Timeline



Apr 17, 2021:

10:23 PM Changeset in webkit [276222] by Chris Dumez
  • 6 edits in trunk

GPUConnectionToWebProcess::allowsExitUnderMemoryPressure() should check if libWebRTCCodecsProxy is used
https://bugs.webkit.org/show_bug.cgi?id=224709

Reviewed by Darin Adler.

Source/WebKit:

If the libWebRTCCodecsProxy has either encoders or decoders then the GPUProcess should not
exit under memory pressure, since it is not idle.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::allowsExitUnderMemoryPressure const):

  • GPUProcess/webrtc/LibWebRTCCodecsProxy.h:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:

(WebKit::LibWebRTCCodecsProxy::createH264Decoder):
(WebKit::LibWebRTCCodecsProxy::createH265Decoder):
(WebKit::LibWebRTCCodecsProxy::createVP9Decoder):
(WebKit::LibWebRTCCodecsProxy::releaseDecoder):
(WebKit::LibWebRTCCodecsProxy::createEncoder):
(WebKit::LibWebRTCCodecsProxy::releaseEncoder):
(WebKit::LibWebRTCCodecsProxy::updateHasEncodersOrDecoders):
(WebKit::LibWebRTCCodecsProxy::allowsExitUnderMemoryPressure const):
Use a std::atomic<bool> to determine if the LibWebRTCCodecsProxy has encoders/decoders since
allowsExitUnderMemoryPressure() gets called on the main thread but m_encoders / m_decoders
get updated on a background thread.

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:

(runMemoryPressureExitTest):
(waitUntilCaptureState):
(TEST):

9:47 PM Changeset in webkit [276221] by commit-queue@webkit.org
  • 10 edits in trunk/Source/WebKit

Unhandled IPC messages should use correct format with the decoder.destinationID() ASSERT message
https://bugs.webkit.org/show_bug.cgi?id=224335

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-17
Reviewed by Antti Koivisto.

Use PRIu64 instead of llu in the ASSERT messages for printing unhandled message destination.
uint64_t is printf'ed with PRIu64.

  • Scripts/webkit/messages.py:

(generate_message_handler):

  • Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp:

(WebKit::TestWithIfMessage::didReceiveMessage):

  • Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp:

(WebKit::TestWithImageData::didReceiveMessage):
(WebKit::TestWithImageData::didReceiveSyncMessage):

  • Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp:

(WebKit::TestWithLegacyReceiver::didReceiveTestWithLegacyReceiverMessage):
(WebKit::TestWithLegacyReceiver::didReceiveSyncTestWithLegacyReceiverMessage):

  • Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp:

(WebKit::TestWithSemaphore::didReceiveMessage):
(WebKit::TestWithSemaphore::didReceiveSyncMessage):

  • Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp:

(WebKit::TestWithStreamBuffer::didReceiveMessage):

  • Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp:

(WebKit::TestWithStream::didReceiveStreamMessage):

  • Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp:

(WebKit::TestWithSuperclass::didReceiveSyncMessage):

  • Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp:

(WebKit::TestWithoutAttributes::didReceiveMessage):
(WebKit::TestWithoutAttributes::didReceiveSyncMessage):

9:24 PM Changeset in webkit [276220] by Wenson Hsieh
  • 13 edits in trunk/Source

[macOS] Add some support for webpage translation in WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=224683
<rdar://problem/75641882>

Reviewed by Darin Adler.

Source/WebCore:

Remove compile-time guards around ContextMenuItemTagAddHighlightToCurrentGroup and
ContextMenuItemTagAddHighlightToNewGroup, so that we can keep these internal WebCore context menu tags in sync
with the SPI-exposed enum values in WebUIDelegatePrivate.h. See WebKitLegacy ChangeLog for more details.

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::checkOrEnableIfNeeded const):

  • platform/ContextMenuItem.cpp:

(WebCore::isValidContextMenuAction):

  • platform/ContextMenuItem.h:

Source/WebKit:

Remove some more compile-time guards, now that the WebCore enum is not conditional on ENABLE(APP_HIGHLIGHT).
See WebCore/ChangeLog for more information.

  • Shared/API/c/WKSharedAPICast.h:

(WebKit::toAPI):
(WebKit::toImpl):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::contextMenuItemSelected):

  • UIProcess/mac/WebContextMenuProxyMac.mm:

(WebKit::menuItemIdentifier):

Source/WebKitLegacy/mac:

Add support for the webpage translation context menu item in WebKitLegacy. See below for more details.

  • WebView/WebHTMLView.mm:

(toAction):
(toTag):

Introduce the WebMenuItemTagTranslate enum value, and use it as the tag value when creating an NSMenuItem
for the Translate action.

(createMenuItem):

  • WebView/WebUIDelegatePrivate.h:

Unfortunately, in order to support a particular internal client of WebKitLegacy, we need to expose
WebMenuItemTagTranslate as an enum value in this existing enumeration of context menu item tags. This is
because the client's implementation of -webView:contextMenuItemsForElement:defaultMenuItems: rejects context
menu items by default, unless the item tag is within the set of item tags that they support.

This client will need to add the enum value of WebMenuItemTagTranslate into their allow-list.

  • WebView/WebView.mm:

(+[WebView _canHandleContextMenuTranslation]):

Softlink against and check with TranslationUIServices to see if we should be showing the Translate menu item.

(-[WebView _handleContextMenuTranslation:selectionBounds:menuLocation:]):

Handle the menu action by creating and presenting a new LTUITranslationViewController using the given
information.

  • WebView/WebViewInternal.h:
8:49 PM Changeset in webkit [276219] by Wenson Hsieh
  • 9 edits in trunk

Remove PromisedAttachmentInfo::blobURL and adjacent code
https://bugs.webkit.org/show_bug.cgi?id=224720

Reviewed by Ryosuke Niwa.

Source/WebCore:

Remove this member of PromisedAttachmentInfo. See WebKit ChangeLog for more details.

  • editing/Editor.cpp:

(WebCore::Editor::promisedAttachmentInfo):

  • platform/PromisedAttachmentInfo.h:

(WebCore::PromisedAttachmentInfo::operator bool const):

Source/WebKit:

The blobURL member of PromisedAttachmentInfo was originally introduced to facilitate drag and drop support
for attachment elements in WebKit2, by writing blob URL data to temporary file paths on behalf of
NSFilePromiseProvider when starting a drag on attachment elements backed by blobs. However, this was
superceded by use of NSFileWrapper and the _WKAttachment SPI instead, such that we only support dragging
attachment elements if they correspond to API Attachment objects in the UI process. This means we can remove
this blobURL, along with the file name and content type members of the struct (which were only added to
support the ability to drag blob-backed attachments).

Code that utilized this member was originally introduced in <https://trac.webkit.org/r235202>, and was
subsequently removed in <https://trac.webkit.org/r240687>.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<PromisedAttachmentInfo>::encode):
(IPC::ArgumentCoder<PromisedAttachmentInfo>::decode):

  • UIProcess/Cocoa/WebViewImpl.mm:

(-[WKPromisedAttachmentContext initWithIdentifier:fileName:]):
(WebKit::WebViewImpl::writeToURLForFilePromiseProvider):
(WebKit::WebViewImpl::startDrag):
(-[WKPromisedAttachmentContext initWithIdentifier:blobURL:fileName:]): Deleted.
(-[WKPromisedAttachmentContext blobURL]): Deleted.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _prepareToDragPromisedAttachment:]):

Tools:

Rebaseline a couple of iOS WKAttachment tests that are failing on recent versions of the iOS SDK. The content
type of text files that are inserted as attachments is now a MIME type rather than a UTI, which is still valid
since it is valid for the content type of an attachment to be either a MIME type or UTI.

  • TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:

(TestWebKitAPI::TEST):

8:40 PM Changeset in webkit [276218] by Chris Dumez
  • 5 edits in trunk/Source/WebKit

Use WebProcess::existingGPUProcessConnection() whenever possible
https://bugs.webkit.org/show_bug.cgi?id=224725

Reviewed by Darin Adler.

Use WebProcess::existingGPUProcessConnection() whenever possible, instead of WebProcess::ensureGPUProcessConnection().
This avoids relaunching the GPUProcess if it has already exited.

  • WebProcess/GPU/media/RemoteAudioHardwareListener.cpp:

(WebKit::RemoteAudioHardwareListener::~RemoteAudioHardwareListener):

  • WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.cpp:

(WebKit::AudioMediaStreamTrackRenderer::~AudioMediaStreamTrackRenderer):

  • WebProcess/cocoa/RemoteRealtimeAudioSource.cpp:

(WebKit::RemoteRealtimeAudioSource::~RemoteRealtimeAudioSource):

  • WebProcess/cocoa/RemoteRealtimeVideoSource.cpp:

(WebKit::RemoteRealtimeVideoSource::~RemoteRealtimeVideoSource):

6:19 PM Changeset in webkit [276217] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Unreviewed, suppress warnings
https://bugs.webkit.org/show_bug.cgi?id=224616

  • runtime/HashMapImpl.h:
  • runtime/HashMapImplInlines.h:

(JSC::areKeysEqual):
(JSC::wangsInt64Hash):

6:03 PM Changeset in webkit [276216] by commit-queue@webkit.org
  • 30 edits
    8 adds in trunk

Add support for inline-{start/end} values to float & clear properties
https://bugs.webkit.org/show_bug.cgi?id=218087

Patch by Tim Nguyen <ntim@apple.com> on 2021-04-17
Reviewed by Antti Koivisto & Zalan Bujtas.

Imported reftests from: https://github.com/web-platform-tests/wpt/commit/47e7176242e2ca4ca68d6cfe032619ccf44d55a6
Enabled: imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear.html

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-box/parsing/clear-computed-expected.txt:
  • web-platform-tests/css/css-box/parsing/clear-valid-expected.txt:
  • web-platform-tests/css/css-box/parsing/float-computed-expected.txt:
  • web-platform-tests/css/css-box/parsing/float-valid-expected.txt:
  • web-platform-tests/css/css-logical/logical-values-float-clear-1-expected.html: Added.
  • web-platform-tests/css/css-logical/logical-values-float-clear-1.html: Added.
  • web-platform-tests/css/css-logical/logical-values-float-clear-2-expected.html: Added.
  • web-platform-tests/css/css-logical/logical-values-float-clear-2.html: Added.
  • web-platform-tests/css/css-logical/logical-values-float-clear-3-expected.html: Added.
  • web-platform-tests/css/css-logical/logical-values-float-clear-3.html: Added.
  • web-platform-tests/css/css-logical/logical-values-float-clear-4-expected.html: Added.
  • web-platform-tests/css/css-logical/logical-values-float-clear-4.html: Added.
  • web-platform-tests/css/css-logical/logical-values-float-clear-expected.txt:
  • web-platform-tests/css/css-logical/w3c-import.log:

Source/WebCore:

Tests: imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-1.html

imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-2.html
imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-3.html
imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-4.html

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator Clear const):
(WebCore::CSSPrimitiveValue::operator Float const):

  • css/CSSValueKeywords.in:
  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

  • display/css/DisplayStyle.cpp:

(WebCore::Display::Style::Style):

  • layout/integration/LayoutIntegrationBoxTree.cpp:

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

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::isFloatingPositioned const):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::createLayoutBox):
(WebCore::Layout::TreeBuilder::buildTableStructure):

  • rendering/ComplexLineLayout.cpp:

(WebCore::ComplexLineLayout::layoutRunsAndFloats):
(WebCore::ComplexLineLayout::layoutRunsAndFloatsInRange):

  • rendering/FloatingObjects.cpp:

(WebCore::FloatingObject::FloatingObject):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::computeBlockPreferredLogicalWidths const):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::marginOffsetForSelfCollapsingBlock):
(WebCore::RenderBlockFlow::marginBeforeEstimateForChild const):
(WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
(WebCore::RenderBlockFlow::positionNewFloats):
(WebCore::RenderBlockFlow::clearFloats):
(WebCore::RenderBlockFlow::getClearDelta):
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):

  • rendering/RenderBlockFlow.h:
  • rendering/line/BreakingContext.h:

(WebCore::BreakingContext::handleBR):

  • rendering/line/LineBreaker.cpp:

(WebCore::LineBreaker::reset):

  • rendering/line/LineBreaker.h:

(WebCore::LineBreaker::usedClear):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::usedClear):
(WebCore::RenderStyle::usedFloat):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::isFloating const):
(WebCore::RenderStyle::initialFloating):

  • rendering/style/RenderStyleConstants.cpp:

(WebCore::operator<<):

  • rendering/style/RenderStyleConstants.h:
  • style/StyleAdjuster.cpp:

(WebCore::Style::Adjuster::adjust const):

LayoutTests:

5:27 PM Changeset in webkit [276215] by Diego Pino Garcia
  • 2 edits
    2 adds in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Emit new baseline after r276193.

  • platform/glib/TestExpectations:
  • platform/glib/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt: Added.
5:10 PM Changeset in webkit [276214] by Chris Dumez
  • 5 edits in trunk/Source

LibWebRTCCodecs eagerly launches the GPUProcess and always relaunches it on exit
https://bugs.webkit.org/show_bug.cgi?id=224704

Reviewed by Darin Adler.

LibWebRTCCodecs eagerly launches the GPUProcess and always relaunches it on exit. The GPUProcess
should only be (re-)launched when needed. In the case of the LibWebRTCCodecs, it seems it only
needs a GPUProcess connection if it has m_decoders / m_encoders are non-empty.

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:

(WebKit::LibWebRTCCodecs::ensureGPUProcessConnectionOnMainThread):
Renamed startListeningForIPC() to ensureGPUProcessConnectionOnMainThread(). Only do the
connection initialization if m_connection is not null.

(WebKit::LibWebRTCCodecs::ensureGPUProcessConnectionAndDispatchToThread):
Version of dispatchToThread() which makes sure that the GPUProcessConnection is initialized
before dispatching. It is used when constructing a decoder / encoder. It sets the
m_needsGPUProcessConnection flag to true to indicate someone needed the connection
(and that we should re-initiate it in case it is severed). If the connection is already
initialized, then it does a simple dispatchToThread(). If the connection is not initialized
yet, then we have to hop to the main thread (if not already on it) to initialize the
GPUProcessConnection.

(WebKit::LibWebRTCCodecs::gpuProcessConnectionMayNoLongerBeNeeded):
Function that gets called on the background thread every time a encoder / decoder is
removed. Its purpose is to set m_needsGPUProcessConnection back to false once we no
longer have any encoder / decoder, so that gpuProcessConnectionDidClose() does not
attempt to relaunch the GPUProcess if it goes away.

LibWebRTCCodecs::setCallbacks():
Check if VP9Support is enabled via PlatformMediaSessionManager instead of from the
GPUProcessConnection. This avoids eagerly launching the GPUProcess. The
GPUProcessConnection constructor gets its VPx support information from
PlatformMediaSessionManager anyway. The WebPage constructor is where the VPx support
information comes from and it updates the VPx flags on the PlatformMediaSessionManager.
The WebPage constructor only updates the VPx flags on the GPUProcessConnection if this
connection already exists to avoid eagerly launching the GPUProcess.

(WebKit::LibWebRTCCodecs::createDecoder):

  • Call ensureGPUProcessConnectionAndDispatchToThread() instead of dispatchToThread() to make sure we have a GPUProcessConnection before creating the decoder.
  • Add a missing locker for m_connectionLock on the background thread since it is using m_connection (pre-existing bug).

(WebKit::LibWebRTCCodecs::releaseDecoder):
Call gpuProcessConnectionMayNoLongerBeNeeded() to reset the m_needsGPUProcessConnection
flag to false if necessary.

(WebKit::LibWebRTCCodecs::createEncoder):

  • Call ensureGPUProcessConnectionAndDispatchToThread() instead of dispatchToThread() to make sure we have a GPUProcessConnection before creating the encoder.

(WebKit::LibWebRTCCodecs::releaseEncoder):
Call gpuProcessConnectionMayNoLongerBeNeeded() to reset the m_needsGPUProcessConnection
flag to false if necessary.

(WebKit::LibWebRTCCodecs::gpuProcessConnectionDidClose):

  • Clear m_connection when the GPUProcess connection is severed (note that this does not necessarily indicate a crash since the GPUProcess exits when idle and under memory pressure).
  • Only re-initiate the GPUProcess connection if m_needsGPUProcessConnection is true, meaning that we have encoders/decoders. I use this flag instead of checking m_encoders & m_decoders since those containers are modified on the background thread and this function is called on the main thread.
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.h:

(WebKit::LibWebRTCCodecs::create):

  • Stop calling startListeningForIPC() on construction as we don't want to launch the GPUProcess

until an encoder / decoder is created.

  • Fix a pre-existing issue where the class subclasses ThreadSafeRefCounted (via ThreadMessageReceiverRefCounted) and yet was using std::unique_ptr<> instead of RefPtr<>.
  • WebProcess/WebProcess.h:
4:55 PM Changeset in webkit [276213] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Unreviewed, reverting r276178.
https://bugs.webkit.org/show_bug.cgi?id=224724

tests still broken

Reverted changeset:

"[ macOS Wk2 ] media/media-fragments/TC0051.html is flakey
crashing"
https://bugs.webkit.org/show_bug.cgi?id=222277
https://trac.webkit.org/changeset/276178

4:22 PM Changeset in webkit [276212] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

RemoteImageDecoderAVFManager should never re-launch the GPUProcess on destruction
https://bugs.webkit.org/show_bug.cgi?id=224723

Reviewed by Darin Adler.

RemoteImageDecoderAVFManager was calling ensureGPUProcessConnection() it is destructor,
just to remove itself as an IPC message receiver. This means it could unnecessarily
relaunch the GPUProcess. This patch addresses that.

This patch also makes it so that RemoteImageDecoderAVFManager registers itself as a
client of the GPUProcessConnection, so that it gets notified when the connection gets
severed. Right now, I only do very basic crash handling but this paves the way to do
better in the future. I did fix a bug where the RemoteImageDecoderAVFManager would
not re-register itself as a message receiver after a GPUProcess re-launch.

  • WebProcess/GPU/media/RemoteImageDecoderAVF.cpp:

(WebKit::RemoteImageDecoderAVF::RemoteImageDecoderAVF):

  • WebProcess/GPU/media/RemoteImageDecoderAVFManager.cpp:

(WebKit::RemoteImageDecoderAVFManager::createImageDecoder):
(WebKit::RemoteImageDecoderAVFManager::deleteRemoteImageDecoder):
(WebKit::RemoteImageDecoderAVFManager::~RemoteImageDecoderAVFManager):
(WebKit::RemoteImageDecoderAVFManager::gpuProcessConnectionDidClose):
(WebKit::RemoteImageDecoderAVFManager::ensureGPUProcessConnection):
(WebKit::RemoteImageDecoderAVFManager::gpuProcessConnection const): Deleted.

  • WebProcess/GPU/media/RemoteImageDecoderAVFManager.h:
3:55 PM Changeset in webkit [276211] by basuke.suzuki@sony.com
  • 6 edits in trunk/Source/WebCore

[Curl] Remove warnings on curl layer.
https://bugs.webkit.org/show_bug.cgi?id=224721

Reviewed by Darin Adler.

Remove unused parameters to prevent warnings. For CurlRequest, it passes
member variable to private method which is meaningless so that it was
removed.

Covered by existing test files.

  • platform/network/curl/CookieJarDB.cpp:

(WebCore::CookieJarDB::createPrepareStatement):

  • platform/network/curl/CurlFormDataStream.cpp:

(WebCore::CurlFormDataStream::read):

  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::setupTransfer):
(WebCore::CurlRequest::setupPUT):
(WebCore::CurlRequest::setupPOST):

  • platform/network/curl/CurlRequest.h:
  • platform/network/curl/NetworkStorageSessionCurl.cpp:

(WebCore::NetworkStorageSession::setCookiesFromDOM const):

3:40 PM Changeset in webkit [276210] by Chris Lord
  • 2 edits in trunk/Source/WebCore

Create local copy of CSSParserContext in CSSPropertyParserWorkerSafe
https://bugs.webkit.org/show_bug.cgi?id=224675

Reviewed by Darin Adler.

Make sure to hold a copy of the CSSParserContext in
CSSPropertyParserWorkerSafe functions as CSSParserImpl only takes a
reference.

  • css/parser/CSSParserWorkerSafe.cpp:
3:38 PM Changeset in webkit [276209] by commit-queue@webkit.org
  • 10 edits in trunk

Consider making CSSStyleSheet::rules() just an alias of CSSStyleSheet::cssRules().
https://bugs.webkit.org/show_bug.cgi?id=197725

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-04-17
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

To match other browsers and the below WPT, CSSStyleSheet.rules now aliases
CSSStyleSheet.cssRulesForBindings, meaning we pass two more tests.

  • web-platform-tests/css/cssom/CSSStyleSheet-expected.txt:

Source/WebCore:

To match other browsers (Blink and Gecko) and pass a WPT, CSSStyleSheet.rules now aliases
CSSStyleSheet.cssRulesForBindings. CSSStyleSheet.rulesForBindings is deleted.

Tested by
imported/w3c/web-platform-tests/css/cssom/CSSStyleSheet.html.

  • css/CSSStyleSheet.cpp:

(WebCore::CSSStyleSheet::rulesForBindings): Deleted.
(WebCore::CSSStyleSheet::rules): Deleted.

  • css/CSSStyleSheet.h:

Change rules() to be an inlined alias for cssRulesForBindings().

  • css/CSSStyleSheet.idl:

Remove [ImplementedAs=rulesForBindings], as this function has been
deleted.

Source/WebKit:

CSSStyleSheet.rules has been changed to alias CSSStyleSheet.cssRulesForBindings. Now,
to access just the CSSRuleList, CSSStyleSheet.cssRules must be called.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:

(webkit_dom_css_style_sheet_get_rules):
Use CSSStyleSheet.cssRules instead of CSSStyleSheet.rules (deleted
with this patch) to get access to the CSSRuleList of this
stylesheet.

Source/WebKitLegacy/mac:

CSSStyleSheet.rules has been changed to alias CSSStyleSheet.cssRulesForBindings. Now,
to access just the CSSRuleList, CSSStyleSheet.cssRules must be called.

  • DOM/DOMCSSStyleSheet.mm:

(-[DOMCSSStyleSheet rules]):
Update this function to call IMPL->cssRules instead of IMPL->rules.

3:21 PM Changeset in webkit [276208] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

Media queries with max-width greater than 999999999px evaluate to false
https://bugs.webkit.org/show_bug.cgi?id=224097

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-04-17
Reviewed by Darin Adler.

We now evaluate <length> values in media queries with double
Source/WebCore:

precision instead of int precision to match other browsers and pass a WPT.

See similar method in Chromium:
https://github.com/chromium/chromium/blob/09a0b960b27f6e08fbe67ad97e6c4fb55ada383f/third_party/blink/renderer/core/css/media_query_evaluator.cc#L436

Test: fast/media/media-query-lengths-evaluate-with-double-precision.html
and WPT imported/w3c/web-platform-tests/css/mediaqueries/min-width-001.xht

  • css/MediaQueryEvaluator.cpp:

(WebCore::computeLength):
Return Optional<double> rather than int& out-value.

(WebCore::deviceHeightEvaluate):
(WebCore::deviceWidthEvaluate):
(WebCore::heightEvaluate):
(WebCore::widthEvaluate):
Evaluate length values as doubles instead of ints.

LayoutTests:

precision instead of int precision to match other browsers and pass another WPT.

Remove ImageOnlyFailure for imported/w3c/web-platform-tests/css/mediaqueries/min-width-001.xht
because it passes now.

  • fast/media/media-query-lengths-evaluate-with-double-precision-expected.html:

Added.

  • fast/media/media-query-lengths-evaluate-with-double-precision.html:

Added to test properties that WPT min-width-001.xht doesn't
(min-height, device-min-height, device-min-width).

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

[Cleanup] Remove redundant BreakingContext::m_currentStyle
https://bugs.webkit.org/show_bug.cgi?id=224717

Reviewed by Antti Koivisto.

  • rendering/line/BreakingContext.h:

(WebCore::BreakingContext::BreakingContext):
(WebCore::BreakingContext::initializeForCurrentObject):
(WebCore::BreakingContext::handleBR):
(WebCore::BreakingContext::handleText):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

1:59 PM Changeset in webkit [276206] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Perform port blocking earlier in the load
https://bugs.webkit.org/show_bug.cgi?id=224525
<rdar://problem/75440591>

Unreviewed follow-up (suggested by David Kilzer)

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::willSendRequest): Restore an m_frame nullptr check.,

1:16 PM Changeset in webkit [276205] by basuke.suzuki@sony.com
  • 3 edits in trunk/Source/WebCore

[clang 11] Remove warning when converting WebCore::maxValueForCssLength from int to float
https://bugs.webkit.org/show_bug.cgi?id=224714

Reviewed by Chris Dumez.

On clang 11, the conversion from const int WebCore::maxValueForCssLength (= 33554429) to
float generates conversion warning:

warning: implicit conversion from 'const int' to 'float' changes value from 33554429 to 33554428

Changing the target type from float to double works for this. Length constructor accept double
so that there's no drawback with this change.

No test because it's compiler behavior.

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertWordSpacing):

1:07 PM Changeset in webkit [276204] by weinig@apple.com
  • 169 edits in trunk/Source

Move RuntimeEnabledFeatures to Settings (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=224440

Reviewed by Alex Christensen.

Move a few RuntimeEnabledFeatures to Settings to consolidate settings
in one object and removes the need for additional boilerplate. This
is now possible as Settings are now accessible in workers.

Moves PeerConnectionEnabled, WebGLUsingMetal, WebGL2Enabled, WebGPUEnabled
and MaskWebGLStringsEnabled.

Source/WebCore:

  • Modules/mediastream/RTCAnswerOptions.idl:
  • Modules/mediastream/RTCCertificate.idl:
  • Modules/mediastream/RTCConfiguration.idl:
  • Modules/mediastream/RTCDTMFSender.idl:
  • Modules/mediastream/RTCDTMFToneChangeEvent.idl:
  • Modules/mediastream/RTCDataChannel.idl:
  • Modules/mediastream/RTCDataChannelEvent.idl:
  • Modules/mediastream/RTCIceCandidate.idl:
  • Modules/mediastream/RTCIceCandidateInit.idl:
  • Modules/mediastream/RTCIceConnectionState.idl:
  • Modules/mediastream/RTCIceGatheringState.idl:
  • Modules/mediastream/RTCIceServer.idl:
  • Modules/mediastream/RTCIceTransport.idl:
  • Modules/mediastream/RTCIceTransportState.idl:
  • Modules/mediastream/RTCOfferAnswerOptions.idl:
  • Modules/mediastream/RTCOfferOptions.idl:
  • Modules/mediastream/RTCPeerConnection.idl:
  • Modules/mediastream/RTCPeerConnectionIceErrorEvent.idl:
  • Modules/mediastream/RTCPeerConnectionIceEvent.idl:
  • Modules/mediastream/RTCPeerConnectionState.idl:
  • Modules/mediastream/RTCPriorityType.idl:
  • Modules/mediastream/RTCRtcpParameters.idl:
  • Modules/mediastream/RTCRtpCapabilities.idl:
  • Modules/mediastream/RTCRtpCodecCapability.idl:
  • Modules/mediastream/RTCRtpCodecParameters.idl:
  • Modules/mediastream/RTCRtpCodingParameters.idl:
  • Modules/mediastream/RTCRtpContributingSource.idl:
  • Modules/mediastream/RTCRtpDecodingParameters.idl:
  • Modules/mediastream/RTCRtpEncodingParameters.idl:
  • Modules/mediastream/RTCRtpFecParameters.idl:
  • Modules/mediastream/RTCRtpHeaderExtensionParameters.idl:
  • Modules/mediastream/RTCRtpParameters.idl:
  • Modules/mediastream/RTCRtpReceiver.idl:
  • Modules/mediastream/RTCRtpRtxParameters.idl:
  • Modules/mediastream/RTCRtpSendParameters.idl:
  • Modules/mediastream/RTCRtpSender.idl:
  • Modules/mediastream/RTCRtpSynchronizationSource.idl:
  • Modules/mediastream/RTCRtpTransceiver.idl:
  • Modules/mediastream/RTCRtpTransceiverDirection.idl:
  • Modules/mediastream/RTCSdpType.idl:
  • Modules/mediastream/RTCSessionDescription.idl:
  • Modules/mediastream/RTCSignalingState.idl:
  • Modules/mediastream/RTCStatsReport.idl:
  • Modules/mediastream/RTCTrackEvent.idl:
  • Modules/webgpu/GPUBindGroupLayoutBinding.idl:
  • Modules/webgpu/GPUBindGroupLayoutDescriptor.idl:
  • Modules/webgpu/GPUBlendDescriptor.idl:
  • Modules/webgpu/GPUBufferDescriptor.idl:
  • Modules/webgpu/GPUBufferUsage.idl:
  • Modules/webgpu/GPUCanvasContext.idl:
  • Modules/webgpu/GPUColor.idl:
  • Modules/webgpu/GPUColorStateDescriptor.idl:
  • Modules/webgpu/GPUColorWrite.idl:
  • Modules/webgpu/GPUCompareFunction.idl:
  • Modules/webgpu/GPUDepthStencilStateDescriptor.idl:
  • Modules/webgpu/GPUErrorFilter.idl:
  • Modules/webgpu/GPUExtent3D.idl:
  • Modules/webgpu/GPULoadOp.idl:
  • Modules/webgpu/GPUOrigin3D.idl:
  • Modules/webgpu/GPUOutOfMemoryError.idl:
  • Modules/webgpu/GPURequestAdapterOptions.idl:
  • Modules/webgpu/GPUSamplerDescriptor.idl:
  • Modules/webgpu/GPUShaderStage.idl:
  • Modules/webgpu/GPUStoreOp.idl:
  • Modules/webgpu/GPUTextureDescriptor.idl:
  • Modules/webgpu/GPUTextureFormat.idl:
  • Modules/webgpu/GPUTextureUsage.idl:
  • Modules/webgpu/GPUUncapturedErrorEvent.idl:
  • Modules/webgpu/GPUValidationError.idl:
  • Modules/webgpu/GPUVertexAttributeDescriptor.idl:
  • Modules/webgpu/GPUVertexBufferDescriptor.idl:
  • Modules/webgpu/GPUVertexInputDescriptor.idl:
  • Modules/webgpu/Navigator+GPU.idl:
  • Modules/webgpu/NavigatorGPU.cpp:
  • Modules/webgpu/WebGPU.idl:
  • Modules/webgpu/WebGPUAdapter.idl:
  • Modules/webgpu/WebGPUBindGroup.idl:
  • Modules/webgpu/WebGPUBindGroupBinding.idl:
  • Modules/webgpu/WebGPUBindGroupDescriptor.idl:
  • Modules/webgpu/WebGPUBindGroupLayout.idl:
  • Modules/webgpu/WebGPUBuffer.idl:
  • Modules/webgpu/WebGPUBufferBinding.idl:
  • Modules/webgpu/WebGPUCommandBuffer.idl:
  • Modules/webgpu/WebGPUCommandEncoder.idl:
  • Modules/webgpu/WebGPUComputePassEncoder.idl:
  • Modules/webgpu/WebGPUComputePipeline.idl:
  • Modules/webgpu/WebGPUComputePipelineDescriptor.idl:
  • Modules/webgpu/WebGPUDevice.idl:
  • Modules/webgpu/WebGPUDeviceErrorScopes.idl:
  • Modules/webgpu/WebGPUDeviceEventHandler.idl:
  • Modules/webgpu/WebGPUPipelineDescriptorBase.idl:
  • Modules/webgpu/WebGPUPipelineLayout.idl:
  • Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl:
  • Modules/webgpu/WebGPUProgrammablePassEncoder.idl:
  • Modules/webgpu/WebGPUProgrammableStageDescriptor.idl:
  • Modules/webgpu/WebGPUQueue.idl:
  • Modules/webgpu/WebGPURenderPassDescriptor.idl:
  • Modules/webgpu/WebGPURenderPassEncoder.idl:
  • Modules/webgpu/WebGPURenderPipeline.idl:
  • Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
  • Modules/webgpu/WebGPUSampler.idl:
  • Modules/webgpu/WebGPUShaderModule.idl:
  • Modules/webgpu/WebGPUShaderModuleDescriptor.idl:
  • Modules/webgpu/WebGPUSwapChain.idl:
  • Modules/webgpu/WebGPUTexture.idl:
  • Modules/webgpu/WebGPUTextureView.idl:
  • Modules/webgpu/WorkerNavigator+GPU.idl:
  • Modules/webgpu/WorkerNavigatorGPU.cpp:
  • Modules/webxr/Navigator+WebXR.idl:
  • Modules/webxr/WebXRBoundedReferenceSpace.idl:
  • Modules/webxr/WebXRFrame.idl:
  • Modules/webxr/WebXRInputSource.idl:
  • Modules/webxr/WebXRInputSourceArray.idl:
  • Modules/webxr/WebXRLayer.idl:
  • Modules/webxr/WebXRPose.idl:
  • Modules/webxr/WebXRReferenceSpace.idl:
  • Modules/webxr/WebXRRenderState.idl:
  • Modules/webxr/WebXRRigidTransform.idl:
  • Modules/webxr/WebXRSession.idl:
  • Modules/webxr/WebXRSpace.idl:
  • Modules/webxr/WebXRSystem.cpp:
  • Modules/webxr/WebXRSystem.idl:
  • Modules/webxr/WebXRView.idl:
  • Modules/webxr/WebXRViewerPose.idl:
  • Modules/webxr/WebXRViewport.idl:
  • Modules/webxr/WebXRWebGLLayer.idl:
  • Modules/webxr/XREnvironmentBlendMode.idl:
  • Modules/webxr/XREye.idl:
  • Modules/webxr/XRHandedness.idl:
  • Modules/webxr/XRInputSourceEvent.idl:
  • Modules/webxr/XRInputSourcesChangeEvent.idl:
  • Modules/webxr/XRInteractionMode.idl:
  • Modules/webxr/XRReferenceSpaceEvent.idl:
  • Modules/webxr/XRReferenceSpaceType.idl:
  • Modules/webxr/XRRenderStateInit.idl:
  • Modules/webxr/XRSessionEvent.idl:
  • Modules/webxr/XRSessionInit.idl:
  • Modules/webxr/XRSessionMode.idl:
  • Modules/webxr/XRTargetRayMode.idl:
  • Modules/webxr/XRVisibilityState.idl:
  • Modules/webxr/XRWebGLLayerInit.idl:
  • html/HTMLCanvasElement.cpp:
  • html/canvas/WebGL2RenderingContext.cpp:
  • html/canvas/WebGL2RenderingContext.idl:
  • html/canvas/WebGLRenderingContextBase.cpp:
  • html/canvas/WebGLTransformFeedback.idl:
  • html/canvas/WebGLVertexArrayObject.idl:
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::peerConnectionEnabled const): Deleted.
(WebCore::RuntimeEnabledFeatures::setPeerConnectionEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setWebGLUsingMetal): Deleted.
(WebCore::RuntimeEnabledFeatures::webGLUsingMetal const): Deleted.
(WebCore::RuntimeEnabledFeatures::setWebGL2Enabled): Deleted.
(WebCore::RuntimeEnabledFeatures::webGL2Enabled const): Deleted.
(WebCore::RuntimeEnabledFeatures::setWebGPUEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::webGPUEnabled const): Deleted.
(WebCore::RuntimeEnabledFeatures::setMaskWebGLStringsEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::maskWebGLStringsEnabled const): Deleted.

  • testing/FakeXRBoundsPoint.idl:
  • testing/FakeXRButtonStateInit.idl:
  • testing/FakeXRInputSourceInit.idl:
  • testing/FakeXRRigidTransformInit.idl:
  • testing/FakeXRViewInit.idl:
  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setWebGL2Enabled): Deleted.
(WebCore::InternalSettings::setWebGPUEnabled): Deleted.

  • testing/InternalSettings.h:
  • testing/InternalSettings.idl:
  • testing/Internals.cpp:
  • testing/WebFakeXRDevice.idl:
  • testing/WebFakeXRInputController.idl:
  • testing/WebXRTest.idl:
  • testing/XRSimulateUserActivationFunction.idl:

Source/WebKit:

  • WebProcess/Inspector/RemoteWebInspectorUI.cpp:

(WebKit::RemoteWebInspectorUI::RemoteWebInspectorUI):

  • WebProcess/Inspector/WebInspectorUI.cpp:

(WebKit::WebInspectorUI::enableFrontendFeatures):
(WebKit::WebInspectorUI::WebInspectorUI):

  • WebProcess/Inspector/WebInspectorUI.h:

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml:
  • Scripts/Preferences/WebPreferencesExperimental.yaml:
12:02 PM Changeset in webkit [276203] by commit-queue@webkit.org
  • 5 edits in trunk

Don't omit conic gradient starting angle when serializing when starting angle is under 0
https://bugs.webkit.org/show_bug.cgi?id=224719

Patch by Tim Nguyen <ntim@apple.com> on 2021-04-17
Reviewed by Ryosuke Niwa.

Updated pre-existing test to cover this case.

Test: LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub.html

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub-expected.txt:
  • web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub.html:

Source/WebCore:

  • css/CSSGradientValue.cpp:

(WebCore::CSSConicGradientValue::customCSSText const):

11:22 AM Changeset in webkit [276202] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[Cleanup] Modernize TrailingObjects
https://bugs.webkit.org/show_bug.cgi?id=224712

Reviewed by Antti Koivisto.

Remove redundant c'tor and start using enum class.

  • rendering/line/BreakingContext.h:

(WebCore::BreakingContext::handleText):
(WebCore::checkWhitespaceCollapsingTransitions):
(WebCore::BreakingContext::handleEndOfLine):

  • rendering/line/TrailingObjects.cpp:

(WebCore::TrailingObjects::updateWhitespaceCollapsingTransitionsForTrailingBoxes):

  • rendering/line/TrailingObjects.h:

(WebCore::TrailingObjects::setTrailingWhitespace):
(WebCore::TrailingObjects::clear):
(WebCore::TrailingObjects::TrailingObjects): Deleted.

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

[Cleanup] BreakingContext::handleText should consistently use the cached renderer
https://bugs.webkit.org/show_bug.cgi?id=224711

Reviewed by Antti Koivisto.

Since this function is not supposed to increment the renderer, let's replace m_current.renderer() with "renderer".

  • rendering/line/BreakingContext.h:

(WebCore::BreakingContext::handleText):

  • rendering/line/TrailingObjects.h:

(WebCore::TrailingObjects::setTrailingWhitespace):

6:48 AM Changeset in webkit [276200] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[Cleanup] inlineLogicalWidth should take const RenderObject&
https://bugs.webkit.org/show_bug.cgi?id=224700

Reviewed by Antti Koivisto.

  1. inlineLogicalWidth takes const RenderObject& now.
  2. Both previousInFlowSibling and shouldAddBorderPaddingMargin moved to inlineLogicalWidth
  • rendering/line/BreakingContext.h:

(WebCore::inlineLogicalWidth):
(WebCore::BreakingContext::handleOutOfFlowPositioned):
(WebCore::BreakingContext::handleEmptyInline):
(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::handleText):
(WebCore::shouldAddBorderPaddingMargin): Deleted.
(WebCore::previousInFlowSibling): Deleted.

5:20 AM Changeset in webkit [276199] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

Do not configure Janitor to delete old logs in local testing mode
https://bugs.webkit.org/show_bug.cgi?id=224552

Reviewed by Jonathan Bedard.

  • CISupport/build-webkit-org/master_buildbot2.cfg:
  • CISupport/ews-build/master.cfg:
5:08 AM Changeset in webkit [276198] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

Unreviewed, GTK LTS build fix after r276197

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::configureMediaStreamAudioTracks):

4:23 AM Changeset in webkit [276197] by Philippe Normand
  • 9 edits in trunk

[GStreamer][MediaStream] fast/mediastream/play-newly-added-audio-track.html is failing since added in r260380
https://bugs.webkit.org/show_bug.cgi?id=210840

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

The test was failing mainly because our mediastreamsrc GStreamer element wasn't creating the
corresponding AudioTrackPrivateMediaStream object. The media player should propagate its
volume/mute/is-playing states to the source element. And also until now our mediastreamsrc
element was handling at most one audio track and at most one audio track, but it turns out
multiple audio tracks can be added actually. So I refactored the element internals
accordingly. The InternalSource is now directly observing the corresponding
RealtimeMediaSource, which simplified some code. Observing is also now suspended/resumed
depending on the element state.

We don't implement a GStreamer AudioMediaStreamTrackRenderer class yet, because actual
rendering is still performed from the WebProcess, so early returns were added in
AudioTrackPrivateMediaStream to handle this case.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::updateTracks):
(WebCore::MediaPlayerPrivateGStreamer::configureMediaStreamAudioTracks):
(WebCore::MediaPlayerPrivateGStreamer::setVolume):
(WebCore::MediaPlayerPrivateGStreamer::setMuted):
(WebCore::MediaPlayerPrivateGStreamer::updateStates):
(WebCore::MediaPlayerPrivateGStreamer::didEnd):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
  • platform/mediastream/AudioTrackPrivateMediaStream.cpp:

(WebCore::AudioTrackPrivateMediaStream::createRenderer):
(WebCore::AudioTrackPrivateMediaStream::setLogger):
(WebCore::AudioTrackPrivateMediaStream::clear):
(WebCore::AudioTrackPrivateMediaStream::setVolume):
(WebCore::AudioTrackPrivateMediaStream::setAudioOutputDevice):
(WebCore::AudioTrackPrivateMediaStream::volume const):
(WebCore::AudioTrackPrivateMediaStream::audioSamplesAvailable):
(WebCore::AudioTrackPrivateMediaStream::startRenderer):
(WebCore::AudioTrackPrivateMediaStream::stopRenderer):
(WebCore::AudioTrackPrivateMediaStream::createNewRenderer):

  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:

(mediaStreamTrackPrivateGetTags):
(WebKitMediaStreamObserver::didRemoveTrack):
(webkitMediaStreamSrcConstructed):
(webkitMediaStreamSrcDispose):
(webkitMediaStreamSrcChangeState):
(webkitMediaStreamSrcPostStreamCollection):
(webkitMediaStreamSrcAddPad):
(ProbeData::ProbeData):
(webkitMediaStreamSrcPadProbeCb):
(webkitMediaStreamSrcAddTrack):
(webkitMediaStreamSrcSetStream):
(webkitMediaStreamSrcTrackEnded):
(InternalSource::trackEnded):
(webkitMediaStreamSrcConfigureAudioTracks):

  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.h:

LayoutTests:

Remove flakyness from test and unflag it on GTK.

  • fast/mediastream/play-newly-added-audio-track.html: addTrack might have asynchronous

effects, so it's better to rely on the trackadded event when testing its result.

  • platform/gtk/TestExpectations:
2:03 AM Changeset in webkit [276196] by commit-queue@webkit.org
  • 2 edits
    1 add in trunk/Tools/buildstream

REGRESSION(r275755): [GStreamer] Crashes on surfaceless i915 platforms
https://bugs.webkit.org/show_bug.cgi?id=224416

Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-17
Reviewed by Adrian Perez de Castro.

Vendor potential fix for https://gitlab.freedesktop.org/mesa/mesa/-/issues/778.

  • elements/sdk/mesa.bst:
  • patches/mesa/0001-i915-Prevent-invalid-framebuffer-usage.patch: Added.

Apr 16, 2021:

10:03 PM Changeset in webkit [276195] by Lauro Moura
  • 3 edits in trunk/Tools

REGRESSION(r276164) [GTK] WKPreferencesDefaults API test is failing
https://bugs.webkit.org/show_bug.cgi?id=224710

Reviewed by Alex Christensen.

As of r276164, Mac/iOS disabled application cache by default but other
ports are still enabling it.

  • TestWebKitAPI/Tests/WebKit/WKPreferences.cpp:

(TestWebKitAPI::TEST): Add missing WPE guard and test against expected
port value instead of enforcing a single value for every port.

  • TestWebKitAPI/glib/TestExpectations.json: Remove WPE expected

failure.

9:45 PM Changeset in webkit [276194] by Diego Pino Garcia
  • 1 edit
    2 copies
    2 adds
    1 delete in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Update focus-visible tests baselines after r276127.

  • platform/glib/imported/w3c/web-platform-tests/css/selectors/focus-visible-002-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/css/selectors/focus-visible-003-expected.txt: Renamed from LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/selectors/focus-visible-003-expected.txt.
  • platform/glib/imported/w3c/web-platform-tests/css/selectors/focus-visible-004-expected.txt: Renamed from LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/selectors/focus-visible-004-expected.txt.
8:22 PM Changeset in webkit [276193] by Brent Fulgham
  • 29 edits
    4 copies
    2 adds in trunk

Perform port blocking earlier in the load
https://bugs.webkit.org/show_bug.cgi?id=224525
<rdar://problem/75440591>

Reviewed by Darin Adler.

Source/WebCore:

WebKit blocks loads to URLs with any of the prohibited ports defined in
the engine. This blocking happens late in the load process, allowing
connections to be made (and observed). Instead, we should stop the load
early, at the same time we perform other checks.

Test: http/tests/security/form-blocked-port.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::isSafeToLoadURL): Add a check for prohibited ports,
and block (with relevant logging) if a load to a denied port is attempted.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::willSendRequest): Ditto.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadFrameRequest): Ditto.
(WebCore::FrameLoader::reportBlockedLoadFailed): Ditto.

  • loader/FrameLoader.h:
  • loader/PingLoader.cpp:

(WebCore::PingLoader::loadImage): Ditto.

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::init): Ditto.

  • loader/SubframeLoader.cpp:

(WebCore::FrameLoader::SubframeLoader::pluginIsLoadable): Ditto.
(WebCore::FrameLoader::SubframeLoader::loadSubframe): Ditto.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::canRequest): Ditto.
(WebCore::CachedResourceLoader::canRequestAfterRedirection const): Ditto.

Tools:

Update URLScheme test to use a non-prohibited port for the test. Tests of
failed fetches are already handled in WPT and other tests, so using a valid
port here should continue to be a valid test.

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

(-[FrameSchemeHandler webView:startURLSchemeTask:]): Use allowed port or the test
instead of 123.

LayoutTests:

WebKit blocks loads to URLs with any of the prohibited ports defined in
the engine. This blocking happens late in the load process, allowing
connections to be made (and observed). Instead, we should stop the load
early, at the same time we perform other checks.

Note: The fact that we now block loads earlier means that we do not fire
'willSendRequestForFrame' for blocked ports, so WebKitTestRunner no longer
outputs a message to stdout. Those errors are reported in the JS console,
but since some test paths are specified to always output JS console messages
to stderrr (for example the WPT tests), we have to revise out test expectations
for a few cases.

  • fast/loader/cancel-load-during-port-block-timer.html: Revised expectation to reflect new console error message.
  • http/tests/cache/cancel-during-failure-crash-expected.txt: Ditto.
  • http/tests/preload/download_resources_from_invalid_headers-expected.txt: Update to reflect a preflight is not executed for a blocked port.
  • http/tests/preload/resources/nph-invalid_resources_from_header.pl: Update to reflect that we do not preload from restricted ports.
  • http/tests/security/blocked-on-redirect-expected.txt: Revised expectation to match revised error message.
  • http/tests/security/form-blocked-port.html: Added.
  • http/tests/security/form-blocked-port-expected.txt: Added.
  • http/tests/xmlhttprequest/cross-origin-redirect-responseURL-expected.txt: Revised expectation for revised error message.
  • http/tests/xmlhttprequest/redirect-cross-origin-2-expected.txt: Ditto.
  • http/tests/xmlhttprequest/redirect-cross-origin-expected.txt: Ditto.
  • http/tests/xmlhttprequest/simple-cross-origin-denied-events.html: Instead of using a port WebKit blocks (7), use one that is not blocked but is unlikely to be active (as originally intended). This retains the expected test behavior since we now block loads to restricted ports earlier in the load process.
  • http/tests/xmlhttprequest/simple-cross-origin-denied-events-post.html: Ditto.
  • http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt: Update test output to reflect that we are attempting to load from port 8 instead of port 7.
  • http/wpt/beacon/beacon-async-error-logging-expected.txt: Ditto.
  • http/wpt/beacon/beacon-async-error-logging.html: Update to reflect a preflight is not executed for a blocked port.
  • imported/w3c/web-platform-tests/fetch/api/request/request-bad-port.any-expected.txt: Since we block before executing the load, TestRunner no longer outputs an error message to stdout. Instead, they appear in stderr (since all 'wpt' tests are marked to dump console.log output to stderr).
  • imported/w3c/web-platform-tests/fetch/api/request/request-bad-port.any.worker-expected.txt: Ditto.
  • platform/mac-wk1/http/tests/xmlhttprequest/redirect-cross-origin-post-expected.txt: Revise to reflect change in console logging (the functional test results are identical).
  • platform/mac-wk1/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt: Ditto.
  • platform/win/http/tests/xmlhttprequest/redirect-cross-origin-post-expected.txt: Ditto.
  • platform/win/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt: Ditto.
  • platform/wk2/http/tests/security/blocked-on-redirect-expected.txt: Ditto.
8:12 PM Changeset in webkit [276192] by basuke.suzuki@sony.com
  • 2 edits in trunk/Source/WebCore

Use WebKit macro to detect 64bit in RenderLayerBacking.h
https://bugs.webkit.org/show_bug.cgi?id=224707

Reviewed by Yusuke Suzuki.

There's no definition of WORDSIZE in some environment. Also there's WebKit macro for that.

warning: 'WORDSIZE' is not defined, evaluates to 0 [-Wundef]
#if
WORDSIZE == 64 && PLATFORM(COCOA)


No test because it's compiler behavior.

  • rendering/RenderLayerBacking.h:
7:32 PM Changeset in webkit [276191] by rniwa@webkit.org
  • 14 edits in trunk/Source

Deploy Ref/RefPtr in Editor
https://bugs.webkit.org/show_bug.cgi?id=224708

Reviewed by Wenson Hsieh.

Source/WebCore:

Deployed smart pointers in WebCore::Editor.

Also deployed ScriptDisallowedScope around the code which accesses the render tree.

  • dom/Position.cpp:

(WebCore::Position::containerOrParentElement const): Added.

  • dom/Position.h:
  • editing/Editor.cpp:

(WebCore::Editor::selectionForCommand):
(WebCore::Editor::pasteAsPlainText):
(WebCore::Editor::pasteAsFragment):
(WebCore::Editor::shouldInsertFragment):
(WebCore::Editor::replaceSelectionWithFragment):
(WebCore::Editor::respondToChangedContents):
(WebCore::Editor::hasBidiSelection const):
(WebCore::Editor::selectionUnorderedListState const):
(WebCore::Editor::selectionOrderedListState const):
(WebCore::Editor::findEventTargetFrom const):
(WebCore::Editor::findEventTargetFromSelection const):
(WebCore::notifyTextFromControls):
(WebCore::Editor::willApplyEditing const):
(WebCore::Editor::appliedEditing):
(WebCore::Editor::insertTextWithoutSendingTextEvent):
(WebCore::Editor::performCutOrCopy):
(WebCore::Editor::simplifyMarkup): Replaced the manual tree traversal by treeOrder(~).
(WebCore::Editor::copyImage):
(WebCore::Editor::setBaseWritingDirection):
(WebCore::Editor::baseWritingDirectionForSelectionStart const):
(WebCore::Editor::setComposition):
(WebCore::Editor::advanceToNextMisspelling):
(WebCore::Editor::markMisspellingsAfterTypingToWord): Use containerOrParentElement.
(WebCore::Editor::isSpellCheckingEnabledFor const):
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
(WebCore::Editor::markAndReplaceFor):
(WebCore::scanForTelephoneNumbers):
(WebCore::Editor::scanSelectionForTelephoneNumbers): Restrucuted the code with makeScopeExit
to exit early instead of nesting if's.
(WebCore::findFirstMarkable):
(WebCore::Editor::selectionStartHasMarkerFor const):
(WebCore::Editor::resolveTextCheckingTypeMask):
(WebCore::Editor::stringForCandidateRequest const):
(WebCore::Editor::fontAttributesAtSelectionStart):
(WebCore::Editor::promisedAttachmentInfo):
(WebCore::Editor::styleForSelectionStart):
(WebCore::Editor::fontForSelection):

  • editing/Editor.h:
  • page/DragController.cpp:

(WebCore::DragController::dispatchTextInputEventFor):

Source/WebKit:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::editorState const):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::requestAutocorrectionData):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::fontAtSelection):

Source/WebKitLegacy/mac:

  • WebView/WebFrame.mm:

(-[WebFrame fontForSelection:]):

  • WebView/WebHTMLView.mm:

(-[WebHTMLView _updateFontPanel]):

  • WebView/WebView.mm:

(-[WebView updateTextTouchBar]):

7:06 PM Changeset in webkit [276190] by commit-queue@webkit.org
  • 3 edits in trunk/Source/ThirdParty/ANGLE

Metal-ANGLE: Shared memory texture tests failing in iOS Simulator
https://bugs.webkit.org/show_bug.cgi?id=222685

Patch by Kyle Piddington <Kyle Piddington> on 2021-04-16
Reviewed by Dean Jackson.

Simulator-only path drives filling textures via Blit encoders instead of mapped memory.
This workaround fixes dropped texture writes when using replaceRegion

  • src/libANGLE/renderer/metal/TextureMtl.mm:
  • src/libANGLE/renderer/metal/mtl_utils.mm:

(rx::mtl::InitializeTextureContents):

6:30 PM Changeset in webkit [276189] by Chris Dumez
  • 7 edits in trunk

RemoteAudioDestinationProxy should not launch / relaunch the GPUProcess unless it is actually rendering
https://bugs.webkit.org/show_bug.cgi?id=224691

Reviewed by Geoffrey Garen.

Source/WebKit:

RemoteAudioDestinationProxy was initiating a connection to the GPUProcess in its constructor and
re-initiating the connection right away upon GPUProcess crash. This goes against our recent efforts
to run the GPUProcess only when it is actually needed. The RemoteAudioDestinationProxy really only
needs the GPUProcess when it is actually rendering / playing.

  • GPUProcess/media/RemoteAudioDestinationManager.cpp:

(WebKit::RemoteAudioDestinationManager::allowsExitUnderMemoryPressure const):
Allow the GPUProcess to exit when under memory pressure even if it has AudioDestinations, as long
as they are not playing.

  • WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:

(WebKit::RemoteAudioDestinationProxy::RemoteAudioDestinationProxy):
(WebKit::RemoteAudioDestinationProxy::ensureGPUProcessConnection):
(WebKit::RemoteAudioDestinationProxy::~RemoteAudioDestinationProxy):
(WebKit::RemoteAudioDestinationProxy::startRendering):
(WebKit::RemoteAudioDestinationProxy::stopRendering):
(WebKit::RemoteAudioDestinationProxy::storageChanged):
(WebKit::RemoteAudioDestinationProxy::gpuProcessConnectionDidClose):

  • WebProcess/GPU/media/RemoteAudioDestinationProxy.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/audio-context-playing.html:
6:24 PM Changeset in webkit [276188] by Chris Dumez
  • 4 edits
    2 adds in trunk

[GPUProcess] Crash under RemoteAudioDestination::render()
https://bugs.webkit.org/show_bug.cgi?id=224688
<rdar://76643365>

Reviewed by Eric Carlson.

Source/WebKit:

When the connection between the GPUProcess and the WebProcess was severed,
GPUConnectionToWebProcess::didClose() would get called and end up destroying
the RemoteAudioDestination object on the main thread. The issue is that the
RemoteAudioDestination may be playing at the time and we would end up
destroying the RemoteAudioDestination object without stopping rendering
first. As a result, we would crash on the background thread in the
RemoteAudioDestination::render() function, trying to use the m_ringBuffer
data member that got destroyed on the main thread.

To address this, I updated the RemoteAudioDestination destructor so that it
stops rendering if necessary. AudioOutputUnitStop() is synchronous so this
ensures render() is done running on the background thread (and won't be
called again) before proceeding with the destruction of the data members.

Test: webaudio/AudioContext/audiocontext-destruction-crash.html

  • GPUProcess/media/RemoteAudioDestinationManager.cpp:

Updated the class to stop subclassing ThreadSafeRefCounted. This class does
not need RefCounting at all. I updated the call site to use UniqueRef<>.

(WebKit::RemoteAudioDestination::create): Deleted.
Drop this factory function and made the constructor public now that we no longer
subclass ThreadSafeRefCounted and use makeUniqueRef<>() at the call site.

(WebKit::RemoteAudioDestination::scheduleGracefulShutdownIfNeeded): Deleted.
Stop this function now that the destructor takes care of shutting down gracefully.

(WebKit::RemoteAudioDestination::RemoteAudioDestination):
Made the constructor public.

(WebKit::RemoteAudioDestination::render):

  • Stop checking m_protectThisDuringGracefulShutdown on the background thread. This data member is not needed since stop() is synchronous. It was also not thread-safe since m_protectThisDuringGracefulShutdown was set on the main thread and we are on the audio thread here.
  • Similarly, drop the check for m_isPlaying. m_isPlaying is not atomic so the check was not thread safe. Even if m_isPlaying was atomic, m_isPlaying get set to true *after* calling m_audioOutputUnitAdaptor.start() so render() may early return even though we were playing. Also, this check is not needed since we set m_isPlaying to false after calling m_audioOutputUnitAdaptor.stop() and the stop() call is synchronous and should not return until the audio thread stopped rendering.
  • GPUProcess/media/RemoteAudioDestinationManager.h:

LayoutTests:

Add layout test that can flakily reproduce the issue.

  • webaudio/AudioContext/audiocontext-destruction-crash-expected.txt: Added.
  • webaudio/AudioContext/audiocontext-destruction-crash.html: Added.
6:08 PM Changeset in webkit [276187] by Darin Adler
  • 7 edits in trunk

font-size with viewport units in calc() doesn't change when viewport resizes
https://bugs.webkit.org/show_bug.cgi?id=224614

Reviewed by Zalan Bujtas.

Source/WebCore:

  • css/CSSToLengthConversionData.cpp:

(WebCore::CSSToLengthConversionData::zoom const): Updated since m_zoom is now optional.
We use effectiveZoom when m_zoom is not specified, which is the same semantic that was
implemented before with a separate boolean.
(WebCore::CSSToLengthConversionData::viewportWidthFactor const): When calling the
setHasViewportUnits function as a side effect, use m_viewportDependencyDetectionStyle,
rather than always using m_style. This lets us handle the font-size case correctly.
Also removed the explicit computingFontSize check for the same reason.
(WebCore::CSSToLengthConversionData::viewportHeightFactor const): Ditto.
(WebCore::CSSToLengthConversionData::viewportMinFactor const): Ditto.
(WebCore::CSSToLengthConversionData::viewportMaxFactor const): Ditto.

  • css/CSSToLengthConversionData.h: Added a new member, m_viewportDependencyDetectionStyle,

which defaults to the same value as m_style. Also changed m_zoom to use Optional instead
of a separate boolean and an ignored "must be 1.0" value. Initialized data members in
the modern way, allowing us to use the default constructor.

  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyValueFontSize): Pass in the builder's style as the
viewportDependencyDetectionStyle. This does the same thing that the existing code to
call setHasViewportUnits did directly, but does it even for more complex cases involving
calc(). Also made the isLength and isCalculatedPercentageWithLength cases more similar
to each other and left a FIXME behind about taking that a bit further, but doing that
probably requires creating some more test cases.

LayoutTests:

  • css3/viewport-percentage-lengths/viewport-percentage-lengths-resize-expected.txt:
  • css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html:

Added tests that involve calc, and broke rules up into multiple elements so that side
effects from one style won't give us false negatives. This now has a subtest that was
failing without the fix in this patch.

5:57 PM Changeset in webkit [276186] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Nullptr deref in CompositeEditCommand::isRemovableBlock in DeleteSelectionCommand::removeRedundantBlocks
https://bugs.webkit.org/show_bug.cgi?id=224518

Patch by Ian Gilbert <iang@apple.com> on 2021-04-16
Reviewed by Ryosuke Niwa.

Source/WebCore:

Add null check in case node is removed while iterating over tree.

Test: editing/execCommand/remove-node-during-command-crash.html

  • editing/DeleteSelectionCommand.cpp:

(WebCore::DeleteSelectionCommand::removeRedundantBlocks):

LayoutTests:

Add a regression test.

  • editing/execCommand/remove-node-during-command-crash-expected.txt: Added.
  • editing/execCommand/remove-node-during-command-crash.html: Added.
5:38 PM Changeset in webkit [276185] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

The RemoteRemoteCommandListener destructor should never (re-)launch the GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=224701

Reviewed by Eric Carlson.

The RemoteRemoteCommandListener destructor should never (re-)launch the GPUProcess,
just to unregister itself. If the GPUProcess is not running, then the
RemoteRemoteCommandListener is not registered.

  • WebProcess/GPU/media/RemoteRemoteCommandListener.cpp:

(WebKit::RemoteRemoteCommandListener::~RemoteRemoteCommandListener):
(WebKit::RemoteRemoteCommandListener::gpuProcessConnectionDidClose):

5:14 PM Changeset in webkit [276184] by jiewen_tan@apple.com
  • 13 edits in trunk

Pass credential name to the WebAuthn UI during registration
https://bugs.webkit.org/show_bug.cgi?id=224697
<rdar://75803352>

Reviewed by Brent Fulgham.

Source/WebKit:

Covered by new test contents within existing test files.

  • Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:

Paperwork for the new SPI.

  • UIProcess/API/APIWebAuthenticationPanel.cpp:

(API::WebAuthenticationPanel::create):
(API::WebAuthenticationPanel::WebAuthenticationPanel):

  • UIProcess/API/APIWebAuthenticationPanel.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

(-[_WKWebAuthenticationPanel userName]):
Adds a new userName property.

  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:

(WebKit::WebCore::getUserName):
(WebKit::AuthenticatorManager::runPanel):
(WebKit::AuthenticatorManager::runPresenter):
Passes the userName to the UI.

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

Paperwork for the new SPI.

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

(WebKit::AuthenticatorPresenterCoordinator::AuthenticatorPresenterCoordinator):
Passes the userName to the new SPI.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST):

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

Re-land Cherry-pick r275846. rdar://problem/76727548

4:55 PM Changeset in webkit [276182] by Cameron McCormack
  • 37 edits
    2 copies
    8 adds in trunk

Place vertical scrollbars at (inline/block)-end edge in all writing modes.
https://bugs.webkit.org/show_bug.cgi?id=224224

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-scroll-snap/snap-inline-block-expected.txt:
  • web-platform-tests/css/cssom-view/scrollLeftTop-expected.txt:

Source/WebCore:

Tests: fast/scrolling/v-rl-scrollbars-initial-position-dynamic.html

fast/scrolling/v-rl-scrollbars-initial-position.html
fast/scrolling/vertical-scrollbar-position.html

We currently only consider moving a vertical scrollbar to the left for
writing-mode: horizontal-{tb,bt}; direction: rtl containers. But
ideally we should always place the vertical scrollbar at the end edge
of the container (whether that's the inline-end edge, when using a
horizontal writing mode, or the block-end edge, when using a vertical
writing mode).

Some functions calling the existing shouldPlaceBlockDirectionScrollbarOnLeft
instead really care about whether the vertical scrollbar is on the
left, not whether the block direction scrollbar is on the left (since
for vertical writing modes, the block direction scrollbar is the
horizontal one on the bottom). So we rename this to
shouldPlaceVerticalScrollbarOnLeft, make it return true for
writing-mode: vertical-rl, and adjust callers that really do care
only about block direction scrollbars to additionally check their
writing mode.

  • page/EventHandler.cpp:

(WebCore::EventHandler::selectCursor):

  • page/FrameView.cpp:

(WebCore::FrameView::shouldPlaceVerticalScrollbarOnLeft const):

  • page/FrameView.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin const):
(WebCore::ScrollView::updateScrollbars):
(WebCore::ScrollView::scrollCornerRect const):
(WebCore::ScrollView::locationOfContents const):

  • platform/ScrollableArea.h:
  • platform/adwaita/ScrollbarThemeAdwaita.cpp:

(WebCore::ScrollbarThemeAdwaita::paint):

  • platform/gtk/ScrollbarThemeGtk.cpp:

(WebCore::widgetTypeForScrollbar):
(WebCore::ScrollbarThemeGtk::paint):

  • platform/mac/ScrollbarThemeMac.mm:

(WebCore::ScrollbarThemeMac::didCreateScrollerImp):

  • platform/win/PopupMenuWin.h:
  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::logicalLeftOffsetForContent const):
(WebCore::RenderBlock::logicalRightOffsetForContent const):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::determineLogicalLeftPositionForChild):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::paddingBoxRect const):
(WebCore::RenderBox::contentBoxLocation const):
(WebCore::RenderBox::overflowClipRect const):
(WebCore::RenderBox::computePositionedLogicalWidth const):
(WebCore::RenderBox::flippedClientBoxRect const):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::constrainingRectForStickyPosition const):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::resize):
(WebCore::RenderLayer::overflowControlsRects const):
(WebCore::RenderLayer::offsetFromResizeCorner const):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::positionForClipLayer const):

  • rendering/RenderLayerModelObject.cpp:

(WebCore::RenderLayerModelObject::shouldPlaceVerticalScrollbarOnLeft const):

  • rendering/RenderLayerModelObject.h:
  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::shouldPlaceVerticalScrollbarOnLeft const):
(WebCore::RenderLayerScrollableArea::overflowControlsRects const):
(WebCore::RenderLayerScrollableArea::computeScrollOrigin):
(WebCore::RenderLayerScrollableArea::updateScrollbarsAfterLayout):
(WebCore::RenderLayerScrollableArea::drawPlatformResizerImage):
(WebCore::RenderLayerScrollableArea::hitTestResizerInFragments const):
(WebCore::RenderLayerScrollableArea::updateScrollbarsAfterStyleChange):

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

(WebCore::RenderListBox::itemBoundingBoxRect):
(WebCore::RenderListBox::paintScrollbar):
(WebCore::RenderListBox::isPointInOverflowControl):
(WebCore::RenderListBox::listIndexAtOffset):
(WebCore::RenderListBox::invalidateScrollbarRect):
(WebCore::RenderListBox::convertFromScrollbarToContainingView const):
(WebCore::RenderListBox::convertFromContainingViewToScrollbar const):

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

(WebCore::RenderView::repaintViewRectangle const):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::shouldPlaceVerticalScrollbarOnLeft const):

  • rendering/style/RenderStyle.h:

Source/WebKit:

  • UIProcess/win/WebPopupMenuProxyWin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.h:

LayoutTests:

iOS test failure expectations and skips are because we don't support
non-overlay scrollbars on the left on that platform.

  • TestExpectations:
  • css3/flexbox/child-overflow-expected.html:
  • fast/repaint/vertical-overflow-parent-expected.txt:
  • fast/repaint/vertical-overflow-same-expected.txt:
  • fast/scrolling/v-rl-scrollbars-initial-position-dynamic-expected.html: Added.
  • fast/scrolling/v-rl-scrollbars-initial-position-dynamic.html: Added.
  • fast/scrolling/v-rl-scrollbars-initial-position-expected.html: Added.
  • fast/scrolling/v-rl-scrollbars-initial-position.html: Added.
  • fast/scrolling/vertical-scrollbar-position-expected.txt: Added.
  • fast/scrolling/vertical-scrollbar-position.html: Added.
  • platform/ios/TestExpectations:
  • platform/ios/imported/w3c/web-platform-tests/css/css-scroll-snap/snap-inline-block-expected.txt: Added.
  • platform/ios/imported/w3c/web-platform-tests/css/cssom-view/scrollLeftTop-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollLeftTop-expected.txt.
4:53 PM Changeset in webkit [276181] by Wenson Hsieh
  • 21 edits in trunk/Source

[macOS] Refactor some webpage translation code
https://bugs.webkit.org/show_bug.cgi?id=224680
Work towards <rdar://75641882>

Reviewed by Tim Horton.

Source/WebCore:

In preparation for fixing https://webkit.org/b/224683, refactor some codepaths for handling webpage translation
via the context menu on macOS, in WebKit2.

Currently, the context menu action for ContextMenuItemTagTranslate is fully handled in the client layer in
WebKit2, using state in m_activeContextMenuContextData. However, to make this action work in WebKitLegacy as
well, we need the ability to call back into the ContextMenuController to handle the action, since context menu
actions in WebKitLegacy only target the shared WebMenuTarget instance, which only knows about the context menu
controller rather than the WebHTMLView that vended the menu item.

Instead of adding logic in WebMenuTarget to dig the WebHTMLView corresponding to the focused frame out of
the context menu controller, it makes more sense to plumb this call through the (already-established)
ContextMenuClient. While this has the disadvantage of requiring an extra IPC hop on the WebKit2 case, it also
has the advantage that we can lazily compute the selection bounds and menu location in root view coordinates
only if the user has selected this menu action, which makes context menu data (slightly) cheaper to compute.

No change in behavior.

  • loader/EmptyClients.cpp:
  • page/ContextMenuClient.h:
  • page/ContextMenuContext.h:

(WebCore::ContextMenuContext::setSelectionBounds): Deleted.
(WebCore::ContextMenuContext::selectionBounds const): Deleted.

Remove code for computing and setting selection bounds. This was only added in support of webpage translation;
instead of computing this up front, we can instead send this information only when the action is invoked.

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::contextMenuItemSelected):

Move logic for computing the selection bounds and menu location in root view coordinates out of populate and
into contextMenuItemSelected, only in the case where the action is ContextMenuItemTagTranslate.

(WebCore::ContextMenuController::populate):

Source/WebKit:

See WebCore ChangeLog for more details.

  • Shared/ContextMenuContextData.cpp:

(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::encode const):
(WebKit::ContextMenuContextData::decode):

  • Shared/ContextMenuContextData.h:

Remove selectionBounds. We don't need this anymore, because we'll instead compute the selection bounds only
when the Translate menu item is selected, instead of relying on m_activeContextMenuContextData being up to
date.

(WebKit::ContextMenuContextData::selectedText const):
(WebKit::ContextMenuContextData::selectionBounds const): Deleted.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::handleContextMenuTranslation):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::contextMenuItemSelected):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebContextMenuClient.h:
  • WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:

(WebKit::WebContextMenuClient::handleTranslation):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::handleContextMenuTranslation):

  • WebProcess/WebPage/WebPage.h:

Source/WebKitLegacy/mac:

See WebCore ChangeLog for more details.

  • WebCoreSupport/WebContextMenuClient.h:
  • WebCoreSupport/WebContextMenuClient.mm:

(WebContextMenuClient::handleTranslation):

  • WebView/WebView.mm:

(-[WebView _handleContextMenuTranslation:selectionBounds:menuLocation:]):

Add an empty stub with a FIXME for the time being.

  • WebView/WebViewInternal.h:
4:52 PM Changeset in webkit [276180] by jiewen_tan@apple.com
  • 17 edits in trunk

Allow using the platform authenticator on non-Touch ID Macs according to Internal requirements
https://bugs.webkit.org/show_bug.cgi?id=224639
<rdar://74698346>

Reviewed by Daniel Bates.

Source/WebCore:

Covered by new tests within existing test files.

  • testing/MockWebAuthenticationConfiguration.h:
  • testing/MockWebAuthenticationConfiguration.idl:

Mock testing support.

Source/WebKit:

  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:

(WebKit::LocalAuthenticator::continueMakeCredentialAfterDecidePolicy):
(WebKit::LocalAuthenticator::continueMakeCredentialAfterUserVerification):
(WebKit::LocalAuthenticator::continueGetAssertionAfterResponseSelected):
(WebKit::LocalAuthenticator::continueGetAssertionAfterUserVerification):
Don't set the UserVerification bit if UserVerification is not done.

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

(WebKit::LocalConnection::verifyUser):
Only check UserPresence on non-Touch ID Macs.

  • UIProcess/WebAuthentication/Cocoa/LocalService.mm:

(WebKit::LocalService::isAvailable):
Make the platform authenticator available according to Internal requirements.

  • UIProcess/WebAuthentication/Mock/MockLocalConnection.h:
  • UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:

(WebKit::MockLocalConnection::verifyUser):
Mock testing support.

  • UIProcess/WebAuthentication/WebAuthenticationRequestData.cpp:

(WebKit::getUserVerificationRequirement):

  • UIProcess/WebAuthentication/WebAuthenticationRequestData.h:

Add a helper for extracting the UserVerification input.

LayoutTests:

  • http/wpt/webauthn/public-key-credential-create-success-local.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-success-local.https.html:
  • http/wpt/webauthn/public-key-credential-get-success-local.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-success-local.https.html:
4:32 PM Changeset in webkit [276179] by Russell Epstein
  • 8 edits in branches/safari-611-branch/Source/WebKit

Revert "Cherry-pick r275846. rdar://problem/76727548"

This reverts commit r276116.

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

[ macOS Wk2 ] media/media-fragments/TC0051.html is flakey crashing
https://bugs.webkit.org/show_bug.cgi?id=222277

Uneviewed test gardening.

  • platform/mac-wk2/TestExpectations: Removing skip expectation to verify fix.
3:54 PM Changeset in webkit [276177] by Peng Liu
  • 42 edits
    2 adds
    1 delete in trunk/Source

[GPUP] WebContent process should not create AVOutputContext instances when media in GPU Process is enabled
https://bugs.webkit.org/show_bug.cgi?id=224469

Reviewed by Eric Carlson.

Source/WebCore:

This patch modifies MediaPlaybackTargetContext to provide interfaces to serialize/deserialize
AVOutputContext and modifies MediaPlaybackTargetCocoa to use MediaPlaybackTargetContext to
manage its AVOutputContext instead of keeping a pointer to the AVOutputContext object.
With these changes, a WebContent process can forward a serialized AVOutputContext object
to other processes (e.g., the GPU process) without deserializing it. Therefore, the WebContent
process does not need access to the CoreMedia routing service. So we can remove the fix (r275669)
for bug 224328.

Covered by existing tests.

  • Modules/airplay/WebMediaSessionManager.cpp:

(WebCore::WebMediaSessionManager::setMockMediaPlaybackTargetPickerState):

  • Modules/airplay/WebMediaSessionManager.h:
  • Headers.cmake:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:

Modify the project file because MediaPlaybackTargetContext is used in Cocoa ports only.

  • page/ChromeClient.h:

(WebCore::ChromeClient::setMockMediaPlaybackTargetPickerState):

  • page/Page.cpp:

(WebCore::Page::setMockMediaPlaybackTargetPickerState):

  • page/Page.h:
  • platform/graphics/MediaPlaybackTarget.h:

(WebCore::MediaPlaybackTarget::hasActiveRoute const):
(WebCore::MediaPlaybackTarget::deviceName const):
(WebCore::MediaPlaybackTarget::supportsRemoteVideoPlayback):
(): Deleted.

  • platform/graphics/MediaPlaybackTargetContext.h: Removed.
  • platform/graphics/avfoundation/MediaPlaybackTargetCocoa.h:

(WebCore::MediaPlaybackTargetCocoa::outputContext const): Deleted.

  • platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm:

(WebCore::MediaPlaybackTargetCocoa::create):
(WebCore::MediaPlaybackTargetCocoa::MediaPlaybackTargetCocoa):
(WebCore::MediaPlaybackTargetCocoa::~MediaPlaybackTargetCocoa):
(WebCore::toMediaPlaybackTargetCocoa):
(WebCore::MediaPlaybackTargetCocoa::supportsRemoteVideoPlayback const): Deleted.
(WebCore::MediaPlaybackTargetCocoa::targetContext const): Deleted.
(WebCore::MediaPlaybackTargetCocoa::hasActiveRoute const): Deleted.
(WebCore::MediaPlaybackTargetCocoa::deviceName const): Deleted.
Don't directly use AVOutputContext in this class.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget):

  • platform/graphics/cocoa/MediaPlaybackTargetContext.h: Added.

(WebCore::MediaPlaybackTargetContext::MediaPlaybackTargetContext):
(WebCore::MediaPlaybackTargetContext::type const):
(WebCore::MediaPlaybackTargetContext::mockState const):
(WebCore::MediaPlaybackTargetContext::outputContext const):
(WebCore::MediaPlaybackTargetContext::serializedOutputContext const):
(WebCore::MediaPlaybackTargetContext::encodingRequiresPlatformData const):

  • platform/graphics/cocoa/MediaPlaybackTargetContext.mm: Added.

(WebCore::MediaPlaybackTargetContext::MediaPlaybackTargetContext):
(WebCore::MediaPlaybackTargetContext::deviceName const):
(WebCore::MediaPlaybackTargetContext::hasActiveRoute const):
(WebCore::MediaPlaybackTargetContext::supportsRemoteVideoPlayback const):
(WebCore::MediaPlaybackTargetContext::serializeOutputContext):
(WebCore::MediaPlaybackTargetContext::deserializeOutputContext):

  • platform/mock/MediaPlaybackTargetMock.cpp:

(WebCore::MediaPlaybackTargetMock::create):
(WebCore::MediaPlaybackTargetMock::MediaPlaybackTargetMock):
(WebCore::toMediaPlaybackTargetMock):
(WebCore::MediaPlaybackTargetMock::targetContext const): Deleted.

  • platform/mock/MediaPlaybackTargetMock.h:

(WebCore::MediaPlaybackTargetMock::state const):

  • platform/mock/MediaPlaybackTargetPickerMock.cpp:

(WebCore::MediaPlaybackTargetPickerMock::externalOutputDeviceAvailable):
(WebCore::MediaPlaybackTargetPickerMock::startingMonitoringPlaybackTargets):
(WebCore::MediaPlaybackTargetPickerMock::invalidatePlaybackTargets):
(WebCore::MediaPlaybackTargetPickerMock::setState):

  • platform/mock/MediaPlaybackTargetPickerMock.h:
  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setMockMediaPlaybackTargetPickerState):

Source/WebKit:

  • Scripts/webkit/messages.py: Fix clean build failures on the WinCairo port.
  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::setWirelessPlaybackTarget):

  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/ios/RemoteMediaSessionHelperProxy.cpp:

(WebKit::RemoteMediaSessionHelperProxy::activeVideoRouteDidChange):

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<WebCore::MediaPlaybackTargetContext>::encodePlatformData):
(IPC::ArgumentCoder<WebCore::MediaPlaybackTargetContext>::decodePlatformData):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<MediaPlaybackTargetContext>::encode):
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • Shared/mac/WebCoreArgumentCodersMac.mm:

(IPC::ArgumentCoder<WebCore::MediaPlaybackTargetContext>::encodePlatformData): Deleted.
(IPC::ArgumentCoder<WebCore::MediaPlaybackTargetContext>::decodePlatformData): Deleted.

  • UIProcess/WebPageProxy.cpp:

(WebKit::mediaRelatedIOKitClasses):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerState):
(WebKit::WebPageProxy::setPlaybackTarget):
(WebKit::temporaryMachServices): Deleted.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/GPU/media/ios/RemoteMediaSessionHelper.cpp:

(WebKit::RemoteMediaSessionHelper::activeVideoRouteDidChange):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::setMockMediaPlaybackTargetPickerState):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::playbackTargetSelected const):

Source/WebKitLegacy/mac:

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

(WebChromeClient::setMockMediaPlaybackTargetPickerState):

  • WebView/WebMediaPlaybackTargetPicker.h:
  • WebView/WebMediaPlaybackTargetPicker.mm:

(WebMediaPlaybackTargetPicker::setMockMediaPlaybackTargetPickerState):

  • WebView/WebView.mm:

(-[WebView _setMockMediaPlaybackTargetPickerName:state:]):

  • WebView/WebViewInternal.h:
3:50 PM Changeset in webkit [276176] by Kate Cheney
  • 4 edits in trunk

Disable app-bound request API tests on specific OS versions
https://bugs.webkit.org/show_bug.cgi?id=223692
<rdar://problem/75787288>

Reviewed by Brent Fulgham.

Source/WTF:

  • wtf/PlatformEnableCocoa.h:

Tools:

These test rely on internal additions only available on certain OS
versions. We should disable them on other versions.

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
3:28 PM Changeset in webkit [276175] by Ruben Turcios
  • 5 edits in branches/safari-611-branch/Source/JavaScriptCore

Cherry-pick r276155. rdar://problem/76781047

Before deleting a MarkedBlock we do not need to clear its m_directory pointer.
https://bugs.webkit.org/show_bug.cgi?id=224677

Reviewed by Yusuke Suzuki.

Right now when we are about to free a MarkedBlock we clear the
m_directory pointer in the MarkedBlock's Handle. This has the
downside, however, of potentially paging in the footer from disk /
the compressor, which some data we have seen shows is happening.
This patch prevents this uncessary store to hopefully reduce the
number of pageins/decompressions caused by Safari web content.

  • heap/BlockDirectory.cpp: (JSC::BlockDirectory::removeBlock): (JSC::BlockDirectory::removeBlockForDeletion):
  • heap/BlockDirectory.h:
  • heap/MarkedBlock.cpp: (JSC::MarkedBlock::Handle::~Handle):
  • heap/MarkedSpace.cpp: (JSC::MarkedSpace::freeBlock):

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

3:16 PM Changeset in webkit [276174] by Robert Jenner
  • 2 edits in trunk/LayoutTests

N[ BigSur Release wk2 ARM64 ] inspector/console/console-oom.html is a flakey crash
https://bugs.webkit.org/show_bug.cgi?id=224698

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Updating expectations to Pass Crash for BigSur Release arm64 only.
2:56 PM Changeset in webkit [276173] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Unreviewed non-unified build fix.

  • loader/DocumentThreadableLoader.cpp: Add missing FrameLoader.h header.
2:55 PM Changeset in webkit [276172] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ BigSur wk2 ARM64 ] http/wpt/webrtc/change-encoded-transform.html is a flakey crash
https://bugs.webkit.org/show_bug.cgi?id=224696

Unreviewed test gardneing.

  • platform/mac-wk2/TestExpectations: Updating test expectations to Pass Crash while test is reviewed.
2:34 PM Changeset in webkit [276171] by Russell Epstein
  • 1 edit in branches/safari-611-branch/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp

Unreviewed build fix, rdar://problem/76412930

WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp:283:327: error: no member named 'Timeout' in namespace 'IPC'

2:22 PM Changeset in webkit [276170] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(?): Graphics: dropping a recording leaves behind a drop zone view
https://bugs.webkit.org/show_bug.cgi?id=224648

Reviewed by BJ Burg.

  • UserInterface/Views/GraphicsTabContentView.js:

(WI.GraphicsTabContentView.prototype.initialLayout):
It appears that it's possible for re-entrancy issues in the WI.View system since the
_didInitialLayout flag isn't set until _after_ initialLayout returns, meaning that if
the logic inside initialLayout triggers a synchronous layout then that second layout
won't know that it's already in the middle of an initialLayout. In this case, showing the
WI.GraphicsOverviewContentView causes the navigation sidebar to be shown, which forces a
synchronous layout from handling WI.Sidebar.Event.WidthDidChange. For now, there's no
"rush" to show the WI.GraphicsOverviewContentView so we delay it by one event loop turn.

  • UserInterface/Views/CanvasContentView.js:

(WI.CanvasContentView.prototype.initialLayout):
(WI.CanvasContentView.prototype.dropZoneShouldAppearForDragEvent): Deleted.
(WI.CanvasContentView.prototype.dropZoneHandleDrop): Deleted.
There's no reason to have another WI.DropZoneView here since there's already one that
covers the entire tab.

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

Remove redundant renderObject in BreakingContext::handleText
https://bugs.webkit.org/show_bug.cgi?id=224682

Reviewed by Darin Adler.

  • rendering/line/BreakingContext.h:

(WebCore::BreakingContext::handleText):

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

[ macOS wk2 ]compositing/video/video-border-radius-clipping.html is a flakey image failure
https://bugs.webkit.org/show_bug.cgi?id=224690

Unreviewed test gardneing.

  • platform/mac-wk2/TestExpectations: Updating test expectations to include Debug.
2:07 PM Changeset in webkit [276167] by basuke.suzuki@sony.com
  • 4 edits in trunk/Source/WebCore

[PlayStation][OpenSSL] Remove warnings.
https://bugs.webkit.org/show_bug.cgi?id=224630

Reviewed by Don Olmstead.

There're two kinds of warnings in curl and openssl layer in our platform.

a) Unused param

b) 'WORDSIZE' is not defined.
warning: '
WORDSIZE' is not defined, evaluates to 0 [-Wundef]
#if WORDSIZE >= 64

No new tests because it's only for compilation issue.

  • crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:

(WebCore::CryptoAlgorithmAES_GCM::encrypt):
(WebCore::CryptoAlgorithmAES_GCM::decrypt):

  • crypto/openssl/CryptoKeyECOpenSSL.cpp:

(WebCore::CryptoKeyEC::platformGeneratePair):
(WebCore::CryptoKeyEC::platformImportRaw):
(WebCore::CryptoKeyEC::platformImportJWKPublic):
(WebCore::CryptoKeyEC::platformImportJWKPrivate):
(WebCore::CryptoKeyEC::platformImportSpki):
(WebCore::CryptoKeyEC::platformImportPkcs8):

  • crypto/openssl/CryptoKeyRSAOpenSSL.cpp:

(WebCore::CryptoKeyRSA::create):
(WebCore::CryptoKeyRSA::generatePair):
(WebCore::CryptoKeyRSA::importSpki):
(WebCore::CryptoKeyRSA::importPkcs8):

1:55 PM Changeset in webkit [276166] by Said Abou-Hallawa
  • 4 edits in trunk/LayoutTests

[BigSur wk1] svg/canvas/canvas-global-alpha-svg.html is flakey failing
https://bugs.webkit.org/show_bug.cgi?id=221559
<rdar://problem/74104075>

Reviewed by Daniel Bates.

By default, aliasing is applied when drawing the SVGImage to the canvas
through CanvasRenderingContext2D::drawImage() and when drawing the canvas
itself to DOM container through ImageBuffer::draw(). Because the test
includes only rectangles, we need to make sure the edges of the SVG image
and the canvas in this test get pixelated. This will match the expected
page which uses DOM objects to mimic the SVG and canvas drawing

Make sure the test is ended only after the SVG image is fully loaded.

  • platform/ios/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • svg/canvas/canvas-global-alpha-svg.html:
1:54 PM Changeset in webkit [276165] by Robert Jenner
  • 2 edits in trunk/LayoutTests

N[ wk2 ] media/presentationmodechanged-fired-once.html is a flakey timeout
https://bugs.webkit.org/show_bug.cgi?id=224633

Unreviewed test gardneing.

  • platform/ios-simulator-wk2/TestExpectations: Forgot to update expectations for iOS as well.
1:41 PM Changeset in webkit [276164] by commit-queue@webkit.org
  • 11 edits in trunk

Disable ApplicationCache with linkedOnOrAfter check
https://bugs.webkit.org/show_bug.cgi?id=224629

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-16
Reviewed by Brady Eidson.

Source/WebCore:

ApplicationCache has been deprecated for two years in WebKit with a message to developers since r227225.

Firefox removed support in https://bugzilla.mozilla.org/show_bug.cgi?id=1619673 which shipped with Firefox 84 on Dec 15, 2020.

Chrome removed support in https://bugs.chromium.org/p/chromium/issues/detail?id=582750 by default in Chrome 85 on August 25, 2020
but they have a reverse origin trial program running right now so that some origins have it working, but they are planning to remove
even that support October 2021.

We have kept it working for a reason related to rdar://38505756, specifically the 4th and 5th comment in that bug.
That reason is now passed.

This patch removes support for new apps but keeps it working for 3rd party apps linked with existing SDKs. Once those apps update
to a new SDK, they will be unable to use ApplicationCache. They will need to migrate to use fetch service workers instead.

  • platform/cocoa/VersionChecks.h:

Source/WebKit:

  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultOfflineWebApplicationCacheEnabled):

  • Shared/WebPreferencesDefaultValues.h:

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml:

Tools:

  • TestWebKitAPI/Tests/WebKit/WKPreferences.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:

(TEST):

  • WebKitTestRunner/TestOptions.cpp:

(WTR::TestOptions::defaults):

1:35 PM Changeset in webkit [276163] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ wk2 ] media/presentationmodechanged-fired-once.html is a flakey timeout
https://bugs.webkit.org/show_bug.cgi?id=224633

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Updating test expectations to Pass Timeout while test is reviewed.
1:27 PM WebKitGTK/Debugging edited by Michael Catanzaro
Also consistently use GST_DEBUG_NO_COLOR=1 (diff)
1:26 PM WebKitGTK/Debugging edited by Michael Catanzaro
Recommend WEBKIT_FORCE_SANDBOX=0 (diff)
12:59 PM Changeset in webkit [276162] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

More changes to support the TerminationException.
https://bugs.webkit.org/show_bug.cgi?id=224681
rdar://76698113

Reviewed by Keith Miller.

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::executeProgram):

  • ProgramExecutable::initializeGlobalProperties() can throw the TerminationException. Add handling for that.
  • runtime/JSObject.cpp:

(JSC::JSObject::defineOwnIndexedProperty):

  • JSObject::defineOwnIndexedProperty() has a blob of assertion code that it verifying that getOwnPropertyDescriptor() should succeed without throwing any exceptions if the fast path is allowed. However, this is assertion is only true if there isn't a termination being requested. So, use the DeferTermination scope to allow this assertion to be tested without the complication of a TerminationException.
12:42 PM Changeset in webkit [276161] by Russell Epstein
  • 8 edits in branches/safari-612.1.11-branch/Source

Versioning.

WebKit-7612.1.11.1

12:39 PM Changeset in webkit [276160] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit

Add WKUIDelegate SPI for starting XR session
https://bugs.webkit.org/show_bug.cgi?id=224634

Patch by Ada Chan <ada.chan@apple.com> on 2021-04-16
Reviewed by Tim Horton.

  • UIProcess/API/APIUIClient.h:

(API::UIClient::startXRSession):

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::startXRSession):

12:28 PM Changeset in webkit [276159] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Unreviewed, reverting r273733.
https://bugs.webkit.org/show_bug.cgi?id=224686

Broke mouse wheel scrolling speed

Reverted changeset:

"Eliminate ScrollAnimatorGeneric::m_smoothAnimation"
https://bugs.webkit.org/show_bug.cgi?id=222588
https://trac.webkit.org/changeset/273733

12:26 PM Changeset in webkit [276158] by Russell Epstein
  • 19 edits in branches/safari-611-branch/Source

Cherry-pick r275485. rdar://problem/76412930

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

Reviewed by Darin Adler.

Source/WebCore:

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

  • platform/cocoa/VersionChecks.h:

Source/WebKit:

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

To make the view blank, the approach chosen is the set the opacity of our
root layer to 0 when the JS prompt is requested (before the first paint) and
set the opacity back to 1 after the first paint.

To minimize the risks of breakage, the behavior change is behind a
linked-on-after check. Also, we only trigger this behavior if the WKWebView
client actually implements the corresponding JS prompt delegate.

  • UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::UIClient::runJavaScriptAlert): (WebKit::UIDelegate::UIClient::runJavaScriptConfirm): (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
  • UIProcess/PageClient.h: (WebKit::PageClient::makeViewBlank):
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::stopMakingViewBlankDueToLackOfRenderingUpdate): (WebKit::WebPageProxy::makeViewBlankIfUnpaintedSinceLastLoadCommit): (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::runJavaScriptAlert):
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::makeViewBlank):
  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::didCommitLayerTree):
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::makeViewBlank):
  • UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::didUpdateRenderingAfterCommittingLoad):
  • WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::runJavaScriptAlert): (WebKit::WebChromeClient::runJavaScriptConfirm): (WebKit::WebChromeClient::runJavaScriptPrompt): Add flag to make sure pending async messages are processed *before* the JS prompt sync IPCs. Without this, it was possible for the UIProcess to receive the JS prompt IPC *before* the DidCommitLoadForFrame IPC, which would confuse our logic, since we would think this is a JS prompt for the previous page.
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didCommitLoad):
  • WebProcess/WebPage/WebPage.h: (WebKit::WebPage::sendSyncWithDelayedReply):
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updateRendering):
  • WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::didUpdateRendering):

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

12:26 PM Changeset in webkit [276157] by Russell Epstein
  • 11 edits in branches/safari-611-branch

Cherry-pick r274565. rdar://problem/76412930

Maybe-regression(STP121): window.open flakily returning null
https://bugs.webkit.org/show_bug.cgi?id=222590
<rdar://problem/75211786>

Reviewed by Geoffrey Garen.

Source/WebKit:

This was an IPC ordering bug. WebPageProxy::DidCommitLoadForFrame is async and WebPageProxy::CreateNewPage is
sync. As a result, it was possible for the WebPageProxy::CreateNewPage to get processed *BEFORE* the
WebPageProxy::DidCommitLoadForFrame IPC. This was causing trouble because Safari rejects the popup opening if
the main frame is doing a provisional load.

To address the issue, introduce a new IPC::SendSyncOption::MaintainOrderingWithAsyncMessages flag and
use it on WebPageProxy::CreateNewPage sync IPC so that it gets processed in order with surrounding async
messages.

  • Platform/IPC/Connection.cpp: (IPC::Connection::SyncMessageState::processIncomingMessage): (IPC::Connection::sendSyncMessage):
  • Platform/IPC/Connection.h:
  • Platform/IPC/Decoder.cpp: (IPC::Decoder::shouldMaintainOrderingWithAsyncMessages const):
  • Platform/IPC/Decoder.h:
  • Platform/IPC/Encoder.cpp: (IPC::Encoder::setShouldMaintainOrderingWithAsyncMessages):
  • Platform/IPC/Encoder.h:
  • Platform/IPC/MessageFlags.h:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createWindow):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKit/ModalAlertsSPI.cpp: (TestWebKitAPI::TEST): (TestWebKitAPI::checkFrameLoadStateAndCreateNewPage):

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

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

Cherry-pick r274819. rdar://problem/76373741

AVAudioSessionCaptureDeviceManager should use crossThreadCopy
https://bugs.webkit.org/show_bug.cgi?id=223565
<rdar://75480589>

Reviewed by Youenn Fablet.

Tested manually, this can only be tested on device.

  • platform/mediastream/CaptureDevice.h: Change access restriction for member variables from private: to protected: so derived classes can access them directly.
  • platform/mediastream/ios/AVAudioSessionCaptureDevice.h:
  • platform/mediastream/ios/AVAudioSessionCaptureDevice.mm: (WebCore::AVAudioSessionCaptureDevice::AVAudioSessionCaptureDevice): New constructor. (WebCore::AVAudioSessionCaptureDevice::isolatedCopy const): New.
  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm: (WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices): Use WTFMove(deviceList).isolatedCopy() when moving from AVAudioSession queue to main thread. (WebCore::AVAudioSessionCaptureDeviceManager::getCaptureDevices): Ditto.

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

12:24 PM Changeset in webkit [276155] by keith_miller@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

Before deleting a MarkedBlock we do not need to clear its m_directory pointer.
https://bugs.webkit.org/show_bug.cgi?id=224677

Reviewed by Yusuke Suzuki.

Right now when we are about to free a MarkedBlock we clear the
m_directory pointer in the MarkedBlock's Handle. This has the
downside, however, of potentially paging in the footer from disk /
the compressor, which some data we have seen shows is happening.
This patch prevents this uncessary store to hopefully reduce the
number of pageins/decompressions caused by Safari web content.

  • heap/BlockDirectory.cpp:

(JSC::BlockDirectory::removeBlock):
(JSC::BlockDirectory::removeBlockForDeletion):

  • heap/BlockDirectory.h:
  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::Handle::~Handle):

  • heap/MarkedSpace.cpp:

(JSC::MarkedSpace::freeBlock):

12:22 PM Changeset in webkit [276154] by commit-queue@webkit.org
  • 5 edits in trunk/Source

Reduce maximum HashTable entry size to 128 bytes
https://bugs.webkit.org/show_bug.cgi?id=224381

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-16
Reviewed by Yusuke Suzuki.

Source/WebCore:

  • inspector/agents/InspectorAnimationAgent.cpp:

(WebCore::InspectorAnimationAgent::willApplyKeyframeEffect):
(WebCore::InspectorAnimationAgent::stopTrackingDeclarativeAnimation):

  • inspector/agents/InspectorAnimationAgent.h:

Source/WTF:

  • wtf/HashTable.h:

(WTF::KeyTraits>::inlineLookup):

12:20 PM Changeset in webkit [276153] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed, reverting r275839.

The new release assertion is hitting to easily in client apps

Reverted changeset:

"Make sure AuxiliaryProcessProxy::sendMessage() is called on
the main thread"
https://bugs.webkit.org/show_bug.cgi?id=224448
https://commits.webkit.org/r275839

12:19 PM Changeset in webkit [276152] by commit-queue@webkit.org
  • 45 edits
    1 copy
    5 adds in trunk

[css-counter-styles] Parse and add feature flag for @counter-style
https://bugs.webkit.org/show_bug.cgi?id=223150

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-04-16
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

@counter-style and its descriptors are now exposed behind a feature
flag, so pass some tests and fail others for a different reason
because this patch doesn't actually implement descriptor parsing and
setting yet.

  • web-platform-tests/css/css-counter-styles/counter-style-additive-symbols-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-fallback-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-name-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-negative-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-pad-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-prefix-suffix-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-range-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-speak-as-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-symbols-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-system-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/idlharness-expected.txt:
  • web-platform-tests/css/cssom/CSSCounterStyleRule-expected.txt:

Source/WebCore:

Parse @counter-style (without implementing descriptor parsing) behind
a new feature flag, CSSCounterStyleAtRulesEnabled. A separate feature
flag for @counter-style <image> symbol values has also been added, as
image symbols have extra complexities that we won't want to hold the
entire feature back on.
https://www.w3.org/TR/css-counter-styles-3

The CSSCounterStyleRule IDL interface is also added and implemented,
and similarly feature flagged.
https://www.w3.org/TR/css-counter-styles-3/#apis

Test: webexposed/counter-style-is-not-exposed.html and existing WPTs.

  • CMakeLists.txt:

Add CSSCounterStyleRule.idl.

  • DerivedSources-input.xcfilelist:

Add CSSCounterStyleRule.idl.

  • DerivedSources-output.xcfilelist:

Add JSCSSCounterStyleRule.h and JSCSSCounterStyleRule.cpp.

  • DerivedSources.make:

Add CSSCounterStyleRule.idl.

  • Sources.txt:

Add CSSCounterStyleRule.cpp and JSCSSCounterStyleRule.cpp.

  • WebCore.xcodeproj/project.pbxproj:

Add CounterStyle.h, CounterStyle.cpp, and CounterStyle.idl.

  • bindings/js/JSCSSRuleCustom.cpp:

(WebCore::toJSNewlyCreated):
Support CSSCounterStyleRule.

  • bindings/js/WebCoreBuiltinNames.h:

Add macro(CSSCounterStyleRule) to generate counter-style built-in
names.

  • css/CSSCounterStyleRule.cpp: Added.

(WebCore::StyleRuleCounterStyle::StyleRuleCounterStyle):
(WebCore::StyleRuleCounterStyle::create):
(WebCore::StyleRuleCounterStyle::mutableProperties):
(WebCore::CSSCounterStyleRule::CSSCounterStyleRule):
(WebCore::CSSCounterStyleRule::reattach):
(WebCore::CSSCounterStyleRule::cssText const):

  • css/CSSCounterStyleRule.h: Added.

(isType): Add specialized rule.isCounterStyleRule() implementation.

  • css/CSSCounterStyleRule.idl: Added.
  • css/CSSRule.cpp: Add new StyleRuleType::CounterStyle COMPILE_ASSERT.
  • css/CSSRule.h:

Add COUNTER_STYLE_RULE constant. Also add comment // WebIDL enum to
disable enum_casing lint, since these values are named to match IDL
attributes.

  • css/CSSRule.idl: Add COUNTER_STYLE_RULE constant behind flag.
  • css/StyleRule.cpp:

(WebCore::StyleRuleBase::destroy):
(WebCore::StyleRuleBase::copy const):
(WebCore::StyleRuleBase::createCSSOMWrapper const):
Handle newly added StyleRuleType::CounterStyle.

  • css/StyleRule.h:

(WebCore::StyleRuleBase::isCounterStyleRule const): Added.

  • css/StyleRuleType.h: Add StyleRuleType::CounterStyle
  • css/StyleSheetContents.cpp:

(WebCore::traverseRulesInVector):
(WebCore::StyleSheetContents::traverseSubresources const):
If @counter-style image symbols flag is enabled, do traverse
subresources.

  • css/parser/CSSAtRuleID.cpp:

If the @counter-style feature flag is enabled, return newly added
CSSAtRuleCounterStyle ID.

(WebCore::cssAtRuleID):

  • css/parser/CSSAtRuleID.h:

Add CSSAtRuleCounterStyle ID.

  • css/parser/CSSParserContext.cpp:

(WebCore::operator==):

  • css/parser/CSSParserContext.h:

(WebCore::CSSParserContextHash::hash):
Add cssCounterStyleAtRulesEnabled and
cssCounterStyleAtRuleImageSymbolsEnabled flags.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
Refactor to use new CSSPropertyParserHelpers::isPredefinedCounterStyle
method.

  • css/parser/CSSParserImpl.cpp:

(WebCore::computeNewAllowedRules):
(WebCore::CSSParserImpl::consumeAtRule):
(WebCore::CSSParserImpl::consumeCounterStyleRule): Added.
(WebCore::CSSParserImpl::consumeDeclarationList):
(WebCore::CSSParserImpl::consumeDeclaration):

  • css/parser/CSSParserImpl.h:

Handle new @counter-style rule.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseValue): Handle
StyleRuleType::CounterStyle.
(WebCore::consumeCounterContent):
Refactor to use new CSSPropertyParserHelpers::isPredefinedCounterStyle
method.
(WebCore::CSSPropertyParser::parseCounterStyleDescriptor):
Add placeholder for future @counter-style descriptor parsing work.

  • css/parser/CSSPropertyParser.h:

Add parseCounterStyleDescriptor method

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

(WebCore::CSSPropertyParserHelpers::consumeCustomIdent):
Add new flag that allows consumed custom ident values to be lowercased
on-parse. This is necessary for some <counter-style-name> values.
(WebCore::CSSPropertyParserHelpers::isPredefinedCounterStyle): Added.
(WebCore::CSSPropertyParserHelpers::consumeCounterStyleName):
(WebCore::CSSPropertyParserHelpers::consumeCounterStyleNameInPrelude):
Parse @counter-style names, both in-prelude names and non-prelude
names (e.g. as part of the extends descriptor).

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml: Add CSSCounterStyleAtRulesEnabled and CSSCounterStyleAtRuleImageSymbolsEnabled flags.

Tools:

  • DumpRenderTree/TestOptions.cpp:

(WTR::TestOptions::defaults):
Add false defaults for CSSCounterStyleAtRulesEnabled and
CSSCounterStyleAtRuleImageSymbolsEnabled flags.

LayoutTests:

Add tests ensuring @counter-style is not exposed when feature flag is
disabled.

  • webexposed/counter-style-is-not-exposed-expected.txt: Added.
  • webexposed/counter-style-is-not-exposed.html: Added.
12:04 PM Changeset in webkit [276151] by Russell Epstein
  • 19 edits in branches/safari-611-branch/Source

Revert "Cherry-pick r275485. rdar://problem/76412930"

This reverts commit r276076.

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

Revert "Cherry-pick r274819. rdar://problem/76373741"

This reverts commit r276044.

11:47 AM Changeset in webkit [276149] by guijemont@igalia.com
  • 2 edits in trunk/JSTests

[JSC] Unskip stress/intl-parse-unicode-subtags.js on arm
https://bugs.webkit.org/show_bug.cgi?id=224679

Unreviewed test gardening.

  • stress/intl-parse-unicode-subtags.js: Unskipped, as it passes fine

now.

11:41 AM Changeset in webkit [276148] by Chris Dumez
  • 42 edits in trunk

Exit the GPUProcess when under memory pressure if it is not being used
https://bugs.webkit.org/show_bug.cgi?id=224556

Reviewed by Darin Adler.

Source/WebKit:

Exit the GPUProcess when under memory pressure if it is not being used. This will
help us save memory, especially until we are able to enable "DOM Rendering in
GPUProcess".

Note that when the GPUProcess is ready to exit, it sends an IPC to the UIProcess
in order to get terminated, instead of terminating itself. The reason I do this is
so that the UIProcess can distinguish a GPUProcess crash from a normal idle exit.

A/B testing shows:

  • 5-8% PLUM3 progression on iPhone
  • 2.5-4% PLUM3 progression on iPad
  • No PLT5 regression on either iPhone or iPad.
  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::GPUConnectionToWebProcess):
(WebKit::GPUConnectionToWebProcess::allowsExitUnderMemoryPressure const):
(WebKit::GPUConnectionToWebProcess::releaseRenderingBackend):
(WebKit::GPUConnectionToWebProcess::releaseGraphicsContextGL):

  • GPUProcess/GPUConnectionToWebProcess.h:

(WebKit::GPUConnectionToWebProcess::remoteMediaPlayerManagerProxy):

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::removeGPUConnectionToWebProcess):
(WebKit::GPUProcess::canExitUnderMemoryPressure const):
(WebKit::GPUProcess::tryExitIfUnusedAndUnderMemoryPressure):
(WebKit::GPUProcess::tryExitIfUnused):
(WebKit::GPUProcess::lowMemoryHandler):

  • GPUProcess/GPUProcess.h:
  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::allowsExitUnderMemoryPressure const):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/media/RemoteAudioDestinationManager.cpp:

(WebKit::RemoteAudioDestinationManager::deleteAudioDestination):
(WebKit::RemoteAudioDestinationManager::allowsExitUnderMemoryPressure const):

  • GPUProcess/media/RemoteAudioDestinationManager.h:
  • GPUProcess/media/RemoteCDMFactoryProxy.cpp:

(WebKit::RemoteCDMFactoryProxy::removeInstance):
(WebKit::RemoteCDMFactoryProxy::allowsExitUnderMemoryPressure const):

  • GPUProcess/media/RemoteCDMFactoryProxy.h:
  • GPUProcess/media/RemoteImageDecoderAVFProxy.cpp:

(WebKit::RemoteImageDecoderAVFProxy::deleteDecoder):
(WebKit::RemoteImageDecoderAVFProxy::allowsExitUnderMemoryPressure const):

  • GPUProcess/media/RemoteImageDecoderAVFProxy.h:
  • GPUProcess/media/RemoteLegacyCDMFactoryProxy.cpp:

(WebKit::RemoteLegacyCDMFactoryProxy::removeSession):
(WebKit::RemoteLegacyCDMFactoryProxy::allowsExitUnderMemoryPressure const):

  • GPUProcess/media/RemoteLegacyCDMFactoryProxy.h:
  • GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:

(WebKit::RemoteMediaPlayerManagerProxy::deleteMediaPlayer):
(WebKit::RemoteMediaPlayerManagerProxy::allowsExitUnderMemoryPressure const):

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.h:
  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.cpp:

(WebKit::RemoteAudioMediaStreamTrackRendererManager::allowsExitUnderMemoryPressure const):

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

(WebKit::RemoteMediaRecorderManager::releaseRecorder):
(WebKit::RemoteMediaRecorderManager::allowsExitUnderMemoryPressure const):

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

(WebKit::RemoteSampleBufferDisplayLayerManager::allowsExitUnderMemoryPressure const):

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h:
  • Shared/ProcessTerminationReason.h:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::hasSourceProxies const):

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::gpuProcessExited):
(WebKit::GPUProcessProxy::processIsReadyToExit):
(WebKit::GPUProcessProxy::didClose):
(WebKit::GPUProcessProxy::didFinishLaunching):

  • UIProcess/GPU/GPUProcessProxy.h:
  • UIProcess/GPU/GPUProcessProxy.messages.in:
  • UIProcess/PageClient.h:

(WebKit::PageClient::gpuProcessDidExit):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::gpuProcessExited):

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

(WebKit::WebProcessPool::gpuProcessExited):

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

(WebKit::WebProcessProxy::gpuProcessExited):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::gpuProcessDidExit):

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

(-[WKContentView _gpuProcessDidExit]):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:

(runMemoryPressureExitTest):
(TEST):

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

Unreviewed GTK / WinCairo build fix after Antoine's r276141.

Just add the BlendingContext constructor this time because there are too many build failures.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyBlendingContext::CSSPropertyBlendingContext):
(WebCore::CSSPropertyBlendingContext::client): Deleted.

  • platform/animation/AnimationUtilities.h:

(WebCore::BlendingContext::BlendingContext):

  • platform/graphics/nicosia/NicosiaAnimation.cpp:

(Nicosia::blendFunc):
(Nicosia::applyTransformAnimation):

11:07 AM Changeset in webkit [276146] by Devin Rousso
  • 12 edits in trunk/Source/WebInspectorUI

Web Inspector: Uncaught Exception: null is not an object (evaluating 'this._listeners.get')
https://bugs.webkit.org/show_bug.cgi?id=224651

Reviewed by BJ Burg.

  • UserInterface/Base/Object.js:

(WI.Object.removeEventListener):
Add early-return checks just in case _listeners or listenersForEventType is falsy. While
ideally it would be the case that these would never be falsy, the logic of Web Inspector is
complex and far reaching, so better safe than sorry.

  • UserInterface/Views/TreeElement.js:

(WI.TreeElement.prototype._detach):

  • UserInterface/Views/AuditTreeElement.js:

(WI.AuditTreeElement.prototype.ondetach):

  • UserInterface/Views/BootstrapScriptTreeElement.js:

(WI.BootstrapScriptTreeElement.prototype.ondetach):

  • UserInterface/Views/BreakpointTreeElement.js:

(WI.BreakpointTreeElement.prototype.ondetach):

  • UserInterface/Views/DOMTreeElement.js:

(WI.DOMTreeElement.prototype.ondetach):

  • UserInterface/Views/FrameTreeElement.js:

(WI.FrameTreeElement.prototype.ondetach):

  • UserInterface/Views/JavaScriptBreakpointTreeElement.js:

(WI.JavaScriptBreakpointTreeElement.prototype.ondetach):

  • UserInterface/Views/LocalResourceOverrideTreeElement.js:

(WI.LocalResourceOverrideTreeElement.prototype.ondetach):

  • UserInterface/Views/ShaderProgramTreeElement.js:

(WI.ShaderProgramTreeElement.prototype.ondetach):

  • UserInterface/Views/WebSocketResourceTreeElement.js:

(WI.WebSocketResourceTreeElement.prototype.ondetach):
Add FIXME comments warning of this issue so that future changes can take it into account.
<https://webkit.org/b/224652> (Web Inspector: Tree Outlines: ondetach can be called without onattach ever being called)

11:02 AM Changeset in webkit [276145] by Chris Dumez
  • 7 edits in trunk/Source/WebKit

Early IPC messages to a WorkQueueMessageReceiver may get processed out of order
https://bugs.webkit.org/show_bug.cgi?id=224623

Reviewed by Geoffrey Garen.

Bug 224566 exposed an issue where early IPC being sent to WorkQueueMessageReceiver might get received
out of order. The reason behind it is that the WorkQueueMessageReceiver registers itself on the main
thread while we receive the IPC on the IPC thread. When we receive the IPC on the IPC thread, we check
if there is a WorkQueueMessageReceiver for it and if there is, we dispatch the message straight to its
WorkQueue. However, if the WorkQueueMessageReceiver has not registered itself yet on the main thread,
we hop to the main thread first, before dispatching the IPC back to the receiver's WorkQueue. The
extra hop to the main thread means that 2 IPC messages to the WorkQueueMessageReceiver sent one after
the other may get dispatched on the WorkQueue in an inconsistent order, if the WorkQueueMessageReceiver
registers itself as a receiver in between the 2 IPC messages.

We actually were trying to deal with this issue in Connection::addWorkQueueMessageReceiver(). When
the WorkQueueMessageReceiver would register itself on the main thread, we would grab the incomingMessages
lock and check m_incomingMessages for messages that should be dispatched to the WorkQueue. Those are
async messages that should have been dispatched straight to the WorkQueue on the IPC thread but didn't
because the WorkQueueMessageReceiver has not registered itself yet.

However, this logic in Connection::addWorkQueueMessageReceiver() was insufficient because it only checked
m_incomingMessages. m_incomingMessages only contains async messages. Sync messages (and special async
messages with the IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply flag) are stored in
Connection::SyncMessageState::m_messagesToDispatchWhileWaitingForSyncReply. This is what was causing
Bug 224566 since RemoteRenderingBackendProxy's CreateImageBuffer IPC was async with the
DispatchMessageEvenWhenWaitingForSyncReply flag and its GetDataURLForImageBuffer was synchronous. The
ordering of these 2 IPC messages could get reversed and it would cause correctness issues and flaky
crashes.

To address the issue, I updated Connection::addWorkQueueMessageReceiver() to ask the
Connection::SyncMessageState to enqueue its matching messages to the WorkQueue. There was one issue
though because Connection::SyncMessageState::dispatchMessagesAndResetDidScheduleDispatchMessagesForConnection()
was taking messages out of m_messagesToDispatchWhileWaitingForSyncReply and storing them in a local
container and then iterating over this container to dispatch the messages. The dispatching of one
of these messages could cause a WorkQueueMessageReceiver to register itself (call addWorkQueueMessageReceiver()).
When this would happen, addWorkQueueMessageReceiver() would try and enqueue matching messages in
m_messagesToDispatchWhileWaitingForSyncReply and would miss the messages in the local container
that dispatchMessagesAndResetDidScheduleDispatchMessagesForConnection() is currently iterating on.
To address this issue, I introduced a new m_messagesBeingDispatched data member and used that to
store the messages being dispatched instead of the local container. As a result,
addWorkQueueMessageReceiver() can now enqueue the messages in m_messagesBeingDispatched first and
then enqueue the ones in m_messagesToDispatchWhileWaitingForSyncReply.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::createRenderingBackend):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/GPUConnectionToWebProcess.messages.in:
  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::ensureGPUProcessConnection):
Revert r276007 that was committed as a temporary workaround for this bug.

  • Platform/IPC/Connection.cpp:

(IPC::Connection::SyncMessageState::enqueueMatchingMessages):
Add utility function to SyncMessageState to enqueue its matching messages in m_messagesBeingDispatched
and m_messagesToDispatchWhileWaitingForSyncReply to the provided MessageReceiveQueue. This is called
by Connection::addMessageReceiveQueue(). The logic is similar to the one in the
enqueueMatchingMessagesToMessageReceiveQueue() function but works on a Deque<ConnectionAndIncomingMessage>
instead of a Deque<std::unique_ptr<Decoder>>.

(IPC::Connection::SyncMessageState::dispatchMessages):
(IPC::Connection::SyncMessageState::dispatchMessagesAndResetDidScheduleDispatchMessagesForConnection):
Use m_messagesBeingDispatched instead of a local container to store the messages we are about to
dispatch. This allows enqueueMatchingMessages() to check those messages to see if they should be
dispatched to a MessageReceiveQueue. We also need to make sure we don't iterate over
m_messagesBeingDispatched to call dispatch() on the messages. This is important because any message
dispatch may cause a WorkQueueMessageReceiver to register itself, which would call
enqueueMatchingMessages() and potentially extract matching messages from m_messagesBeingDispatched.
For this reason, we take messages from m_messagesBeingDispatched one by one, until the container
becomes empty.

(IPC::Connection::addMessageReceiveQueue):
(IPC::Connection::addWorkQueueMessageReceiver):
(IPC::Connection::addThreadMessageReceiver):

  • This used to only check m_incomingMessages for matching messages that should be enqueued on the MessageReceiveQueue in order to preserve IPC ordering. This was insufficient because it would fail to consider sync IPC messages (or async IPC messages with the IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply flag). Since those are stored in separate containers in Connection::SyncMessageState, we now also call Connection::SyncMessageState::enqueueMatchingMessages() to enqueue those messages and preserve their ordering too. This fixes IPC ordering bug identified via Bug 224566.
  • Avoid some code duplication by moving more logic to a shared enqueueMatchingMessagesToMessageReceiveQueue() function. The function is no longer templated because I don't think it is worth increasing binary size just to avoid the virtual enqueueMessage() function call on the MessageReceiverQueue. We do not register message receivers very often and then only have a few early messages at most to enqueue.
10:53 AM Changeset in webkit [276144] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Sources: don't show the create local override contextmenu if the navigation item is disabled
https://bugs.webkit.org/show_bug.cgi?id=224647

Reviewed by BJ Burg.

  • UserInterface/Views/ResourceContentView.js:

(WI.ResourceContentView.prototype._populateCreateLocalResourceOverrideContextMenu):

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

Unreviewed attempt to fix GTK's build after Antoine's r276141.

  • platform/graphics/nicosia/NicosiaAnimation.cpp:

(Nicosia::blendFunc):
(Nicosia::applyTransformAnimation):

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

Unreviewed build fix after Antoine's r276141.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyBlendingContext::CSSPropertyBlendingContext):

9:55 AM Changeset in webkit [276141] by graouts@webkit.org
  • 40 edits in trunk/Source/WebCore

Refactor parameters to blending functions
https://bugs.webkit.org/show_bug.cgi?id=224433

Reviewed by Dean Jackson.

Reduce the number of parameters passed to the blending functions such that we package
the client and progress together and track whether the animation is discrete instead
of computing it several times. This information is now passed as a BlendingContext
parameter, and a CSSPropertyBlendingContext private to CSSPropertyAnimation.

When we support composite operations, we'll just need to add a new member to that
struct instead of modifying all the method signatures.

Since we are modifying the method signatures, we also change the RenderStyle pointers
to references since we would never pass in a null value.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyBlendingContext::CSSPropertyBlendingContext):
(WebCore::blendFunc):
(WebCore::blendFilterOperations):
(WebCore::blendFilter):
(WebCore::crossfadeBlend):
(WebCore::AnimationPropertyWrapperBase::canInterpolate const):
(WebCore::PropertyWrapperGetter::value const):
(WebCore::canInterpolateCaretColor):
(WebCore::CSSPropertyAnimation::blendProperties):
(WebCore::CSSPropertyAnimation::propertiesEqual):
(WebCore::CSSPropertyAnimation::canPropertyBeInterpolated):

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

(WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):

  • css/CSSCrossfadeValue.cpp:

(WebCore::blendFunc):
(WebCore::CSSCrossfadeValue::blend const):

  • css/CSSCrossfadeValue.h:
  • css/CSSGradientValue.cpp:

(WebCore::RadialGradientAdapter::normalizeStopsAndEndpointsOutsideRange):
(WebCore::ConicGradientAdapter::normalizeStopsAndEndpointsOutsideRange):
(WebCore::CSSGradientValue::computeStops):

  • platform/Length.cpp:

(WebCore::blendMixedTypes):
(WebCore::blend):

  • platform/Length.h:
  • platform/LengthPoint.h:

(WebCore::blend):

  • platform/LengthSize.h:

(WebCore::blend):

  • platform/animation/AnimationUtilities.h:

(WebCore::blend):

  • platform/graphics/ColorBlending.cpp:

(WebCore::blend):
(WebCore::blendWithoutPremultiply):

  • platform/graphics/ColorBlending.h:
  • platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:

(WebCore::PlatformCAFilters::colorMatrixValueForFilter):

  • platform/graphics/filters/FilterOperation.cpp:

(WebCore::BasicColorMatrixFilterOperation::blend):
(WebCore::BasicComponentTransferFilterOperation::blend):
(WebCore::InvertLightnessFilterOperation::blend):
(WebCore::BlurFilterOperation::blend):
(WebCore::DropShadowFilterOperation::blend):

  • platform/graphics/filters/FilterOperation.h:

(WebCore::FilterOperation::blend):

  • platform/graphics/transforms/IdentityTransformOperation.h:
  • platform/graphics/transforms/Matrix3DTransformOperation.cpp:

(WebCore::createOperation):
(WebCore::Matrix3DTransformOperation::blend):

  • platform/graphics/transforms/Matrix3DTransformOperation.h:
  • platform/graphics/transforms/MatrixTransformOperation.cpp:

(WebCore::MatrixTransformOperation::blend):

  • platform/graphics/transforms/MatrixTransformOperation.h:
  • platform/graphics/transforms/PerspectiveTransformOperation.cpp:

(WebCore::PerspectiveTransformOperation::blend):

  • platform/graphics/transforms/PerspectiveTransformOperation.h:
  • platform/graphics/transforms/RotateTransformOperation.cpp:

(WebCore::RotateTransformOperation::blend):

  • platform/graphics/transforms/RotateTransformOperation.h:
  • platform/graphics/transforms/ScaleTransformOperation.cpp:

(WebCore::ScaleTransformOperation::blend):

  • platform/graphics/transforms/ScaleTransformOperation.h:
  • platform/graphics/transforms/SkewTransformOperation.cpp:

(WebCore::SkewTransformOperation::blend):

  • platform/graphics/transforms/SkewTransformOperation.h:
  • platform/graphics/transforms/TransformOperation.h:
  • platform/graphics/transforms/TransformOperations.cpp:

(WebCore::TransformOperations::blendByMatchingOperations const):
(WebCore::TransformOperations::blendByUsingMatrixInterpolation const):
(WebCore::TransformOperations::blend const):

  • platform/graphics/transforms/TransformOperations.h:
  • platform/graphics/transforms/TranslateTransformOperation.cpp:

(WebCore::TranslateTransformOperation::blend):

  • platform/graphics/transforms/TranslateTransformOperation.h:
  • rendering/style/BasicShapes.cpp:

(WebCore::BasicShapeCircle::blend const):
(WebCore::BasicShapeEllipse::blend const):
(WebCore::BasicShapePolygon::blend const):
(WebCore::BasicShapePath::blend const):
(WebCore::BasicShapeInset::blend const):

  • rendering/style/BasicShapes.h:

(WebCore::BasicShapeCenterCoordinate::blend const):
(WebCore::BasicShapeRadius::blend const):

  • style/Styleable.cpp:

(WebCore::propertyInStyleMatchesValueForTransitionInMap):
(WebCore::updateCSSTransitionsForStyleableAndProperty):

  • svg/SVGLengthValue.cpp:

(WebCore::SVGLengthValue::blend):

  • svg/SVGPathBlender.cpp:

(WebCore::blendFloatPoint):
(WebCore::SVGPathBlender::blendAnimatedDimensonalFloat):
(WebCore::SVGPathBlender::blendArcToSegment):

9:50 AM Changeset in webkit [276140] by Russell Epstein
  • 3 edits in branches/safari-611-branch/Source/WebCore

Apply patch. rdar://problem/76375504

9:15 AM Changeset in webkit [276139] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews] Improve step description when layout-tests step is skipped
https://bugs.webkit.org/show_bug.cgi?id=224666

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(RunWebKitTests.getResultSummary):

  • CISupport/ews-build/steps_unittest.py: Updated unit-tests.
8:46 AM Changeset in webkit [276138] by graouts@webkit.org
  • 25 edits in trunk

Blend using calc() when necessary
https://bugs.webkit.org/show_bug.cgi?id=224670

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Mark 141 WPT progressions.

  • 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/border-image-width-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/border-radius-interpolation-expected.txt:
  • web-platform-tests/css/css-flexbox/animation/flex-basis-composition-expected.txt:
  • web-platform-tests/css/css-position/animations/bottom-composition-expected.txt:
  • web-platform-tests/css/css-position/animations/left-composition-expected.txt:
  • web-platform-tests/css/css-position/animations/right-composition-expected.txt:
  • web-platform-tests/css/css-position/animations/top-composition-expected.txt:
  • web-platform-tests/css/css-shapes/animation/shape-margin-composition-expected.txt:
  • web-platform-tests/css/css-sizing/animation/height-composition-expected.txt:
  • web-platform-tests/css/css-sizing/animation/max-height-composition-expected.txt:
  • web-platform-tests/css/css-sizing/animation/max-width-composition-expected.txt:
  • web-platform-tests/css/css-sizing/animation/min-height-composition-expected.txt:
  • web-platform-tests/css/css-sizing/animation/min-width-composition-expected.txt:
  • web-platform-tests/css/css-transitions/animations/vertical-align-composition-expected.txt:
  • web-platform-tests/css/css-transitions/animations/vertical-align-interpolation-expected.txt:
  • web-platform-tests/css/css-values/animations/calc-interpolation-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt:

Source/WebCore:

We need to blend between lengths when their types are not the same. However, we would take
some shortcuts in the following cases and blend using just one value:

  1. either the from or to value was a 0 value,
  2. progress was 0 or 1.

Now we use the mixed types code path if the types are different or either the from or to
value is a calculated value. The single exception where we don't actually end up generating
a CalculationValue is when we know that one of the two values is 0 and not a percentage, in
which case we run a simple blend.

Due to this approach, we stopped returning the value as-is in some cases where progress was
0 or 1. To avoid regressions in this area, we made the LengthBoxPropertyWrapper clone the from
or to value in the discrete case, as some other areas of the code do not know how to deal with
calculated Length values, for instance valueForImageSliceSide(const Length&).

  • animation/CSSPropertyAnimation.cpp:
  • platform/Length.cpp:

(WebCore::blendMixedTypes):
(WebCore::blend):

  • platform/LengthBox.h:

(WebCore::LengthBox::LengthBox):

  • platform/RectEdges.h:

(WebCore::RectEdges::RectEdges):

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

[RenderTreeBuilder] Do not try to collapse anonymous blocks when cleaning up the first-letter subtree
https://bugs.webkit.org/show_bug.cgi?id=224667
<rdar://76616098>

Reviewed by Antti Koivisto.

We construct a dedicated renderer for the first letter content and in some cases wrap it into an anonymous block.
This subtree needs to be destroyed when the associated RenderText is getting deleted. During this cleanup process
we may find the wrapper anonymous block redundant and initiate a sibling block collapsing. However this collapsing
may interfere with the initial delete (the associated RenderText) and lead to unexpected result.
Let's reserve the anonymous collapsing for the initial remove.

  • rendering/updating/RenderTreeBuilderFirstLetter.cpp:

(WebCore::RenderTreeBuilder::FirstLetter::cleanupOnDestroy):

7:41 AM Changeset in webkit [276136] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[SOUP] Show resource priority and remote IP in the inspector
https://bugs.webkit.org/show_bug.cgi?id=224660

Reviewed by Adrian Perez de Castro.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::toNetworkLoadPriority):
(WebKit::NetworkDataTaskSoup::didGetHeaders):
(WebKit::NetworkDataTaskSoup::networkEvent):

6:35 AM Changeset in webkit [276135] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[IFC] Incorrect box height when scrollbar takes padding box space
https://bugs.webkit.org/show_bug.cgi?id=224546
<rdar://problem/76666402>

Reviewed by Antti Koivisto.

Source/WebCore:

This patch fixes the case when a non-overlay scrollbar can't be accomodated in the padding/content box area (e.g <div style="height: 10px; overflow: scroll">...)
In the legacy render tree the non-overlay scrollbar size is already taken into account when calling RenderBox::contentWidth/Height (paddingBoxHeight/Width), so
we just have to check how much space they actully take (currently maximum of 15px).

Test: fast/inline-block/non-overlay-scrollbar-incorrect-padding.html

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::updateLayoutBoxDimensions):

LayoutTests:

  • fast/inline-block/non-overlay-scrollbar-incorrect-padding-expected.txt: Added.
  • fast/inline-block/non-overlay-scrollbar-incorrect-padding.html: Added.
6:08 AM Changeset in webkit [276134] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardenind. Gardened several flaky failures.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
4:09 AM Changeset in webkit [276133] by rniwa@webkit.org
  • 3 edits in trunk/Source/WebCore

Deploy Ref/RefPtr in ApplyStyleCommand
https://bugs.webkit.org/show_bug.cgi?id=224662

Reviewed by Antti Koivisto.

Deployed smart pointers in ApplyStyleCommand. Also deployed ScriptDisallowedScope around the code
which accesses the render tree in ApplyStyleCommand::applyInlineStyleToPushDown.

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
(WebCore::dummySpanAncestorForNode):
(WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
(WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
(WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
(WebCore::highestEmbeddingAncestor):
(WebCore::ApplyStyleCommand::applyInlineStyle):
(WebCore::ApplyStyleCommand::fixRangeAndApplyInlineStyle):
(WebCore::containsNonEditableRegion):
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
(WebCore::ApplyStyleCommand::shouldApplyInlineStyleToRun):
(WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle):
(WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
(WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
(WebCore::ApplyStyleCommand::removeInlineStyle):
(WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
(WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
(WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
(WebCore::ApplyStyleCommand::applyInlineStyleChange):
(WebCore::ApplyStyleCommand::joinChildTextNodes):

  • editing/ApplyStyleCommand.h:
3:32 AM Changeset in webkit [276132] by Russell Epstein
  • 4 edits
    2 deletes in branches/safari-611-branch

Revert "Cherry-pick r275277. rdar://problem/76375504"

This reverts commit r276126.

3:21 AM Changeset in webkit [276131] by rniwa@webkit.org
  • 6 edits in trunk/Source/WebCore

Deploy Ref/RefPtr/WeakPtr in EditCommand and CompositeEditCommand
https://bugs.webkit.org/show_bug.cgi?id=224659

Reviewed by Antti Koivisto.

Deployed Ref/RefPtr/WeakPtr across CompositeEditCommand and EditCommand.

Also wrapped sections of code that access render tree with ScriptDisallowedScope.

  • editing/CompositeEditCommand.cpp:

(WebCore::postTextStateChangeNotification):
(WebCore::CompositeEditCommand::ensureComposition):
(WebCore::CompositeEditCommand::isRemovableBlock): Let a raw pointer to the parent node here
since the only thing we do is to call hasOneChild on it.
(WebCore::CompositeEditCommand::insertNodeBefore):
(WebCore::CompositeEditCommand::insertNodeAfter):
(WebCore::CompositeEditCommand::insertNodeAt):
(WebCore::CompositeEditCommand::removeChildrenInRange):
(WebCore::CompositeEditCommand::replaceElementWithSpanPreservingChildrenAndAttributes):
(WebCore::CompositeEditCommand::positionOutsideTabSpan):
(WebCore::CompositeEditCommand::textNodeForRebalance const): Renamed from canRebalance and
now returns the text node after downcasting so that rebalanceWhitespaceAt doesn't need to have
a lone downcast without a type check.
(WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
(WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring):
(WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
(WebCore::CompositeEditCommand::deleteInsignificantText):
(WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
(WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
(WebCore::CompositeEditCommand::moveParagraphs):

  • editing/CompositeEditCommand.h:

(WebCore::CompositeEditCommand): Now inherits from CanMakeWeakPtr.
(WebCore::toCompositeEditCommand): Deleted.

  • editing/EditCommand.cpp:

(WebCore::EditCommand::EditCommand): Initialize m_startingSelection and m_endingSelection directly
since setStartingSelection and setEndingSelection now stores "this" pointer in RefPtr.
There is no behavior difference since m_parent and CompositeEditCommand::m_composition if applicable
are both nullptr at this point.
(WebCore::compositionIfPossible):
(WebCore::EditCommand::isEditingTextAreaOrTextInput const): Use enclosingTextFormControl instead
of duplicating the code here.
(WebCore::EditCommand::setStartingSelection):
(WebCore::EditCommand::setEndingSelection):
(WebCore::EditCommand::setParent):
(WebCore::EditCommand::postTextStateChangeNotification):

  • editing/EditCommand.h:

(WebCore::EditCommand::parent const):

  • editing/InsertTextCommand.cpp:

(WebCore::InsertTextCommand::doApply):

3:13 AM Changeset in webkit [276130] by commit-queue@webkit.org
  • 2 edits in trunk/JSTests

[JSC][ARMv7] Unskip stress/put-direct-index-broken-2.js
https://bugs.webkit.org/show_bug.cgi?id=224661

Unreviewed test gardening.

Patch by Xan Lopez <Xan Lopez> on 2021-04-16

  • stress/put-direct-index-broken-2.js: unskip on ARMv7, could not

reproduce locally the crash we saw earlier.

2:43 AM Changeset in webkit [276129] by commit-queue@webkit.org
  • 2 edits in trunk

[CMake] UBSan build fixes
https://bugs.webkit.org/show_bug.cgi?id=224536

Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-16
Reviewed by Adrian Perez de Castro.

Synchronize UBSan compiler flags with the ones defined in ubsan.xcconfig.

  • Source/cmake/WebKitCompilerFlags.cmake:
2:04 AM Changeset in webkit [276128] by Manuel Rego Casasnovas
  • 3 edits in trunk/Tools

Avoid converting HTML chars in _W3CTestConverter
https://bugs.webkit.org/show_bug.cgi?id=224658

Reviewed by Adrian Perez de Castro.

There has been a change in Python HTMLParser in version 3.5 that makes convert_charrefs to be True by default:
https://docs.python.org/3/library/html.parser.html

This is causing that we're modifying the tests that have HTML characters, which is something
we shouldn't change and was not happening in previous Python 3 versions, or Python 2.

  • Scripts/webkitpy/w3c/test_converter.py:

(_W3CTestConverter.init): Set convert_charrefs to False.

  • Scripts/webkitpy/w3c/test_converter_unittest.py: Update test to include HTML chars and check that they're not modified.
1:53 AM Changeset in webkit [276127] by Manuel Rego Casasnovas
  • 27 edits
    12 copies
    26 adds in trunk/LayoutTests

[selectors] Update :focus-visible tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=224601

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/focus-visible-001.html:
  • 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-003-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-003.html:
  • web-platform-tests/css/selectors/focus-visible-004-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-004.html:
  • web-platform-tests/css/selectors/focus-visible-005.html:
  • web-platform-tests/css/selectors/focus-visible-006-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-006.html:
  • web-platform-tests/css/selectors/focus-visible-008.html:
  • web-platform-tests/css/selectors/focus-visible-009.html:
  • web-platform-tests/css/selectors/focus-visible-010.html:
  • web-platform-tests/css/selectors/focus-visible-011.html:
  • web-platform-tests/css/selectors/focus-visible-012.html:
  • web-platform-tests/css/selectors/focus-visible-013.html:
  • web-platform-tests/css/selectors/focus-visible-014.html:
  • web-platform-tests/css/selectors/focus-visible-015.html:
  • web-platform-tests/css/selectors/focus-visible-016.html:
  • web-platform-tests/css/selectors/focus-visible-017.html:
  • web-platform-tests/css/selectors/focus-visible-018.html:
  • web-platform-tests/css/selectors/focus-visible-019.html:
  • web-platform-tests/css/selectors/focus-visible-script-focus-001-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-001.html: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-002.tentative-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-002.tentative.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-019.html.
  • web-platform-tests/css/selectors/focus-visible-script-focus-003.tentative-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-003.tentative.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-019.html.
  • web-platform-tests/css/selectors/focus-visible-script-focus-004-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-004.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-019.html.
  • web-platform-tests/css/selectors/focus-visible-script-focus-005-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-005.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-019.html.
  • web-platform-tests/css/selectors/focus-visible-script-focus-006.tentative-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-006.tentative.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-019.html.
  • web-platform-tests/css/selectors/focus-visible-script-focus-007.tentative-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-007.tentative.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-019.html.
  • web-platform-tests/css/selectors/focus-visible-script-focus-008-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-008.html: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-009-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-009.html: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-010-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-010.html: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-011-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-011.html: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-012-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-012.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-019.html.
  • web-platform-tests/css/selectors/focus-visible-script-focus-013-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-013.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-019.html.
  • web-platform-tests/css/selectors/focus-visible-script-focus-014-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-014.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-019.html.
  • web-platform-tests/css/selectors/focus-visible-script-focus-015-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-015.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-019.html.
  • web-platform-tests/css/selectors/focus-visible-script-focus-016.tentative-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-016.tentative.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-019.html.
  • web-platform-tests/css/selectors/focus-visible-script-focus-017.tentative-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-017.tentative.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-019.html.
  • web-platform-tests/css/selectors/focus-visible-script-focus-018-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-018.html: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-019-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-script-focus-019.html: Added.
  • web-platform-tests/css/selectors/w3c-import.log:

LayoutTests:

Mark failures. They'll be gone once bug #224598 is fixed.

  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
1:53 AM Changeset in webkit [276126] by Russell Epstein
  • 4 edits
    2 adds in branches/safari-611-branch

Cherry-pick r275277. rdar://problem/76375504

Animated pseudo element style resolved against wrong parent style
https://bugs.webkit.org/show_bug.cgi?id=223990
rdar://74997361

Reviewed by Antoine Quint.
Source/WebCore:

In createAnimatedElementUpdate we get the parent and parent box styles from the parent stack.
This is wrong for pseudo elements. Their parent style should the host style which is not pushed to the stack.

This matters in style adjuster which may apply wrong adjustments as a result.

Test: fast/animation/pseudo-element-style-adjuster.html

  • style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::resolveElement): (WebCore::Style::TreeResolver::resolvePseudoStyle): (WebCore::Style::TreeResolver::createAnimatedElementUpdate):

Make static and provide the parent and parent box styles as parameters.

  • style/StyleTreeResolver.h:

LayoutTests:

  • fast/animation/pseudo-element-style-adjuster-expected.html: Added.
  • fast/animation/pseudo-element-style-adjuster.html: Added.

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

1:47 AM Changeset in webkit [276125] by youenn@apple.com
  • 9 edits in trunk

Promote WKWebView device orientation permission delegate to API
https://bugs.webkit.org/show_bug.cgi?id=223919

Reviewed by Alex Christensen.

Source/WebKit:

Move corresponding SPI to API.
Introduce WK_API_UNAVAILABLE to make that API not available in certain OSes.

Covered by existing tests.

  • Scripts/postprocess-header-rule:
  • Shared/API/Cocoa/WKFoundation.h:
  • UIProcess/API/Cocoa/WKUIDelegate.h:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::shouldAllowDeviceOrientationAndMotionAccess):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/DeviceOrientation.mm:

(-[DeviceOrientationPermissionUIDelegate webView:requestDeviceOrientationAndMotionPermissionForOrigin:initiatedByFrame:decisionHandler:]):
(-[DeviceOrientationPermissionValidationDelegate webView:requestDeviceOrientationAndMotionPermissionForOrigin:initiatedByFrame:decisionHandler:]):

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(-[WebsitePoliciesDeviceOrientationUIDelegate webView:requestDeviceOrientationAndMotionPermissionForOrigin:initiatedByFrame:decisionHandler:]):

1:39 AM Changeset in webkit [276124] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Remove a no longer necessary callOnMainThread in Worker::createRTCRtpScriptTransformer
https://bugs.webkit.org/show_bug.cgi?id=224539

Reviewed by Darin Adler.

  • workers/Worker.cpp:

(WebCore::Worker::createRTCRtpScriptTransformer):
ThreadSafeRefCounted already handles it with the DestructionThread::Main option.

1:31 AM Changeset in webkit [276123] by Russell Epstein
  • 4 edits
    2 deletes in branches/safari-611-branch

Revert "Cherry-pick r275277. rdar://problem/76375504"

This reverts commit r276080.

12:48 AM Changeset in webkit [276122] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Reintroduce test failure imported/w3c/web-platform-tests/service-workers/service-worker/next-hop-protocol.https.html.

  • platform/glib/TestExpectations:
12:36 AM BuildingCairoOnWindows edited by Fujii Hironori
(diff)
12:30 AM Changeset in webkit [276121] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Build fix for Debug -O3 after r276069.
https://bugs.webkit.org/show_bug.cgi?id=224619

Not reviewed.

  • runtime/HashMapImplInlines.h:
12:18 AM BuildingCairoOnWindows edited by Fujii Hironori
(diff)

Apr 15, 2021:

11:49 PM Changeset in webkit [276120] by commit-queue@webkit.org
  • 41 edits
    1 add
    2 deletes in trunk/Source

Unreviewed, reverting r276107.
https://bugs.webkit.org/show_bug.cgi?id=224653

It broke non-Cocoa clean builds

Reverted changeset:

"[GPUP] WebContent process should not create AVOutputContext
instances when media in GPU Process is enabled"
https://bugs.webkit.org/show_bug.cgi?id=224469
https://trac.webkit.org/changeset/276107

11:25 PM Changeset in webkit [276119] by Lauro Moura
  • 2 edits in trunk/Source/WebCore

REGRESSION(r276039) [GTK] Build failures on Ubuntu 18.04
https://bugs.webkit.org/show_bug.cgi?id=224644
<rdar://problem/76742835>

Unreviewed build fix.

  • bindings/js/JSDOMSetLike.cpp: Add missing Inlines header as

suggested by Mark.

10:37 PM Changeset in webkit [276118] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r274403. rdar://problem/76374004

Cancel image loader events after first dispatch
https://bugs.webkit.org/show_bug.cgi?id=218556

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

Address post review comments.

  • dom/EventSender.h: (WebCore::EventSender<T>::dispatchPendingEvents):

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

10:37 PM Changeset in webkit [276117] by Russell Epstein
  • 4 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r274357. rdar://problem/76374004

Cancel image loader events after first dispatch
https://bugs.webkit.org/show_bug.cgi?id=218556

Patch by Rob Buis <rbuis@igalia.com> on 2021-03-12
Reviewed by Ryosuke Niwa.

Cancel image loader events after first dispatch.
Also change EventSender to use WeakPtr.

  • dom/EventSender.h: (WebCore::EventSender<T>::dispatchEventSoon): (WebCore::EventSender<T>::dispatchPendingEvents):
  • loader/ImageLoader.cpp: (WebCore::ImageLoader::dispatchPendingErrorEvent):
  • loader/ImageLoader.h:

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

10:09 PM Changeset in webkit [276116] by Russell Epstein
  • 8 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r275846. rdar://problem/76727548

Create WebIDBServer only when it is needed
https://bugs.webkit.org/show_bug.cgi?id=224305
rdar://71962196

Reviewed by Alex Christensen.

Currently each WebIDBServer has a separate thread, so we don't want to create or keep WebIDBServer if it's not
in use. There are two cases where network process needs a WebIDBServer:

  1. handle requests from UI process to collect or remove data
  2. handle requests from Web process to perform IDB operations

Previously, we created a WebIDBServer when network process connects to a web process, but that does not mean web
process will perform IDB operations and we may create a thread that's not used. To avoid this, add a new message
AddIDBConnection for web process to ensure network process has WebIDBServer when it's about to perform operation.

Also, previously network process removes a WebIDBServer when session is removed and WebIDBServer is not binded
with any web process connection. Now we remove WebIDBServer when it's done handling requests, that is count of
pending requests from UI process is 0 and WebIDBServer is not binded with web process connection. We also remove
WebIDBServer at when network process is about to be destroyed (NetworkProcess::didClose) so we can break the
reference cycle of NetworkProcess-WebIDBServer-IDBServer, and make sure thread exits.

  • NetworkProcess/IndexedDB/WebIDBServer.cpp: (WebKit::WebIDBServer::create): (WebKit::WebIDBServer::WebIDBServer): (WebKit::m_closeCallback): (WebKit::WebIDBServer::~WebIDBServer): (WebKit::WebIDBServer::getOrigins): (WebKit::WebIDBServer::closeAndDeleteDatabasesModifiedSince): (WebKit::WebIDBServer::closeAndDeleteDatabasesForOrigins): (WebKit::WebIDBServer::renameOrigin): (WebKit::WebIDBServer::removeConnection): (WebKit::WebIDBServer::close): (WebKit::WebIDBServer::tryClose):
  • NetworkProcess/IndexedDB/WebIDBServer.h:
  • NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::addIDBConnection):
  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::didClose): (WebKit::NetworkProcess::createNetworkConnectionToWebProcess): (WebKit::NetworkProcess::destroySession): (WebKit::NetworkProcess::createWebIDBServer): (WebKit::NetworkProcess::connectionToWebProcessClosed): (WebKit::NetworkProcess::removeWebIDBServerIfPossible): Deleted. Move the removal code to WebIDBServer.
  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp: (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):

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

10:05 PM Changeset in webkit [276115] by don.olmstead@sony.com
  • 4 edits
    2 deletes in trunk/Source/WebCore

Remove TilingData class
https://bugs.webkit.org/show_bug.cgi?id=224643

Reviewed by Yusuke Suzuki.

It doesn't seem to be used anywhere and the code hasn't been touched in almost a decade.

  • PlatformMac.cmake:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/gpu/TilingData.cpp: Removed.
  • platform/graphics/gpu/TilingData.h: Removed.
9:58 PM Changeset in webkit [276114] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, reverting r276112.
https://bugs.webkit.org/show_bug.cgi?id=224646

.h files should not #include *Inlines.h files.

Reverted changeset:

"REGRESSION(r276039) [GTK] Build failures on Ubuntu 18.04"
https://bugs.webkit.org/show_bug.cgi?id=224644
https://trac.webkit.org/changeset/276112

9:57 PM Changeset in webkit [276113] by Diego Pino Garcia
  • 4 edits in trunk/LayoutTests

[GTK][WPE] Unreviewed test gardening. Gardened tests expected to fail but passed.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
9:43 PM Changeset in webkit [276112] by Lauro Moura
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION(r276039) [GTK] Build failures on Ubuntu 18.04
https://bugs.webkit.org/show_bug.cgi?id=224644

Unreviewed build fix.

  • runtime/JSSet.h: Use HashMapImplInlines to include the base

finishCreation implementation. Somehow GCC 7.5 wasn't picking it up.

9:15 PM Changeset in webkit [276111] by don.olmstead@sony.com
  • 2 edits in trunk/Source/WebCore

[CMake] OpenGL libraries not linked when ANGLE isn't used
https://bugs.webkit.org/show_bug.cgi?id=224642

Reviewed by Fujii Hironori.

Move the block linking and including OpenGL libraries outside of the ANGLE related checks
to catch the case where OpenGL is needed but WebGL and ANGLE are disabled.

Also removes an include for the platform/gpu directory as that's only used for WebGPU.

  • CMakeLists.txt:
8:46 PM Changeset in webkit [276110] by svillar@igalia.com
  • 2 edits in trunk/Source/WebCore

Assertion failure in SVGAnimationElement::currentValuesForValuesAnimation
https://bugs.webkit.org/show_bug.cgi?id=222715

Reviewed by Ryosuke Niwa.

Replaced ASSERT_WITH_SECURITY_IMPLICATION by ASSERT. It was added by mistake as part of
r157341 long time ago. There is no security implication because just after the assert
there would be a division by 0 followed by a crash.

  • svg/SVGAnimationElement.cpp:

(WebCore::SVGAnimationElement::currentValuesForValuesAnimation):

7:46 PM Changeset in webkit [276109] by Chris Gambrell
  • 2 edits
    1 add
    1 delete in trunk/LayoutTests

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

Reviewed by Jonathan Bedard.

  • http/tests/resourceLoadStatistics/cap-cache-max-age-for-prevalent-resource.html:
  • http/tests/resourceLoadStatistics/resources/cached-permanent-redirect.php: Removed.
  • http/tests/resourceLoadStatistics/resources/cached-permanent-redirect.py: Added.
7:33 PM Changeset in webkit [276108] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

CrashTracer: com.apple.WebKit.WebContent at com.apple.WebKit: WTF::HashTableConstIterator<WTF::String, WTF::KeyValuePair<...
https://bugs.webkit.org/show_bug.cgi?id=224637
<rdar://problem/76540809>

Reviewed by Alex Christensen.

If the protocol and host of the SecurityOrigin object are empty,
toRawString() could return null. We should add a valid key check here
before doing a hash table lookup.

  • WebProcess/Notifications/WebNotificationManager.cpp:

(WebKit::WebNotificationManager::policyForOrigin const):

7:20 PM Changeset in webkit [276107] by Peng Liu
  • 41 edits
    2 adds
    1 delete in trunk/Source

[GPUP] WebContent process should not create AVOutputContext instances when media in GPU Process is enabled
https://bugs.webkit.org/show_bug.cgi?id=224469

Reviewed by Eric Carlson.

Source/WebCore:

This patch modifies MediaPlaybackTargetContext to provide interfaces to serialize/deserialize
AVOutputContext and modifies MediaPlaybackTargetCocoa to use MediaPlaybackTargetContext to
manage its AVOutputContext instead of keeping a pointer to the AVOutputContext object.
With these changes, a WebContent process can forward a serialized AVOutputContext object
to other processes (e.g., the GPU process) without deserializing it. Therefore, the WebContent
process does not need access to the CoreMedia routing service. So we can remove the fix (r275669)
for bug 224328.

Covered by existing tests.

  • Modules/airplay/WebMediaSessionManager.cpp:

(WebCore::WebMediaSessionManager::setMockMediaPlaybackTargetPickerState):

  • Modules/airplay/WebMediaSessionManager.h:
  • Headers.cmake:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:

Modify the project file because MediaPlaybackTargetContext is used in Cocoa ports only.

  • page/ChromeClient.h:

(WebCore::ChromeClient::setMockMediaPlaybackTargetPickerState):

  • page/Page.cpp:

(WebCore::Page::setMockMediaPlaybackTargetPickerState):

  • page/Page.h:
  • platform/graphics/MediaPlaybackTarget.h:

(WebCore::MediaPlaybackTarget::hasActiveRoute const):
(WebCore::MediaPlaybackTarget::deviceName const):
(WebCore::MediaPlaybackTarget::supportsRemoteVideoPlayback):
(): Deleted.

  • platform/graphics/MediaPlaybackTargetContext.h: Removed.
  • platform/graphics/avfoundation/MediaPlaybackTargetCocoa.h:

(WebCore::MediaPlaybackTargetCocoa::outputContext const): Deleted.

  • platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm:

(WebCore::MediaPlaybackTargetCocoa::create):
(WebCore::MediaPlaybackTargetCocoa::MediaPlaybackTargetCocoa):
(WebCore::MediaPlaybackTargetCocoa::~MediaPlaybackTargetCocoa):
(WebCore::toMediaPlaybackTargetCocoa):
(WebCore::MediaPlaybackTargetCocoa::supportsRemoteVideoPlayback const): Deleted.
(WebCore::MediaPlaybackTargetCocoa::targetContext const): Deleted.
(WebCore::MediaPlaybackTargetCocoa::hasActiveRoute const): Deleted.
(WebCore::MediaPlaybackTargetCocoa::deviceName const): Deleted.
Don't directly use AVOutputContext in this class.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget):

  • platform/graphics/cocoa/MediaPlaybackTargetContext.h: Added.

(WebCore::MediaPlaybackTargetContext::MediaPlaybackTargetContext):
(WebCore::MediaPlaybackTargetContext::type const):
(WebCore::MediaPlaybackTargetContext::mockState const):
(WebCore::MediaPlaybackTargetContext::outputContext const):
(WebCore::MediaPlaybackTargetContext::serializedOutputContext const):
(WebCore::MediaPlaybackTargetContext::encodingRequiresPlatformData const):

  • platform/graphics/cocoa/MediaPlaybackTargetContext.mm: Added.

(WebCore::MediaPlaybackTargetContext::MediaPlaybackTargetContext):
(WebCore::MediaPlaybackTargetContext::deviceName const):
(WebCore::MediaPlaybackTargetContext::hasActiveRoute const):
(WebCore::MediaPlaybackTargetContext::supportsRemoteVideoPlayback const):
(WebCore::MediaPlaybackTargetContext::serializeOutputContext):
(WebCore::MediaPlaybackTargetContext::deserializeOutputContext):

  • platform/mock/MediaPlaybackTargetMock.cpp:

(WebCore::MediaPlaybackTargetMock::create):
(WebCore::MediaPlaybackTargetMock::MediaPlaybackTargetMock):
(WebCore::toMediaPlaybackTargetMock):
(WebCore::MediaPlaybackTargetMock::targetContext const): Deleted.

  • platform/mock/MediaPlaybackTargetMock.h:

(WebCore::MediaPlaybackTargetMock::state const):

  • platform/mock/MediaPlaybackTargetPickerMock.cpp:

(WebCore::MediaPlaybackTargetPickerMock::externalOutputDeviceAvailable):
(WebCore::MediaPlaybackTargetPickerMock::startingMonitoringPlaybackTargets):
(WebCore::MediaPlaybackTargetPickerMock::invalidatePlaybackTargets):
(WebCore::MediaPlaybackTargetPickerMock::setState):

  • platform/mock/MediaPlaybackTargetPickerMock.h:
  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setMockMediaPlaybackTargetPickerState):

Source/WebKit:

  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::setWirelessPlaybackTarget):

  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/ios/RemoteMediaSessionHelperProxy.cpp:

(WebKit::RemoteMediaSessionHelperProxy::activeVideoRouteDidChange):

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<WebCore::MediaPlaybackTargetContext>::encodePlatformData):
(IPC::ArgumentCoder<WebCore::MediaPlaybackTargetContext>::decodePlatformData):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<MediaPlaybackTargetContext>::encode):
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • Shared/mac/WebCoreArgumentCodersMac.mm:

(IPC::ArgumentCoder<WebCore::MediaPlaybackTargetContext>::encodePlatformData): Deleted.
(IPC::ArgumentCoder<WebCore::MediaPlaybackTargetContext>::decodePlatformData): Deleted.

  • UIProcess/WebPageProxy.cpp:

(WebKit::mediaRelatedIOKitClasses):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerState):
(WebKit::WebPageProxy::setPlaybackTarget):
(WebKit::temporaryMachServices): Deleted.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/GPU/media/ios/RemoteMediaSessionHelper.cpp:

(WebKit::RemoteMediaSessionHelper::activeVideoRouteDidChange):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::setMockMediaPlaybackTargetPickerState):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::playbackTargetSelected const):

Source/WebKitLegacy/mac:

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

(WebChromeClient::setMockMediaPlaybackTargetPickerState):

  • WebView/WebMediaPlaybackTargetPicker.h:
  • WebView/WebMediaPlaybackTargetPicker.mm:

(WebMediaPlaybackTargetPicker::setMockMediaPlaybackTargetPickerState):

  • WebView/WebView.mm:

(-[WebView _setMockMediaPlaybackTargetPickerName:state:]):

  • WebView/WebViewInternal.h:
7:06 PM Changeset in webkit [276106] by mark.lam@apple.com
  • 4 edits
    1 add in trunk

HashMapImpl::rehash() should use a version of jsMapHash that cannot throw.
https://bugs.webkit.org/show_bug.cgi?id=224610
rdar://76698910

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/suppress-TerminationException-in-HashMapImpl-rehash.js: Added.

Source/JavaScriptCore:

For context, HashMapImpl::rehash()'s rehash operation relies on jsMapHash().
jsMapHash() can be interrupted by a TerminationException, and as a result, may
not return the string hash we are expecting. This in turn can lead to the
rehash operation hashing with wrong keys.

However, all the keys should have already been hashed. Hence, rehash() should
never see an exception thrown there. We can avoid this complication with the
TerminationException by simply calling an alternate version of jsMapHash() that
is guaranteed to never throw e.g. a jsMapHashForAlreadyHashedValue() function.

  • runtime/ExceptionHelpers.h:
  • runtime/HashMapImplInlines.h:

(JSC::jsMapHashImpl):
(JSC::jsMapHash):
(JSC::jsMapHashForAlreadyHashedValue):
(JSC::HashMapImpl<HashMapBucketType>::rehash):

6:46 PM Changeset in webkit [276105] by Wenson Hsieh
  • 2 edits in trunk/LayoutTests

Unreviewed test gardening after r276084

Mark the test as failing with an image diff on Windows, since contextClick in DumpRenderTree does not appear
to return the resulting context menu item titles (or information about the context menu items) on Windows.

  • platform/win/TestExpectations:
6:45 PM Changeset in webkit [276104] by commit-queue@webkit.org
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Use kIOMainPortDefault where available
https://bugs.webkit.org/show_bug.cgi?id=224632

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-15
Reviewed by Alexey Proskuryakov.

In ANGLE we don't include WTF headers, so we can't use the HAVE macro like we do elsewhere in WebKit,
but this is pretty close.

  • src/gpu_info_util/SystemInfo_macos.mm:

(angle::GetVendorIDFromMetalDeviceRegistryID):

6:40 PM Changeset in webkit [276103] by dino@apple.com
  • 73 edits in trunk/LayoutTests

Rebaseline some WebGL tests that are only running on the dedicated WebGL bot.

  • webgl/2.0.0/conformance/rendering/clipping-wide-points-expected.txt:
  • webgl/2.0.0/conformance2/extensions/promoted-extensions-in-shaders-expected.txt:
  • webgl/2.0.0/conformance2/rendering/clipping-wide-points-expected.txt:
  • webgl/2.0.0/conformance2/rendering/fs-color-type-mismatch-color-buffer-type-expected.txt:
  • webgl/2.0.0/conformance2/state/gl-object-get-calls-expected.txt:
  • webgl/2.0.0/deqp/data/gles2/shaders/conversions-expected.txt:
  • webgl/2.0.0/deqp/data/gles3/shaders/conversions-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/fboinvalidate/sub-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/fboinvalidate/whole-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/fbomultisample.2_samples-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/fbomultisample.4_samples-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/fbomultisample.8_samples-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/fragmentoutput/array.int-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/fragmentoutput/array.uint-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/fragmentoutput/basic.int-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/fragmentoutput/basic.uint-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/fragmentoutput/random_00-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/fragmentoutput/random_01-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/fragmentoutput/random_02-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/internalformatquery-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/negativebufferapi-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/occlusionquery_strict-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/primitiverestart/00-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/primitiverestart/01-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/primitiverestart/02-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/primitiverestart/03-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/primitiverestart/04-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/primitiverestart/05-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/primitiverestart/06-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/primitiverestart/07-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/readpixel-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/shadertexturefunction/texturegrad-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureformat/sized_depth_stencil-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_linear_greater-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_linear_greater_or_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_linear_less-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_linear_less_or_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_linear_mipmap_linear_greater-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_linear_mipmap_linear_greater_or_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_linear_mipmap_linear_less-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_linear_mipmap_linear_less_or_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_linear_mipmap_nearest_greater-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_linear_mipmap_nearest_greater_or_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_linear_mipmap_nearest_less-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_linear_mipmap_nearest_less_or_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_nearest_greater-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_nearest_greater_or_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_nearest_less-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_nearest_less_or_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_nearest_mipmap_linear_greater-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_nearest_mipmap_linear_greater_or_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_nearest_mipmap_linear_less-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_nearest_mipmap_linear_less_or_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_nearest_mipmap_nearest_greater-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_nearest_mipmap_nearest_greater_or_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_nearest_mipmap_nearest_less-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/2d_nearest_mipmap_nearest_less_or_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/cube_linear_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/cube_linear_mipmap_linear_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/cube_linear_mipmap_linear_not_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/cube_linear_mipmap_nearest_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/cube_linear_mipmap_nearest_not_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/cube_linear_not_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/cube_nearest_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/cube_nearest_mipmap_linear_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/cube_nearest_mipmap_linear_not_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/cube_nearest_mipmap_nearest_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/cube_nearest_mipmap_nearest_not_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/textureshadow/cube_nearest_not_equal-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/texturespecification/texstorage2d_format_depth_stencil-expected.txt:
  • webgl/2.0.0/deqp/functional/gles3/texturespecification/texstorage3d_format_depth_stencil-expected.txt:
  • webgl/conformance/extensions/webgl-multi-draw-expected.txt:
6:37 PM Changeset in webkit [276102] by ysuzuki@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Remove CodeBlock::RareData::m_catchProfiles
https://bugs.webkit.org/show_bug.cgi?id=224593

Reviewed by Mark Lam.

We are having this Vector just because we would like to destroy them when destroying the owner Baseline / LLInt CodeBlock.
But we are setting a pointer in OpCatch's metadata in Baseline / LLInt.
So we should just iterate metadata for that and destroy them in the destructor. No need to keep them separately.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::~CodeBlock):
(JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeIndex):
(JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeIndexSlow):
(JSC::CodeBlock::updateAllValueProfilePredictionsAndCountLiveness):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::createRareDataIfNecessary):

  • bytecode/ValueProfile.h:

(JSC::ValueProfileAndVirtualRegisterBuffer::ValueProfileAndVirtualRegisterBuffer): Deleted.
(JSC::ValueProfileAndVirtualRegisterBuffer::~ValueProfileAndVirtualRegisterBuffer): Deleted.
(JSC::ValueProfileAndVirtualRegisterBuffer::forEach): Deleted.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

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

N[ macOS Wk2 ] imported/w3c/web-platform-tests/media-source/mediasource-activesourcebuffers.html is a flakey text failure
https://bugs.webkit.org/show_bug.cgi?id=222371

Uneviewed test gardening.

  • platform/mac-wk2/TestExpectations: Added Crash to the existing test expectations, as test is flakey crashing as well.
6:06 PM Changeset in webkit [276100] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

Pass -d parameter to git clean in commit-queue
https://bugs.webkit.org/show_bug.cgi?id=224636

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(CleanGitRepo):

  • CISupport/ews-build/steps_unittest.py:
5:53 PM Changeset in webkit [276099] by Robert Jenner
  • 2 edits in trunk/LayoutTests

REGRESSION (r275926): [ BigSur X86_64] imported/w3c/web-platform-tests/css/css-fonts/font-feature-settings-tibetan.html
https://bugs.webkit.org/show_bug.cgi?id=224631

Unreviewed test gardening.

  • platform/mac/TestExpectations: Test has been fixed for new platforms, and won't be for BigSur. Updating expectations for BigSur only.
5:38 PM Changeset in webkit [276098] by Russell Epstein
  • 3 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r275876. rdar://problem/76727236

Skip style update
https://bugs.webkit.org/show_bug.cgi?id=223365

Patch by Rob Buis <rbuis@igalia.com> on 2021-04-13
Reviewed by Ryosuke Niwa.

Skip style update for getting the SVG bounding box
since boundingClientRect already updated style.

  • dom/Element.cpp: (WebCore::Element::boundingAbsoluteRectWithoutLayout):
  • svg/SVGElement.cpp: (WebCore::SVGElement::getBoundingBox):

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

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

Cherry-pick r275807. rdar://problem/76732495

Store InputType in a Ref before calling setValueAsDecimal
https://bugs.webkit.org/show_bug.cgi?id=223535

Patch by Rob Buis <rbuis@igalia.com> on 2021-04-11
Reviewed by Ryosuke Niwa.

Store InputType in a Ref before calling setValueAsDecimal.

  • html/InputType.cpp: (WebCore::InputType::applyStep):

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

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

Cherry-pick r275233. rdar://problem/76727522

Ensure that GlobalPropertyInfo is allocated on the stack.
https://bugs.webkit.org/show_bug.cgi?id=223911

Unreviewed test gardening.

Rebaseline builtins generator tests after r275212.

  • Scripts/tests/builtins/expected/WebCoreJSBuiltins.h-result:

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

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

Cherry-pick r275933. rdar://problem/76727571

AudioSourceProviderAVFObjC should lock all multithreaded objects
https://bugs.webkit.org/show_bug.cgi?id=224230

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-13
Reviewed by Eric Carlson.

Lock following objects with TapStorage::lock:

AudioSourceProviderAVFObjC::m_tapStorage
AudioSourceProviderAVFObjC::m_avPlayerItem

Do not clear the tapStorage nor the _this pointer from
the audio thread. This is a race that cannot be overcome
since the main thread needs to access the m_tapStorage pointer to
lock the m_tapStorage pointer for modification.

Initialize m_tap in more robust way, in case initialization fails.

Do not leave stale m_tapStorage present when destroying the mixer.

  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:
  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: (WebCore::AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC): (WebCore::AudioSourceProviderAVFObjC::destroyMixIfNeeded): (WebCore::AudioSourceProviderAVFObjC::createMixIfNeeded): (WebCore::AudioSourceProviderAVFObjC::initCallback): (WebCore::AudioSourceProviderAVFObjC::finalizeCallback):

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

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

Cherry-pick r275897. rdar://problem/76727571

AudioSourceProviderAVFObjC should check for m_client when dispatching setFormat
https://bugs.webkit.org/show_bug.cgi?id=224479

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-13
Reviewed by Eric Carlson.

Use a weak pointer to schedule the setFormat client callback.
If client is unset before any callback is run, cancel the
pending callbacks.

  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:
  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: (WebCore::AudioSourceProviderAVFObjC::destroyMixIfNeeded): (WebCore::AudioSourceProviderAVFObjC::createMixIfNeeded): (WebCore::AudioSourceProviderAVFObjC::prepare):

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

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

Cherry-pick r275896. rdar://problem/76727571

AudioSourceProviderAVFObjC::setClient should check for m_avAssetTrack
https://bugs.webkit.org/show_bug.cgi?id=224478

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-13
Reviewed by Eric Carlson.

Check for m_avAssetTrack when setting the client.
This is done for consistency, it is unclear if this affects
real world content.

  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:
  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: (WebCore::AudioSourceProviderAVFObjC::setClient): (WebCore::AudioSourceProviderAVFObjC::setPlayerItem): (WebCore::AudioSourceProviderAVFObjC::setAudioTrack): (WebCore::AudioSourceProviderAVFObjC::destroyMixIfNeeded): (WebCore::AudioSourceProviderAVFObjC::createMixIfNeeded):

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

5:22 PM Changeset in webkit [276092] by Russell Epstein
  • 12 edits in branches/safari-611-branch/Source

Cherry-pick r275845. rdar://problem/76727387

Modernize uses of ConsoleClient
https://bugs.webkit.org/show_bug.cgi?id=224398

Reviewed by David Kilzer.

ConsoleClient acts like a delegate, so its callers
should be using weak references to it.

Source/JavaScriptCore:

  • inspector/JSGlobalObjectInspectorController.cpp: (Inspector::JSGlobalObjectInspectorController::consoleClient const):
  • inspector/JSGlobalObjectInspectorController.h:
  • runtime/ConsoleClient.h:
  • runtime/ConsoleObject.cpp: (JSC::consoleLogWithLevel): (JSC::JSC_DEFINE_HOST_FUNCTION):
  • runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::init): (JSC::JSGlobalObject::setConsoleClient):
  • runtime/JSGlobalObject.h: (JSC::JSGlobalObject::consoleClient const): (JSC::JSGlobalObject::setConsoleClient): Deleted.

Source/WebCore:

  • bindings/js/ScriptCachedFrameData.cpp: (WebCore::ScriptCachedFrameData::restore):
  • bindings/js/ScriptController.cpp: (WebCore::ScriptController::initScriptForWindowProxy):
  • bindings/js/WindowProxy.cpp: (WebCore::WindowProxy::setDOMWindow):
  • workers/WorkerOrWorkletScriptController.cpp: (WebCore::WorkerOrWorkletScriptController::initScriptWithSubclass):

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

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

Cherry-pick r275756. rdar://problem/76727458

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

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

This reverts r272900 to move the call to RenderTreeUpdater::tearDownRenderers() from hostChildElementDidChange()
to didChangeSlot(). This ensures the renderers are also cleared for other shadow root trees not using details
element.

  • dom/SlotAssignment.cpp: (WebCore::SlotAssignment::addSlotElementByName): (WebCore::SlotAssignment::didChangeSlot):
  • dom/SlotAssignment.h: (WebCore::ShadowRoot::hostChildElementDidChange):

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

5:22 PM Changeset in webkit [276090] by Russell Epstein
  • 4 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r275680. rdar://problem/76727557

Cache NSInvocation objects on _WKRemoteObjectInterface
https://bugs.webkit.org/show_bug.cgi?id=224331
<rdar://75628393>

Reviewed by Geoffrey Garen.

Have _WKRemoteObjectInterface eagerly create the NSInvocation objects and store them
instead of re-constructing them every time they are needed.

  • Shared/API/Cocoa/WKRemoteObjectCoder.mm: (decodeInvocation):
  • Shared/API/Cocoa/_WKRemoteObjectInterface.mm: (methodArgumentTypeEncodingForSelector): (initializeMethod): (-[_WKRemoteObjectInterface debugDescription]): (classesForSelectorArgument): (-[_WKRemoteObjectInterface _invocationForSelector:]): (-[_WKRemoteObjectInterface _invocationForReplyBlockOfSelector:]): (-[_WKRemoteObjectInterface _allowedArgumentClassesForReplyBlockOfSelector:]):
  • Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h:

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

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

Cherry-pick r275656. rdar://problem/76727574

Update SFrame implementation to latest version
https://bugs.webkit.org/show_bug.cgi?id=224276

Reviewed by Eric Carlson.

Source/WebCore:

Update implementation according to latest draft at https://github.com/eomara/sframe/blob/master/draft-omara-sframe.md.
In particular, we derive keys with new algorithm and the generation of the signature by including header and data length as well as nonce.

Test: webrtc/sframe-test-vectors.html

  • Modules/mediastream/RTCRtpSFrameTransform.cpp: (WebCore::RTCRtpSFrameTransform::setCounterForTesting):
  • Modules/mediastream/RTCRtpSFrameTransform.h:
  • Modules/mediastream/RTCRtpSFrameTransformer.cpp: (WebCore::computeIV): (WebCore::RTCRtpSFrameTransformer::updateEncryptionKey): (WebCore::RTCRtpSFrameTransformer::decryptFrame): (WebCore::RTCRtpSFrameTransformer::encryptFrame): (WebCore::RTCRtpSFrameTransformer::computeEncryptedDataSignature):
  • Modules/mediastream/RTCRtpSFrameTransformer.h:
  • Modules/mediastream/RTCRtpSFrameTransformerCocoa.cpp: (WebCore::RTCRtpSFrameTransformer::computeSaltKey): (WebCore::createBaseSFrameKey): (WebCore::RTCRtpSFrameTransformer::computeAuthenticationKey): (WebCore::RTCRtpSFrameTransformer::computeEncryptionKey): (WebCore::encodeBigEndian): (WebCore::RTCRtpSFrameTransformer::computeEncryptedDataSignature):
  • testing/Internals.cpp: (WebCore::Internals::setSFrameCounter):
  • testing/Internals.h:
  • testing/Internals.idl:

Tools:

Update tests according new way of deriving keys and generating the signature.

  • TestWebKitAPI/Tests/WebCore/RTCRtpSFrameTransformerTests.cpp: (TestWebKitAPI::TEST):

LayoutTests:

  • webrtc/sframe-test-vectors-expected.txt: Added.
  • webrtc/sframe-test-vectors.html: Added.

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

5:22 PM Changeset in webkit [276088] by Russell Epstein
  • 8 edits in branches/safari-611-branch/Source

Cherry-pick r275212. rdar://problem/76727522

Ensure that GlobalPropertyInfo is allocated on the stack.
https://bugs.webkit.org/show_bug.cgi?id=223911
rdar://75865742

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

We rely on GlobalPropertyInfo being allocated on the stack to allow its JSValue
value to be scanned by the GC. Unfortunately, an ASAN compilation would choose
to allocate the GlobalPropertyInfo on a side buffer instead of directly on the
stack. This prevents the GC from doing the needed scan.

We'll fix this by suppressing ASAN on the functions that allocated GlobalPropertyInfo
arrays. Also added an ASSERT in the GlobalPropertyInfo constructor to assert that
it is allocated on the stack.

  • Scripts/wkbuiltins/builtins_generate_internals_wrapper_implementation.py: (BuiltinsInternalsWrapperImplementationGenerator.generate_initialize_method):
  • runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::initStaticGlobals): (JSC::JSGlobalObject::init): (JSC::JSGlobalObject::exposeDollarVM):
  • runtime/JSGlobalObject.h: (JSC::JSGlobalObject::GlobalPropertyInfo::GlobalPropertyInfo):

Source/WebCore:

  • bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
  • bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::finishCreation): (WebCore::JSDOMWindowBase::initStaticGlobals):
  • bindings/js/JSDOMWindowBase.h:

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

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

Cherry-pick r275130. rdar://problem/76727598

Dirty layout for floating children of inline on full layout
https://bugs.webkit.org/show_bug.cgi?id=223660

Patch by Ian Gilbert <iang@apple.com> on 2021-03-26
Reviewed by Zalan Bujtas.

Avoid consuming an object on an empty line when that object is floating or out-of-flow.

  • rendering/line/BreakingContext.h: (WebCore::BreakingContext::handleEndOfLine):

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

4:32 PM Changeset in webkit [276086] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Move the implementation of -[WKWebView themeColor] into the main WKWebView category
https://bugs.webkit.org/show_bug.cgi?id=224628

Reviewed by Tim Horton.

Move the implementation of -themeColor out of the private category, and into the main category instead to
silence the warning.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView themeColor]):

4:32 PM Changeset in webkit [276085] by timothy_horton@apple.com
  • 49 edits
    2 adds in trunk

Add a mechanism to dump the PlatformCALayer subtree of a GraphicsLayer, for testing
https://bugs.webkit.org/show_bug.cgi?id=224595

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/harness/platform-layer-tree-as-text.html

Add internals.platformLayerTreeAsText(), which takes a (composited) Element
and returns the recursive PlatformCALayer tree under that element's backing
layer's primary layer.

This is intended to be used in a future patch in order to test a fix
that is only currently testable by observing the platform layer tree.
I've separated it from that patch in order to get the test rebaselining
out of the way in a behavior-neutral patch.

The motivation for a new method instead of a layerTreeAsText() flag
is this: if you make each GraphicsLayerCA dump its PlatformCALayers
(as a "show me the platform sublayers recursively" flag might do),
each GraphicsLayerCA also dumps its children's platform sublayers.
Thus the easiest way to get sane logging for testing is to target
the specific element you're interested in; thus, a new method.

  • page/Frame.cpp:

(WebCore::Frame::layerTreeAsText const): Deleted.

  • page/Frame.h:

Move layerTreeAsText to RenderLayerCompositor, where it probably belongs.

  • page/Page.h: Fix a typo.
  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::platformLayerTreeAsText const):

  • platform/graphics/GraphicsLayerClient.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::purposeNameForInnerLayer const):
When dumping a PlatformCALayer, look up its purpose by checking which
layer member it is, instead of having it passed in. This way, we can
look it up even when we've reached this layer by crawling down the
PlatformCALayer tree.

(WebCore::GraphicsLayerCA::dumpInnerLayer const):
Clean up the PlatformCALayer dumping; make it multi-line and more
consistent with GraphicsLayer's dumping (a future patch will add more properties).

(WebCore::GraphicsLayerCA::dumpAdditionalProperties const):
Use dumpInnerLayer when dumping PlatformCALayers from a GraphicsLayer dump,
but with a bit set to disable dumping children, to maintain the exising output
and avoid each layer also dumping its children's platform layers, as mentioned above.

(WebCore::GraphicsLayerCA::platformLayerTreeAsText const):
(WebCore::dumpInnerLayer): Deleted.

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

Add a getter for the set of sublayers of a PlatformCALayerCocoa that
themselves have PlatformCALayers (thus the -forLogging; I didn't want
anybody to accidentally think that this gets *all* of the sublayers).

(WebCore::PlatformCALayerCocoa::sublayersForLogging):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateCompositingForLayerTreeAsTextDump):
Consolidate all of the pre-layer-tree-dumping setup work, so it can
be shared between layerTreeAsText and platformLayerTreeAsText.

(WebCore::RenderLayerCompositor::layerTreeAsText):
(WebCore::RenderLayerCompositor::platformLayerTreeAsText):

  • rendering/RenderLayerCompositor.h:
  • testing/Internals.cpp:

(WebCore::Internals::layerTreeAsText const):
Adopt the RenderLayerCompositor version of layerTreeAsText.
Don't bother doing layout, RenderLayerCompositor does it.

(WebCore::toPlatformLayerTreeFlags):
(WebCore::Internals::platformLayerTreeAsText const):

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

Source/WebKit:

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h:

Add a getter for the PlatformCALayer sublayers of PlatformCALayerRemote; see the note on PlatformCALayerCocoa.

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::layerTreeAsText const):
Adopt the RenderLayerCompositor version of layerTreeAsText.

Source/WebKitLegacy/mac:

  • WebView/WebFrame.mm:

(-[WebFrame _layerTreeAsText]):
Adopt the RenderLayerCompositor version of layerTreeAsText.

LayoutTests:

  • fast/harness/platform-layer-tree-as-text-expected.txt: Added.
  • fast/harness/platform-layer-tree-as-text.html: Added.

Add a test for the basic output of platformLayerTreeAsText().

  • compositing/video/video-object-position-expected.txt:
  • compositing/visible-rect/mask-layer-coverage-expected.txt:
  • css3/filters/backdrop/backdrop-filter-does-not-size-properly-absolute-expected.txt:
  • css3/filters/backdrop/backdrop-filter-does-not-size-properly-border-and-padding-expected.txt:
  • css3/filters/backdrop/backdrop-filter-with-cliprect-expected.txt:
  • css3/filters/backdrop/backdrop-filter-with-mask-expected.txt:
  • css3/filters/backdrop/backdrop-with-visibility-hidden-changing-expected.txt:
  • css3/filters/backdrop/backdrop-with-visibility-hidden-expected.txt:
  • css3/filters/backdrop/resource-use-add-more-layers-expected.txt:
  • css3/filters/backdrop/resource-use-excessive-expected.txt:
  • css3/filters/backdrop/resource-use-ok-expected.txt:
  • css3/filters/backdrop/resource-use-remove-some-layers-expected.txt:
  • fullscreen/full-screen-layer-dump-expected.txt:
  • platform/ios/compositing/reflections/direct-image-object-fit-reflected-expected.txt:
  • platform/ios/compositing/video/video-object-position-expected.txt:
  • platform/ios/compositing/visible-rect/mask-layer-coverage-expected.txt:
  • platform/ios/css3/filters/backdrop/backdrop-filter-does-not-size-properly-absolute-expected.txt:
  • platform/ios/css3/filters/backdrop/backdrop-filter-with-cliprect-expected.txt:
  • platform/ios/css3/filters/backdrop/backdrop-filter-with-mask-expected.txt:
  • platform/mac/compositing/images/direct-image-object-fit-expected.txt:
  • platform/mac/compositing/reflections/direct-image-object-fit-reflected-expected.txt:
  • platform/mac/compositing/video/video-object-fit-expected.txt:

Rebaseline some tests to the new logging format.

  • platform/gtk/TestExpectations:
  • platform/win/TestExpectations:
  • platform/wpe/TestExpectations:

Skip the new test on non-Cocoa ports.

4:10 PM Changeset in webkit [276084] by Wenson Hsieh
  • 4 edits
    2 adds in trunk

[macOS] Support the Translate menu item in editable selected text
https://bugs.webkit.org/show_bug.cgi?id=224625
<rdar://problem/76723022>

Reviewed by Tim Horton and Devin Rousso.

Source/WebCore:

Adjust some logic in ContextMenuController to ensure that the "Translate" context menu item shows up for
selected text in both editable and non-editable fields. To do this, we pull code for appending the menu items
out into a separate lambda function, which we use in both cases. This also allows us to remove some duplicated
code between the editable and non-editable codepaths.

Test: fast/events/contextmenu-actions-in-selected-text.html

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::populate):

Additionally, set selectedText and selectionBounds in both cases, as long as there is selected text.

LayoutTests:

Add a new layout test to verify that three context menu actions are consistent across selected text in editable
and non-editable content. This test is valid for all platforms where ENABLE(CONTEXT_MENUS) is set, regardless
of whether or not each individual action is supported.

  • fast/events/contextmenu-actions-in-selected-text-expected.html: Added.
  • fast/events/contextmenu-actions-in-selected-text.html: Added.
  • platform/ios/TestExpectations:
4:04 PM Changeset in webkit [276083] by Sam Sneddon
  • 4 edits in trunk/Tools

scm_unittest.py fails at import-time on Python 2
https://bugs.webkit.org/show_bug.cgi?id=224627

Reviewed by Jonathan Bedard.

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

(Package.repr): Add a repr for debug friendliness

  • Scripts/webkitpy/init.py: pathlib2 never provides pathlib
  • Scripts/webkitpy/common/checkout/scm/scm_unittest.py: ditto
3:58 PM Changeset in webkit [276082] by Jonathan Bedard
  • 4 edits in trunk/Tools

style checker should warn about adding new PHP files
https://bugs.webkit.org/show_bug.cgi?id=223905
<rdar://problem/76112036>

Reviewed by Youenn Fablet.

  • Scripts/webkitpy/style/checker.py:

(CheckerDispatcher.is_valid_file): Check if a file has a file extension for an unsupported language.
(StyleProcessor.should_process): If a file has an extension of an unsupported language, report a
style error.

  • Scripts/webkitpy/style/checker_unittest.py:

(CheckerDispatcherDispatchTest.test_text_paths): php files are now invalid extensions.
(CheckerDispatcherDispatchTest.test_none_paths): php files have no checker.
(StyleProcessor_CodeCoverageTest.MockDispatcher.is_valid_file):
(StyleProcessor_CodeCoverageTest.test_invalid_file): Check that an error is returned when checking
a file with an invalid extension.

  • Scripts/webkitpy/style/checkers/cpp.py:

(CppChecker): Add a language rule.

3:44 PM Changeset in webkit [276081] by Sam Sneddon
  • 5 edits in trunk/Tools

webkitpy classes need not define loads/dumps helpers for pickle
https://bugs.webkit.org/show_bug.cgi?id=224620

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/layout_tests/models/test_failures.py:

(TestFailure.loads): Deleted.
(TestFailure.dumps): Deleted.

  • Scripts/webkitpy/layout_tests/models/test_failures_unittest.py:

(TestFailuresTest.assert_pickle_roundtrip):
(TestFailuresTest.test_pickle_roundtrip):

  • Scripts/webkitpy/layout_tests/models/test_results.py:

(TestResult.loads): Deleted.
(TestResult.dumps): Deleted.

  • Scripts/webkitpy/layout_tests/models/test_results_unittest.py:

(TestResultsTest.test_pickle_roundtrip):

3:44 PM Changeset in webkit [276080] by Russell Epstein
  • 4 edits
    2 adds in branches/safari-611-branch

Cherry-pick r275277. rdar://problem/76375504

Animated pseudo element style resolved against wrong parent style
https://bugs.webkit.org/show_bug.cgi?id=223990
rdar://74997361

Reviewed by Antoine Quint.
Source/WebCore:

In createAnimatedElementUpdate we get the parent and parent box styles from the parent stack.
This is wrong for pseudo elements. Their parent style should the host style which is not pushed to the stack.

This matters in style adjuster which may apply wrong adjustments as a result.

Test: fast/animation/pseudo-element-style-adjuster.html

  • style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::resolveElement): (WebCore::Style::TreeResolver::resolvePseudoStyle): (WebCore::Style::TreeResolver::createAnimatedElementUpdate):

Make static and provide the parent and parent box styles as parameters.

  • style/StyleTreeResolver.h:

LayoutTests:

  • fast/animation/pseudo-element-style-adjuster-expected.html: Added.
  • fast/animation/pseudo-element-style-adjuster.html: Added.

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

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

Null pointer dereference on MediaStreamAudioSourceNode destructor
https://bugs.webkit.org/show_bug.cgi?id=224573

Patch by Ian Gilbert <iang@apple.com> on 2021-04-15
Reviewed by Eric Carlson.

Source/WebCore:

Add null pointer check in case the capture source no longer exists.

Test: webaudio/destroy-audio-source-node-with-no-track-crash.html

  • platform/mediastream/mac/MediaStreamTrackAudioSourceProviderCocoa.cpp:

(WebCore::MediaStreamTrackAudioSourceProviderCocoa::hasNewClient):

LayoutTests:

Add regression test.

  • webaudio/destroy-audio-source-node-with-no-track-crash-expected.txt: Added.
  • webaudio/destroy-audio-source-node-with-no-track-crash.html: Added.
3:34 PM Changeset in webkit [276078] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Crash in ReplaceSelectionCommand::mergeEndIfNeeded()
https://bugs.webkit.org/show_bug.cgi?id=224587

Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2021-04-15
Reviewed by Ryosuke Niwa.

Source/WebCore:

Return early in mergeEndIfNeeded() if either of our VisiblePositions are null.

Test: editing/inserting/insert-horizontal-rule-with-style-crash.html

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::mergeEndIfNeeded):

LayoutTests:

Add a test to catch the editing crash fixed here; thanks to Tuomas Karkkainen
for its basic structure and Ryosuke Niwa for some fixes.

  • editing/inserting/insert-horizontal-rule-with-style-crash-expected.txt: Added.
  • editing/inserting/insert-horizontal-rule-with-style-crash.html: Added.
3:27 PM Changeset in webkit [276077] by Manuel Rego Casasnovas
  • 2 edits in trunk/Source/WebCore

Move FocusRemovalEventsMode into FocusOptions
https://bugs.webkit.org/show_bug.cgi?id=224549
<rdar://problem/76695885>

Reviewed by Darin Adler.

Follow-up patch to use braces initializer for FocusOptions struct and simplify the code.

  • dom/Document.cpp:

(WebCore::Document::adjustFocusedNodeOnNodeRemoval):

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

Cherry-pick r275485. rdar://problem/76412930

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

Reviewed by Darin Adler.

Source/WebCore:

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

  • platform/cocoa/VersionChecks.h:

Source/WebKit:

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

To make the view blank, the approach chosen is the set the opacity of our
root layer to 0 when the JS prompt is requested (before the first paint) and
set the opacity back to 1 after the first paint.

To minimize the risks of breakage, the behavior change is behind a
linked-on-after check. Also, we only trigger this behavior if the WKWebView
client actually implements the corresponding JS prompt delegate.

  • UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::UIClient::runJavaScriptAlert): (WebKit::UIDelegate::UIClient::runJavaScriptConfirm): (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
  • UIProcess/PageClient.h: (WebKit::PageClient::makeViewBlank):
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::stopMakingViewBlankDueToLackOfRenderingUpdate): (WebKit::WebPageProxy::makeViewBlankIfUnpaintedSinceLastLoadCommit): (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::runJavaScriptAlert):
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::makeViewBlank):
  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::didCommitLayerTree):
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::makeViewBlank):
  • UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::didUpdateRenderingAfterCommittingLoad):
  • WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::runJavaScriptAlert): (WebKit::WebChromeClient::runJavaScriptConfirm): (WebKit::WebChromeClient::runJavaScriptPrompt): Add flag to make sure pending async messages are processed *before* the JS prompt sync IPCs. Without this, it was possible for the UIProcess to receive the JS prompt IPC *before* the DidCommitLoadForFrame IPC, which would confuse our logic, since we would think this is a JS prompt for the previous page.
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didCommitLoad):
  • WebProcess/WebPage/WebPage.h: (WebKit::WebPage::sendSyncWithDelayedReply):
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updateRendering):
  • WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::didUpdateRendering):

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

2:40 PM Changeset in webkit [276075] by Russell Epstein
  • 3 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r274377. rdar://problem/76412582

AX: PDF frame conversion routines need to be updated
https://bugs.webkit.org/show_bug.cgi?id=223138

Reviewed by Darin Adler.

PDF bounding boxes are wrong in WebKit because.

1) There's no way for PDF objects to get the primary screen height. So we need to be able to return the primary

screen height from an object in the PDF hierarchy.

2) The WKPDFPluginAccessibilityObject's position was not being converted correctly.

  • WebProcess/Plugins/PDF/PDFPlugin.mm: (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:]): (-[WKPDFPluginAccessibilityObject ALLOW_DEPRECATED_IMPLEMENTATIONS_END]): (WebKit::PDFPlugin::boundsOnScreen const):
  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm: (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):

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

2:40 PM Changeset in webkit [276074] by Russell Epstein
  • 6 edits in branches/safari-611-branch/Source/WebKit

Apply patch. rdar://problem/76375364

2:37 PM Changeset in webkit [276073] by Ruben Turcios
  • 1 copy in tags/Safari-612.1.11

Tag Safari-612.1.11.

2:13 PM Changeset in webkit [276072] by achristensen@apple.com
  • 9 edits in trunk/Source

Add deprecation macros
https://bugs.webkit.org/show_bug.cgi?id=224624

Source/ThirdParty/ANGLE:

  • src/gpu_info_util/SystemInfo_macos.mm:

(angle::GetVendorIDFromMetalDeviceRegistryID):

Source/WebCore:

  • platform/audio/mac/AudioHardwareListenerMac.cpp:

(WebCore::isAudioHardwareProcessRunning):
(WebCore::currentDeviceSupportedBufferSizes):
(WebCore::processIsRunningPropertyDescriptor):
(WebCore::outputDevicePropertyDescriptor):

  • platform/audio/mac/AudioSessionMac.mm:

(WebCore::defaultDevice):
(WebCore::defaultDeviceTransportIsBluetooth):
(WebCore::AudioSessionPrivate::addSampleRateObserverIfNeeded):
(WebCore::AudioSessionPrivate::addBufferSizeObserverIfNeeded):
(WebCore::AudioSession::sampleRate const):
(WebCore::AudioSession::bufferSize const):
(WebCore::AudioSession::maximumNumberOfOutputChannels const):
(WebCore::AudioSession::setPreferredBufferSize):
(WebCore::AudioSession::isMuted const):
(WebCore::AudioSession::addMutedStateObserver):
(WebCore::AudioSession::removeMutedStateObserver):

  • platform/graphics/mac/GraphicsChecksMac.cpp:

(WebCore::attachToAppleGraphicsControl):

  • platform/mediastream/mac/CoreAudioCaptureDevice.cpp:

(WebCore::getDeviceInfo):
(WebCore::CoreAudioCaptureDevice::CoreAudioCaptureDevice):
(WebCore::CoreAudioCaptureDevice::relatedAudioDeviceIDs):

  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:

(WebCore::deviceHasInputStreams):
(WebCore::deviceHasOutputStreams):
(WebCore::isValidCaptureDevice):
(WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices):
(WebCore::computeAudioDeviceList):

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioSharedUnit::defaultOutputDevice):

2:07 PM Changeset in webkit [276071] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests

calc() simplification for a multiplication should apply the multiplication to each value of an addition
https://bugs.webkit.org/show_bug.cgi?id=224376

Reviewed by Dean Jackson.

Add a test for a multiplication with more than 2 values on the multiplied side such that
we check that we correctly handle a larger number of children in Add node than we did in
the Product node, which led to a crash in an earlier version of the patch that
landed for bug 224376 (r275793) but was then corrected in r275869.

  • css3/calc/simplification-expected.txt:
  • css3/calc/simplification.html:
1:31 PM Changeset in webkit [276070] by don.olmstead@sony.com
  • 12 edits in trunk

ANGLE is only being built when WebGL is enabled
https://bugs.webkit.org/show_bug.cgi?id=224555

Reviewed by Fujii Hironori.

.:

ANGLE should be built if either USE_ANGLE_EGL or ENABLE_WEBGL is ON.

  • Source/CMakeLists.txt:

Source/WebCore:

Remove any ENABLE(WEBGL) guards that reference functionality that isn't WebGL specific.
Modify the CMakeLists file to build with USE_ANGLE_EGL when ENABLE_WEBGL is OFF.

  • CMakeLists.txt:
  • platform/graphics/GLContext.h:
  • platform/graphics/angle/ANGLEHeaders.h:
  • platform/graphics/egl/GLContextEGL.cpp:

(WebCore::GLContextEGL::platformContext):

  • platform/graphics/egl/GLContextEGL.h:
  • platform/graphics/glx/GLContextGLX.cpp:

(WebCore::GLContextGLX::platformContext):

  • platform/graphics/glx/GLContextGLX.h:
  • platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
  • platform/graphics/opengl/TemporaryOpenGLSetting.h:
1:31 PM Changeset in webkit [276069] by mark.lam@apple.com
  • 10 edits
    1 add in trunk/Source

Optimize the DeferTermination scope to be more efficient.
https://bugs.webkit.org/show_bug.cgi?id=224619

Reviewed by Saam Barati.

Source/JavaScriptCore:

This can be beneficial since we may be using DeferTermination in more places in
the code.

  1. Added a VMTrapsInlines.h to hold the inline functions.
  1. Split deferTermination() and undoDeferTermination() into fast and slow functions. The fast functions are inlineable.
  1. Remove the locking of VMTraps::m_lock in these functions. These functions only modify the following:
    1. VMTraps::m_deferTerminationCount
    2. VMTraps::m_suspendedTerminationException
    3. VMTraps::m_trapBits for setting the NeedTermination bit if needed.
    4. VM::m_exception

Except for VMTraps::m_trapBits, all of these are only written to from the mutator
thread. VMTraps::m_trapBits is always written to using Atomics. There isn't
anything that needs to be guarded by VMTraps::m_lock.

  1. Fix VMTraps::deferTermination() to only set m_suspendedTerminationException and clear an existing TerminationException if it's being called from the outermost DeferTermination (i.e. m_deferTerminationCount is 1 after incrementing). These conditional operations are not done in VMTraps::deferTerminationSlow().

In practice, it wouldn't have mattered anyway because we would never throw a
TerminationException while a DeferTermination scope is in effect. The
the vm.isTerminationException() in the original deferTermination() would
always have prevented the slow path operations from being executed anyway.

However, for the purpose of this patch, we want to avoid as much unnecessary
work as possible in the fast path. Hence, it is good to skip the slow path
if deferTermination() isn't called from the outermost scope.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • jit/JITOperations.cpp:
  • jsc.cpp:
  • runtime/JSGlobalObject.cpp:
  • runtime/VMTraps.cpp:

(JSC::VMTraps::deferTerminationSlow):
(JSC::VMTraps::undoDeferTerminationSlow):
(JSC::VMTraps::vm const): Deleted.
(JSC::VMTraps::deferTermination): Deleted.
(JSC::VMTraps::undoDeferTermination): Deleted.

  • runtime/VMTraps.h:
  • runtime/VMTrapsInlines.h: Added.

(JSC::VMTraps::vm const):
(JSC::VMTraps::deferTermination):
(JSC::VMTraps::undoDeferTermination):

Source/WebCore:

  • workers/WorkerOrWorkletScriptController.cpp:
1:16 PM Changeset in webkit [276068] by Russell Epstein
  • 11 edits
    4 deletes in branches/safari-611-branch

Revert "Cherry-pick r271879. rdar://problem/76375364"

1:16 PM Changeset in webkit [276067] by Russell Epstein
  • 7 edits
    2 deletes in branches/safari-611-branch

Revert "Cherry-pick r272051. rdar://problem/76375364"

1:16 PM Changeset in webkit [276066] by Russell Epstein
  • 13 edits
    1 copy
    2 moves
    2 adds in branches/safari-611-branch/Source

Revert "Cherry-pick r272196. rdar://problem/76375364"

1:15 PM Changeset in webkit [276065] by Russell Epstein
  • 17 edits in branches/safari-611-branch

Revert "Cherry-pick r273848. rdar://problem/76375364"

1:15 PM Changeset in webkit [276064] by Russell Epstein
  • 4 edits in branches/safari-611-branch/Tools

Revert "Cherry-pick r271794. rdar://problem/76375364"

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

Revert "Cherry-pick r272195. rdar://problem/76375364"

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

Revert "Cherry-pick r272301. rdar://problem/76375364"

1:15 PM Changeset in webkit [276061] by Russell Epstein
  • 10 edits in branches/safari-611-branch/Source

Revert "Cherry-pick r272010. rdar://problem/76375364"

1:15 PM Changeset in webkit [276060] by Russell Epstein
  • 14 edits in branches/safari-611-branch

Revert "Cherry-pick r272009. rdar://problem/76375364"

1:15 PM Changeset in webkit [276059] by Russell Epstein
  • 3 edits in branches/safari-611-branch/Source/WebKit

Revert "Cherry-pick r272138. rdar://problem/76375364"

1:15 PM Changeset in webkit [276058] by Russell Epstein
  • 10 edits in branches/safari-611-branch/Source

Revert "Cherry-pick r272641. rdar://problem/76375364"

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

Cherry-pick r274862. rdar://problem/76416505

Nullptr crash in HTMLConverter::convert
https://bugs.webkit.org/show_bug.cgi?id=221719

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

When the "Undo" command is called after DOM changes, one of the selection's position anchors
may have been moved to a new document. In that case, just clear the selection. Also add
asserts to ensure the selection is in good state after unapply and reapply commands.

  • editing/CompositeEditCommand.cpp: (WebCore::EditCommandComposition::unapply): Add security assert to ensure selection is in good state. (WebCore::EditCommandComposition::reapply): Ditto.
  • editing/FrameSelection.cpp: (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance): If the selection's position anchors have been moved to a new document then just clear the selection. (WebCore::FrameSelection::isConnectedToDocument const): New method to verify that all the positions of the visible selection are in m_document.
  • editing/FrameSelection.h: Declare new method.
  • editing/VisibleSelection.cpp: (WebCore::VisibleSelection::document const): New method that returns a common document for all positions or nullptr otherwise.
  • editing/VisibleSelection.h: Declare new method.

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

12:42 PM Changeset in webkit [276056] by Russell Epstein
  • 1 edit in branches/safari-611-branch/Source/WebCore/page/Quirks.cpp

Follow-up build-fix for rdar://problem/76373841

Remove duplicate line for trailers.apple.com quirk.

12:42 PM Changeset in webkit [276055] by Russell Epstein
  • 10 edits in branches/safari-611-branch/Source

Cherry-pick r272641. rdar://problem/76375364

[SOUP] Simplify ResourceRequest and ResourceResponse
https://bugs.webkit.org/show_bug.cgi?id=221543

Reviewed by Adrian Perez de Castro.

Source/WebCore:

There's unused code there and it can be refactored.

  • ResourceRequest:
    • Remove unused member m_soupFlags.
    • Remove updateSoupMessage() that is always called after a SoupMessage has been created and add createSoupMessage() to return a new SoupMessage.
    • Set the message priority in the createSoupMessage() too.
    • Remove updateFromSoupMessage() that is curently used only by WebSockets to update the request headers after the request is sent to include cookies and other headers set by libsoup. We can simply use updateFromSoupMessageHeaders() for that case instead.
  • ResourceResponse:
    • Remove unused member m_soupFlags.
    • Remove updateFromSoupMessage() that is always used with a newly created ResourceResponse and use the ResourceResponse constructor that receives a SoupMessage instead.
    • Sniffed content type is now received as an optional parameter of the ResourceResponse constructor that receives a SoupMessage, and used to set the MIME type and text encoding.
    • Remove unused certificate info getters and the encode/decode methods that are no longer needed.
  • platform/network/soup/ResourceRequest.h: (WebCore::ResourceRequest::encodeWithPlatformData const): (WebCore::ResourceRequest::decodeWithPlatformData):
  • platform/network/soup/ResourceRequestSoup.cpp: (WebCore::toSoupMessagePriority): (WebCore::ResourceRequest::createSoupMessage const):
  • platform/network/soup/ResourceResponse.h: (WebCore::ResourceResponse::ResourceResponse): (WebCore::ResourceResponse::soupMessageCertificate const): (WebCore::ResourceResponse::soupMessageTLSErrors const):
  • platform/network/soup/ResourceResponseSoup.cpp: (WebCore::ResourceResponse::ResourceResponse): (WebCore::ResourceResponse::updateSoupMessageHeaders const): (WebCore::ResourceResponse::updateFromSoupMessageHeaders):

Source/WebKit:

Use new ResourceRequest and ResourceResponse API.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp: (WebKit::NetworkDataTaskSoup::createRequest): Use ResourceRequest::createSoupMessage(). (WebKit::NetworkDataTaskSoup::didSendRequest): Use ResourceResponse passing the SoupMessage and sniffed content type. (WebKit::NetworkDataTaskSoup::didRequestNextPart): Create a ResourceResponse passing the url, content type, expected length and text encoding. Then call ResourceResponse::updateFromSoupMessageHeaders() to set the headers.
  • NetworkProcess/soup/NetworkSessionSoup.cpp: (WebKit::NetworkSessionSoup::createWebSocketTask): Use ResourceRequest::createSoupMessage() and pass the ResourceRequest to WebSocketTask constructor.
  • NetworkProcess/soup/WebSocketTaskSoup.cpp: (WebKit::WebSocketTask::WebSocketTask): Save the ResourceRequest and then just call ResourceRequest::updateFromSoupMessageHeaders() to update the headers after the response has been sent by libsoup. (WebKit::WebSocketTask::didConnect): Use ResourceResponse constructor with the SoupMessage directly. (WebKit::WebSocketTask::didFail): Ditto.
  • NetworkProcess/soup/WebSocketTaskSoup.h:

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

12:42 PM Changeset in webkit [276054] by Russell Epstein
  • 3 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r272138. rdar://problem/76375364

[SOUP] Add support for data URLs in the network process
https://bugs.webkit.org/show_bug.cgi?id=221127

Reviewed by Adrian Perez de Castro.

In r271879 I removed the support for data URLs in the network process for soup, assuming data URLs were always
loaded from the web process, but that's not the case for downloads. I think we should not go to the network
process for downloads either, but for now it's easier to fix this regression by supporting data URLs in the
network process again. Fixes http/tests/security/anchor-download-allow-data.html.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp: (WebKit::NetworkDataTaskSoup::createRequest): Return early if it's a data URL. (WebKit::NetworkDataTaskSoup::clearRequest): Clear the pending data URL result. (WebKit::NetworkDataTaskSoup::resume): Start a data URL decode task if it's a new data URL request, or complete the pending one. (WebKit::NetworkDataTaskSoup::didReadDataURL): Complete the data URL request.
  • NetworkProcess/soup/NetworkDataTaskSoup.h:

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

12:42 PM Changeset in webkit [276053] by Russell Epstein
  • 14 edits in branches/safari-611-branch

Cherry-pick r272009. rdar://problem/76375364

Load data URLs in the web process also for synchronous loads
https://bugs.webkit.org/show_bug.cgi?id=220981

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Add synchronous API for DataURLDecoder. It now uses a Vector<char> for the data instead of SharedBuffer. That
way, ResourceLoader can create the SharedBuffer from the given data and loader strategy can simply move it.

  • Headers.cmake: Add DataURLDecoder.h.
  • WebCore.xcodeproj/project.pbxproj: Mark DataURLDecoder.h as private.
  • loader/ResourceLoader.cpp: (WebCore::ResourceLoader::loadDataURL): Adapt to the DataURLDecoder API changes.
  • platform/network/DataURLDecoder.cpp: (WebCore::DataURLDecoder::parseMediaType): Update the data initialization. (WebCore::DataURLDecoder::decodeBase64): Return bool to indicate success or error and move the resulting vector instead of creating a SharedBuffer. (WebCore::DataURLDecoder::decodeEscaped): Move the resulting vector instead of creating a SharedBuffer. (WebCore::DataURLDecoder::decodeSynchronously): Helper to do the actual decoding synchronously. (WebCore::DataURLDecoder::decode): Use decodeSynchronously. (WebCore::DataURLDecoder::decode): Synchronous implementation.
  • platform/network/DataURLDecoder.h:
  • platform/network/ResourceResponseBase.cpp: (WebCore::ResourceResponseBase::dataURLResponse): Create a ResourceResponse for the given url and DataURLDecoder::Result.
  • platform/text/DecodeEscapeSequences.h: (WebCore::decodeURLEscapeSequencesAsData): Use Vector<char> so that we can avoid data copies.

Source/WebKit:

In r271879 I removed the support for data URLs in the network process for soup, assuming data URLs were always
loaded from the web process, but that's not the case for synchronous loads.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp: (WebKit::NetworkDataTaskSoup::createRequest): Schedule an error if URL is not file or HTTP family.
  • WebProcess/Network/WebLoaderStrategy.cpp: (WebKit::WebLoaderStrategy::loadDataURLSynchronously): Helper to load a Data URL synchronously. (WebKit::WebLoaderStrategy::loadResourceSynchronously): Call loadDataURLSynchronously for data URLs.
  • WebProcess/Network/WebLoaderStrategy.h:

LayoutTests:

Remove expectations for tests that are no longer crashing.

  • platform/glib/TestExpectations:

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

12:39 PM Changeset in webkit [276052] by graouts@webkit.org
  • 12 edits in trunk

calc() should not contain 0 values other than percentages
https://bugs.webkit.org/show_bug.cgi?id=224611

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Fix expectation of existing WPT tests and make some modifications to existing WPT tests.

  • web-platform-tests/css/css-flexbox/parsing/flex-basis-computed-expected.txt:
  • web-platform-tests/css/css-shapes/parsing/shape-outside-computed-expected.txt:
  • web-platform-tests/css/css-shapes/parsing/shape-outside-computed.html: Add a new assertion checking

that the computed style for shape-outside may not contain 0px values in calc() values.

  • web-platform-tests/css/css-transitions/animations/vertical-align-interpolation-expected.txt:
  • web-platform-tests/css/css-transitions/animations/vertical-align-interpolation.html: Use 40% rather than

calc(0px + 40%) as the expected value for the computed style at the 100% keyframe when blending from 40px
to 40%. The test would have passed with calc(0px + 40%) as well, since it would now compute to 40%, but
the test is clearer when the actual computed form is used.

  • web-platform-tests/css/css-values/minmax-percentage-serialize-expected.txt:

Source/WebCore:

A calc() value containing a 0px value, such as calc(10% + 0px), was incorrectly serialized
as-is for the computed style, instead of the simplified form containing on the percentage.

For the correct behavior we need to make four changes in css/CSSCalculationValue.cpp:

  1. in createCSS(const CalcExpressionNode&, const RenderStyle&), when dealing with a node

that is CalcExpressionNodeType::Length, we return nullptr in the case then node's Length
is a 0 value that's not a percentage,

  1. additionally, in createCSS(const Vector<std::unique_ptr<CalcExpressionNode>>&, const RenderStyle&),

we no longer bail when a nullptr value is returned for a child and instead proceed with the
processing of further children, ensuring that a 0px value in, say, a Sum operation is removed
while retaining other non-zero values,

  1. back in createCSS(const CalcExpressionNode&, const RenderStyle&), for CalcExpressionNodeType::Operation

nodes, when there is single parameter to a Sum operation we return that parameter rather than
a Sum operation, and do the same for a Negate operation, making sure we return negated node if
it is the second child,

  1. finally, in CSSCalcOperationNode::buildCSSText(const CSSCalcExpressionNode&, StringBuilder&)

when we serialize a calculated value, we do not enclose the value in a calc() string if the
node is a CSSCalcPrimitiveValueNode.

  • css/CSSCalculationValue.cpp:

(WebCore::CSSCalcOperationNode::buildCSSText):
(WebCore::createCSS):

LayoutTests:

Adjust a non-WPT test to not feature a 0px addition.

  • fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt:
  • fast/shapes/shape-outside-floats/shape-outside-animation.html:
12:32 PM Changeset in webkit [276051] by Wenson Hsieh
  • 7 edits in trunk

WKContentView should become focused without requiring -[WKWebView canBecomeFocused] to return YES
https://bugs.webkit.org/show_bug.cgi?id=224613
<rdar://problem/76710314>

Reviewed by Tim Horton.

Source/WebKit:

Make a couple of minor tweaks to WKContentView's implementation of the UIFocus protocol methods.

Test: UIFocusTests.ContentViewCanBecomeFocused

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView canBecomeFocused]): Deleted.

Remove the ability for clients to influence -[WKContentView canBecomeFocused] by overriding `-[WKWebView
canBecomeFocused]. Apparently, making WKWebView` focusable by UIKit in addition to the content view causes the
web view to occasionally take first responder instead of the content view, which then breaks key event handling.

Instead, make it so that -[WKContentView canBecomeFocused] still returns NO by default, return YES for
internal clients that override the private UI delegate method -_webView:takeFocus:, and additionally introduce
a new delegate method, -_webViewCanBecomeFocused:, so that clients can make -[WKContentView canBecomeFocused]
return NO even if the delegate responds to -_webView:takeFocus:. This is because it doesn't make sense for a
WebKit client to allow UIKit's focus engine to (effectively) descend into web content without a way for the
embedder to handle the case where focus later ascends out of web content (and asks the UI delegate to take
focus).

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

(-[WKContentView canBecomeFocused]):
(-[WKContentView didUpdateFocusInContext:withAnimationCoordinator:]):

Also, make a minor adjustment here to avoid moving focus to the next or previous focusable element in the case
where focus is being moved _away from_ the content view, by consulting -[UIFocusUpdateContext nextFocusedView].

(-[WKContentView canBecomeFocusedForWebView]): Deleted.

Tools:

Adjust an existing API test so that it adopts the new UI delegate method.

  • TestWebKitAPI/Tests/ios/UIFocusTests.mm:

(-[UIFocusDelegate _webViewCanTakeFocus:]):
(-[UIFocusDelegate _webView:takeFocus:]):
(TestWebKitAPI::TEST):
(-[UIFocusTestWKWebView canBecomeFocused]): Deleted.

12:26 PM Changeset in webkit [276050] by Russell Epstein
  • 10 edits in branches/safari-611-branch/Source

Cherry-pick r272010. rdar://problem/76375364

[SOUP] Stop using SoupRequest API in preparation for libsoup3
https://bugs.webkit.org/show_bug.cgi?id=220764

Reviewed by Adrian Perez de Castro.

Source/WebCore:

  • platform/network/soup/ResourceError.h: Error constructors now receive the failing URL instead of a SoupRequest that is only used to get its URL.
  • platform/network/soup/ResourceErrorSoup.cpp: (WebCore::ResourceError::transportError): (WebCore::ResourceError::httpError): (WebCore::ResourceError::genericGError):
  • platform/network/soup/ResourceRequest.h: Remmove the constructor that receives a SoupRequest and the initiating page ID since it's currently unsused.
  • platform/network/soup/ResourceRequestSoup.cpp:
  • platform/network/soup/SoupNetworkSession.h:

Source/WebKit:

It's gone in libsoup3, we can just use soup_session_send_async() instead, which is what SoupRequest does
internally.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp: (WebKit::NetworkDataTaskSoup::createRequest): Manually create the SoupMessage. Also connect to content-sniffed signal that it was handled by SoupRequest internally. (WebKit::NetworkDataTaskSoup::clearRequest): Remove the SoupRequest reset and clear m_sniffedContentType. (WebKit::NetworkDataTaskSoup::resume): Use soup_session_send_async(). We need to know the message for passed to the function from the async ready callback, so we use a struct to pass both the task and the message. In case of being suspended the struct was attached to the pending result. (WebKit::NetworkDataTaskSoup::sendRequestCallback): Finish the soup_session_send_async() operation. (WebKit::NetworkDataTaskSoup::didSendRequest): Set the sniffed content type from m_sniffedContentType. (WebKit::NetworkDataTaskSoup::tlsConnectionAcceptCertificate): Use SoupMessage instead of SoupRequest to get the URI. (WebKit::NetworkDataTaskSoup::didSniffContentCallback): Build the sniffed content type and call didSniffContent(). (WebKit::NetworkDataTaskSoup::didSniffContent): Save the passed content type. (WebKit::NetworkDataTaskSoup::continueAuthenticate): Use m_currentRequest instead of the SoupRequest to build the authentication error. (WebKit::NetworkDataTaskSoup::skipInputStreamForRedirectionCallback): Pass the failing URL to the ResourceError constructor. (WebKit::NetworkDataTaskSoup::continueHTTPRedirection): Ditto. (WebKit::NetworkDataTaskSoup::readCallback): Ditto. (WebKit::NetworkDataTaskSoup::requestNextPartCallback): Ditto.
  • NetworkProcess/soup/NetworkDataTaskSoup.h:
  • WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp: Stop setting the initiating page ID in the request because it's unused.

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

12:26 PM Changeset in webkit [276049] by Russell Epstein
  • 1 edit in branches/safari-611-branch/Source/WebCore/page/Quirks.cpp

Unreviewed build fix after bad merge in rdar://problem/76373841

./page/Quirks.cpp:1305:14: error: redefinition of 'host'

12:26 PM Changeset in webkit [276048] by Russell Epstein
  • 5 edits in branches/safari-611-branch/Source

Cherry-pick r272301. rdar://problem/76375364

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

Reviewed by Adrian Perez de Castro.

Source/WebCore:

  • platform/network/soup/AuthenticationChallengeSoup.cpp: (WebCore::protectionSpaceServerTypeFromURL): (WebCore::protectionSpaceFromSoupAuthAndURL): (WebCore::AuthenticationChallenge::AuthenticationChallenge): (WebCore::protectionSpaceServerTypeFromURI): Deleted. (WebCore::protectionSpaceFromSoupAuthAndMessage): Deleted.

Source/WebKit:

  • UIProcess/API/glib/WebKitURISchemeRequest.cpp: (webkit_uri_scheme_request_get_scheme): (webkit_uri_scheme_request_get_path):
  • UIProcess/API/glib/WebKitWebView.cpp: (webkit_web_view_load_uri):

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

12:26 PM Changeset in webkit [276047] by Russell Epstein
  • 8 edits in branches/safari-611-branch

Cherry-pick r272195. rdar://problem/76375364

[GTK][WPE] Migrate WebKitTestServer to libsoup 2.48 API
https://bugs.webkit.org/show_bug.cgi?id=219160
<rdar://problem/71620310>

Reviewed by Michael Catanzaro.

Source/WTF:

  • wtf/Platform.h: Bump libsoup minimum required version to 2.54.

Tools:

  • TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp: (serverCallback):
  • TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp: (serverCallback):
  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp: (serverCallback):
  • TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp: (WebKitTestServer::WebKitTestServer): (WebKitTestServer::run): (WebKitTestServer::port const):
  • TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.h:

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

12:26 PM Changeset in webkit [276046] by Russell Epstein
  • 4 edits in branches/safari-611-branch/Tools

Cherry-pick r271794. rdar://problem/76375364

Unreviewed, reverting r270074 and r270170.
https://bugs.webkit.org/show_bug.cgi?id=220922

Broke all GLib unit tests using a SoupServer

Reverted changesets:

"[GTK] Migrate WebKitTestServer to libsoup 2.48 API"
https://bugs.webkit.org/show_bug.cgi?id=219160
https://trac.webkit.org/changeset/270074

"[GTK] Allow WebKitTestServer to run non-loopback addresses
for API tests"
https://bugs.webkit.org/show_bug.cgi?id=219257
https://trac.webkit.org/changeset/270170

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

12:26 PM Changeset in webkit [276045] by Russell Epstein
  • 10 edits
    2 adds in branches/safari-611-branch

Cherry-pick r272928. rdar://problem/76416505

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:

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

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

Cherry-pick r274819. rdar://problem/76373741

AVAudioSessionCaptureDeviceManager should use crossThreadCopy
https://bugs.webkit.org/show_bug.cgi?id=223565
<rdar://75480589>

Reviewed by Youenn Fablet.

Tested manually, this can only be tested on device.

  • platform/mediastream/CaptureDevice.h: Change access restriction for member variables from private: to protected: so derived classes can access them directly.
  • platform/mediastream/ios/AVAudioSessionCaptureDevice.h:
  • platform/mediastream/ios/AVAudioSessionCaptureDevice.mm: (WebCore::AVAudioSessionCaptureDevice::AVAudioSessionCaptureDevice): New constructor. (WebCore::AVAudioSessionCaptureDevice::isolatedCopy const): New.
  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm: (WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices): Use WTFMove(deviceList).isolatedCopy() when moving from AVAudioSession queue to main thread. (WebCore::AVAudioSessionCaptureDeviceManager::getCaptureDevices): Ditto.

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

12:25 PM Changeset in webkit [276043] by Russell Epstein
  • 17 edits in branches/safari-611-branch

Cherry-pick r273848. rdar://problem/76375364

Use adoptNS() right away after calling [obj copy] / [obj mutableCopy]
https://bugs.webkit.org/show_bug.cgi?id=222634

Reviewed by Darin Adler.

Use adoptNS() right away after calling [obj copy] / [obj mutableCopy] to minimize the chance of leaks.

Source/WebCore:

  • editing/cocoa/HTMLConverter.mm: (defaultParagraphStyle):
  • platform/cocoa/SystemVersion.mm: (WebCore::createSystemMarketingVersion): (WebCore::systemMarketingVersion):

Source/WebKit:

  • Shared/ApplePay/ApplePayPaymentSetupFeatures.mm: (WebKit::PaymentSetupFeatures::decode):
  • Shared/ApplePay/PaymentSetupConfiguration.mm: (WebKit::PaymentSetupConfiguration::decode):
  • Shared/ApplePay/cocoa/PaymentSetupConfiguration.mm: (WebKitAdditions::PaymentSetupConfiguration::decode):
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::systemDirectoryPath):
  • UIProcess/mac/ServicesController.mm: (WebKit::ServicesController::refreshExistingServices):
  • UIProcess/mac/WebPageProxyMac.mm: (WebKit::temporaryPDFDirectoryPath):

Source/WebKitLegacy/mac:

  • Misc/WebNSPasteboardExtras.mm: (_writableTypesForImageWithArchive):
  • WebCoreSupport/WebApplicationCache.mm: (overrideBundleIdentifier): (+[WebApplicationCache initializeWithBundleIdentifier:]): (applicationCacheBundleIdentifier):
  • WebView/WebPreferences.mm: (classIBCreatorID): (+[WebPreferences _setIBCreatorID:]): (+[WebPreferences _IBCreatorID]):

Tools:

  • TestWebKitAPI/Tests/WebKit/mac/ContextMenuMouseEvents.mm: (TestWebKitAPI::runTest):
  • TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm: (TEST):

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

12:25 PM Changeset in webkit [276042] by Russell Epstein
  • 13 edits
    2 moves
    3 deletes in branches/safari-611-branch/Source

Cherry-pick r272196. rdar://problem/76375364

[SOUP] Stop using SoupBuffer in preparation for libsoup3
https://bugs.webkit.org/show_bug.cgi?id=221206

Reviewed by Sergio Villar Senin.

Source/WebCore:

Remove use of SoupBuffer from platform since it's now unused.

  • platform/SharedBuffer.cpp: (WebCore::SharedBuffer::DataSegment::data const): (WebCore::SharedBuffer::DataSegment::size const):
  • platform/SharedBuffer.h:
  • platform/Soup.cmake:
  • platform/SourcesSoup.txt:
  • platform/network/soup/GRefPtrSoup.cpp: Removed.
  • platform/network/soup/GRefPtrSoup.h: Removed.
  • platform/network/soup/GUniquePtrSoup.h:
  • platform/network/soup/ResourceRequestSoup.cpp: (WebCore::ResourceRequest::updateSoupMessageBody const):
  • platform/soup/SharedBufferSoup.cpp: Removed.

Source/WebKit:

Use GBytes instead of SoupBuffer.

  • NetworkProcess/cache/NetworkCacheData.h: (WebKit::NetworkCache::Data::bytes const):
  • NetworkProcess/cache/NetworkCacheDataGLib.cpp: Renamed from Source/WebKit/NetworkProcess/cache/NetworkCacheDataSoup.cpp. (WebKit::NetworkCache::Data::Data): (WebKit::NetworkCache::Data::empty): (WebKit::NetworkCache::Data::data const): (WebKit::NetworkCache::Data::apply const): (WebKit::NetworkCache::Data::subrange const): (WebKit::NetworkCache::concatenate): (WebKit::NetworkCache::Data::adoptMap): (WebKit::NetworkCache::Data::tryCreateSharedMemory const):
  • NetworkProcess/cache/NetworkCacheIOChannel.h:
  • NetworkProcess/cache/NetworkCacheIOChannelGLib.cpp: Renamed from Source/WebKit/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp. (WebKit::NetworkCache::runTaskInQueue): (WebKit::NetworkCache::fillDataFromReadBuffer): (WebKit::NetworkCache::inputStreamReadReadyCallback): (WebKit::NetworkCache::IOChannel::read): (WebKit::NetworkCache::IOChannel::readSyncInThread): (WebKit::NetworkCache::outputStreamWriteReadyCallback): (WebKit::NetworkCache::IOChannel::write):
  • Shared/ShareableResource.cpp: (WebKit::ShareableResource::wrapInSharedBuffer):
  • SourcesGTK.txt:
  • SourcesWPE.txt:

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

12:25 PM Changeset in webkit [276041] by Russell Epstein
  • 7 edits
    2 adds in branches/safari-611-branch

Cherry-pick r272051. rdar://problem/76375364

[SOUP] Use a GInputStream to set the request body in preparation for libsoup3
https://bugs.webkit.org/show_bug.cgi?id=221034

Reviewed by Adrian Perez de Castro.

Source/WebCore:

In libsoup3, the request body can be set using a stream. Add the stream now, that can still be used in libsoup2
to set the body data. This moves the FormData processing code to WebKitFormDataInputStream and also implements
the file seek and range length, which makes test http/tests/local/blob/send-hybrid-blob-using-open-panel.html pass.

  • platform/SourcesSoup.txt:
  • platform/network/soup/ResourceRequestSoup.cpp: (WebCore::ResourceRequest::updateSoupMessageBody const):
  • platform/network/soup/WebKitFormDataInputStream.cpp: Added. (webkitFormDataInputStreamCreateNextStream): (webkitFormDataInputStreamRead): (webkitFormDataInputStreamClose): (webkit_form_data_input_stream_class_init): (webkitFormDataInputStreamNew): (webkitFormDataInputStreamReadAll):
  • platform/network/soup/WebKitFormDataInputStream.h: Added.

Tools:

Add WebKitFormDataInputStream as an exception for some style checker rules.

  • Scripts/webkitpy/style/checker.py:

LayoutTests:

Remove expectations of http/tests/local/blob/send-hybrid-blob-using-open-panel.html that is now passing.

  • platform/gtk/TestExpectations:

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

12:25 PM Changeset in webkit [276040] by Russell Epstein
  • 11 edits
    5 adds in branches/safari-611-branch

Cherry-pick r271879. rdar://problem/76375364

[SOUP] Stop using SoupRequest API to load files in preparation for libsoup3
https://bugs.webkit.org/show_bug.cgi?id=220509

Reviewed by Adrian Perez de Castro.

Source/WebCore/platform/gtk/po:

  • POTFILES.in: Add WebKitDirectoryInputStream.cpp

Source/WebKit:

SoupRequest API is gone in libsoup3 and there's no replacement for file requests. GResource and data URI loads
already happen in the web process so we only need to care about file and directory loads.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp: (WebKit::NetworkDataTaskSoup::createRequest): Create a GFile for local files. (WebKit::NetworkDataTaskSoup::clearRequest): Clear the m_file. (WebKit::NetworkDataTaskSoup::resume): Check also if there's a file operation to resume. (WebKit::NetworkDataTaskSoup::didSendRequest): We always have a soup message now here because SoupRequest is only used for HTTP. (WebKit::NetworkDataTaskSoup::readCallback): In case of failure check if this is an HTTP or file request to create the error. (WebKit::NetworkDataTaskSoup::fileQueryInfoCallback): Call didGetFileInfo() and continue reading the file or directory. (WebKit::NetworkDataTaskSoup::didGetFileInfo): Set URL, content type and length of the response for the given GFileInfo. (WebKit::NetworkDataTaskSoup::readFileCallback): Complete the g_file_read_async operation. (WebKit::NetworkDataTaskSoup::enumerateFileChildrenCallback): Create a WebKitDirectoryInputStream. (WebKit::NetworkDataTaskSoup::didReadFile): Set the input stream and notify the response is ready.
  • NetworkProcess/soup/NetworkDataTaskSoup.h:
  • NetworkProcess/soup/Resources/directory.css: Added.
  • NetworkProcess/soup/Resources/directory.js: Added.
  • NetworkProcess/soup/WebKitDirectoryInputStream.cpp: Added. (webkitDirectoryInputStreamCreateHeader): (webkitDirectoryInputStreamCreateFooter): (webkitDirectoryInputStreamCreateRow): (webkitDirectoryInputStreamReadNextFile): (webkitDirectoryInputStreamRead): (webkitDirectoryInputStreamClose): (webkit_directory_input_stream_class_init): (webkitDirectoryInputStreamNew):
  • NetworkProcess/soup/WebKitDirectoryInputStream.h: Added.
  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • SourcesGTK.txt:
  • SourcesWPE.txt:

Tools:

Add WebKitDirectoryInputStream.cpp as exception for style checker.

  • Scripts/webkitpy/style/checker.py:

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

12:18 PM Changeset in webkit [276039] by mark.lam@apple.com
  • 19 edits
    4 adds in trunk/Source

Refactor inline functions out of HashMapImpl.h into HashMapImplInlines.h.
https://bugs.webkit.org/show_bug.cgi?id=224616
rdar://76713709

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

Also do the same for clients of HashMapImpl that require similar refactoring.
This fixes the #include of JSCJSValueInlines.h in HashMapImpl.h, as well as makes
it easier to use other inline functions from other classes in the implementation
of HashMapImpl's inline functions in the future.

This patch only moves inline functions out to their respective *Inlines.h.
There are no behavior changes.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • dfg/DFGAbstractInterpreterInlines.h:
  • dfg/DFGOperations.cpp:
  • runtime/AbstractModuleRecord.cpp:
  • runtime/HashMapImpl.cpp:
  • runtime/HashMapImpl.h:

(JSC::areKeysEqual): Deleted.
(JSC::normalizeMapKey): Deleted.
(JSC::wangsInt64Hash): Deleted.
(JSC::jsMapHash): Deleted.
(JSC::concurrentJSMapHash): Deleted.
(JSC::shouldShrink): Deleted.
(JSC::shouldRehashAfterAdd): Deleted.
(JSC::nextCapacity): Deleted.
(JSC::HashMapImpl::finishCreation): Deleted.
(JSC::HashMapImpl::findBucket): Deleted.
(JSC::HashMapImpl::get): Deleted.
(JSC::HashMapImpl::has): Deleted.
(JSC::HashMapImpl::add): Deleted.
(JSC::HashMapImpl::addNormalized): Deleted.
(JSC::HashMapImpl::remove): Deleted.
(JSC::HashMapImpl::clear): Deleted.
(JSC::HashMapImpl::setUpHeadAndTail): Deleted.
(JSC::HashMapImpl::addNormalizedNonExistingForCloning): Deleted.
(JSC::HashMapImpl::addNormalizedInternal): Deleted.
(JSC::HashMapImpl::findBucketAlreadyHashedAndNormalized): Deleted.
(JSC::HashMapImpl::rehash): Deleted.
(JSC::HashMapImpl::checkConsistency const): Deleted.
(JSC::HashMapImpl::makeAndSetNewBuffer): Deleted.
(JSC::HashMapImpl::assertBufferIsEmpty const): Deleted.

  • runtime/HashMapImplInlines.h: Added.

(JSC::areKeysEqual):
(JSC::normalizeMapKey):
(JSC::wangsInt64Hash):
(JSC::jsMapHash):
(JSC::concurrentJSMapHash):
(JSC::shouldShrink):
(JSC::shouldRehashAfterAdd):
(JSC::nextCapacity):
(JSC::HashMapImpl<HashMapBucketType>::finishCreation):
(JSC::HashMapImpl<HashMapBucketType>::findBucket):
(JSC::HashMapImpl<HashMapBucketType>::get):
(JSC::HashMapImpl<HashMapBucketType>::has):
(JSC::HashMapImpl<HashMapBucketType>::add):
(JSC::HashMapImpl<HashMapBucketType>::addNormalized):
(JSC::HashMapImpl<HashMapBucketType>::remove):
(JSC::HashMapImpl<HashMapBucketType>::clear):
(JSC::HashMapImpl<HashMapBucketType>::setUpHeadAndTail):
(JSC::HashMapImpl<HashMapBucketType>::addNormalizedNonExistingForCloning):
(JSC::HashMapImpl<HashMapBucketType>::addNormalizedInternal):
(JSC::HashMapImpl<HashMapBucketType>::findBucketAlreadyHashedAndNormalized):
(JSC::HashMapImpl<HashMapBucketType>::rehash):
(JSC::HashMapImpl<HashMapBucketType>::checkConsistency const):
(JSC::HashMapImpl<HashMapBucketType>::makeAndSetNewBuffer):
(JSC::HashMapImpl<HashMapBucketType>::assertBufferIsEmpty const):

  • runtime/JSMap.h:
  • runtime/JSMapInlines.h: Added.

(JSC::JSMap::set):

  • runtime/JSSetInlines.h: Added.
  • runtime/JSWeakMap.h:
  • runtime/JSWeakMapInlines.h: Added.

(JSC::JSWeakMap::set):

  • runtime/MapConstructor.cpp:
  • runtime/MapPrototype.cpp:
  • runtime/SetConstructor.cpp:
  • runtime/WeakMapConstructor.cpp:
  • runtime/WeakMapImpl.h:

(JSC::jsWeakMapHash): Deleted.
(JSC::nextCapacityAfterBatchRemoval): Deleted.
(JSC::WeakMapImpl::add): Deleted.
(JSC::WeakMapImpl::shouldRehashAfterAdd const): Deleted.
(JSC::WeakMapImpl::rehash): Deleted.

  • runtime/WeakMapImplInlines.h:

(JSC::jsWeakMapHash):
(JSC::nextCapacityAfterBatchRemoval):
(JSC::WeakMapImpl<WeakMapBucket>::add):
(JSC::WeakMapImpl<WeakMapBucket>::rehash):
(JSC::WeakMapImpl<WeakMapBucket>::shouldRehashAfterAdd const):

  • runtime/WeakMapPrototype.cpp:

Source/WebCore:

  • bindings/js/SerializedScriptValue.cpp:
12:08 PM Changeset in webkit [276038] by Jonathan Bedard
  • 4 edits in trunk/Tools

[results.webkit.org] Fully report git commits
https://bugs.webkit.org/show_bug.cgi?id=224519
<rdar://problem/76619007>

Reviewed by Aakash Jain.

Rather than allowing the back-end to fully define commits associated with a test,
define those commits client side and post the result.

  • Scripts/webkitpy/layout_tests/models/test_run_results.py:

(summarize_results): Handle fully qualified commits.

  • Scripts/webkitpy/port/base.py:

(Port.commits_for_upload): Fully define git commits.

  • Scripts/webkitpy/port/base_unittest.py:

(PortTest.test_commits_for_upload_git_svn):

11:50 AM Changeset in webkit [276037] by beidson@apple.com
  • 8 edits in trunk

Move WKURLSchemeTask redirect API to SPI
https://bugs.webkit.org/show_bug.cgi?id=224581

Reviewed by Alex Christensen.

Source/WebKit:

Need to work out some design kinks.

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

(-[WKURLSchemeTaskImpl _willPerformRedirection:newRequest:completionHandler:]):
(-[WKURLSchemeTaskImpl willPerformRedirection:newRequest:completionHandler:]): Deleted.

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

(-[WKWebViewConfiguration setURLSchemeHandler:forURLScheme:]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setURLSchemeHandlerForScheme):

Tools:

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

(-[TaskSchemeHandler webView:startURLSchemeTask:]):
(-[HTTPRedirectTest webView:startURLSchemeTask:]): Deleted.
(-[HTTPRedirectTest webView:stopURLSchemeTask:]): Deleted.

11:37 AM Changeset in webkit [276036] by Simon Fraser
  • 4 edits in trunk/Source/WebKit

UI process can assert in DisplayLink::decrementFullSpeedRequestClientCount()
https://bugs.webkit.org/show_bug.cgi?id=224388

Reviewed by Tim Horton.

The start/stop of m_wheelEventActivityHysteresis in WebPageProxy could cross
a process swap boundary, resulting in a decrement getting sent to the new DisplayLink/connection
pair for the new process, which asserted.

Fix by telling the DisplayLink about new processes when we're in an active wheel
event state.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::finishAttachingToWebProcess):
(WebKit::WebPageProxy::updateWheelEventActivityAfterProcessSwap):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/mac/DisplayRefreshMonitorMac.cpp:

(WebKit::DisplayRefreshMonitorMac::startNotificationMechanism):
(WebKit::DisplayRefreshMonitorMac::stopNotificationMechanism):

11:08 AM Changeset in webkit [276035] by Alan Coon
  • 1 copy in tags/Safari-612.1.10.4

Tag Safari-612.1.10.4.

10:59 AM Changeset in webkit [276034] by Alan Coon
  • 8 edits in branches/safari-612.1.10-branch/Source

Versioning.

WebKit-7612.1.10.4

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

Use WTF::Function instead of std::function in SVGPropertyAnimatorFactory::attributeAnimatorCreator
https://bugs.webkit.org/show_bug.cgi?id=224586

Reviewed by Darin Adler.

Source/WebCore:

sizeof(WTF::Function<void()>) is 8.
sizeof(std::function<void()>) is 48.

  • svg/properties/SVGPropertyAnimatorFactory.h:

(WebCore::SVGPropertyAnimatorFactory::attributeAnimatorCreator):

Source/WTF:

This requires something like r223122 until something like http://wg21.link/P1249 is accepted.
I also added a missing reserveInitialCapacity call that could reduce rehashing when constructing a HashMap from an initializer_list.

  • wtf/HashMap.h:
10:25 AM Changeset in webkit [276032] by Alan Coon
  • 1 copy in tags/Safari-612.1.10.3

Tag Safari-612.1.10.3.

10:23 AM Changeset in webkit [276031] by Alan Coon
  • 10 edits in branches/safari-612.1.10-branch

Cherry-pick r275687. rdar://problem/76192721

REGRESSION(r273541) WKWebView can't load NSURLRequest subclasses
https://bugs.webkit.org/show_bug.cgi?id=224338
Source/WebCore:

<rdar://76192721>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-08
Reviewed by Brent Fulgham.

We used to use SPI to extract the CFURLRequestRef, but now we just call encodeWithCoder and initWithCoder.
That's great for many reasons, but to stay binary compatible we have to continue to support NSURLRequest subclasses.
They fail in two possible ways:

  1. In ObjC, you can do wild and crazy things such as overriding encodeWithCoder and not calling [super encodeWithCoder:coder];
  2. The process decoding the request (one of our auxiliary processes) almost certainly has not linked with the definition of the subclass. This makes us receive an NSException like this when calling decodeObjectOfClasses:forKey:

* -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (TestURLRequest) for key (root) because no class named "TestURLRequest" was found;
the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target).
If the class was renamed, use setClassName:forClass: to add a class translation mapping to NSKeyedUnarchiver

To solve this problem, when attempting to encode a request that is not an NSURLRequest or NSMutableURLRequest, use existing code in ResourceRequest to extract
the parts we use into an NSMutableURLRequest that we can successfully decode.

  • platform/network/cf/ResourceRequest.h:
  • platform/network/cocoa/ResourceRequestCocoa.mm: (WebCore::ResourceRequest::replacePlatformRequest):

Source/WebKit:

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-08
Reviewed by Brent Fulgham.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm: (IPC::ArgumentCoder<WebCore::ResourceRequest>::encodePlatformData):

Tools:

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-08
Reviewed by Brent Fulgham.

  • TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm: (respond):
  • TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm: (-[TestURLRequest initWithURL:]): (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebKitCocoa/TestURLSchemeHandler.h:

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

10:22 AM Changeset in webkit [276030] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r274877. rdar://problem/76373841

Enable the quirk to disable firing "webkitendfullscreen" event when a video enters picture-in-picture from fullscreen on espn.com
https://bugs.webkit.org/show_bug.cgi?id=223610

Reviewed by Jer Noble.

A video element entering picture-in-picture from fullscreen will fire a "webkitendfullscreen"
event since r266728, but some sites (e.g., espn.com) do not handle the event properly.
Because they assume the video will resume to inline after exiting fullscreen.

This patch enables the quirk for espn.com to disable firing "webkitendfullscreen" event
in that scenario before they fix the issue in the event handler.

  • page/Quirks.cpp: (WebCore::Quirks::shouldDisableEndFullscreenEventWhenEnteringPictureInPictureFromFullscreenQuirk const):

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

10:21 AM Changeset in webkit [276029] by Alan Coon
  • 8 edits in branches/safari-612.1.10-branch/Source

Versioning.

WebKit-7612.1.10.3

10:18 AM Changeset in webkit [276028] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[ MacOS wk2 ] webgl/1.0.3/conformance/glsl/functions/glsl-function-abs.html is flaky crashing
https://bugs.webkit.org/show_bug.cgi?id=224612

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
9:51 AM Changeset in webkit [276027] by Russell Epstein
  • 8 edits in branches/safari-611-branch/Source

Versioning.

WebKit-7611.2.4

9:50 AM Changeset in webkit [276026] by Wenson Hsieh
  • 6 edits
    2 adds in trunk

[iOS] Image extraction fails in Google search results
https://bugs.webkit.org/show_bug.cgi?id=224527
<rdar://problem/76500331>

Reviewed by Andy Estes.

Source/WebCore:

Override the -webkit-user-select CSS property in Google search results pages, and make a slight adjustment to
the user agent stylesheet.

Test: fast/images/image-extraction/image-overlay-in-image-with-zero-font-size.html

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::updateWithImageExtractionResult):

  • html/shadow/imageOverlay.css:

(div#image-overlay):

Additionally force a default value for the font size and font family of the image overlay text, so that a
cascading font size of 0 won't end up breaking logic for computing image overlay CSS transforms. See layout test
for more details.

  • page/Quirks.cpp:

(WebCore::Quirks::needsToForceUserSelectWhenInstallingImageOverlay const):

  • page/Quirks.h:

LayoutTests:

Add a new layout test to exercise the user agent stylesheet change.

  • fast/images/image-extraction/image-overlay-in-image-with-zero-font-size-expected-mismatch.html: Added.
  • fast/images/image-extraction/image-overlay-in-image-with-zero-font-size.html: Added.
9:33 AM Changeset in webkit [276025] by Ruben Turcios
  • 3 edits in branches/safari-612.1.11-branch/Source/JavaScriptCore

Cherry-pick r275924. rdar://problem/76707173

The watchdog should not fire when it's not active.
https://bugs.webkit.org/show_bug.cgi?id=224494
rdar://76581259

Reviewed by Saam Barati and Yusuke Suzuki.

The watchdog is only active when we have entered the VM. If we haven't entered
the VM, we postpone starting the watchdog. For example, see Watchdog::enteredVM()
and Watchdog::exitedVM().

The underlying timer may still fire the NeedWatchdogCheck event after
Watchdog::stopTimer() is called. So, we need to just ignore the event if the
watchdog isn't active.

  • runtime/VMTraps.cpp: (JSC::VMTraps::handleTraps):
  • runtime/Watchdog.h: (JSC::Watchdog::isActive const):

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

9:02 AM Changeset in webkit [276024] by Chris Gambrell
  • 28 edits
    9 adds
    10 deletes in trunk/LayoutTests

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

Reviewed by Jonathan Bedard.

  • http/tests/media/media-document-referer.html:
  • http/tests/media/media-document.html:
  • http/tests/media/media-play-stream-chunked-icy.html:
  • http/tests/media/media-seeking-no-ranges-server.html:
  • http/tests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-live-broadcast.html:
  • http/tests/media/modern-media-controls/pip-support/pip-support-live-broadcast.html:
  • http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html:
  • http/tests/media/modern-media-controls/skip-back-support/skip-back-support-live-broadcast.html:
  • http/tests/media/modern-media-controls/status-support/status-support-live-broadcast.html:
  • http/tests/media/modern-media-controls/time-control/1-to-10-hours.html:
  • http/tests/media/modern-media-controls/time-control/10-hours-or-more.html:
  • http/tests/media/modern-media-controls/time-control/10-minutes-to-1-hour.html:
  • http/tests/media/modern-media-controls/time-control/less-than-10-minutes.html:
  • http/tests/media/resources/create-id3-db.php:
  • http/tests/media/resources/hls/generate-vod.php: Removed.
  • http/tests/media/resources/hls/generate-vod.py: Added.
  • http/tests/media/resources/hls/playlist-with-cookie.m3u8:
  • http/tests/media/resources/hls/sub-playlist-with-cookie.php: Removed.
  • http/tests/media/resources/hls/sub-playlist-with-cookie.py: Added.
  • http/tests/media/resources/hls/test-live.php: Removed.
  • http/tests/media/resources/hls/test-live.py: Added.
  • http/tests/media/resources/load-video.php: Removed.
  • http/tests/media/resources/load-video.py: Added.
  • http/tests/media/resources/serve-video.php: Removed.
  • http/tests/media/resources/serve_video.py:

(answering):

  • http/tests/media/resources/video-auth.php: Removed.
  • http/tests/media/resources/video-auth.py: Added.
  • http/tests/media/resources/video-check-useragent.php: Removed.
  • http/tests/media/resources/video-check-useragent.py: Added.
  • http/tests/media/resources/video-cookie-check-cookie.php: Removed.
  • http/tests/media/resources/video-cookie-check-cookie.py: Added.
  • http/tests/media/resources/video-referer-check-referer.php: Removed.
  • http/tests/media/resources/video-referer-check-referer.py: Added.
  • http/tests/media/video-auth-expected.txt:
  • http/tests/media/video-auth-with-allowCrossOriginSubresourcesToAskForCredentials-expected.txt:
  • http/tests/media/video-auth-with-allowCrossOriginSubresourcesToAskForCredentials.html:
  • http/tests/media/video-auth.html:
  • http/tests/media/video-cookie.html:
  • http/tests/media/video-no-content-length-stall.html:
  • http/tests/media/video-play-stall.html:
  • http/tests/media/video-play-waiting.html:
  • http/tests/media/video-query-url.html:
  • http/tests/media/video-referer.html:
  • http/tests/media/video-useragent.html:
  • media/content/metadata.db: Removed.
  • media/content/metadata.json: Added.
8:51 AM Changeset in webkit [276023] by Antti Koivisto
  • 7 edits in trunk/Source/WebCore

Remove unused RunIterator::setAtEnd
https://bugs.webkit.org/show_bug.cgi?id=224597

Reviewed by Zalan Bujtas.

  • layout/integration/LayoutIntegrationLineIteratorLegacyPath.h:

(WebCore::LayoutIntegration::LineIteratorLegacyPath::atEnd const):
(WebCore::LayoutIntegration::LineIteratorLegacyPath::setAtEnd): Deleted.

  • layout/integration/LayoutIntegrationLineIteratorModernPath.h:

(WebCore::LayoutIntegration::LineIteratorModernPath::atEnd const):
(WebCore::LayoutIntegration::LineIteratorModernPath::setAtEnd):

  • layout/integration/LayoutIntegrationRunIterator.cpp:

(WebCore::LayoutIntegration::RunIterator::setAtEnd): Deleted.

  • layout/integration/LayoutIntegrationRunIterator.h:
  • layout/integration/LayoutIntegrationRunIteratorLegacyPath.h:

(WebCore::LayoutIntegration::RunIteratorLegacyPath::atEnd const):
(WebCore::LayoutIntegration::RunIteratorLegacyPath::setAtEnd): Deleted.

  • layout/integration/LayoutIntegrationRunIteratorModernPath.h:

(WebCore::LayoutIntegration::RunIteratorModernPath::atEnd const):
(WebCore::LayoutIntegration::RunIteratorModernPath::setAtEnd):

8:48 AM Changeset in webkit [276022] by basuke.suzuki@sony.com
  • 2 edits in trunk

Remove warnings caused by export g_config extern definition in WTFConfig.h
https://bugs.webkit.org/show_bug.cgi?id=224462

Reviewed by Don Olmstead.

While building PlayStation port, lots of warnings are displayed:

WTF/Headers\wtf/WTFConfig.h:49:36: warning: redeclaration of 'WebConfig::g_config'
should not add 'dllimport' attribute [-Wdll-attribute-on-redeclaration]
extern "C" WTF_EXPORT_PRIVATE Slot g_config[];


bmalloc/Headers\bmalloc/GigacageConfig.h:38:17: note: previous declaration is here
extern "C" Slot g_config[];

This is because the two definitions are not same.
Becasue we can't solve the situation completely, we just ignore these warnings at
this morment.

  • Source/cmake/OptionsPlayStation.cmake:
8:35 AM Changeset in webkit [276021] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[SOUP] Bring back the call to ResourceResponse::setDeprecatedNetworkLoadMetrics after r276008
https://bugs.webkit.org/show_bug.cgi?id=224608

Reviewed by Adrian Perez de Castro.

It turns out it's actually still used by the inspector. I don't want to revert r276008 because it included other
fixes, so it's just fixed in this patch.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::didSendRequest):
(WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):

6:41 AM Changeset in webkit [276020] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

Allow fast-cq as a prefix for patch name for fast-cq mode on commit-queue
https://bugs.webkit.org/show_bug.cgi?id=224580

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(BugzillaMixin):
(BugzillaMixin._is_patch_obsolete):

  • CISupport/ews-build/steps_unittest.py: Updated unit-test.
6:02 AM Changeset in webkit [276019] by commit-queue@webkit.org
  • 13 edits
    2 adds in trunk

[WebRTC][GStreamer] Build and use the openh264 based encoder if present on the system
https://bugs.webkit.org/show_bug.cgi?id=202538
<rdar://problem/76047172>

Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-15
Reviewed by Xabier Rodriguez-Calvar.

.:

  • Source/CMakeLists.txt:
  • Source/cmake/GStreamerChecks.cmake:

Source/ThirdParty/libwebrtc:

In WPE/GTK we would like to have the libwebrtc openh264 encoder enabled if libopenh264 is
present on the host (eg not vendored).

  • CMakeLists.txt:
  • LibWebRTCWebKitMacros.h.in: Added.
  • Source/webrtc/modules/video_coding/codecs/h264/h264.cc:
  • Source/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc:
  • Source/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.h:
  • cmake/FindOpenh264.cmake: Added.

Source/WebCore:

Enable the openh264 encoder if it is available, it would be preferred over existing
GStreamer H.264 encoders in such case.

  • platform/mediastream/libwebrtc/GStreamerVideoCommon.cpp:

(WebCore::supportedH264Formats):

  • platform/mediastream/libwebrtc/GStreamerVideoCommon.h:
  • platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
  • platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:

(WebCore::GStreamerVideoEncoderFactory::CreateVideoEncoder):
(WebCore::GStreamerVideoEncoderFactory::GetSupportedFormats const):

5:59 AM Changeset in webkit [276018] by youenn@apple.com
  • 6 edits in trunk

Make RTCEncodedVideoFrameMetadata.contributingSources undefined until properly supported
https://bugs.webkit.org/show_bug.cgi?id=224540

Reviewed by Eric Carlson.

Source/WebCore:

We are not yet ready to expose contributing sources for video.
It seems better to have the corresponding field be undefined instead of an empty array.

Covered by updated test.

  • Modules/mediastream/RTCEncodedVideoFrame.idl:
  • Modules/mediastream/RTCRtpTransformableFrame.h:
  • Modules/mediastream/libwebrtc/LibWebRTCRtpTransformableFrame.cpp:

(WebCore::LibWebRTCRtpTransformableFrame::videoMetadata const):

LayoutTests:

  • http/wpt/webrtc/metadata-transform.html:
4:14 AM Changeset in webkit [276017] by Chris Lord
  • 18 edits
    2 adds in trunk/Source/WebCore

Make FontFace parsing worker-safe
https://bugs.webkit.org/show_bug.cgi?id=224426

Reviewed by Darin Adler.

Make CSS FontFace property parsing safe to do in a Worker. Instead of
constructing a rule per property and using the full CSSPropertyParser
path, instead factor out the specific, necessary property parsers into a
new CSSPropertyParserWorkerSafe and make sure they're safe to use in a
Worker (mainly by allowing for specifying the CSSValuePool so that
main-thread singletons don't get used).

No new tests, no change in behavior.

  • Sources.txt: Add CSSPropertyParserWorkerSafe.cpp/.h
  • WebCore.xcodeproj/project.pbxproj:
  • css/FontFace.cpp: Call setters with the ScriptExecutionContext so that we have access to ::cssValuePool() and use new worker-safe parser functions.

(WebCore::FontFace::create):
(WebCore::FontFace::setFamily):
(WebCore::FontFace::setStyle):
(WebCore::FontFace::setWeight):
(WebCore::FontFace::setStretch):
(WebCore::FontFace::setUnicodeRange):
(WebCore::FontFace::setFeatureSettings):
(WebCore::FontFace::setDisplay):

  • css/FontFace.h:
  • css/FontFace.idl:
  • css/parser/CSSParser.cpp: Move WorkerSafe parsing functions to CSSPropertyParserWorkerSafe and remove now-unnecessary parseFontFaceDescriptor.
  • css/parser/CSSParser.h:
  • css/parser/CSSPropertyParser.cpp: Move FontFace property parsers to CSSPropertyParserWorkerSafe.

(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseFontFaceDescriptor):
(WebCore::CSSPropertyParser::consumeFont):

  • css/parser/CSSPropertyParser.h:
  • css/parser/CSSPropertyParserHelpers.cpp: Add WorkerSafe variants for some of the basic consume helpers.

(WebCore::CSSPropertyParserHelpers::CalcParser::CalcParser):
(WebCore::CSSPropertyParserHelpers::CalcParser::consumeValue):
(WebCore::CSSPropertyParserHelpers::CalcParser::consumeInteger):
(WebCore::CSSPropertyParserHelpers::CalcParser::consumeNumber):
(WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):
(WebCore::CSSPropertyParserHelpers::consumeFontWeightNumberWorkerSafe):
(WebCore::CSSPropertyParserHelpers::consumePercent):
(WebCore::CSSPropertyParserHelpers::consumePercentWorkerSafe):
(WebCore::CSSPropertyParserHelpers::consumeAngle):
(WebCore::CSSPropertyParserHelpers::consumeAngleWorkerSafe):
(WebCore::CSSPropertyParserHelpers::consumeIdent):
(WebCore::CSSPropertyParserHelpers::consumeIdentWorkerSafe):
(WebCore::CSSPropertyParserHelpers::consumeFontRaw):

  • css/parser/CSSPropertyParserHelpers.h:

(WebCore::CSSPropertyParserHelpers::consumeIdent):
(WebCore::CSSPropertyParserHelpers::consumeIdentWorkerSafe):

  • css/parser/CSSPropertyParserWorkerSafe.cpp: Added.

(WebCore::CSSPropertyParserWorkerSafe::parseFont):
(WebCore::CSSPropertyParserWorkerSafe::parseColor):
(WebCore::CSSPropertyParserWorkerSafe::parseFontFaceSrc):
(WebCore::CSSPropertyParserWorkerSafe::parseFontFaceStyle):
(WebCore::CSSPropertyParserWorkerSafe::parseFontFaceWeight):
(WebCore::CSSPropertyParserWorkerSafe::parseFontFaceStretch):
(WebCore::CSSPropertyParserWorkerSafe::parseFontFaceUnicodeRange):
(WebCore::CSSPropertyParserWorkerSafe::parseFontFaceFeatureSettings):
(WebCore::CSSPropertyParserWorkerSafe::parseFontFaceDisplay):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontFaceSrcURI):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontFaceSrcLocal):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontFaceSrc):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontStyle):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontStyleKeywordValue):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontStyleRange):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontWeightAbsoluteKeywordValue):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontWeightAbsoluteRange):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontWeightAbsolute):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontStretchKeywordValue):
(WebCore::CSSPropertyParserHelpersWorkerSafe::fontStretchIsWithinRange):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontStretch):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontStretchRange):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontFaceUnicodeRange):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontFeatureTag):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontFeatureSettings):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontFaceFontDisplay):

  • css/parser/CSSPropertyParserWorkerSafe.h: Added.
  • dom/ScriptExecutionContext.cpp: Add ::cssValuePool().

(WebCore::ScriptExecutionContext::cssValuePool):

  • dom/ScriptExecutionContext.h:
  • html/canvas/CanvasRenderingContext2D.cpp: Update due to refactoring.

(WebCore::CanvasRenderingContext2D::setFontWithoutUpdatingStyle):

  • html/canvas/CanvasStyle.cpp:

(WebCore::parseColor):

  • html/canvas/OffscreenCanvasRenderingContext2D.cpp:

(WebCore::OffscreenCanvasRenderingContext2D::setFont):

  • workers/WorkerGlobalScope.h:
4:01 AM Changeset in webkit [276016] by Manuel Rego Casasnovas
  • 7 edits in trunk/Source/WebCore

Move FocusRemovalEventsMode into FocusOptions
https://bugs.webkit.org/show_bug.cgi?id=224549

Reviewed by Darin Adler.

This patch is just a refactoring that moves FocusRemovalEventsMode enum into FocusOptions.
This allows us to simplify some method signatures, as they'll just receive a FocusOptions parameter, instead of two parameters for FocusRemovalEventsMode and FocusDirection.

There is no change of behavior, just a code refactoring.

  • dom/Document.cpp:

(WebCore::Document::adjustFocusedNodeOnNodeRemoval):
(WebCore::Document::setFocusedElement):

  • dom/Document.h:

(WebCore::Document::setFocusedElement):

  • dom/Element.cpp:

(WebCore::Element::focus):

  • dom/FocusOptions.h:
  • page/FocusController.cpp:

(WebCore::FocusController::setFocusedElement):

  • page/FocusController.h:

(WebCore::FocusController::setFocusedElement):

3:59 AM Changeset in webkit [276015] by svillar@igalia.com
  • 2 edits in trunk/Source/WebCore

Empty value is added in codePointsFromString in CSSFontFaceSet::matchingFacesExcludingPreinstalledFonts
https://bugs.webkit.org/show_bug.cgi?id=223857

Reviewed by Darin Adler.

Use UnsignedWithZeroKeyHashTraits in codePointsFromString() to avoid it.

  • css/CSSFontFaceSet.cpp:

(WebCore::codePointsFromString):

3:07 AM Changeset in webkit [276014] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[RenderTreeBuilder] Cleanup the inline tree when moving subtrees
https://bugs.webkit.org/show_bug.cgi?id=224342
<rdar://76349279>

Reviewed by Antti Koivisto.

When an inline box is moved over to a different BFC (<span>), any inline level descendant (<span><img></span>) should be invalidated. The safest way to do this is
to destroy the inline tree (the "subtree moving" will eventually be replaced by "destroy followed by construct" activity).

  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::move):

2:10 AM Changeset in webkit [276013] by youenn@apple.com
  • 19 edits in trunk

Update RTCScriptTransform constructor up to spec
https://bugs.webkit.org/show_bug.cgi?id=224447

Reviewed by Eric Carlson.

Source/WebCore:

Remove built-in support for message ports in RTCRtpScriptTransform/RTCRtpScriptTransformer.
Instead pass a transfer object to RTCRtpScriptTransform constructor used jointly with options to enable the same behavior.
This aligns with the change made in https://github.com/w3c/webrtc-encoded-transform/pull/96.

Covered by updated tests.

  • Modules/mediastream/RTCRtpScriptTransform.cpp:

(WebCore::RTCRtpScriptTransform::create):
(WebCore::RTCRtpScriptTransform::RTCRtpScriptTransform):

  • Modules/mediastream/RTCRtpScriptTransform.h:
  • Modules/mediastream/RTCRtpScriptTransform.idl:
  • Modules/mediastream/RTCRtpScriptTransformer.cpp:

(WebCore::RTCRtpScriptTransformer::create):
(WebCore::RTCRtpScriptTransformer::RTCRtpScriptTransformer):
(WebCore::RTCRtpScriptTransformer::options):

  • Modules/mediastream/RTCRtpScriptTransformer.h:

(WebCore::RTCRtpScriptTransformer::port): Deleted.

  • Modules/mediastream/RTCRtpScriptTransformer.idl:
  • workers/DedicatedWorkerGlobalScope.cpp:

(WebCore::DedicatedWorkerGlobalScope::createRTCRtpScriptTransformer):

  • workers/DedicatedWorkerGlobalScope.h:
  • workers/Worker.cpp:

(WebCore::Worker::createRTCRtpScriptTransformer):

  • workers/Worker.h:

LayoutTests:

  • http/wpt/webrtc/audio-script-transform.html:
  • http/wpt/webrtc/context-transform.js:

(MockRTCRtpTransformer):
(MockRTCRtpTransformer.prototype.start):
(MockRTCRtpTransformer.prototype.process):

  • http/wpt/webrtc/metadata-transform-worker.js:
  • http/wpt/webrtc/script-transform.js:
  • http/wpt/webrtc/video-script-transform.html:
  • http/wpt/webrtc/webrtc-transform.html:
  • http/wpt/webrtc/write-twice-transform.js:
2:07 AM Changeset in webkit [276012] by youenn@apple.com
  • 4 edits
    3 adds in trunk

REGRESSION(Safari 14): iframe with blob url does not work with sandboxing
https://bugs.webkit.org/show_bug.cgi?id=222312
<rdar://problem/74927624>

Reviewed by Chris Dumez.

Source/WebCore:

In https://trac.webkit.org/r275884, we correctly compute whether a blob is to be considered secure or not.
For that, we need to have the blob URL registered with its document origin.
Update PolicyChecker to properly register the temporoary blob URL with its document origin.

Test: http/tests/security/sandbox-iframe-and-blob.https.html

  • loader/PolicyChecker.cpp:

(WebCore::FrameLoader::PolicyChecker::extendBlobURLLifetimeIfNecessary const):

LayoutTests:

  • http/tests/security/resources/sandbox-iframe-and-blob-frame.html: Added.
  • http/tests/security/sandbox-iframe-and-blob.https-expected.txt: Added.
  • http/tests/security/sandbox-iframe-and-blob.https.html: Added.
  • platform/win/TestExpectations:
2:00 AM Changeset in webkit [276011] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[WPE] Unreviewed test gardening. Several tests are failing after async scrolling was activated in r275593.

  • platform/wpe/TestExpectations:
1:43 AM Changeset in webkit [276010] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebCore

REGRESSION(r272900): Nullptr crash in ComposedTreeIterator::traverseNextInShadowTree() via ShadowRoot::hostChildElementDidChange
https://bugs.webkit.org/show_bug.cgi?id=222720

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

This patch reverts r274064 to apply a different fix. Instead of null-checking the nodes returned by
SlotAssignment::assignedNodesForSlot(), assigned nodes are removed from the list when they are about to be
removed from the parent. That ensures we never return nullptr nodes nor nodes with a nullptr parent from the
assigned nodes vector.

  • dom/ComposedTreeIterator.cpp:

(WebCore::ComposedTreeIterator::traverseNextInShadowTree):
(WebCore::ComposedTreeIterator::advanceInSlot):

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::removeBetween):

  • dom/Node.h:

(WebCore::Node::hasShadowRootContainingSlots const):
(WebCore::Node::setHasShadowRootContainingSlots):

  • dom/ShadowRoot.h:
  • dom/SlotAssignment.cpp:

(WebCore::SlotAssignment::addSlotElementByName):
(WebCore::SlotAssignment::removeSlotElementByName):
(WebCore::SlotAssignment::willRemoveAssignedNode):

  • dom/SlotAssignment.h:

(WebCore::ShadowRoot::willRemoveAssignedNode):

1:34 AM Changeset in webkit [276009] by Carlos Garcia Campos
  • 4 edits in trunk

[SOUP] Add support for "nextHopProtocol" for Resource Timing
https://bugs.webkit.org/show_bug.cgi?id=168543

Reviewed by Adrian Perez de Castro.

Source/WebKit:

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::didGetHeaders): Set NetworkLoadMetrics::protocol.

LayoutTests:

Remove passing tests from expectations.

  • platform/glib/TestExpectations:
1:30 AM Changeset in webkit [276008] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit

[SOUP] Stop using ResourceResponse::setDeprecatedNetworkLoadMetrics
https://bugs.webkit.org/show_bug.cgi?id=224541

Reviewed by Adrian Perez de Castro.

We are already providing the metrics via didCompleteWithError(). Also make sure we set fetchStart and use it
instead of a member.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
(WebKit::NetworkDataTaskSoup::didSendRequest):
(WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):
(WebKit::NetworkDataTaskSoup::dispatchDidCompleteWithError):
(WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
(WebKit::NetworkDataTaskSoup::networkEvent):
(WebKit::NetworkDataTaskSoup::didStartRequest):
(WebKit::NetworkDataTaskSoup::didRestart):

  • NetworkProcess/soup/NetworkDataTaskSoup.h:
12:37 AM Changeset in webkit [276007] by Chris Dumez
  • 8 edits in trunk

REGRESSION(r275921-r275922): [ wk2 ] http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html is flakey crashing
https://bugs.webkit.org/show_bug.cgi?id=224566
<rdar://problem/76657007>

Reviewed by Tim Horton.

Source/WebKit:

r275921-r275922 changed the timing of when the WebProcess/RemoteRenderingBackendProxy sends the GPUConnectionToWebProcess::CreateRenderingBackend
IPC to the GPUProcess. This IPC used to get sent as soon as the RemoteRenderingBackendProxy was constructed. However, I delayed sending it until
the RemoteRenderingBackendProxy actually needs to create an ImageBuffer to avoid launching the GPUProcess prematurely.

Unfortunately, this exposed a pre-existing synchronization issue with regards to the RemoteRenderingBackend IPC. In particular, the
GPUConnectionToWebProcess::CreateRenderingBackend was getting sent asynchronously and processed by the GPUProcess on the main thread. This would
cause the creation of the RemoteRenderingBackend object on the GPUProcess side, which would then register itself as a WorkQueueMessageReceiver.
The issue is that the WebProcess was sending the RemoteRenderingBackend IPC so quickly after the CreateRenderingBackend IPC that when the IPC is
received (on the IPC thread), the RemoteRenderingBackend has not had a change to register itself as a WorkQueueMessageReceiver yet. As a result,
some of the early IPC was getting dispatched to the main thread and later IPC would get sent to the RemoteRenderingBackend WorkQueue. This was
causing RemoteRenderingBackend to get processed out of order.

To address the synchronization issue for now, I made the GPUConnectionToWebProcess::CreateRenderingBackend synchronous. This may not be the
best design long term but it is an easy and safe way to resolve this for now. It makes sure the WebProcess cannot send RemoteRenderingBackend
IPC until after the GPUProcess has created the RemoteRenderingBackend and the RemoteRenderingBackend object has registered itself as a
WorkQueueMessageReceiver. We probably want to follow-up when we come up with a better design. For now though, I have verified locally that this
fixes the out of order IPC messaging AND the flaky crashes on these canvas tests.

No new tests, unskipped existing tests that are no longer flaky.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::createRenderingBackend):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/GPUConnectionToWebProcess.messages.in:
  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::ensureGPUProcessConnection):

LayoutTests:

Unskip layout tests that should no longer be flaky.

  • platform/ios-simulator-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
12:34 AM Changeset in webkit [276006] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Deploy Ref/RefPtr in ReplaceSelectionCommand
https://bugs.webkit.org/show_bug.cgi?id=224591

Reviewed by Jiewen Tan.

Deployed Ref/RefPtr in ReplaceSelectionCommand.cpp per guidelines we outlined in
https://lists.webkit.org/pipermail/webkit-dev/2020-September/031386.html

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::positionAvoidingPrecedingNodes):
(WebCore::ReplacementFragment::ReplacementFragment):
(WebCore::ReplacementFragment::removeUnrenderedNodes):
(WebCore::ReplacementFragment::removeInterchangeNodes):
(WebCore::ReplaceSelectionCommand::shouldMerge):
(WebCore::fragmentNeedsColorTransformed): Protected the code accessing the render tree
with ScriptDisallowedScope::InMainThread.
(WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
(WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
(WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor):
(WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent const):
(WebCore::handleStyleSpansBeforeInsertion):
(WebCore::ReplaceSelectionCommand::handleStyleSpans):
(WebCore::enclosingInline):
(WebCore::ReplaceSelectionCommand::doApply):
(WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace const):
(WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace):
(WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
(WebCore::singleChildList):
(WebCore::deepestSingleChildList):
(WebCore::ReplaceSelectionCommand::insertAsListItems):
(WebCore::ReplaceSelectionCommand::performTrivialReplace):

12:03 AM Changeset in webkit [276005] by ysuzuki@apple.com
  • 18 edits in trunk/Source/JavaScriptCore

[JSC] Change Vector<> to FixedVector<> in DFG::CommonData if possible
https://bugs.webkit.org/show_bug.cgi?id=224588

Reviewed by Mark Lam.

DFG::CommonData is kept alive so long as DFG code exists. It includes a lot of Vectors while they are not mutable after the DFG code compilation.
This patch changes Vector<> to FixedVector<> if possible to shrink sizeof(DFG::CommonData). And this also removes the need of calling shrinkToFit
explicitly for them.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::determineLiveness):
(JSC::CodeBlock::stronglyVisitWeakReferences):
(JSC::CodeBlock::jettison):
(JSC::CodeBlock::numberOfDFGIdentifiers const):
(JSC::CodeBlock::identifier const):

  • bytecode/CodeBlock.h:
  • dfg/DFGCommonData.cpp:

(JSC::DFG::CommonData::shrinkToFit):
(JSC::DFG::CommonData::invalidate):
(JSC::DFG::CommonData::~CommonData):
(JSC::DFG::CommonData::installVMTrapBreakpoints):
(JSC::DFG::CommonData::isVMTrapBreakpoint):
(JSC::DFG::CommonData::finalizeCatchEntrypoints):
(JSC::DFG::CommonData::notifyCompilingStructureTransition): Deleted.

  • dfg/DFGCommonData.h:

(JSC::DFG::CommonData::catchOSREntryDataForBytecodeIndex):
(JSC::DFG::CommonData::appendCatchEntrypoint): Deleted.

  • dfg/DFGDesiredIdentifiers.cpp:

(JSC::DFG::DesiredIdentifiers::reallyAdd):

  • dfg/DFGDesiredTransitions.cpp:

(JSC::DFG::DesiredTransition::DesiredTransition):
(JSC::DFG::DesiredTransitions::DesiredTransitions):
(JSC::DFG::DesiredTransitions::addLazily):
(JSC::DFG::DesiredTransitions::reallyAdd):
(JSC::DFG::DesiredTransition::reallyAdd): Deleted.

  • dfg/DFGDesiredTransitions.h:
  • dfg/DFGDesiredWeakReferences.cpp:

(JSC::DFG::DesiredWeakReferences::reallyAdd):

  • dfg/DFGGraph.h:
  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::link):
(JSC::DFG::JITCompiler::noticeCatchEntrypoint):

  • dfg/DFGOSREntry.h:
  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::Plan):
(JSC::DFG::Plan::finalizeWithoutNotifyingCallback):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::linkOSREntries):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compilePutStructure):
(JSC::FTL::DFG::LowerDFGToB3::compileMultiPutByOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileInvalidationPoint):

Apr 14, 2021:

11:23 PM Changeset in webkit [276004] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Unreviewed test gardening. Update tests expected to fail but passing.

  • platform/gtk/TestExpectations:
11:17 PM Changeset in webkit [276003] by Antti Koivisto
  • 9 edits
    2 adds in trunk/Source/WebCore

Preloaded async scripts should use the same priority as the normally loaded ones
https://bugs.webkit.org/show_bug.cgi?id=224537

Reviewed by Sam Weinig.

Use the same priority (medium instead of low) when preloading.

Factor default priorities to a separate type making it easier to keep them in sync.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::load):

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::process):

  • html/parser/HTMLResourcePreloader.cpp:

(WebCore::PreloadRequest::resourceRequest):

  • loader/DefaultResourceLoadPriority.cpp: Added.

(WebCore::DefaultResourceLoadPriority::forResourceType):

  • loader/DefaultResourceLoadPriority.h: Added.
  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::preloadIfNeeded):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::setLoadPriority):
(WebCore::CachedResource::defaultPriorityForResourceType): Deleted.

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::identifierForLoadWithoutResourceLoader const):

11:15 PM Changeset in webkit [276002] by commit-queue@webkit.org
  • 10 edits in trunk

Omit default position/angle when serializing radial & conic gradients
https://bugs.webkit.org/show_bug.cgi?id=223892

Patch by Tim Nguyen <ntim@apple.com> on 2021-04-14
Reviewed by Antti Koivisto.

Test: LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub.html

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub-expected.txt:

Source/WebCore:

  • css/CSSGradientValue.cpp:

(WebCore::ConicGradientAdapter::normalizeStopsAndEndpointsOutsideRange):
(WebCore::CSSLinearGradientValue::customCSSText const):
(WebCore::CSSRadialGradientValue::customCSSText const):
(WebCore::CSSConicGradientValue::customCSSText const):

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::isCenterPosition const):

  • css/CSSPrimitiveValue.h:

LayoutTests:

  • fast/gradients/unprefixed-gradient-parsing-expected.txt:
  • fast/gradients/unprefixed-gradient-parsing.html:
  • http/wpt/css/css-images-4/conic-gradient-parsing.html:
10:55 PM Changeset in webkit [276001] by don.olmstead@sony.com
  • 3 edits in trunk/Source/WebCore

[Nicosia] NicosiaGCGLLayer is unneeded when ENABLE_WEBGL is OFF
https://bugs.webkit.org/show_bug.cgi?id=224557

Reviewed by Michael Catanzaro.

Add an ENABLE(WEBGL) guard around NicosiaGCGLLayer.

  • platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp:
  • platform/graphics/nicosia/texmap/NicosiaGCGLLayer.h:
10:53 PM Changeset in webkit [276000] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

Add missing exception check in operationGetPrivateNameOptimize().
https://bugs.webkit.org/show_bug.cgi?id=224592
rdar://76645873

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/suppress-TerminationException-in-operationGetPrivateNameOptimize.js: Added.

Source/JavaScriptCore:

Though the fieldNameValue.toPropertyKey() call in operationGetPrivateNameOptimize()
would not normally throw an exception, it still can throw a TerminationException
because it contains RETURN_IF_EXCEPTION checks.

  • jit/JITOperations.cpp:
10:44 PM Changeset in webkit [275999] by Diego Pino Garcia
  • 16 edits
    2 copies
    13 adds in trunk/LayoutTests

[GTK][WPE] Unreviewed test gardening. Add missing images after r275996.

  • platform/gtk/css2.1/t100801-c544-valgn-03-d-agi-expected.png:
  • platform/gtk/fast/block/margin-collapse/block-inside-inline/001-expected.png:
  • platform/gtk/fast/block/margin-collapse/block-inside-inline/005-expected.png:
  • platform/gtk/fast/css/child-style-can-override-visited-style-expected.png:
  • platform/gtk/fast/dom/HTMLProgressElement/progress-element-expected.png:
  • platform/gtk/fast/images/image-map-anchor-children-expected.png:
  • platform/gtk/fast/inline-block/003-expected.png:
  • platform/gtk/fast/inline/002-expected.png:
  • platform/gtk/fast/invalid/018-expected.png:
  • platform/gtk/fast/table/frame-and-rules-expected.png:
  • platform/gtk/fast/table/table-display-types-strict-expected.png:
  • platform/gtk/fast/text/basic/012-expected.png:
  • platform/gtk/svg/custom/invisible-text-after-scrolling-expected.png:
  • platform/gtk/tables/mozilla/bugs/bug14323-expected.png:
  • platform/gtk/tables/mozilla/bugs/bug2267-expected.png:
  • platform/wpe/css2.1/t100801-c544-valgn-03-d-agi-expected.png: Added.
  • platform/wpe/fast/block/margin-collapse/block-inside-inline/001-expected.png: Added.
  • platform/wpe/fast/block/margin-collapse/block-inside-inline/005-expected.png: Added.
  • platform/wpe/fast/css/child-style-can-override-visited-style-expected.png: Added.
  • platform/wpe/fast/dom/HTMLProgressElement/progress-element-expected.png: Added.
  • platform/wpe/fast/images/image-map-anchor-children-expected.png: Added.
  • platform/wpe/fast/inline-block/003-expected.png: Added.
  • platform/wpe/fast/inline/002-expected.png: Added.
  • platform/wpe/fast/invalid/018-expected.png: Added.
  • platform/wpe/fast/table/frame-and-rules-expected.png: Added.
  • platform/wpe/fast/table/table-display-types-strict-expected.png: Added.
  • platform/wpe/fast/text/basic/012-expected.png: Added.
  • platform/wpe/svg/custom/invisible-text-after-scrolling-expected.png: Added.
  • platform/wpe/tables/mozilla/bugs/bug14323-expected.png: Added.
  • platform/wpe/tables/mozilla/bugs/bug2267-expected.png: Added.
8:44 PM Changeset in webkit [275998] by Diego Pino Garcia
  • 44 edits
    1 move
    34 adds in trunk/LayoutTests

[WPE] Unreviewed test gardening. Update stale baselines.

Also add missing .png images.

  • platform/gtk/fast/css/word-space-extra-expected.png: Renamed from LayoutTests/platform/glib/fast/css/word-space-extra-expected.png.
  • platform/wpe/css1/box_properties/border-expected.png: Added.
  • platform/wpe/css1/box_properties/border-expected.txt:
  • platform/wpe/css1/text_properties/text_decoration-expected.png: Added.
  • platform/wpe/css1/text_properties/text_decoration-expected.txt:
  • platform/wpe/css1/text_properties/vertical_align-expected.png: Added.
  • platform/wpe/css1/text_properties/vertical_align-expected.txt:
  • platform/wpe/css1/text_properties/word_spacing-expected.txt:
  • platform/wpe/fast/block/basic/014-expected.png: Added.
  • platform/wpe/fast/block/basic/014-expected.txt:
  • platform/wpe/fast/block/positioning/057-expected.png: Added.
  • platform/wpe/fast/block/positioning/057-expected.txt:
  • platform/wpe/fast/css-generated-content/after-duplicated-after-split-expected.png: Added.
  • platform/wpe/fast/css-generated-content/after-duplicated-after-split-expected.txt:
  • platform/wpe/fast/css/word-space-extra-expected.png:
  • platform/wpe/fast/css/word-space-extra-expected.txt:
  • platform/wpe/fast/encoding/utf-16-big-endian-expected.png: Added.
  • platform/wpe/fast/encoding/utf-16-big-endian-expected.txt:
  • platform/wpe/fast/inline/drawStyledEmptyInlines-expected.png: Added.
  • platform/wpe/fast/inline/drawStyledEmptyInlines-expected.txt:
  • platform/wpe/fast/invalid/missing-end-tag-expected.png: Added.
  • platform/wpe/fast/invalid/missing-end-tag-expected.txt:
  • platform/wpe/fast/lists/marker-before-empty-inline-expected.png: Added.
  • platform/wpe/fast/lists/marker-before-empty-inline-expected.txt:
  • platform/wpe/fast/overflow/scrollRevealButton-expected.png: Added.
  • platform/wpe/fast/overflow/scrollRevealButton-expected.txt:
  • platform/wpe/fast/parser/nofoo-tags-inside-paragraph-expected.png: Added.
  • platform/wpe/fast/parser/nofoo-tags-inside-paragraph-expected.txt:
  • platform/wpe/fast/parser/xhtml-alternate-entities-expected.png: Added.
  • platform/wpe/fast/parser/xhtml-alternate-entities-expected.txt:
  • platform/wpe/fast/selectors/visited-descendant-expected.png: Added.
  • platform/wpe/fast/selectors/visited-descendant-expected.txt:
  • platform/wpe/fast/text/basic/013-expected.png: Added.
  • platform/wpe/fast/text/basic/013-expected.txt:
  • platform/wpe/fast/text/mark-matches-overflow-clip-expected.txt:
  • platform/wpe/fast/text/whitespace/018-expected.png: Added.
  • platform/wpe/fast/text/whitespace/018-expected.txt:
  • platform/wpe/fast/text/word-break-expected.png: Added.
  • platform/wpe/fast/text/word-break-expected.txt:
  • platform/wpe/scrollingcoordinator/scrolling-tree/coordinated-frame-expected.txt:
  • platform/wpe/scrollingcoordinator/scrolling-tree/coordinated-frame-gain-scrolling-ancestor-expected.txt:
  • platform/wpe/scrollingcoordinator/scrolling-tree/coordinated-frame-in-fixed-expected.txt:
  • platform/wpe/scrollingcoordinator/scrolling-tree/coordinated-frame-lose-scrolling-ancestor-expected.txt:
  • platform/wpe/svg/custom/svg-fonts-in-html-expected.png: Added.
  • platform/wpe/svg/custom/svg-fonts-in-html-expected.txt:
  • platform/wpe/svg/custom/svg-fonts-word-spacing-expected.txt:
  • platform/wpe/tables/mozilla/bugs/bug113235-1-expected.png: Added.
  • platform/wpe/tables/mozilla/bugs/bug113235-1-expected.txt:
  • platform/wpe/tables/mozilla/bugs/bug113235-2-expected.png: Added.
  • platform/wpe/tables/mozilla/bugs/bug113235-2-expected.txt:
  • platform/wpe/tables/mozilla/bugs/bug1188-expected.png: Added.
  • platform/wpe/tables/mozilla/bugs/bug1188-expected.txt:
  • platform/wpe/tables/mozilla/bugs/bug126742-expected.png: Added.
  • platform/wpe/tables/mozilla/bugs/bug126742-expected.txt:
  • platform/wpe/tables/mozilla/bugs/bug1318-expected.png: Added.
  • platform/wpe/tables/mozilla/bugs/bug1318-expected.txt:
  • platform/wpe/tables/mozilla/bugs/bug16252-expected.png: Added.
  • platform/wpe/tables/mozilla/bugs/bug16252-expected.txt:
  • platform/wpe/tables/mozilla/bugs/bug18359-expected.png: Added.
  • platform/wpe/tables/mozilla/bugs/bug18359-expected.txt:
  • platform/wpe/tables/mozilla/bugs/bug4527-expected.png: Added.
  • platform/wpe/tables/mozilla/bugs/bug4527-expected.txt:
  • platform/wpe/tables/mozilla/bugs/bug57300-expected.png: Added.
  • platform/wpe/tables/mozilla/bugs/bug57300-expected.txt:
  • platform/wpe/tables/mozilla/bugs/bug57828-2-expected.png: Added.
  • platform/wpe/tables/mozilla/bugs/bug57828-2-expected.txt:
  • platform/wpe/tables/mozilla/bugs/bug7342-expected.png: Added.
  • platform/wpe/tables/mozilla/bugs/bug7342-expected.txt:
  • platform/wpe/tables/mozilla/core/bloomberg-expected.png: Added.
  • platform/wpe/tables/mozilla/core/bloomberg-expected.txt:
  • platform/wpe/tables/mozilla/other/ms-expected.png: Added.
  • platform/wpe/tables/mozilla/other/ms-expected.txt:
  • platform/wpe/tables/mozilla/other/wa_table_thtd_rowspan-expected.png: Added.
  • platform/wpe/tables/mozilla/other/wa_table_thtd_rowspan-expected.txt:
  • platform/wpe/tables/mozilla/other/wa_table_tr_align-expected.png: Added.
  • platform/wpe/tables/mozilla/other/wa_table_tr_align-expected.txt:
  • platform/wpe/tables/mozilla_expected_failures/bugs/bug89315-expected.png: Added.
  • platform/wpe/tables/mozilla_expected_failures/bugs/bug89315-expected.txt:
8:34 PM Changeset in webkit [275997] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Avoid indirect load in ContainerNode::hasOneChild()
https://bugs.webkit.org/show_bug.cgi?id=224589

Reviewed by Chris Dumez.

Getting nextSibling() will involve loading the first child into the register.
Avoid that and just check m_firstChild and m_lastChild instead to avoid this extra memory load.

  • dom/ContainerNode.h:

(WebCore::ContainerNode::hasOneChild const):

8:31 PM Changeset in webkit [275996] by Diego Pino Garcia
  • 1 edit
    23 copies
    13 moves
    2 adds
    4 deletes in trunk/LayoutTests

[WPE] Unreviewed test gardening. Emit specific baselines for WPE.

Several baselines that were common to GTK and WPE are no longer valid.
It's necessary to move the common baseline to GTK and emit new baselines for WPE.

  • platform/gtk/css2.1/t100801-c544-valgn-03-d-agi-expected.txt: Copied from LayoutTests/platform/glib/css2.1/t100801-c544-valgn-03-d-agi-expected.txt.
  • platform/gtk/fast/block/margin-collapse/block-inside-inline/001-expected.txt: Copied from LayoutTests/platform/glib/fast/block/margin-collapse/block-inside-inline/001-expected.txt.
  • platform/gtk/fast/block/margin-collapse/block-inside-inline/005-expected.txt: Copied from LayoutTests/platform/glib/fast/block/margin-collapse/block-inside-inline/005-expected.txt.
  • platform/gtk/fast/css/child-style-can-override-visited-style-expected.txt: Copied from LayoutTests/platform/glib/fast/css/child-style-can-override-visited-style-expected.txt.
  • platform/gtk/fast/dom/HTMLProgressElement/progress-element-expected.txt: Copied from LayoutTests/platform/glib/fast/dom/HTMLProgressElement/progress-element-expected.txt.
  • platform/gtk/fast/images/image-map-anchor-children-expected.txt: Copied from LayoutTests/platform/glib/fast/images/image-map-anchor-children-expected.txt.
  • platform/gtk/fast/inline-block/002-expected.txt: Copied from LayoutTests/platform/glib/fast/inline-block/002-expected.txt.
  • platform/gtk/fast/inline-block/003-expected.txt: Copied from LayoutTests/platform/glib/fast/inline-block/003-expected.txt.
  • platform/gtk/fast/inline/002-expected.txt: Copied from LayoutTests/platform/glib/fast/inline/002-expected.txt.
  • platform/gtk/fast/invalid/018-expected.txt: Copied from LayoutTests/platform/glib/fast/invalid/018-expected.txt.
  • platform/gtk/fast/table/frame-and-rules-expected.txt: Copied from LayoutTests/platform/glib/fast/table/frame-and-rules-expected.txt.
  • platform/gtk/fast/table/table-display-types-strict-expected.txt: Copied from LayoutTests/platform/glib/fast/table/table-display-types-strict-expected.txt.
  • platform/gtk/fast/text/basic/012-expected.txt: Copied from LayoutTests/platform/glib/fast/text/basic/012-expected.txt.
  • platform/gtk/svg/custom/invisible-text-after-scrolling-expected.txt: Copied from LayoutTests/platform/glib/svg/custom/invisible-text-after-scrolling-expected.txt.
  • platform/gtk/svg/hixie/processing-model/003-expected.txt: Copied from LayoutTests/platform/glib/svg/hixie/processing-model/003-expected.txt.
  • platform/gtk/svg/hixie/processing-model/004-expected.txt: Copied from LayoutTests/platform/glib/svg/hixie/processing-model/004-expected.txt.
  • platform/gtk/tables/mozilla/bugs/bug14323-expected.txt: Copied from LayoutTests/platform/glib/tables/mozilla/bugs/bug14323-expected.txt.
  • platform/gtk/tables/mozilla/bugs/bug2267-expected.txt: Copied from LayoutTests/platform/glib/tables/mozilla/bugs/bug2267-expected.txt.
  • platform/wpe/css2.1/t100801-c544-valgn-03-d-agi-expected.txt: Renamed from LayoutTests/platform/glib/css2.1/t100801-c544-valgn-03-d-agi-expected.txt.
  • platform/wpe/fast/block/margin-collapse/block-inside-inline/001-expected.txt: Renamed from LayoutTests/platform/glib/fast/block/margin-collapse/block-inside-inline/001-expected.txt.
  • platform/wpe/fast/block/margin-collapse/block-inside-inline/005-expected.txt: Renamed from LayoutTests/platform/glib/fast/block/margin-collapse/block-inside-inline/005-expected.txt.
  • platform/wpe/fast/css/child-style-can-override-visited-style-expected.txt: Renamed from LayoutTests/platform/glib/fast/css/child-style-can-override-visited-style-expected.txt.
  • platform/wpe/fast/dom/HTMLProgressElement/progress-element-expected.txt: Renamed from LayoutTests/platform/glib/fast/dom/HTMLProgressElement/progress-element-expected.txt.
  • platform/wpe/fast/images/image-map-anchor-children-expected.txt: Renamed from LayoutTests/platform/glib/fast/images/image-map-anchor-children-expected.txt.
  • platform/wpe/fast/inline-block/002-expected.txt: Renamed from LayoutTests/platform/glib/fast/inline-block/002-expected.txt.
  • platform/wpe/fast/inline-block/003-expected.txt: Renamed from LayoutTests/platform/glib/fast/inline-block/003-expected.txt.
  • platform/wpe/fast/inline/002-expected.txt: Renamed from LayoutTests/platform/glib/fast/inline/002-expected.txt.
  • platform/wpe/fast/invalid/018-expected.txt: Renamed from LayoutTests/platform/glib/fast/invalid/018-expected.txt.
  • platform/wpe/fast/table/frame-and-rules-expected.txt: Renamed from LayoutTests/platform/glib/fast/table/frame-and-rules-expected.txt.
  • platform/wpe/fast/table/table-display-types-strict-expected.txt: Renamed from LayoutTests/platform/glib/fast/table/table-display-types-strict-expected.txt.
  • platform/wpe/fast/text/basic/012-expected.txt: Renamed from LayoutTests/platform/glib/fast/text/basic/012-expected.txt.
  • platform/wpe/svg/custom/invisible-text-after-scrolling-expected.txt: Renamed from LayoutTests/platform/glib/svg/custom/invisible-text-after-scrolling-expected.txt.
  • platform/wpe/svg/hixie/processing-model/003-expected.txt: Renamed from LayoutTests/platform/glib/svg/hixie/processing-model/003-expected.txt.
  • platform/wpe/svg/hixie/processing-model/004-expected.txt: Renamed from LayoutTests/platform/glib/svg/hixie/processing-model/004-expected.txt.
  • platform/wpe/tables/mozilla/bugs/bug14323-expected.txt: Renamed from LayoutTests/platform/glib/tables/mozilla/bugs/bug14323-expected.txt.
  • platform/wpe/tables/mozilla/bugs/bug2267-expected.txt: Renamed from LayoutTests/platform/glib/tables/mozilla/bugs/bug2267-expected.txt.
8:29 PM Changeset in webkit [275995] by ysuzuki@apple.com
  • 30 edits in trunk/Source/JavaScriptCore

[JSC] Do not copy SimpleJumpTable
https://bugs.webkit.org/show_bug.cgi?id=224472

Reviewed by Mark Lam.

This patch avoids copying UnlinkedSimpleJumpTable to SimpleJumpTable by decoupling CTI addresses from jump offset in SimpleJumpTable.
SimpleJumpTable and UnlinkedSimpleJumpTable are almost identical. SimpleJumpTable adds JIT jump target for each branch.
We should use data from UnlinkedSimpleJumpTable and jump via SimpleJumpTable. Do not need to have copy of branches from UnlinkedSimpleJumpTable.

This way removes Vector<SimpleJumpTable> from CodeBlock::RareData. And this is moved to CodeBlock::JITData. And it only includes jump target addresses,
and branch offset information is kept in UnlinkedSimpleJumpTable side. We no longer need to carefully copy these vectors in CodeBlock including DFG / FTL ones.

In LLInt, we instead use UnlinkedSimpleJumpTable for jumping.

In Baseline, we first allocate enough FixedVector<SimpleJumpTable> and fill content via SimpleJumpTable::ensureCTITable() call when compiling corresponding
switch opcode. Finally we fill these data structures with actual code locations in JIT::link function.

In DFG, we first collect UnlinkedSimpleJumpTable without copying. This is OK since it is kept by UnlinkedCodeBlock, and UnlinkedCodeBlock is kept by baseline CodeBlocks that
are handled by this DFG compilation. We hold Vector<const UnlinkedSimpleJumpTable*> in DFG::Graph and we materialize Vector<SimpleJumpTable> in DFG::Graph.
During DFG compilation, we touch this DFG::Graph's jump tables, and JIT compiler generates code via these tables. And when linking, we move the content to CodeBlock.

In FTL, while we use UnlinkedSimpleJumpTable in FTL code generation, FTL do not use SimpleJumpTable and instead FTL uses Switch in B3.

  • bytecode/BytecodeDumper.cpp:

(JSC::CodeBlockBytecodeDumper<Block>::dumpSwitchJumpTables):

  • bytecode/BytecodeDumper.h:
  • bytecode/BytecodeGeneratorification.cpp:

(JSC::BytecodeGeneratorification::run):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::shrinkToFit):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::switchJumpTable):
(JSC::CodeBlock::numberOfUnlinkedSwitchJumpTables const):
(JSC::CodeBlock::unlinkedSwitchJumpTable):
(JSC::CodeBlock::numberOfSwitchJumpTables const): Deleted.
(JSC::CodeBlock::clearSwitchJumpTables): Deleted.
(JSC::CodeBlock::addSwitchJumpTableFromProfiledCodeBlock): Deleted.

  • bytecode/JumpTable.cpp:

(JSC::SimpleJumpTable::offsetForValue): Deleted.

  • bytecode/JumpTable.h:

(JSC::SimpleJumpTable::ensureCTITable):
(JSC::SimpleJumpTable::ctiForValue const):
(JSC::SimpleJumpTable::isEmpty const):
(): Deleted.
(JSC::SimpleJumpTable::cloneNonJITPart const): Deleted.
(JSC::SimpleJumpTable::ctiForValue): Deleted.
(JSC::SimpleJumpTable::clear): Deleted.

  • bytecode/PreciseJumpTargetsInlines.h:
  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedSimpleJumpTable::offsetForValue const):
(JSC::UnlinkedSimpleJumpTable::add):
(JSC::UnlinkedCodeBlock::numberOfUnlinkedSwitchJumpTables const):
(JSC::UnlinkedCodeBlock::unlinkedSwitchJumpTable const):
(JSC::UnlinkedCodeBlock::unlinkedStringSwitchJumpTable const):
(JSC::UnlinkedCodeBlock::numberOfSwitchJumpTables const): Deleted.
(JSC::UnlinkedCodeBlock::switchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::unlinkedStringSwitchJumpTable): Deleted.

  • bytecode/UnlinkedCodeBlockGenerator.cpp:

(JSC::UnlinkedCodeBlockGenerator::finalize):

  • bytecode/UnlinkedCodeBlockGenerator.h:

(JSC::UnlinkedCodeBlockGenerator::numberOfUnlinkedSwitchJumpTables const):
(JSC::UnlinkedCodeBlockGenerator::addUnlinkedSwitchJumpTable):
(JSC::UnlinkedCodeBlockGenerator::unlinkedSwitchJumpTable):
(JSC::UnlinkedCodeBlockGenerator::numberOfSwitchJumpTables const): Deleted.
(JSC::UnlinkedCodeBlockGenerator::addSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlockGenerator::switchJumpTable): Deleted.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::beginSwitch):
(JSC::prepareJumpTableForSwitch):
(JSC::BytecodeGenerator::endSwitch):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):

  • dfg/DFGGraph.h:
  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::link):

  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

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

(JSC::DFG::SpeculativeJIT::emitSwitchIntJump):
(JSC::DFG::SpeculativeJIT::emitSwitchImm):
(JSC::DFG::SpeculativeJIT::emitSwitchChar):
(JSC::DFG::SpeculativeJIT::emitSwitchString):

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • jit/JIT.cpp:

(JSC::JIT::compileWithoutLinking):
(JSC::JIT::link):

  • jit/JIT.h:

(JSC::SwitchRecord::SwitchRecord):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):

  • jit/JITOperations.cpp:

(JSC::JSC_DEFINE_JIT_OPERATION):

  • jit/JITOperations.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CachedTypes.cpp:

(JSC::CachedSimpleJumpTable::encode):
(JSC::CachedSimpleJumpTable::decode const):
(JSC::CachedCodeBlockRareData::encode):
(JSC::CachedCodeBlockRareData::decode const):

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

Crash in in ReplaceSelectionCommand::mergeEndIfNeeded()
https://bugs.webkit.org/show_bug.cgi?id=222941

Unreviewed. Address Darin's post-commit comment that we don't need to explicitly call copyRef here.

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::mergeEndIfNeeded):

8:06 PM Changeset in webkit [275993] by zhifei_fang@apple.com
  • 14 edits in trunk/Websites/perf.webkit.org

Support Commit revision identifier in the Chart
https://bugs.webkit.org/show_bug.cgi?id=224496

Reviewed by Dewei Zhu.

In the measurement-set, we include the commit info but not the commit revision identifier column.
Make the API return the commit revision identifier as part of the commit data.

  • browser-tests/customizable-test-group-form-tests.js: Fix flaky tests.
  • browser-tests/index.html: Add commit revision identifier info.
  • browser-tests/time-series-chart-tests.js: Fix flaky tests.
  • public/api/measurement-set.php: Make this API provide commit revision identifier info.
  • public/include/build-requests-fetcher.php: Ditto.
  • public/v3/models/commit-set.js: Make the commit model can be constructed with the API respose format.
  • server-tests/api-measurement-set-tests.js: Adding test for commit revision identifier.
  • server-tests/api-build-requests-tests.js: Ditto.
  • unit-tests/analysis-task-tests.js: Ditto.

(measurementCluster):

  • unit-tests/commit-set-tests.js: Ditto.
  • unit-tests/measurement-adaptor-tests.js: Ditto.
  • unit-tests/measurement-set-tests.js: Ditto.
7:42 PM Changeset in webkit [275992] by basuke.suzuki@sony.com
  • 2 edits in trunk/Source/WebKit

Fix WK_EXPORT macro for declspec compilers
https://bugs.webkit.org/show_bug.cgi?id=224583

Reviewed by Don Olmstead.

It displays warnings when macro is not defined. Actually it is defined only when
it builds WebKit. It should be defined(BUILDING_WebKit).

  • Shared/API/c/WKDeclarationSpecifiers.h:
7:23 PM Changeset in webkit [275991] by Diego Pino Garcia
  • 2 edits
    3 adds in trunk/LayoutTests

[GTK] Unreviewed test gardening. Update test expectations after r275515.

Two tests are returning an image failure.

html/dom/elements/the-innertext-idl-attribute/getter.html requires a new baseline.

  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/html/dom/elements/the-innertext-idl-attribute/getter-expected.txt: Added.
7:11 PM Changeset in webkit [275990] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebKit

6 http/wpt/webauthn layout-tests are constantly timing out
https://bugs.webkit.org/show_bug.cgi?id=224531
<rdar://76432480>

Reviewed by Brent Fulgham.

Covered by existing tests.

  • UIProcess/WebAuthentication/Mock/MockLocalService.mm:

(WebKit::MockLocalService::MockLocalService):
Needs to deal with the mock testing infrastructure according to internal requirements.

7:11 PM Changeset in webkit [275989] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Skip accessibility test added in r275664.

  • platform/glib/TestExpectations:
7:04 PM Changeset in webkit [275988] by Wenson Hsieh
  • 8 edits
    2 adds in trunk

[macOS] Make image extraction interactions work for elements inside links
https://bugs.webkit.org/show_bug.cgi?id=224576
<rdar://problem/76664721>

Reviewed by Devin Rousso.

Source/WebCore:

Make a slight adjustment to EventHandler::canMouseDownStartSelect to allow selection to begin when handling a
mousedown over text inside an image overlay.

Test: fast/images/image-extraction/mac/select-image-overlay-in-link-with-mouse-drag.html

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::isImageOverlayText):

Add an overloaded version of this helper method that takes a pointer instead of a reference, and use it in
several places where we current check the nullity of a Node* before dereferencing it and passing it into
isImageOverlayText().

  • html/HTMLElement.h:
  • page/DragController.cpp:

(WebCore::DragController::draggableElement const):

  • page/EventHandler.cpp:

(WebCore::EventHandler::canMouseDownStartSelect):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::updateSelectionForMouseDrag):

Additionally, make it so that we only invalidate a click (i.e. prevent mouse release from dispatching a click
event) in EventHandler::updateSelectionForMouseDrag in the case where we're selecting text in an image
overlay, if the selection hasn't actually changed.

Source/WebKit:

See WebCore ChangeLog for more details.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::elementPositionInformation):

LayoutTests:

Add a layout test to exercise the change.

  • fast/images/image-extraction/mac/select-image-overlay-in-link-with-mouse-drag-expected.txt: Added.
  • fast/images/image-extraction/mac/select-image-overlay-in-link-with-mouse-drag.html: Added.
6:57 PM Changeset in webkit [275987] by Robert Jenner
  • 3 edits in trunk/LayoutTests

[ wk2 ] http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html is flakey crashing
https://bugs.webkit.org/show_bug.cgi?id=224566

Unreviewed test gardening.

Updating expectations to two more tests I found that are flakey crashing.

  • platform/ios-simulator-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
6:52 PM Changeset in webkit [275986] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

[Apple Pay] add WKA hooks for ApplePayModifier
https://bugs.webkit.org/show_bug.cgi?id=224585
<rdar://problem/76669793>

Reviewed by Wenson Hsieh.

  • Modules/applepay/paymentrequest/ApplePayModifier.h:
6:27 PM Changeset in webkit [275985] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Flaky crash under AudioSummingJunction::removeOutput() on Debug bots
https://bugs.webkit.org/show_bug.cgi?id=224584

Reviewed by Eric Carlson.

Add DisableMallocRestrictionsForCurrentThreadScope to allow the heap allocation until I can investigate
if we can avoid it.

  • Modules/webaudio/AudioSummingJunction.cpp:

(WebCore::AudioSummingJunction::removeOutput):

6:26 PM Changeset in webkit [275984] by Devin Rousso
  • 7 edits in trunk

Promote -[WKWebView _themeColor] SPI to API
https://bugs.webkit.org/show_bug.cgi?id=224571
<rdar://problem/75231602>

Reviewed by Geoffrey Garen.

Source/WebKit:

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

(-[WKWebView themeColor]): Added.
(-[WKWebView _themeColor]):

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

(WebKit::PageClientImplCocoa::themeColorWillChange):
(WebKit::PageClientImplCocoa::themeColorDidChange):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/HTMLMetaThemeColor.mm:

(TEST.HTMLMetaThemeColor.OnLoad):
(TEST.HTMLMetaThemeColor.MultipleTags):
(-[WKWebViewThemeColorObserver initWithWebView:]):
(TEST.HTMLMetaThemeColor.KVO):
(TEST.HTMLMetaThemeColor.ExperimentalUseThemeColorForScrollAreaBackgroundColor):

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

REGRESSION: [ Mac WK2 ] fast/mediastream/audio-track-enabled.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=221985

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
5:18 PM Changeset in webkit [275982] by BJ Burg
  • 10 edits in trunk/Source

Web Inspector: add setting to allow inspecting Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=224082
<rdar://75695002>

Reviewed by Devin Rousso.

Source/WebCore:

Add a property to check if inspecting inspector is allowed,
and to enable/disable upon loading the frontend or toggling the setting.

  • en.lproj/Localizable.strings:
  • inspector/InspectorFrontendHost.cpp:

(WebCore::InspectorFrontendHost::inspectInspector):
(WebCore::InspectorFrontendHost::allowsInspectingInspector):
(WebCore::InspectorFrontendHost::setAllowsInspectingInspector):

  • inspector/InspectorFrontendHost.h:
  • inspector/InspectorFrontendHost.idl:

Source/WebInspectorUI:

Instead of telling curious users to set the WebKitDeveloperExtras default,
expose an experimental setting that does the same thing.

  • UserInterface/Base/Main.js:

(WI.loaded):

  • UserInterface/Base/Setting.js:
  • UserInterface/Views/SettingsTabContentView.js:
5:15 PM Changeset in webkit [275981] by weinig@apple.com
  • 9 edits
    1 add in trunk/Source/WebCore

Use range-for loop in target contrast selection to simplify/improve code readability
https://bugs.webkit.org/show_bug.cgi?id=224512

Reviewed by Darin Adler.

Address some additional post landing feedback from Darin.

  • Use range-for loop in target contrast selection.
  • Use double to represent luminance, lightness and contrast everywhere. This avoid unnecessary conversions to and from float.
  • Rename Color::contrastRatio(Color, Color) to just contrastRatio(Color, Color) and move it ColorLuminance.h/cpp with the other contrastRatio overloads.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:

Add ColorLuminance.cpp

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::selectFirstColorThatMeetsOrExceedsTargetContrast):
Convert colorsToCompareAgainst to an r-value since vector is never used after
calling this.

(WebCore::CSSPropertyParserHelpers::selectFirstColorWithHighestContrast):
Convert colorsToCompareAgainst to an r-value since vector is never used after
calling this. Also, switch to a range-for loop to aid readability.

(WebCore::CSSPropertyParserHelpers::parseColorContrastFunctionParameters):
Move colorsToCompareAgainst to the select functions.

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

(WebCore::Color::lightness const):
(WebCore::Color::luminance const):
Use double to represent lightness and luminance.

(WebCore::Color::contrastRatio): Deleted.
Moved to ColorLuminance.h/cpp

  • platform/graphics/ColorLuminance.cpp: Added.

(WebCore::contrastRatio):

  • platform/graphics/ColorLuminance.h:

(WebCore::relativeLuminance):
(WebCore::contrastRatio):

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::disabledTextColor const):

  • rendering/TextPaintStyle.cpp:

(WebCore::textColorIsLegibleAgainstBackgroundColor):
Use double to represent luminance and constrast everywhere.

5:11 PM Changeset in webkit [275980] by Wenson Hsieh
  • 7 edits
    4 adds in trunk

[iOS] Make image extraction interactions work for elements inside links
https://bugs.webkit.org/show_bug.cgi?id=224517
<rdar://problem/76616431>

Reviewed by Devin Rousso.

Source/WebKit:

See comments below for more details.

Tests: fast/images/image-extraction/click-link-with-image-overlay.html

fast/images/image-extraction/ios/select-word-in-image-overlay-inside-link.html

  • Shared/ios/InteractionInformationAtPosition.h:
  • Shared/ios/InteractionInformationAtPosition.mm:

(WebKit::InteractionInformationAtPosition::encode const):
(WebKit::InteractionInformationAtPosition::decode):

Add imageElementContext, an optional element context that exists alongside elementContext. This is necessary
in the case where the user is interacting with an image element inside a link element because we need to know
about the inner hit-tested image element for the purposes of image extraction, but the clickable element we use
for the elementContext is the link element instead.

  • Shared/ios/InteractionInformationRequest.cpp:

(WebKit::InteractionInformationRequest::isValidForRequest const):

Make a slight adjustment here - since includeImageData may require image bitmap data in cases where only the
includeSnapshot flag is set, it's incorrect to assume that setting includeSnapshot fulfills all the needs of
includeImageData.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):

Consult imageElementContext instead of elementContext.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::imagePositionInformation):

Set the position information's imageElementContext.

(WebKit::elementPositionInformation):
(WebKit::WebPage::positionInformation):

Make a couple of adjustments here: (1) avoid requesting link position information if the hit-tested node is text
inside of an image overlay. (2) If the includeImageData request flag is set and the hit-tested node is an
image element but isImage is not set, then additionally supply the image data using the
imagePositionInformation helper function. This ensures that in the case where we're requesting image data and
the user is interacting with an image element inside a link, we'll send decoded image data back to the UI
process.

LayoutTests:

  • fast/images/image-extraction/click-link-with-image-overlay-expected.txt: Added.
  • fast/images/image-extraction/click-link-with-image-overlay.html: Added.

Add a test that verifies that activating different parts of an image in a link fires click events.

  • fast/images/image-extraction/ios/select-word-in-image-overlay-inside-link-expected.txt: Added.
  • fast/images/image-extraction/ios/select-word-in-image-overlay-inside-link.html: Added.

Add a test that selects image overlay text for an image element inside a link.

4:55 PM Changeset in webkit [275979] by commit-queue@webkit.org
  • 4 edits in trunk/Source/JavaScriptCore

Keep UniqueRef<MathICGenerationState> instead of MathICGenerationState in HashTables
https://bugs.webkit.org/show_bug.cgi?id=224569

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

sizeof(KeyValuePair<const Instruction*, MathICGenerationState>) is 136 on some platforms.
That's on the big side for sparse HashTable entries. I think using UniqueRef will help performance.

  • jit/JIT.h:
  • jit/JITArithmetic.cpp:

(JSC::JIT::emitMathICFast):
(JSC::JIT::emitMathICSlow):

  • jit/JITMathIC.h:
3:54 PM Changeset in webkit [275978] by Antti Koivisto
  • 3 edits
    2 adds in trunk

RunIterator::traverseNext/PreviousOnLineIgnoringLineBreak should skip over WBRs
https://bugs.webkit.org/show_bug.cgi?id=224545
rdar://76101143

Reviewed by Zalan Bujtas.
Source/WebCore:

Test: fast/editing/wbr-iterator-crash.html

  • layout/integration/LayoutIntegrationRunIterator.cpp:

(WebCore::LayoutIntegration::RunIterator::traverseNextOnLineIgnoringLineBreak):
(WebCore::LayoutIntegration::RunIterator::traversePreviousOnLineIgnoringLineBreak):

Skip over (instead of bailing) runs with isLineBreak() set. It is true for <WBR> so there can be multiple on a line.

LayoutTests:

  • fast/editing/wbr-iterator-crash-expected.txt: Added.
  • fast/editing/wbr-iterator-crash.html: Added.
3:39 PM Changeset in webkit [275977] by Russell Epstein
  • 1 copy in tags/Safari-611.2.3

Tag Safari-611.2.3.

3:18 PM Changeset in webkit [275976] by Lauro Moura
  • 4 edits in trunk/Source/WebCore

REGRESSION(r275948) Wrap sh::ShaderVariable into UniqueRef to fit in HashMap
https://bugs.webkit.org/show_bug.cgi?id=224567

Unreviewed build fix.

  • platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp:

(WebCore::ExtensionsGLOpenGLCommon::getTranslatedShaderSourceANGLE):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:

(WebCore::GraphicsContextGLOpenGL::precisionsMatch const):
(WebCore::GraphicsContextGLOpenGL::mappedSymbolInShaderSourceMap):
(WebCore::GraphicsContextGLOpenGL::originalSymbolInShaderSourceMap):
(WebCore::GraphicsContextGLOpenGL::mappedSymbolName):
(WebCore::GraphicsContextGLOpenGL::shaderSource):

3:15 PM Changeset in webkit [275975] by youenn@apple.com
  • 4 edits in trunk

Update WKPageSet implementation according new MediaProducer::MutedState values
https://bugs.webkit.org/show_bug.cgi?id=224548

Reviewed by Eric Carlson.

Source/WebKit:

Covered by API test.

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetMuted):
Translate WKMediaMutedState to WebCore::MediaProducer::MutedStateFlags properly.

Tools:

  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:

(TestWebKitAPI::doCaptureMuteTest):
(TestWebKitAPI::TEST):

3:11 PM Changeset in webkit [275974] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ wk2 ] http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html is flakey crashing
https://bugs.webkit.org/show_bug.cgi?id=224566

Uneviewed test gardneing.

  • platform/mac-wk2/TestExpectations: Adding mac wk2 to Pass Crash expectations.
3:11 PM Changeset in webkit [275973] by achristensen@apple.com
  • 4 edits in trunk

Don't block proxy authentication challenges
https://bugs.webkit.org/show_bug.cgi?id=224564
Source/WebKit:

<rdar://76542907>

Reviewed by Brady Eidson.

You have to use SPI to get WebKit to tell CFNetwork to not handle proxy authentication by default,
but if you do it only works for first-party requests. Our challenge blocking to prevent cross-site fetches from
asking for basic auth credentials should not block challenges for proxy authentication. The radar has an application
that wants to handle them.

Covered by an API test.

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::didReceiveChallenge):

Tools:

Reviewed by Brady Eidson.

  • TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:

(TestWebKitAPI::proxyAuthenticationServer):
(TestWebKitAPI::webViewAndDelegate):
(TestWebKitAPI::TEST):

3:11 PM Changeset in webkit [275972] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Crash in ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds()
https://bugs.webkit.org/show_bug.cgi?id=224520

Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2021-04-14
Reviewed by Ryosuke Niwa.

Adopt RefPtr<Node> instead of using plain Node* here to avoid a crash.

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):

2:57 PM Changeset in webkit [275971] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Apply DeferTermination in some utility functions in the jsc shell.
https://bugs.webkit.org/show_bug.cgi?id=224572
rdar://76646089

Reviewed by Yusuke Suzuki.

This is to make sure that these functions don't get in the way of testing with
the watchdog. Since these are only test utility functions, just doing the simple
thing of using a DeferTermination scope is the right thing to do here.

  • jsc.cpp:
2:52 PM Changeset in webkit [275970] by Jonathan Bedard
  • 1 edit
    1 add in trunk/Tools

[GitHub] Add script to verify integrity of the mirror
https://bugs.webkit.org/show_bug.cgi?id=224514
<rdar://problem/76613576>

Reviewed by Aakash Jain.

  • Scripts/check-github-mirror-integrity: Added.
2:50 PM Changeset in webkit [275969] by mark.lam@apple.com
  • 7 edits
    1 add in trunk

Defer TerminationExceptions when evaluating ASSERT in HashMapIml::addNormalized().
https://bugs.webkit.org/show_bug.cgi?id=224565
rdar://76645980

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/suppress-TerrminationException-in-ASSERT-in-HashMapImpl-addNormalized.js: Added.

Source/JavaScriptCore:

HashMapImpl::addNormalized() has an ASSERT that calls jsMapHash(), which can
potentially throw exceptions. As a result, it has a RETURN_IF_EXCEPTION which
provides an opportunity to handle traps and throw a TerminationException. This
in turn causes the ASSERT to fail.

To fix this, we do:

  1. Introduce VMTraps::DeferAction, which gives us DeferForAWhile and DeferUntilEndOfScope.
  1. Templatize the DeferTermination RAII object on VMTraps::DeferAction. Introduce DeferTerrminationForAWhile, which is DeferTermination<VMTraps::DeferAction::DeferForAWhile>. DeferForAWhile means that the deferScope will not throw the TerminationException on exit. Instead, it will re-set the NeedTermination bit in the traps, and let the next trap check handle it.
  1. Introduce DEFER_TERMINATION_AND_ASSERT_WITH_MESSAGE (and friends) which creates a DeferTerrminationForAWhile scope before doing an ASSERT_WITH_MESSAGE.
  1. Use DEFER_TERMINATION_AND_ASSERT_WITH_MESSAGE instead in HashMapImpl::addNormalized().
  • runtime/DeferTermination.h:

(JSC::DeferTermination::DeferTermination):
(JSC::DeferTermination::~DeferTermination):

  • runtime/ExceptionHelpers.h:
  • runtime/HashMapImpl.h:

(JSC::HashMapImpl::addNormalized):

  • runtime/VMTraps.cpp:

(JSC::VMTraps::deferTermination):
(JSC::VMTraps::undoDeferTermination):

  • runtime/VMTraps.h:
2:49 PM Changeset in webkit [275968] by don.olmstead@sony.com
  • 2 edits in trunk/Source/WebKit

[GPUP] RemoteGraphicsContextsGL shouldn't be referenced when ENABLE_WEBGL is off
https://bugs.webkit.org/show_bug.cgi?id=224560

Reviewed by Alex Christensen.

Add an ENABLE(WEBGL) guard.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::didClose):

2:37 PM Changeset in webkit [275967] by don.olmstead@sony.com
  • 2 edits in trunk

[PlayStation] Disable WebGL
https://bugs.webkit.org/show_bug.cgi?id=224562

Reviewed by Alex Christensen.

WebGL support on PlayStation platforms is deprecated.

  • Source/cmake/OptionsPlayStation.cmake:
2:35 PM Changeset in webkit [275966] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebKit

Unreviewed, a comment fix after r275847

  • UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:

(WebKit::LocalConnection::verifyUser):
Explains why instead of what.

1:32 PM Changeset in webkit [275965] by guijemont@igalia.com
  • 2 edits in trunk/JSTests

[JSC] Unskip stress/intl-segmenter.js
https://bugs.webkit.org/show_bug.cgi?id=224553

Unreviewed test gardening.

It shouldn't fail any more on our bots now that our handling of libicu
is more robust.

  • stress/intl-segmenter.js:
1:00 PM Changeset in webkit [275964] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Temporarily fix more terminate_with_reason-related crashes
https://bugs.webkit.org/show_bug.cgi?id=224559
<rdar://76639741>

Reviewed by Geoff Garen.

  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::terminateWithReason):

12:58 PM Changeset in webkit [275963] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebCore

Revert "Cherry-pick r274877. rdar://problem/76373841"

This reverts commit r275741.

12:58 PM Changeset in webkit [275962] by Russell Epstein
  • 5 edits in branches/safari-611-branch

Revert "Cherry-pick r274199. rdar://problem/76416079"

This reverts commit r275744.

12:58 PM Changeset in webkit [275961] by Russell Epstein
  • 4 edits in branches/safari-611-branch/Source/WebCore

Revert "Cherry-pick r274357. rdar://problem/76374004"

This reverts commit r275745.

12:58 PM Changeset in webkit [275960] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebCore

Revert "Cherry-pick r274403. rdar://problem/76374004"

This reverts commit r274403.

12:58 PM Changeset in webkit [275959] by Russell Epstein
  • 3 edits in branches/safari-611-branch/Source/WebKit

Revert "Cherry-pick r274377. rdar://problem/76412582"

This reverts commit r275766.

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

Revert "Cherry-pick r274819. rdar://problem/76373741"

This reverts commit r275767.

12:58 PM Changeset in webkit [275957] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebCore

Revert "Unreviewed build fix for rdar://76617366."

This reverts commit r275919.

12:42 PM Changeset in webkit [275956] by Devin Rousso
  • 12 edits in trunk/Source

[iOS] limit how often WebAVPlayerController notifies the PlaybackSessionModel about changes to playback speed
https://bugs.webkit.org/show_bug.cgi?id=224515
<rdar://problem/75901463>

Reviewed by Eric Carlson.

This change will cause HTMLMediaElement::setPlaybackRate to not send IPC back and forth
between the WebProcess and UIProcess, as a modification to the WebAVPlayerController in
the UIProcess would notify its PlaybackSessionModel "delegate", which would in turn make
it's way back to the related HTMLMediaElement::setPlaybackRate in the WebProcess.

Source/WebCore:

  • platform/ios/WebAVPlayerController.mm:

(-[WebAVPlayerController init]):
(-[WebAVPlayerController dealloc]):
(-[WebAVPlayerController defaultPlaybackRate]): Added.
(-[WebAVPlayerController setDefaultPlaybackRate:]): Added.
(-[WebAVPlayerController rate]): Added.
(-[WebAVPlayerController setRate:]): Added.
(-[WebAVPlayerController observeValueForKeyPath:ofObject:change:context:]):
Instead of relying on ObjC KVO on self to handle changes to defaultPlaybackRate (and
rate), create an actual setDefaultPlaybackRate: so that we can handle cases where the
value is the same. Limit when we notify the PlaybackSessionModel to only when it has a
different value.

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

(WebCore::PlaybackSessionModelMediaElement::setPlaybackRate): Added.

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(VideoFullscreenControllerContext::setPlaybackRate): Added.
Add support for handling when the rate of the AVPlayerController changes too.

Source/WebKit:

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

(WebKit::PlaybackSessionModelContext::setPlaybackRate): Added.
(WebKit::PlaybackSessionManagerProxy::setPlaybackRate): Added.

  • WebProcess/cocoa/PlaybackSessionManager.messages.in:
  • WebProcess/cocoa/PlaybackSessionManager.h:
  • WebProcess/cocoa/PlaybackSessionManager.mm:

(WebKit::PlaybackSessionManager::setPlaybackRate): Added.
Add support for handling when the rate of the AVPlayerController changes too.

11:47 AM Changeset in webkit [275955] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ wk2 ] http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html is flakey crashing
https://bugs.webkit.org/show_bug.cgi?id=224566

Unrviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations: Updating test expectations to Pass Crash, while test is reviewed.
11:42 AM Changeset in webkit [275954] by achristensen@apple.com
  • 2 edits in trunk/Source/WTF

Revert important part of r275948
https://bugs.webkit.org/show_bug.cgi?id=224381

It caused an internal build failure.

  • wtf/HashTable.h:

(WTF::KeyTraits>::inlineLookup):

11:25 AM Changeset in webkit [275953] by Jonathan Bedard
  • 4 edits in trunk/Tools

[results.webkit.org] Document ref API argument
https://bugs.webkit.org/show_bug.cgi?id=224435
<rdar://problem/76599481>

Reviewed by Aakash Jain.

  • Scripts/libraries/resultsdbpy/resultsdbpy/init.py: Bump version.
  • Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html:
  • Scripts/libraries/resultsdbpy/setup.py: Bump version.
10:54 AM Changeset in webkit [275952] by Kate Cheney
  • 17 edits in trunk

Service worker soft-update loads not being marked app-bound
https://bugs.webkit.org/show_bug.cgi?id=223200
<rdar://problem/75438555>

Reviewed by Youenn Fablet.

Source/WebCore:

We need to mark requests initiated by service worker soft updates as
app-bound based on the last navigation. We should get this value from the
NetworkResourceLoader and store it in SWServerRegistration so we can
use it to build a new request.

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::startScriptFetch):

  • workers/service/server/SWServer.h:

Pass the entire SWServerRegistration to SWServer::startScriptFetch
now that we need more than one value from it. Move shouldRefreshCache
logic here instead of SWServerJobQueue::runUpdateJob.

  • workers/service/server/SWServerJobQueue.cpp:

(WebCore::SWServerJobQueue::runUpdateJob):

  • workers/service/server/SWServerRegistration.cpp:

(WebCore::SWServerRegistration::scheduleSoftUpdate):

  • workers/service/server/SWServerRegistration.h:

(WebCore::SWServerRegistration::isAppBound):

Source/WebKit:

We should pass the app-bound request value when doing a soft update.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::isAppBound):

  • NetworkProcess/NetworkResourceLoader.h:

Make a helper function to get the request's app-bound value.

  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:

(WebKit::ServiceWorkerFetchTask::softUpdateIfNeeded):

  • NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp:

(WebKit::ServiceWorkerSoftUpdateLoader::loadFromNetwork):

  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::createFetchTask):

  • Shared/NavigatingToAppBoundDomain.h:

(WebKit::AppBoundNavigationTestingData::setDidPerformSoftUpdate):
(WebKit::AppBoundNavigationTestingData::clearAppBoundNavigationDataTesting):
(WebKit::AppBoundNavigationTestingData::encode const):
(WebKit::AppBoundNavigationTestingData::decode):

  • UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
  • UIProcess/API/Cocoa/WKWebViewTesting.mm:

(-[WKWebView _appBoundNavigationData:]):
Update testing struct to make sure a soft-update occurred before
checking app-bound data. This accounts for the delay between the
page load and the soft update.

Tools:

API test coverage. Refactor to avoid code duplication in other tests.

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

A soft update might be delayed after the synthetic response comes
back. We should wait until we receive the test data indicating that
a soft update has occurred before checking the app-bound values.

10:39 AM Changeset in webkit [275951] by Robert Jenner
  • 3 edits in trunk/LayoutTests

[ wk2 ] 2 page-cache layout-tests are flakey crashing
https://bugs.webkit.org/show_bug.cgi?id=224558

Unreviewed test gardening.

Updated expectations to Pass Crash for the following two tests for causing issues with EWS and Commit-Queue.

  • platform/ios-simulator-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
9:55 AM Changeset in webkit [275950] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

Add support for using local-worker for build.webkit.org
https://bugs.webkit.org/show_bug.cgi?id=224551

Reviewed by Carlos Alberto Lopez Perez.

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

(loadBuilderConfig): Added local-worker support.

  • CISupport/ews-build/loadConfig.py:

(loadBuilderConfig): Removed use_localhost_worker variable.

9:53 AM Changeset in webkit [275949] by eric.carlson@apple.com
  • 7 edits in trunk/Source/WebCore

Allow text tracks to purge cues outside of the buffered range
https://bugs.webkit.org/show_bug.cgi?id=224489

Reviewed by Jer Noble.

TextTrackCues associated in-band tracks live "forever" - until the video element
is deleted or reloaded. This is fine for relatively short files, but not so good
for long lived files (eg. a very long live stream), or for timed metadata where
the "cue" size can be much larger than a text sample.

Allow text tracks to opt in to purging cues who's time range does not intersect
with the buffered range, where audio and video data is also not available. Only
AVFoundation backed in-band tracks opt in at this time, because AVFoundation will
redeliver cues if a time range is played again.

Tested manually as the only way to test this currently would be with an HLS stream
that would have to play too long for a layout test, or with an MSE text track but
we won't support text tracks in MSE yet.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerBufferedTimeRangesChanged): Allow tracks
that support purging cues to do so.

  • html/HTMLMediaElement.h:
  • html/track/InbandDataTextTrack.h: Return true for shouldPurgeCuesFromUnbufferedRanges();
  • html/track/InbandGenericTextTrack.h: Ditto.
  • html/track/TextTrack.cpp:

(WebCore::TextTrack::removeCuesNotInTimeRanges): Remove all cues who's time range
does not intersect with the buffered range.

  • html/track/TextTrack.h:

(WebCore::TextTrack::shouldPurgeCuesFromUnbufferedRanges const):

9:19 AM Changeset in webkit [275948] by achristensen@apple.com
  • 5 edits in trunk/Source

Reduce maximum HashTable entry size to 128 bytes
https://bugs.webkit.org/show_bug.cgi?id=224381

Reviewed by Yusuke Suzuki.

Source/WebKit:

  • WebProcess/WebPage/ViewUpdateDispatcher.cpp:

(WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
(WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):

  • WebProcess/WebPage/ViewUpdateDispatcher.h:

(WebKit::ViewUpdateDispatcher::UpdateData::UpdateData):

Source/WTF:

It turns out that HashMaps use HashTable::Value as KeyValuePair, so sizeof(Key) + sizeof(Value) was double counting the key size.
This caused FontCascadeCache to be a false positive. It has a key size of a little over 100 bytes. Only counting it once reflects what is intended.
Also, the USE(ANGLE) exception was convenient for a downstream branch, but isn't needed. Next time they rebase they will use UniqueRef.

  • wtf/HashTable.h:

(WTF::KeyTraits>::inlineLookup):

9:07 AM Changeset in webkit [275947] by Ruben Turcios
  • 2 edits in branches/safari-612.1.11-branch/Source/WebKit

Cherry-pick r275918. rdar://problem/76648077

Unreviewed build fix after r275898; remove unnecessary files from the project.

  • WebKit.xcodeproj/project.pbxproj:

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

9:07 AM Changeset in webkit [275946] by Ruben Turcios
  • 20 edits in branches/safari-612.1.11-branch

Cherry-pick r275855. rdar://problem/76627715

Unreviewed, reverting r275793.
https://bugs.webkit.org/show_bug.cgi?id=224466

Caused crashes on <http://facebook.com|facebook.com>

Reverted changeset:

"calc() simplification for a multiplication should apply the
multiplication to each value of an addition"
https://bugs.webkit.org/show_bug.cgi?id=224376
https://trac.webkit.org/changeset/275793

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

8:42 AM Changeset in webkit [275945] by Antti Koivisto
  • 3 edits in trunk/Source/WebCore

Remove unused InlineBox::next/previousLeafOnLineIgnoringLineBreak()
https://bugs.webkit.org/show_bug.cgi?id=224542

Reviewed by Zalan Bujtas.

  • rendering/InlineBox.cpp:

(WebCore::InlineBox::nextLeafOnLineIgnoringLineBreak const): Deleted.
(WebCore::InlineBox::previousLeafOnLineIgnoringLineBreak const): Deleted.

  • rendering/InlineBox.h:
8:13 AM Changeset in webkit [275944] by commit-queue@webkit.org
  • 3 edits
    4 adds in trunk

Crash in RenderBlock::addOverflowFromChildren
https://bugs.webkit.org/show_bug.cgi?id=223539

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

Source/WebCore:

For an <svg> element that is a direct child of a <foreignObject>, a RenderSVGRoot is
generally created. However, a RenderSVGViewportContainer is currently created instead if
the element is inside a shadow tree. This is leading to bad state during the layout of
the foreign object, causing a debug assertion and a nullptr crash. This patch fixes this
issue by always treating direct <svg> child of <foreignObject> as an outermost SVG element.

Tests: svg/foreignObject/svg-child-of-foreign-object-in-shadow-tree-crash.html

svg/outermost-svg-root.html

  • svg/SVGElement.cpp:

(WebCore::SVGElement::isOutermostSVGSVGElement const): Lower down the priority of the rule
"is in shadow tree".

LayoutTests:

Add regressions tests for the crash and for isOutermostSVGSVGElement().

  • svg/foreignObject/svg-child-of-foreign-object-in-shadow-tree-crash-expected.txt: Added.
  • svg/foreignObject/svg-child-of-foreign-object-in-shadow-tree-crash.html: Added.
  • svg/outermost-svg-root-expected.txt: Added.
  • svg/outermost-svg-root.html: Added.
6:57 AM Changeset in webkit [275943] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

InlineBox should not hold a reference to RenderObject
https://bugs.webkit.org/show_bug.cgi?id=224506

Reviewed by Antti Koivisto.

The InlineBox/RenderObject relationship is somewhat error-prone (see RenderBox::setInlineBoxWrapper vs. InlineElementBox::extractLine) and it's rather easy to delete one without letting the other know.

  • rendering/InlineBox.cpp:

(WebCore::InlineBox::showNodeTreeForThis const):
(WebCore::InlineBox::showLineTreeForThis const):
(WebCore::InlineBox::caretMinOffset const):
(WebCore::InlineBox::caretMaxOffset const):
(WebCore::InlineBox::adjustPosition):
(WebCore::InlineBox::selectionState):
(WebCore::InlineBox::canAccommodateEllipsis const):
(WebCore::InlineBox::locationIncludingFlipping const):
(WebCore::InlineBox::flipForWritingMode const):

  • rendering/InlineBox.h:

(WebCore::InlineBox::renderer const):
(WebCore::InlineBox::boxModelObject const):
(WebCore::InlineBox::InlineBox):

6:30 AM Changeset in webkit [275942] by Aditya Keerthi
  • 3 edits in trunk/Source/WebCore

[iOS][FCR] Indeterminate progress bars should update at 60fps
https://bugs.webkit.org/show_bug.cgi?id=224372
<rdar://problem/76416848>

Reviewed by Wenson Hsieh.

  • rendering/RenderProgress.cpp:

(WebCore::RenderProgress::animationTimerFired):

Added a FIXME to state that progress bar animation should be performed
as part of the rendering update lifecycle. Progress bars have always
maintained their own timers for animation, however, the update interval
may not always match the display's refresh rate.

  • rendering/RenderThemeIOS.mm:

Ensure a smoother animation by increasing the frame rate to 60fps.

3:18 AM Changeset in webkit [275941] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

Commit queue isn't skipping builds and test on revert patches
https://bugs.webkit.org/show_bug.cgi?id=224477

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(BugzillaMixin): Changed preamble to lower-case to match with new logic.

  • CISupport/ews-build/steps_unittest.py: Added unit-tests.
3:03 AM Changeset in webkit [275940] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[GTK4] Use a while loop in PlatformWebView::dismissAllPopupMenus()
https://bugs.webkit.org/show_bug.cgi?id=224534

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-04-14
Reviewed by Philippe Normand.

The child might be destroyed during the loop iteration. Using a while loop we ensure we get the next sibling
before the current child is destroyed.

  • WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:

(WTR::PlatformWebView::dismissAllPopupMenus):

2:45 AM Changeset in webkit [275939] by Angelos Oikonomopoulos
  • 2 edits in trunk/JSTests

[JSC] Unskip typedarray-functions-with-neutered.js on MIPS
https://bugs.webkit.org/show_bug.cgi?id=224428

Unreviewed test gardening.

This appears to no longer fail.

  • stress/typedarray-functions-with-neutered.js:
2:42 AM Changeset in webkit [275938] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Do not reset computed style for element children with display contents style
https://bugs.webkit.org/show_bug.cgi?id=223794

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

We were checking hasDisplayContents() was false before calling resetComputedStyle() on the parent, but we don't
check it when iterating the children.

  • dom/Element.cpp:

(WebCore::Element::resetComputedStyle):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolveComposedTree):

1:20 AM Changeset in webkit [275937] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

[iOS] WKMouseDeviceObserver is calling WebProcessProxy::send() on a non-main thread
https://bugs.webkit.org/show_bug.cgi?id=224529
<rdar://76598710>

Reviewed by Tim Horton.

Make sure WKMouseDeviceObserver calls WebProcessProxy::notifyHasMouseDeviceChanged() on the main thread
since:

  1. It iterates over WebProcessProxy::allProcesses() which is only safe on the main thread
  2. It calls WebProcessProxy::send() wich is only safe on the main thread
  • UIProcess/WebProcessProxy.h:
  • UIProcess/ios/WKMouseDeviceObserver.mm:

(-[WKMouseDeviceObserver mousePointerDevicesDidChange:]):
(-[WKMouseDeviceObserver _setHasMouseDeviceForTesting:]):

  • UIProcess/ios/WebProcessProxyIOS.mm:

(WebKit::WebProcessProxy::notifyHasMouseDeviceChanged):

12:44 AM Changeset in webkit [275936] by magomez@igalia.com
  • 10 edits in trunk

[GTK][WPE] Add a property to the WebKitWebView indicating whether the web process is responsive
https://bugs.webkit.org/show_bug.cgi?id=224359

Reviewed by Adrian Perez de Castro.

Source/WebKit:

Add a property to WebKitWebView indicating whether the web processes used are responsive.

  • UIProcess/API/glib/WebKitNavigationClient.cpp:
  • UIProcess/API/glib/WebKitWebView.cpp:

(webkitWebViewConstructed):
(webkitWebViewGetProperty):
(webkit_web_view_class_init):
(webkitWebViewSetIsWebProcessResponsive):
(webkit_web_view_get_is_web_process_responsive):

  • UIProcess/API/glib/WebKitWebViewPrivate.h:
  • UIProcess/API/gtk/WebKitWebView.h:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
  • UIProcess/API/wpe/WebKitWebView.h:
  • UIProcess/API/wpe/docs/wpe-1.0-sections.txt:

Tools:

Added unit test for web process responsiveness API.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:

(testWebViewIsWebProcessResponsive):
(beforeAll):

Apr 13, 2021:

11:59 PM Changeset in webkit [275935] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Make SVGElement::getBoundingBox retrieve bbox from RenderObject
https://bugs.webkit.org/show_bug.cgi?id=224482

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

Make SVGElement::getBoundingBox retrieve bbox from RenderObject.
Also make it const and return an Optional.

  • dom/Element.cpp:

(WebCore::Element::boundsInRootViewSpace):
(WebCore::Element::absoluteEventBounds):
(WebCore::Element::boundingAbsoluteRectWithoutLayout):

  • page/ResizeObservation.cpp:

(WebCore::ResizeObservation::computeObservedSize const):

  • svg/SVGElement.cpp:

(WebCore::SVGElement::getBoundingBox const):
(WebCore::SVGElement::getBoundingBox): Deleted.

  • svg/SVGElement.h:
11:24 PM Changeset in webkit [275934] by jer.noble@apple.com
  • 4 edits
    2 adds in trunk

[GPUP] MediaSource.addSourceBuffer() will throw if given the same parameter as a previous call to HTMLMediaElement.canPlayType()
https://bugs.webkit.org/show_bug.cgi?id=224273
<rdar://74805071>

Reviewed by Eric Carlson.

Source/WebKit:

Test: media/media-source/media-source-addsourcebuffer-after-canplaytype.html

RemoteMediaPlayerMIMETypeCache will receive requests to verify whether it can handle a MIME/codec combination,
as well as whether this indicates a MediaStream, MSE source, or neither. If a cache for the MSE back-end receives
a query for a MIME type, but the query parameters indicate this is not a MSE source, it will say no and cache the
response. However the cache is keyed solely on the MIME/codec, so when a subsequent call to create a SourceBuffer
hits the cache entry, it thinks it will be unable to handle the MIME and rejects.

Make the mime-type cache triple keyed: use both the raw ContentType (MIME & codecs) as well as the flags stating
whether the source is a MediaStream, MSE, or neither.

  • WebProcess/GPU/media/RemoteMediaPlayerMIMETypeCache.cpp:

(WebKit::RemoteMediaPlayerMIMETypeCache::supportsTypeAndCodecs):

  • WebProcess/GPU/media/RemoteMediaPlayerMIMETypeCache.h:

LayoutTests:

  • media/media-source/media-source-addsourcebuffer-after-canplaytype-expected.txt: Added.
  • media/media-source/media-source-addsourcebuffer-after-canplaytype.html: Added.
11:12 PM Changeset in webkit [275933] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

AudioSourceProviderAVFObjC should lock all multithreaded objects
https://bugs.webkit.org/show_bug.cgi?id=224230

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-13
Reviewed by Eric Carlson.

Lock following objects with TapStorage::lock:

AudioSourceProviderAVFObjC::m_tapStorage
AudioSourceProviderAVFObjC::m_avPlayerItem

Do not clear the tapStorage nor the _this pointer from
the audio thread. This is a race that cannot be overcome
since the main thread needs to access the m_tapStorage pointer to
lock the m_tapStorage pointer for modification.

Initialize m_tap in more robust way, in case initialization fails.

Do not leave stale m_tapStorage present when destroying the mixer.

  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:
  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:

(WebCore::AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC):
(WebCore::AudioSourceProviderAVFObjC::destroyMixIfNeeded):
(WebCore::AudioSourceProviderAVFObjC::createMixIfNeeded):
(WebCore::AudioSourceProviderAVFObjC::initCallback):
(WebCore::AudioSourceProviderAVFObjC::finalizeCallback):

10:36 PM Changeset in webkit [275932] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Skip sframe tests added in r275656 and r275874.

Currently SFrames are not supported in GTK and WPE ports.

  • platform/glib/TestExpectations:
10:34 PM Changeset in webkit [275931] by Fujii Hironori
  • 3 edits
    2 adds in trunk

Table caption jumps to the bottom of the table after simplified table relayout
https://bugs.webkit.org/show_bug.cgi?id=187903
<rdar://problem/42506245>

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: fast/table/caption-simplified-layout.html

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::simplifiedNormalFlowLayout):
Do not call layoutCaptions().

LayoutTests:

  • fast/table/caption-simplified-layout-expected.html: Added.
  • fast/table/caption-simplified-layout.html: Added.
10:24 PM Changeset in webkit [275930] by Diego Pino Garcia
  • 3 edits
    4 adds in trunk/LayoutTests

[GTK] Unreviewed test gardening. Update baselines after r275515.

r275515 updated several general baselines that resulted into test
failures for GTK. Emit new baselines for GTK. Other pre-existing GTK
baselines just required an update.

  • platform/glib/tables/mozilla/bugs/bug113424-expected.txt:
  • platform/gtk/fast/css/empty-inline-003-quirksmode-expected.txt: Added.
  • platform/gtk/fast/lists/marker-before-empty-inline-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/css/css-flexbox/orthogonal-flex-item-crash-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/innerText/getter-expected.txt: Added.
9:16 PM Changeset in webkit [275929] by commit-queue@webkit.org
  • 4 edits in trunk/Source

Implement PlatformXRSystem::xrCoordinator() for USE(APPLE_INTERNAL_SDK)
https://bugs.webkit.org/show_bug.cgi?id=224510

Patch by Ada Chan <ada.chan@apple.com> on 2021-04-13
Reviewed by Dean Jackson.

Source/WebKit:

  • UIProcess/Cocoa/PlatformXRSystem.mm:

Source/WTF:

Update ENABLE_WEBXR flag

  • wtf/PlatformEnableCocoa.h:
8:47 PM Changeset in webkit [275928] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed fix after r275921 to address crashes on the iOS bots.

The crash would occur when the WebPage constructor would end up calling WebProcess::ensureGPUProcessConnection().
Since we're in the middle of constructing the page, the pageID has been added to m_pageMap but not the page yet.
ensureGPUProcessConnection() was iterating over m_pageMap and expecting pages in the map to be non-null.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::createWebPage):
(WebKit::WebProcess::ensureGPUProcessConnection):

8:43 PM Changeset in webkit [275927] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Unreviewed test gardening. Several 'editing/selections' tests are flaky after r275810.

  • platform/gtk/TestExpectations:
8:26 PM Changeset in webkit [275926] by mmaxfield@apple.com
  • 2 edits in trunk/LayoutTests

[Mac] imported/w3c/web-platform-tests/css/css-fonts/font-feature-settings-tibetan.html is passing
<rdar://problem/66399069>

Unreviewed.

  • platform/mac/TestExpectations:
7:57 PM Changeset in webkit [275925] by mmaxfield@apple.com
  • 10 edits
    2 adds in trunk

[GPU Process] Simplify DisplayList::Iterator part 4: Move DisplayList::Iterator to its own .h/.cpp files
https://bugs.webkit.org/show_bug.cgi?id=224146

Reviewed by Wenson Hsieh.

Source/WebCore:

This doesn't actually change any lines of code; it just moves code into different files.
This patch isn't strictly necessary, but I think it helps, because the iterator contains
a non-trivial amount of logic.

No new tests because there is no behavior change.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::begin const):
(WebCore::DisplayList::DisplayList::end const):
(WebCore::DisplayList::DisplayList::iterator::atEnd const): Deleted.
(WebCore::DisplayList::DisplayList::iterator::updateCurrentDrawingItemExtent): Deleted.
(WebCore::DisplayList::DisplayList::iterator::updateCurrentItem): Deleted.
(WebCore::DisplayList::DisplayList::iterator::advance): Deleted.
(WebCore::DisplayList::DisplayList::iterator::clearCurrentItem): Deleted.
(WebCore::DisplayList::DisplayList::iterator::moveToEnd): Deleted.
(WebCore::DisplayList::DisplayList::iterator::moveCursorToStartOfCurrentBuffer): Deleted.

  • platform/graphics/displaylists/DisplayList.h:

(WebCore::DisplayList::DisplayList::iterator::iterator): Deleted.
(WebCore::DisplayList::DisplayList::iterator::~iterator): Deleted.
(WebCore::DisplayList::DisplayList::iterator::operator==): Deleted.
(WebCore::DisplayList::DisplayList::iterator::operator!=): Deleted.
(WebCore::DisplayList::DisplayList::iterator::operator++): Deleted.
(WebCore::DisplayList::DisplayList::iterator::operator* const): Deleted.
(WebCore::DisplayList::DisplayList::iterator::itemBuffer const): Deleted.
(WebCore::DisplayList::DisplayList::begin const): Deleted.
(WebCore::DisplayList::DisplayList::end const): Deleted.

  • platform/graphics/displaylists/DisplayListIterator.cpp: Added.

(WebCore::DisplayList::DisplayList::Iterator::atEnd const):
(WebCore::DisplayList::DisplayList::Iterator::updateCurrentDrawingItemExtent):
(WebCore::DisplayList::DisplayList::Iterator::updateCurrentItem):
(WebCore::DisplayList::DisplayList::Iterator::advance):
(WebCore::DisplayList::DisplayList::Iterator::clearCurrentItem):
(WebCore::DisplayList::DisplayList::Iterator::moveToEnd):
(WebCore::DisplayList::DisplayList::Iterator::moveCursorToStartOfCurrentBuffer):

  • platform/graphics/displaylists/DisplayListIterator.h: Added.

(WebCore::DisplayList::DisplayList::Iterator::Iterator):
(WebCore::DisplayList::DisplayList::Iterator::~Iterator):
(WebCore::DisplayList::DisplayList::Iterator::operator==):
(WebCore::DisplayList::DisplayList::Iterator::operator!=):
(WebCore::DisplayList::DisplayList::Iterator::operator++):
(WebCore::DisplayList::DisplayList::Iterator::operator* const):
(WebCore::DisplayList::DisplayList::Iterator::itemBuffer const):

  • platform/graphics/displaylists/DisplayListReplayer.cpp:

Tools:

  • TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:
7:19 PM Changeset in webkit [275924] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

The watchdog should not fire when it's not active.
https://bugs.webkit.org/show_bug.cgi?id=224494
rdar://76581259

Reviewed by Saam Barati and Yusuke Suzuki.

The watchdog is only active when we have entered the VM. If we haven't entered
the VM, we postpone starting the watchdog. For example, see Watchdog::enteredVM()
and Watchdog::exitedVM().

The underlying timer may still fire the NeedWatchdogCheck event after
Watchdog::stopTimer() is called. So, we need to just ignore the event if the
watchdog isn't active.

  • runtime/VMTraps.cpp:

(JSC::VMTraps::handleTraps):

  • runtime/Watchdog.h:

(JSC::Watchdog::isActive const):

6:48 PM Changeset in webkit [275923] by Alan Coon
  • 8 edits in branches/safari-611-branch/Source

Versioning.

WebKit-7611.2.3

6:00 PM Changeset in webkit [275922] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

RemoteRenderingBackendProxy should only relaunch the GPUProcess if it actually needs it
https://bugs.webkit.org/show_bug.cgi?id=224516

Reviewed by Geoff Garen.

Previously, RemoteRenderingBackendProxy would launch the GPUProcess as soon as it was
constructed. This went against the goals of r275887 to delay the GPUProcess launch
until it is actually needed. Also, in case a a GPUProcess crash/termination,
RemoteRenderingBackendProxy would relaunch the GPUProcess right away, even if it
did not need it (No live ImageBuffers). This patch addresses both issues.

This patch is a pre-requirement for terminating the GPUProcess on memory pressure when
it is not used by any tabs.

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::~RemoteRenderingBackendProxy):
(WebKit::RemoteRenderingBackendProxy::ensureGPUProcessConnection):
(WebKit::RemoteRenderingBackendProxy::gpuProcessConnectionDidClose):
(WebKit::RemoteRenderingBackendProxy::messageSenderConnection const):
(WebKit::RemoteRenderingBackendProxy::waitForDidCreateImageBufferBackend):
(WebKit::RemoteRenderingBackendProxy::waitForDidFlush):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
5:37 PM Changeset in webkit [275921] by Chris Dumez
  • 13 edits in trunk/Source/WebKit

Stop requiring a RemoteRenderingBackend for visibility propagation views
https://bugs.webkit.org/show_bug.cgi?id=224513

Reviewed by Geoff Garen.

Stop requiring a RemoteRenderingBackend for visibility propagation views. This is
inconvenient because doing media playback in the GPUProcess does not require a
RemoteRenderingBackend. This was also making things difficult to exit the
GPUProcess on memory pressure when unused.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::createVisibilityPropagationContextForPage):
(WebKit::GPUConnectionToWebProcess::destroyVisibilityPropagationContextForPage):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/GPUConnectionToWebProcess.messages.in:
  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::RemoteRenderingBackend):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/graphics/RemoteRenderingBackendCreationParameters.h:

(WebKit::RemoteRenderingBackendCreationParameters::encode const):
(WebKit::RemoteRenderingBackendCreationParameters::decode):

  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::createVisibilityPropagationContextForPage):
(WebKit::GPUProcessConnection::destroyVisibilityPropagationContextForPage):

  • WebProcess/GPU/GPUProcessConnection.h:
  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::RemoteRenderingBackendProxy):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_lastNavigationWasAppBound):
(WebKit::WebPage::gpuProcessConnectionDidBecomeAvailable):
(WebKit::WebPage::~WebPage):
(WebKit::WebPage::updatePreferences):

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

(WebKit::WebProcess::ensureGPUProcessConnection):

5:24 PM Changeset in webkit [275920] by Ross Kirsling
  • 6 edits
    1 copy in trunk/Source/JavaScriptCore

Move cloneUBreakIterator declaration to IntlWorkaround.h
https://bugs.webkit.org/show_bug.cgi?id=224511

Reviewed by Yusuke Suzuki.

Follow up to r275856. There's ultimately no reason IntlWorkaround.cpp needs to be headerless;
this was tied to some confusion about how to successfully include ubrk.h in two different ways.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • runtime/IntlSegmenter.cpp:
  • runtime/IntlSegmenter.h:
  • runtime/IntlSegments.cpp:
  • runtime/IntlWorkaround.cpp:
  • runtime/IntlWorkaround.h: Added.
5:04 PM Changeset in webkit [275919] by Ryan Haddad
  • 2 edits in branches/safari-611-branch/Source/WebCore

Unreviewed build fix for rdar://76617366.

  • page/Quirks.cpp:

(WebCore::Quirks::shouldDisableEndFullscreenEventWhenEnteringPictureInPictureFromFullscreenQuirk const):
(WebCore::Quirks::requiresUserGestureToLoadInPictureInPicture const):

4:56 PM Changeset in webkit [275918] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

Unreviewed build fix after r275898; remove unnecessary files from the project.

  • WebKit.xcodeproj/project.pbxproj:
4:22 PM Changeset in webkit [275917] by Chris Gambrell
  • 179 edits
    5 moves
    19 adds
    18 deletes in trunk/LayoutTests

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

Reviewed by Jonathan Bedard.

  • TestExpectations:
  • http/tests/blink/sendbeacon/connect-src-beacon-allowed.html:
  • http/tests/cache/resources/iframe304.py:
  • http/tests/contentextensions/block-cookies-in-csp-report.py:
  • http/tests/css/resources/webfont-request.py:

(get_request_count): Deleted.
(set_request_count): Deleted.

  • http/tests/local/script-crossorigin-loads-file-scheme.html:
  • http/tests/media/resources/serve_video.py: Added.

(answering):

  • http/tests/resources/portabilityLayer.py:

(get_cookies): Add trailing newline.
(get_request): PHP equivalent of $_REQUEST which is used by numerous scripts.
(get_count): Added trailing newline.
(get_state): Added trailing newline.
(set_state): Changed open file's name to prevent confusion with parameter.
(step_state): Added trailing newline.

  • http/tests/security/401-logout/401-logout-expected.txt:
  • http/tests/security/401-logout/401-logout.php: Removed.
  • http/tests/security/401-logout/401-logout.py: Added.
  • http/tests/security/canvas-remote-read-remote-video-allowed-anonymous.html:
  • http/tests/security/canvas-remote-read-remote-video-allowed-with-credentials.html:
  • http/tests/security/canvas-remote-read-remote-video-blocked-no-crossorigin.html:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-in-report-only-ignored.html:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-https-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-https.html:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin.html:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-https-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-https.html:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin.html:
  • http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive.py:
  • http/tests/security/contentSecurityPolicy/1.1/resources/testScriptHash.php: Removed.
  • http/tests/security/contentSecurityPolicy/1.1/resources/testScriptHash.py: Added.
  • http/tests/security/contentSecurityPolicy/1.1/script-blocked-sends-multiple-reports-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/script-blocked-sends-multiple-reports.py:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-enforced-policy-and-blocked-by-report-policy-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-enforced-policy-and-blocked-by-report-policy.py:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-enforced-policy-and-blocked-by-report-policy2-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-enforced-policy-and-blocked-by-report-policy2.py:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy.py:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy2-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy2.py:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-enforced-policy-and-allowed-by-report-policy-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-enforced-policy-and-allowed-by-report-policy.py:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-allowed-by-report-policy.py:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy.py:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy2-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy2.py:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-tests.html:
  • http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed-by-enforced-policy-and-blocked-by-report-policy.py:
  • http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed-by-enforced-policy-and-blocked-by-report-policy2.py:
  • http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy.py:
  • http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy2.py:
  • http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-enforced-policy-and-allowed-by-report-policy-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-enforced-policy-and-allowed-by-report-policy.py:
  • http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-legacy-enforced-policy-and-allowed-by-report-policy.py:
  • http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy.py:
  • http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy2.py:
  • http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-iframe-report-only-expected.txt:
  • http/tests/security/contentSecurityPolicy/block-all-mixed-content/resources/frame-with-insecure-css-report-only.py:
  • http/tests/security/contentSecurityPolicy/connect-src-beacon-allowed.html:
  • http/tests/security/contentSecurityPolicy/connect-src-beacon-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/connect-src-beacon-blocked.html:
  • http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode-and-sends-report-expected.txt:
  • http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode-and-sends-report.py:
  • http/tests/security/contentSecurityPolicy/eval-blocked-and-sends-report-expected.txt:
  • http/tests/security/contentSecurityPolicy/eval-blocked-and-sends-report.html:
  • http/tests/security/contentSecurityPolicy/report-and-enforce-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-and-enforce.py:
  • http/tests/security/contentSecurityPolicy/report-blocked-data-uri-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-blocked-data-uri.py:
  • http/tests/security/contentSecurityPolicy/report-blocked-file-uri-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-blocked-file-uri.py:
  • http/tests/security/contentSecurityPolicy/report-blocked-uri-and-do-not-follow-redirect-when-sending-report-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-blocked-uri-and-do-not-follow-redirect-when-sending-report.py:
  • http/tests/security/contentSecurityPolicy/report-blocked-uri-cross-origin-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-blocked-uri-cross-origin.py:
  • http/tests/security/contentSecurityPolicy/report-blocked-uri-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-blocked-uri.py:
  • http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled.py:
  • http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled.php: Removed.
  • http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled.py: Added.
  • http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies.py:
  • http/tests/security/contentSecurityPolicy/report-document-uri-after-blocked-redirect.html:
  • http/tests/security/contentSecurityPolicy/report-multiple-violations-01.php: Removed.
  • http/tests/security/contentSecurityPolicy/report-multiple-violations-01.py: Added.
  • http/tests/security/contentSecurityPolicy/report-multiple-violations-02.php: Removed.
  • http/tests/security/contentSecurityPolicy/report-multiple-violations-02.py: Added.
  • http/tests/security/contentSecurityPolicy/report-only-connect-src-beacon-redirect-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-only-connect-src-beacon-redirect-blocked.php: Removed.
  • http/tests/security/contentSecurityPolicy/report-only-connect-src-beacon-redirect-blocked.py: Added.
  • http/tests/security/contentSecurityPolicy/report-only-connect-src-xmlhttprequest-redirect-to-blocked.php: Removed.
  • http/tests/security/contentSecurityPolicy/report-only-connect-src-xmlhttprequest-redirect-to-blocked.py: Added.
  • http/tests/security/contentSecurityPolicy/report-only-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-only-from-header-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-only-from-header.py:
  • http/tests/security/contentSecurityPolicy/report-only-upgrade-insecure-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-only-upgrade-insecure.py:
  • http/tests/security/contentSecurityPolicy/report-only.py:
  • http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled.py:
  • http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled.py:
  • http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies.py:
  • http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-https-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-https.html:
  • http/tests/security/contentSecurityPolicy/report-uri-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-uri-from-child-frame-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-uri-from-child-frame.html:
  • http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript.py:
  • http/tests/security/contentSecurityPolicy/report-uri-from-javascript-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-uri-from-javascript.py:
  • http/tests/security/contentSecurityPolicy/report-uri-in-meta-tag-ignored.html:
  • http/tests/security/contentSecurityPolicy/report-uri-scheme-relative-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-uri-scheme-relative.py:
  • http/tests/security/contentSecurityPolicy/report-uri.py:
  • http/tests/security/contentSecurityPolicy/resources/echo-report.php: Removed.
  • http/tests/security/contentSecurityPolicy/resources/echo-report.py: Added.
  • http/tests/security/contentSecurityPolicy/resources/generate-csp-report.php: Removed.
  • http/tests/security/contentSecurityPolicy/resources/generate-csp-report.py: Added.
  • http/tests/security/contentSecurityPolicy/resources/go-to-echo-report.js:

(window.onload):

  • http/tests/security/contentSecurityPolicy/resources/go-to-echo-report.py:
  • http/tests/security/contentSecurityPolicy/resources/image-document-default-src-none-iframe.py:
  • http/tests/security/contentSecurityPolicy/resources/redir.php: Removed.
  • http/tests/security/contentSecurityPolicy/resources/report-file-path.php: Removed.
  • http/tests/security/contentSecurityPolicy/resources/report_file_path.py: Added.
  • http/tests/security/contentSecurityPolicy/resources/save-report-and-redirect-to-save-report.php: Removed.
  • http/tests/security/contentSecurityPolicy/resources/save-report-and-redirect-to-save-report.py: Added.
  • http/tests/security/contentSecurityPolicy/resources/save-report.php: Removed.
  • http/tests/security/contentSecurityPolicy/resources/save-report.py: Added.
  • http/tests/security/contentSecurityPolicy/resources/save_report.py: Added.

(not_being_called):
(save_report):

  • http/tests/security/contentSecurityPolicy/resources/worker.php: Removed.
  • http/tests/security/contentSecurityPolicy/resources/worker.py: Added.
  • http/tests/security/contentSecurityPolicy/resources/xhr-redirect-not-allowed.py:
  • http/tests/security/contentSecurityPolicy/same-origin-plugin-document-blocked-in-child-window-report-expected.txt:
  • http/tests/security/contentSecurityPolicy/same-origin-plugin-document-blocked-in-child-window-report.py:
  • http/tests/security/contentSecurityPolicy/worker-connect-src-allowed.html:
  • http/tests/security/contentSecurityPolicy/worker-connect-src-blocked.html:
  • http/tests/security/contentSecurityPolicy/worker-eval-blocked.html:
  • http/tests/security/contentSecurityPolicy/worker-function-function-blocked.html:
  • http/tests/security/contentSecurityPolicy/worker-importscripts-blocked.html:
  • http/tests/security/contentSecurityPolicy/worker-multiple-csp-headers.html:
  • http/tests/security/contentSecurityPolicy/worker-script-src.html:
  • http/tests/security/contentSecurityPolicy/worker-set-timeout-blocked.html:
  • http/tests/security/contentSecurityPolicy/worker-without-own-csp.html:
  • http/tests/security/contentSecurityPolicy/xmlhttprequest-protected-resource-does-not-crash.html:
  • http/tests/security/cookies/cookies-wrong-domain-rejected-result.php: Removed.
  • http/tests/security/cookies/cookies-wrong-domain-rejected-result.py: Added.
  • http/tests/security/cookies/cookies-wrong-domain-rejected.py:
  • http/tests/security/cookies/resources/first-party-cookie-allow.xsl:
  • http/tests/security/cookies/resources/set-a-cookie.php: Removed.
  • http/tests/security/cookies/resources/set-a-cookie.py: Added.
  • http/tests/security/cookies/resources/third-party-cookie-blocking.xsl:
  • http/tests/security/cookies/third-party-cookie-blocking-main-frame.html:
  • http/tests/security/cookies/third-party-cookie-blocking-user-action.html:
  • http/tests/security/cookies/third-party-cookie-blocking.html:
  • http/tests/security/credentials-from-different-domains.html:
  • http/tests/security/credentials-iframes-allowCrossOriginSubresourcesToAskForCredentials-expected.txt:
  • http/tests/security/credentials-iframes-expected.txt:
  • http/tests/security/import-module-crossorigin-loads.html:
  • http/tests/security/import-script-crossorigin-loads-omit.html:
  • http/tests/security/isolatedWorld/bypass-main-world-csp-worker.html:
  • http/tests/security/module-crossorigin-error-event-information-expected.txt:
  • http/tests/security/module-crossorigin-error-event-information.html:
  • http/tests/security/module-crossorigin-loads-correctly-credentials.html:
  • http/tests/security/module-crossorigin-loads-omit.html:
  • http/tests/security/module-crossorigin-onerror-information-expected.txt:
  • http/tests/security/module-crossorigin-onerror-information.html:
  • http/tests/security/private-browsing-http-auth-expected.txt:
  • http/tests/security/private-browsing-http-auth.html:
  • http/tests/security/referrer-policy-header-expected.txt:
  • http/tests/security/referrer-policy-header.html:
  • http/tests/security/resources/basic-auth.php: Removed.
  • http/tests/security/resources/basic-auth.py: Added.
  • http/tests/security/resources/cors-basic-auth.php: Removed.
  • http/tests/security/resources/cors-basic-auth.py: Added.
  • http/tests/security/resources/cors-script.php: Removed.
  • http/tests/security/resources/cors-script.py: Added.
  • http/tests/security/resources/credentials-from-different-domains-continued-1.html:
  • http/tests/security/resources/credentials-from-different-domains-continued-2.html:
  • http/tests/security/resources/credentials-iframes-different-domain.html:
  • http/tests/security/resources/credentials-iframes-same-domain.html:
  • http/tests/security/resources/credentials-main-resource.py:
  • http/tests/security/resources/import-module-crossorigin-loads-src.js:
  • http/tests/security/resources/reference-movie-cross-origin-allow.php: Removed.
  • http/tests/security/resources/reference-movie-cross-origin-allow.py: Added.
  • http/tests/security/resources/serve-referrer-policy-and-test.php: Removed.
  • http/tests/security/resources/serve-referrer-policy-and-test.py: Added.
  • http/tests/security/resources/video-cross-origin-allow-credentials.php: Removed.
  • http/tests/security/resources/video-cross-origin-allow-credentials.py: Added.
  • http/tests/security/resources/video-cross-origin-allow.php: Removed.
  • http/tests/security/resources/video-cross-origin-allow.py: Added.
  • http/tests/security/script-crossorigin-error-event-information-expected.txt:
  • http/tests/security/script-crossorigin-error-event-information.html:
  • http/tests/security/script-crossorigin-loads-correctly-credentials.html:
  • http/tests/security/script-crossorigin-loads-correctly.html:
  • http/tests/security/script-crossorigin-onerror-information-expected.txt:
  • http/tests/security/script-crossorigin-onerror-information.html:
  • http/tests/security/script-no-crossorigin-error-event-should-be-sanitized.html:
  • http/tests/security/script-no-crossorigin-onerror-should-be-sanitized.html:
  • http/tests/security/sync-xhr-partition.html:
  • http/tests/security/video-cross-origin-caching.html:
  • http/tests/security/video-cross-origin-readback.html:
  • http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-redirect.html:
  • http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html:
  • http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin-redirect.html:
  • http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin.html:
  • http/tests/security/xssAuditor/report-script-tag-and-do-not-follow-redirect-when-sending-report-expected.txt:
  • http/tests/security/xssAuditor/report-script-tag-and-do-not-follow-redirect-when-sending-report.html:
  • http/tests/security/xssAuditor/report-script-tag-expected.txt:
  • http/tests/security/xssAuditor/report-script-tag-full-block-and-do-not-follow-redirect-when-sending-report-expected.txt:
  • http/tests/security/xssAuditor/report-script-tag-full-block-and-do-not-follow-redirect-when-sending-report.html:
  • http/tests/security/xssAuditor/report-script-tag-full-block-expected.txt:
  • http/tests/security/xssAuditor/report-script-tag-replace-state-expected.txt:
  • http/tests/security/xssAuditor/resources/echo-intertag.pl:
  • http/tests/security/xssAuditor/resources/tag-with-pause.py:
  • http/tests/ssl/curl/certificate-and-authentication.html:
  • http/tests/xmlhttprequest/resources/noContentLength.cgi:
  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk1/http/tests/security/contentSecurityPolicy/report-document-uri-after-blocked-redirect-expected.txt:
  • platform/win/TestExpectations:
  • platform/win/http/tests/security/contentSecurityPolicy/report-document-uri-after-blocked-redirect-expected.txt:
  • platform/wk2/TestExpectations:
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-iframe-report-only-expected.txt:
3:48 PM Changeset in webkit [275916] by commit-queue@webkit.org
  • 9 edits in trunk/Source

WebProcessPool should store Vector<Ref<WebProcessProxy>> instead of Vector<RefPtr>
https://bugs.webkit.org/show_bug.cgi?id=224412

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-13
Reviewed by Chris Dumez.

Source/WebKit:

No change in behavior, except I also changed a raw pointer to a WeakPtr, so we should be a little safer.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::remoteWebInspectorEnabledCallback):
(WebKit::WebProcessPool::registerNotificationObservers):

  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:

(WebKit::WebProcessProxy::cacheMediaMIMETypes):

  • UIProcess/VisitedLinkStore.cpp:

(WebKit::VisitedLinkStore::removeAll):
(WebKit::VisitedLinkStore::sendStoreHandleToProcess):
(WebKit::VisitedLinkStore::didUpdateSharedStringHashes):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::gpuProcessCrashed):
(WebKit::WebProcessPool::establishWorkerContextConnectionToNetworkProcess):
(WebKit::WebProcessPool::tryTakePrewarmedProcess):
(WebKit::WebProcessPool::initializeNewWebProcess):
(WebKit::WebProcessPool::enableProcessTermination):
(WebKit::WebProcessPool::shouldTerminate):
(WebKit::WebProcessPool::processDidFinishLaunching):
(WebKit::WebProcessPool::disconnectProcess):
(WebKit::WebProcessPool::processForRegistrableDomain):
(WebKit::WebProcessPool::createWebPage):
(WebKit::WebProcessPool::terminateAllWebContentProcesses):
(WebKit::webProcessProxyFromConnection):

  • UIProcess/WebProcessPool.h:

(WebKit::WebProcessPool::sendToAllProcesses):
(WebKit::WebProcessPool::sendToAllProcessesForSession):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didFinishLaunching):

Source/WTF:

  • wtf/Ref.h:

(WTF::operator==):
(WTF::operator!=):

3:42 PM Changeset in webkit [275915] by Lauro Moura
  • 2 edits in trunk/Source/WebKit

REGRESSION(r275262) [WebDriver] Make automation JS code aware of injected script headers
https://bugs.webkit.org/show_bug.cgi?id=224422

Reviewed by BJ Burg.

r275262 introduced "# sourceURL..." prefixes to injected scripts and
this broke Automation JS evaluation, as the code evaluated is wrapped
with "(async " + CODE + ")". This results in "Unexpected keyword 'function'.
Expected ')' to end a compound expression." errors.

Covered by existing tests.

  • WebProcess/Automation/WebAutomationSessionProxy.js:

(let.AutomationSessionProxy.prototype._execute): Move initial lines
with leading comments before the async expression.

2:54 PM Changeset in webkit [275914] by Aditya Keerthi
  • 2 edits in trunk/Source/WebKit

[iOS][FCR] Color picker sheet should use default height
https://bugs.webkit.org/show_bug.cgi?id=224371
<rdar://problem/76416775>

Reviewed by Wenson Hsieh.

System color pickers have a default height that is between a half-sheet
and a full sheet. WebKit should match the default so that users do not
need to swipe up and down to access all of the controls in the color
picker.

  • UIProcess/ios/forms/WKFormColorControl.mm:

(-[WKColorPicker configurePresentation]):

Always use UIModalPresentationPopover when presenting the
UIColorPickerViewController. In compact environments, this style
behaves the same as UIModalPresentationFormSheet, and the presented
height of the color picker matches the system default.

This method of presentation matches the logic in UIColorWell.

2:44 PM Changeset in webkit [275913] by Wenson Hsieh
  • 7 edits
    2 adds in trunk/Source/WebKit

[macOS] Refactor logic for presenting the shared QLPreviewPanel when revealing an image
https://bugs.webkit.org/show_bug.cgi?id=224445
<rdar://problem/76552762>

Reviewed by Andy Estes and Devin Rousso.

QLPreviewPanel.h states that QLPreviewPanel's state should never be modified by something that is not
currently controlling it (where "control" is determined through the QLPreviewPanelController category
methods declared in the same header file). Currently, WebKit code for revealing an image using the shared
QuickLook panel does not respect this requirement, and instead attempts to set the dataSource and delegate
properties of QLPreviewPanel out of band.

While this is not an issue if nothing in the responder chain accepts preview panel control (i.e. implements the
method -acceptsPreviewPanelControl: and returns YES), it leads to compatibility issues in apps like Mail
that override these methods and replace the dataSource and delegate properties on QLPreviewPanel. The end
result is that WebPageProxy ends up in an unexpected state where WKImageExtractionPreviewController has been
created, but will never be destroyed (until the web view itself is destroyed) because we're no longer the
delegate for the shared QLPreviewPanel, and therefore won't receive the teardown message when the preview
window is dismissed.

To address this, we refactor this logic so that WKWebView (or WKView, if applicable) is capable of accepting
preview panel control. See below for more details.

  • SourcesCocoa.txt:
  • UIProcess/API/mac/WKView.mm:

(-[WKView acceptsPreviewPanelControl:]):
(-[WKView beginPreviewPanelControl:]):
(-[WKView endPreviewPanelControl:]):

Implement QLPreviewPanelController hooks on WKView, and plumb directly into WebViewImpl.

  • UIProcess/API/mac/WKWebViewMac.mm:

(-[WKWebView acceptsPreviewPanelControl:]):
(-[WKWebView beginPreviewPanelControl:]):
(-[WKWebView endPreviewPanelControl:]):

Implement QLPreviewPanelController hooks on WKWebView, and plumb directly into WebViewImpl.

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

(WebKit::WebViewImpl::acceptsPreviewPanelControl):

Only accept control of the preview panel if we have an active image extraction preview controller.

(WebKit::WebViewImpl::beginPreviewPanelControl):
(WebKit::WebViewImpl::endPreviewPanelControl):

When beginning to take control (and relinquishing control) of the preview panel, respectively set and unset the
dataSource and delegate properties to the active image extraction preview controller.

  • UIProcess/mac/WKImageExtractionPreviewController.h: Added.
  • UIProcess/mac/WKImageExtractionPreviewController.mm: Added.

(-[WKImageExtractionPreviewItem initWithURL:title:]):
(-[WKImageExtractionPreviewItem dealloc]):
(-[WKImageExtractionPreviewItem previewItemURL]):
(-[WKImageExtractionPreviewItem previewItemTitle]):
(-[WKImageExtractionPreviewController initWithPage:url:title:]):
(-[WKImageExtractionPreviewController numberOfPreviewItemsInPreviewPanel:]):
(-[WKImageExtractionPreviewController previewPanel:previewItemAtIndex:]):

Partially upstream _WKImageExtractionPreviewController to OpenSource, as WKImageExtractionPreviewController
(the underscore is unnecessary because this object is not SPI- or API-exposed). Additionally, move it out into
its own header and source, so that it can be imported elsewhere.

  • WebKit.xcodeproj/project.pbxproj:
2:20 PM Changeset in webkit [275912] by commit-queue@webkit.org
  • 6 edits in trunk

Remove support for NPAPI plugins in WebView
https://bugs.webkit.org/show_bug.cgi?id=224449

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-13
Reviewed by Chris Dumez.

Source/WebKitLegacy/mac:

  • WebView/WebPreferences.mm:

(-[WebPreferences setPlugInsEnabled:]):

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml:

Tools:

Keep them on in tests until we remove the code.

  • DumpRenderTree/TestOptions.cpp:

(WTR::TestOptions::defaults):

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

Disable YouTube Flash and QuickTime plug in replacements on iOS
https://bugs.webkit.org/show_bug.cgi?id=224453

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-13
Reviewed by Chris Dumez.

  • page/Settings.yaml:
2:18 PM Changeset in webkit [275910] by commit-queue@webkit.org
  • 5 edits in trunk

Remove support for NPAPI plugins in WKWebView
https://bugs.webkit.org/show_bug.cgi?id=224451

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-13
Reviewed by Chris Dumez.

Source/WebKit:

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences encodeWithCoder:]):
(-[WKPreferences initWithCoder:]):
(-[WKPreferences plugInsEnabled]):
(-[WKPreferences setPlugInsEnabled:]):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Copying.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:

(-[PlugInDelegate _webView:unavailablePlugInButtonClickedWithReason:plugInInfo:]): Deleted.

1:55 PM Changeset in webkit [275909] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Make MemoryPressureHandler::isUnderMemoryPressure() return true for 2 seconds after a simulated warning
https://bugs.webkit.org/show_bug.cgi?id=224505

Reviewed by Darin Adler.

Make MemoryPressureHandler::isUnderMemoryPressure() return true for 2 seconds after a simulated warning,
to make our simulated warning more realistic.

  • wtf/cocoa/MemoryPressureHandlerCocoa.mm:

(WTF::MemoryPressureHandler::install):

1:52 PM Changeset in webkit [275908] by commit-queue@webkit.org
  • 7 edits in trunk

[css-grid] Incorrect track sizing when using relative sized items in 'auto' column tracks
https://bugs.webkit.org/show_bug.cgi?id=191627

Patch by Ziran Sun <Ziran Sun> on 2021-04-13
Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001-expected.txt:

Source/WebCore:

This is a reland of r274596. The original patch was reverted because Google logo is not visible
on google.com.

Containing block for a grid item is the grid area it's located in. During the GridTrackSizingAlgorithm,
we determine that this item has a relative size (percent in this case) and that the grid area is still
indefinite. Hence, we set nullopt for the grid area width and mark the item for layout. During the item's
layout, we call this RenderBox::containingBlockLogicalWidthForContent to determine the available height.
However, this method checks the containing block's width if the overridingContentLogicalWidth is nullopt,
which is incorrect for grid items. We should never use the grid container for resolving grid item's size.

This change is to return 0_lu for grid item when overridingContainingBlockContentLogicalWidth() returns
nullopt rather than use containing block's width. It also comments that there might be an issue with
RenderBox::containingBlockLogicalHeightForContent for grid item. It should return whatever value we get from
overridingContainingBlockContentLogicalHeight(), including WTF::nullopt.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::containingBlockLogicalWidthForContent const):
(WebCore::RenderBox::containingBlockLogicalHeightForContent const):

LayoutTests:

  • TestExpectations:
  • platform/ios-simulator-wk2/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001-expected.txt:
1:38 PM Changeset in webkit [275907] by Devin Rousso
  • 5 edits
    2 copies
    1 add in trunk/Source/WebCore

[WebIDL] includes for Conditional dictionary members should also be guarded
https://bugs.webkit.org/show_bug.cgi?id=224501
<rdar://problem/76598492>

Reviewed by Tim Horton.

WebKitAdditions sometimes needs to conditionally include IDL files and in those cases the
generated JS*.h might not get created even though the wrapped C++ type does exist. In
these cases, we should also guard the #include JS*.h (in addition to the already guarded
usage of the wrapped C++ type in convertDictionary).

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateDictionaryImplementationContent):

  • bindings/scripts/test/TestDictionary.idl: Added.
  • bindings/scripts/test/JS/JSTestDictionary.h: Added.
  • bindings/scripts/test/JS/JSTestDictionary.cpp: Added.
  • bindings/scripts/test/TestDictionaryWithOnlyConditionalMembers.idl:
  • bindings/scripts/test/JS/JSTestDictionaryWithOnlyConditionalMembers.cpp:
  • bindings/scripts/test/SupplementalDependencies.dep:
1:37 PM Changeset in webkit [275906] by Kate Cheney
  • 2 edits in trunk/LayoutTests

http/.../contentSecurityPolicy/report-document-uri-after-blocked-redirect.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=224498
<rdar://problem/76602331>

The error reported by the xhr may not always happen before the
document URI is reported. We should only end the test if both
the error and URI have been reported.

Reviewed by Jonathan Bedard.

  • http/tests/security/contentSecurityPolicy/report-document-uri-after-blocked-redirect.html:
1:19 PM Changeset in webkit [275905] by Said Abou-Hallawa
  • 20 edits in trunk/Source

[GPU Process] Make ImageBuffer calculate its memoryCost() from its size
https://bugs.webkit.org/show_bug.cgi?id=224306

Reviewed by Simon Fraser.

Source/WebCore:

Instead of round-trip processes to get the backend memoryCost(), we can
calculate it from the size and the bytes alignment of each row in the
backend. These are static values so in the case of RemoteImageBufferProxy,
there is no need to ensure the backend is created in GPUP and it is mapped
in the Web Process.

  • platform/graphics/ConcreteImageBuffer.h:
  • platform/graphics/ImageBufferBackend.cpp:

(WebCore::ImageBufferBackend::calculateBackendSize):
(WebCore::ImageBufferBackend::calculateMemoryCost):
(WebCore::ImageBufferBackend::ImageBufferBackend):

  • platform/graphics/ImageBufferBackend.h:

(WebCore::ImageBufferBackend::calculateExternalMemoryCost):
(WebCore::ImageBufferBackend::memoryCost const): Deleted.
(WebCore::ImageBufferBackend::externalMemoryCost const): Deleted.
(WebCore::ImageBufferBackend::bytesPerRow const): Deleted.

  • This is the general case of the backend which is 4-bytes aligned rows.
  • calculateSafeBackendSize() returns the size whose bytesPerRow does not

overflow unsigned and whose memoryCost does not not overflow size_t.

  • platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.cpp:

(WebCore::ImageBufferCairoImageSurfaceBackend::calculateSafeBackendSize):
(WebCore::ImageBufferCairoImageSurfaceBackend::calculateBytesPerRow):
(WebCore::ImageBufferCairoImageSurfaceBackend::calculateMemoryCost):
(WebCore::ImageBufferCairoImageSurfaceBackend::create):
(WebCore::ImageBufferCairoImageSurfaceBackend::bytesPerRow const):

  • platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.h:

cairo_format_stride_for_width() is used to calculate the bytesPerRow()
for Cairo port.

  • platform/graphics/cg/ImageBufferCGBackend.cpp:

(WebCore::ImageBufferCGBackend::calculateBytesPerRow):

  • platform/graphics/cg/ImageBufferCGBackend.h:

This is the CG case when the backend is 4-bytes aligned rows.

  • platform/graphics/cg/ImageBufferCGBitmapBackend.cpp:

(WebCore::ImageBufferCGBitmapBackend::calculateSafeBackendSize):
(WebCore::ImageBufferCGBitmapBackend::calculateMemoryCost):
(WebCore::ImageBufferCGBitmapBackend::create):
(WebCore::ImageBufferCGBitmapBackend::bytesPerRow const):

  • platform/graphics/cg/ImageBufferCGBitmapBackend.h:

This is the CG bitmap case where the backend is 4-bytes aligned rows.

  • platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:

(WebCore::ImageBufferIOSurfaceBackend::calculateSafeBackendSize):
(WebCore::ImageBufferIOSurfaceBackend::calculateBytesPerRow):
(WebCore::ImageBufferIOSurfaceBackend::calculateMemoryCost):
(WebCore::ImageBufferIOSurfaceBackend::calculateExternalMemoryCost):
(WebCore::ImageBufferIOSurfaceBackend::create):
(WebCore::ImageBufferIOSurfaceBackend::context const):
(WebCore::ImageBufferIOSurfaceBackend::calculateBackendSize): Deleted.
(WebCore::ImageBufferIOSurfaceBackend::memoryCost const): Deleted.
(WebCore::ImageBufferIOSurfaceBackend::externalMemoryCost const): Deleted.

  • platform/graphics/cg/ImageBufferIOSurfaceBackend.h:

IOSurfaceAlignProperty() is used to align the CG bytesPerRow to the proper
IOSurface alignment.

Source/WebKit:

  • Shared/ShareableBitmap.h:

Make ShareableBitmap::calculateBytesPerRow() public.

  • WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp:

(WebKit::ImageBufferShareableBitmapBackend::configuration):
(WebKit::ImageBufferShareableBitmapBackend::calculateSafeBackendSize):
(WebKit::ImageBufferShareableBitmapBackend::calculateBytesPerRow):
(WebKit::ImageBufferShareableBitmapBackend::calculateMemoryCost):
(WebKit::ImageBufferShareableBitmapBackend::create):

  • WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h:

ShareableBitmap::calculateBytesPerRow() is used to get the bytesPerRow()
by giving it the scaled backend size.

  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:

(WebKit::RemoteImageBufferProxy::create):
Use the new name of the function calculateSafeBackendSize().

  • WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.cpp:

(WebKit::ImageBufferShareableIOSurfaceBackend::calculateSafeBackendSize):
(WebKit::ImageBufferShareableIOSurfaceBackend::calculateMemoryCost):
(WebKit::ImageBufferShareableIOSurfaceBackend::calculateExternalMemoryCost):
(WebKit::ImageBufferShareableIOSurfaceBackend::bytesPerRow const):

  • WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.h:

Implement these static functions and make them call the corresponding
functions from ImageBufferIOSurfaceBackend because this class is derived
from ImageBufferBackend.

  • WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.cpp:

(WebKit::ImageBufferShareableMappedIOSurfaceBackend::create):
Use the new name of the function calculateSafeBackendSize().

1:09 PM Changeset in webkit [275904] by Razvan Caliman
  • 2 edits in trunk/Source/WebCore

Web Inspector: Forced color scheme should reset on page refresh
https://bugs.webkit.org/show_bug.cgi?id=224485
<rdar://76227216>

Reviewed by BJ Burg.

Reset the forced color scheme on page reload to keep in sync with Web Inspector
behavior for other forced states, like pseudo-classes.

  • page/Page.cpp:

(WebCore::Page::didCommitLoad):

1:06 PM Changeset in webkit [275903] by Ruben Turcios
  • 3 edits in branches/safari-612.1.11-branch/Source/WebKit

Cherry-pick r275898. rdar://problem/76520529

[Cocoa] remove link-time dependency on WebKitSwift
https://bugs.webkit.org/show_bug.cgi?id=224493

Reviewed by Eric Carlson.

  • Configurations/WebKit.xcconfig:
  • WebKit.xcodeproj/project.pbxproj:

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

12:56 PM Changeset in webkit [275902] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Use a JSString for the TerminationException value instead of a Symbol.
https://bugs.webkit.org/show_bug.cgi?id=224490

Reviewed by Yusuke Suzuki.

This makes it convertible to a String for clients that wish to report the exception.
Clients, in this case, does not apply to JS code, only C++ code that catches the
exception at the outermost point to handle the termination. The TerminationException
value is not visible to JS code because the TerminationException cannot be caught.
So, this change is transparent to JS code.

  • runtime/VM.cpp:

(JSC::VM::ensureTerminationException):

12:54 PM Changeset in webkit [275901] by ysuzuki@apple.com
  • 5 edits in trunk

[WTF] Add Vector&& move constructor / assignment to FixedVector and RefCountedArray
https://bugs.webkit.org/show_bug.cgi?id=224475

Reviewed by Ryosuke Niwa.

Source/WTF:

This patch adds move constructor and move-assignment taking Vector to FixedVector / RefCountedArray.
This allows transferring MoveOnly things from Vector to FixedVector.

  • wtf/FixedVector.h:

(WTF::FixedVector::FixedVector):
(WTF::FixedVector::operator=):

  • wtf/RefCountedArray.h:

(WTF::RefCountedArray::RefCountedArray):
(WTF::RefCountedArray::operator=):
(WTF::RefCountedArray::~RefCountedArray):
(WTF::RefCountedArray::allocateUninitializedData):
(WTF::RefCountedArray::assign):

Tools:

  • TestWebKitAPI/Tests/WTF/FixedVector.cpp:

(TestWebKitAPI::TEST):

12:51 PM Changeset in webkit [275900] by commit-queue@webkit.org
  • 5 edits in trunk

Remove SharedBuffer's equality operators with Ref<SharedBuffer>
https://bugs.webkit.org/show_bug.cgi?id=224464

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-13
Reviewed by Chris Dumez.

Source/WebCore:

No change in behavior.

I'm doing this to make a Ref comparator for all Refs to remove another reason we use RefPtr instead of Ref, even when they're all non-null.
See bug 224412

  • platform/SharedBuffer.h:

(WebCore::operator==): Deleted.
(WebCore::operator!=): Deleted.

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

(WebCore::CDMInstanceFairPlayStreamingAVFObjC::sessionForKeyIDs const):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):

Tools:

  • TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:

(TestWebKitAPI::TEST_F):

12:46 PM Changeset in webkit [275899] by commit-queue@webkit.org
  • 6 edits in trunk/Source

Revert r275172
https://bugs.webkit.org/show_bug.cgi?id=224499
<rdar://76396241>

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

Source/WebKit:

It turns out that terminate_with_reason uses a different syscall than xpc_connection_kill in its implementation,
and the former is not allowed by Messages's sandbox yet. Revert for Messages until they add it.

  • Platform/IPC/cocoa/ConnectionCocoa.mm:

(IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
(IPC::Connection::kill):

  • Platform/spi/Cocoa/ReasonSPI.h:
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::ProcessLauncher::platformInvalidate):
(WebKit::terminateWithReason):

Source/WTF:

  • wtf/spi/darwin/XPCSPI.h:
12:10 PM Changeset in webkit [275898] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebKit

[Cocoa] remove link-time dependency on WebKitSwift
https://bugs.webkit.org/show_bug.cgi?id=224493

Reviewed by Eric Carlson.

  • Configurations/WebKit.xcconfig:
  • WebKit.xcodeproj/project.pbxproj:
11:35 AM Changeset in webkit [275897] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

AudioSourceProviderAVFObjC should check for m_client when dispatching setFormat
https://bugs.webkit.org/show_bug.cgi?id=224479

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-13
Reviewed by Eric Carlson.

Use a weak pointer to schedule the setFormat client callback.
If client is unset before any callback is run, cancel the
pending callbacks.

  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:
  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:

(WebCore::AudioSourceProviderAVFObjC::destroyMixIfNeeded):
(WebCore::AudioSourceProviderAVFObjC::createMixIfNeeded):
(WebCore::AudioSourceProviderAVFObjC::prepare):

11:31 AM Changeset in webkit [275896] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

AudioSourceProviderAVFObjC::setClient should check for m_avAssetTrack
https://bugs.webkit.org/show_bug.cgi?id=224478

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-13
Reviewed by Eric Carlson.

Check for m_avAssetTrack when setting the client.
This is done for consistency, it is unclear if this affects
real world content.

  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:
  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:

(WebCore::AudioSourceProviderAVFObjC::setClient):
(WebCore::AudioSourceProviderAVFObjC::setPlayerItem):
(WebCore::AudioSourceProviderAVFObjC::setAudioTrack):
(WebCore::AudioSourceProviderAVFObjC::destroyMixIfNeeded):
(WebCore::AudioSourceProviderAVFObjC::createMixIfNeeded):

11:29 AM Changeset in webkit [275895] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, reverting r275867.
https://bugs.webkit.org/show_bug.cgi?id=224495

Need alternate fix.

Reverted changeset:

"Reduce functionWithHellaArguments3()'s number of arguments
from 5000 to 500."
https://bugs.webkit.org/show_bug.cgi?id=224474
https://trac.webkit.org/changeset/275867

10:52 AM Changeset in webkit [275894] by Devin Rousso
  • 4 edits in trunk

[iOS] Only use the theme color if it's valid when UseThemeColorForScrollAreaBackgroundColor is enabled
https://bugs.webkit.org/show_bug.cgi?id=224455

Reviewed by Wenson Hsieh.

Source/WebKit:

Without a check for isValid(), the m_themeColor would always be used, even if not set.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::scrollAreaBackgroundColor const):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/HTMLMetaThemeColor.mm:

(createWebView): Added.
(TEST.HTMLMetaThemeColor.ExperimentalUseThemeColorForScrollAreaBackgroundColor): Added.

10:42 AM Changeset in webkit [275893] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Fix typo in GPUProcessConnection::enableVP9Decoders()
https://bugs.webkit.org/show_bug.cgi?id=224491

Reviewed by Darin Adler.

  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::enableVP9Decoders):

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

Unreviewed, reverting r275889.
https://bugs.webkit.org/show_bug.cgi?id=224488

Unintentional commit

Reverted changeset:

https://trac.webkit.org/changeset/275889

9:53 AM Changeset in webkit [275891] by sihui_liu@apple.com
  • 10 edits in trunk/Source

Make WebIDBServer not block main thread during initialization
https://bugs.webkit.org/show_bug.cgi?id=224299

Reviewed by Geoffrey Garen.

Source/WebCore:

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::IDBServer):

  • Modules/indexeddb/server/IDBServer.h:

(WebCore::IDBServer::IDBServer::lock): Deleted.

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::abortActiveTransactions):

Source/WebKit:

Move Lock from WebCore::IDBServer to WebIDBServer so we can block background thread in suspend() when m_server
is uninitialized.

  • NetworkProcess/IndexedDB/WebIDBServer.cpp:

(WebKit::m_closeCallback):
(WebKit::WebIDBServer::getOrigins):
(WebKit::WebIDBServer::closeAndDeleteDatabasesModifiedSince):
(WebKit::WebIDBServer::closeAndDeleteDatabasesForOrigins):
(WebKit::WebIDBServer::renameOrigin):
(WebKit::WebIDBServer::suspend):
(WebKit::WebIDBServer::resume):
(WebKit::WebIDBServer::openDatabase):
(WebKit::WebIDBServer::deleteDatabase):
(WebKit::WebIDBServer::abortTransaction):
(WebKit::WebIDBServer::commitTransaction):
(WebKit::WebIDBServer::didFinishHandlingVersionChangeTransaction):
(WebKit::WebIDBServer::createObjectStore):
(WebKit::WebIDBServer::deleteObjectStore):
(WebKit::WebIDBServer::renameObjectStore):
(WebKit::WebIDBServer::clearObjectStore):
(WebKit::WebIDBServer::createIndex):
(WebKit::WebIDBServer::deleteIndex):
(WebKit::WebIDBServer::renameIndex):
(WebKit::WebIDBServer::putOrAdd):
(WebKit::WebIDBServer::getRecord):
(WebKit::WebIDBServer::getAllRecords):
(WebKit::WebIDBServer::getCount):
(WebKit::WebIDBServer::deleteRecord):
(WebKit::WebIDBServer::openCursor):
(WebKit::WebIDBServer::iterateCursor):
(WebKit::WebIDBServer::establishTransaction):
(WebKit::WebIDBServer::databaseConnectionPendingClose):
(WebKit::WebIDBServer::databaseConnectionClosed):
(WebKit::WebIDBServer::abortOpenAndUpgradeNeeded):
(WebKit::WebIDBServer::didFireVersionChangeEvent):
(WebKit::WebIDBServer::openDBRequestCancelled):
(WebKit::WebIDBServer::getAllDatabaseNamesAndVersions):
(WebKit::WebIDBServer::addConnection):
(WebKit::WebIDBServer::removeConnection):
(WebKit::WebIDBServer::close):

  • NetworkProcess/IndexedDB/WebIDBServer.h:

Source/WebKitLegacy:

  • Storage/InProcessIDBServer.cpp:

(InProcessIDBServer::InProcessIDBServer):
(InProcessIDBServer::deleteDatabase):
(InProcessIDBServer::openDatabase):
(InProcessIDBServer::abortTransaction):
(InProcessIDBServer::commitTransaction):
(InProcessIDBServer::didFinishHandlingVersionChangeTransaction):
(InProcessIDBServer::createObjectStore):
(InProcessIDBServer::deleteObjectStore):
(InProcessIDBServer::renameObjectStore):
(InProcessIDBServer::clearObjectStore):
(InProcessIDBServer::createIndex):
(InProcessIDBServer::deleteIndex):
(InProcessIDBServer::renameIndex):
(InProcessIDBServer::putOrAdd):
(InProcessIDBServer::getRecord):
(InProcessIDBServer::getAllRecords):
(InProcessIDBServer::getCount):
(InProcessIDBServer::deleteRecord):
(InProcessIDBServer::openCursor):
(InProcessIDBServer::iterateCursor):
(InProcessIDBServer::establishTransaction):
(InProcessIDBServer::databaseConnectionPendingClose):
(InProcessIDBServer::databaseConnectionClosed):
(InProcessIDBServer::abortOpenAndUpgradeNeeded):
(InProcessIDBServer::didFireVersionChangeEvent):
(InProcessIDBServer::openDBRequestCancelled):
(InProcessIDBServer::getAllDatabaseNamesAndVersions):
(InProcessIDBServer::closeAndDeleteDatabasesModifiedSince):

  • Storage/InProcessIDBServer.h:
9:50 AM Changeset in webkit [275890] by Simon Fraser
  • 2 edits in trunk/Tools

REGRESSION (r275792): [ iOS wk2 ] TestWebKitAPI.IndexedDB.DatabaseProcessKill is a flakey timeout
https://bugs.webkit.org/show_bug.cgi?id=224454

Reviewed by Brady Eidson, Sihui Liu.

This test was racey; the content ran script immediately, and it was possible for
the first set of messages to be received before -_test_waitForDidFinishNavigation
returned; the test would then stall because nothing triggered any more messages.

Fix by having the content run the tests from a function, and call that function
from the test. Also handle the case where receivedScriptMessage can be true
before entering the first TestWebKitAPI::Util::run().

  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill-1.html:
  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm:

(TEST):

9:50 AM Changeset in webkit [275889] by Simon Fraser
  • 6 edits in trunk/Source

Try not to schedule updates every time

9:47 AM Changeset in webkit [275888] by Sam Sneddon
  • 5 edits in trunk/Tools

Test objects should know if they need servers
https://bugs.webkit.org/show_bug.cgi?id=224442

Reviewed by Jonathan Bedard.

This also removes the unused Manager.needs_servers

  • Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py:

(LayoutTestFinder.init): Move known paths from Manager.init
(LayoutTestFinder.find_tests_by_path):

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager.init):
(Manager._is_http_test): Deleted.
(Manager._is_websocket_test): Deleted.
(Manager._needs_web_platform_test): Deleted.
(Manager._http_tests): Deleted.
(Manager._tests_to_run):
(Manager._test_input_for_file):
(Manager.needs_servers): Deleted.
(Manager.run):

  • Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:

(ManagerTest.test_needs_servers): Deleted.
(ManagerTest.integration_test_needs_servers): Deleted.

  • Scripts/webkitpy/layout_tests/models/test.py:

(Test):
(Test.needs_http_server):
(Test.needs_websocket_server):
(Test.needs_wpt_server):
(Test.needs_any_server):

9:36 AM Changeset in webkit [275887] by Chris Dumez
  • 11 edits in trunk

The GPUProcess should only launch when it is needed
https://bugs.webkit.org/show_bug.cgi?id=224461

Reviewed by Eric Carlson.

Source/WebKit:

The GPUProcess should only launch when it is needed. This avoids wasting memory
on simple pages, especially until we enable "DOM rendering in GPU Process".

  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::GPUProcessConnection):
As soon as we create a GPUProcessConnection, if "Media in GPUProcess" is enabled
we do some media-related initialization that we used to do in
WebProcess::setUseGPUProcessForMedia(). setUseGPUProcessForMedia() gets called
when constructing a WebPage and this initialization requires a GPUProcess. We
thus want to delay the initialization until we actually need a GPUProcess.

(WebKit::GPUProcessConnection::enableVP9Decoders):
Rename function to make it clear it is only used for VP9.

  • WebProcess/GPU/GPUProcessConnection.h:
  • WebProcess/GPU/media/RemoteAudioSession.cpp:

(WebKit::RemoteAudioSession::create):
(WebKit::RemoteAudioSession::RemoteAudioSession):
(WebKit::RemoteAudioSession::~RemoteAudioSession):
(WebKit::RemoteAudioSession::gpuProcessConnectionDidClose):
(WebKit::RemoteAudioSession::ensureConnection):
(WebKit::RemoteAudioSession::configuration const):
(WebKit::RemoteAudioSession::configuration):
(WebKit::RemoteAudioSession::setCategory):
(WebKit::RemoteAudioSession::setPreferredBufferSize):
(WebKit::RemoteAudioSession::tryToSetActiveInternal):
(WebKit::RemoteAudioSession::category const):
(WebKit::RemoteAudioSession::configurationChanged):

  • WebProcess/GPU/media/RemoteAudioSession.h:

Update RemoteAudioSession to lazily initiate the GPUProcess connection instead
of doing it on construction. The RemoteAudioSession gets created as soon as we
create a WebPage, at which point we may not need a GPUProcess yet.

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

(WebKit::RemoteMediaSessionHelper::RemoteMediaSessionHelper):
(WebKit::RemoteMediaSessionHelper::ensureConnection):
(WebKit::RemoteMediaSessionHelper::gpuProcessConnectionDidClose):
(WebKit::RemoteMediaSessionHelper::startMonitoringWirelessRoutesInternal):
(WebKit::RemoteMediaSessionHelper::stopMonitoringWirelessRoutesInternal):
(WebKit::RemoteMediaSessionHelper::providePresentingApplicationPID):

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

Update RemoteMediaSessionHelper to lazily initiate the GPUProcess connection instead
of doing it on construction. The RemoteAudioSession gets created as soon as we
create a WebPage, at which point we may not need a GPUProcess yet.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

  • Update GPUProcessConnection::updateParameters() call to enableVP9Decoders() due to rename. This makes it clear it is only useful for VP9. We also only call it if there is already a GPUProcess connection. If there is no connection right now, the GPUProcessConnection constructor will take care of getting the latest values from the PlatformMediaSessionManager and send them to the GPUProcess.
  • Call ensureRemoteRenderingBackendProxy() only if we already have a GPUProcessConnection, to avoid eagerly launching the GPUProcess. If no GPUProcessConnection exists, WebProcess::ensureGPUProcessConnection() will take care of calling ensureRemoteRenderingBackendProxy() on its pages.
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::ensureGPUProcessConnection):
This logic used to happen in WebPage::updatePreferences(). However, I had to make it conditional on
have a GPUProcessConnection to avoid eagerly launching the GPUProcess. As a result, I now need some
logic when we initiate the GPUProcessConnection to call ensureRemoteRenderingBackendProxy() on the
WebPages. Note that this is a temporary workaround until we enable DOM Rendering in the GPUProcess.

(WebKit::WebProcess::setUseGPUProcessForMedia):
setUseGPUProcessForMedia() gets called when constructing a WebPage, at which point a GPUProcess is
not useful yet. As a result, we should make sure setUseGPUProcessForMedia() does not call
ensureGPUProcessConnection() to avoid eagerly launching the GPUProcess and potentially wasting memory.
To fix this, I moved some of the logic to the GPUProcessConnection constructor so that we do the
media-related GPUProcess initialization ONLY once we actually have a GPUProcess.

Tools:

Add layout test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:

(TEST):

8:55 AM Changeset in webkit [275886] by sihui_liu@apple.com
  • 5 edits in trunk/Source/WebKit

StorageArea in LocalStorageNamespace can be abandoned
https://bugs.webkit.org/show_bug.cgi?id=224459

Reviewed by Geoffrey Garen.

Remove StorageArea from LocalStorageNamespace if it has no connection (no web page is using it).

  • NetworkProcess/WebStorage/LocalStorageNamespace.cpp:

(WebKit::LocalStorageNamespace::removeStorageArea):

  • NetworkProcess/WebStorage/LocalStorageNamespace.h:
  • NetworkProcess/WebStorage/StorageArea.cpp:

(WebKit::StorageArea::removeListener):

  • NetworkProcess/WebStorage/StorageManagerSet.cpp:

(WebKit::StorageManagerSet::removeConnection):
(WebKit::StorageManagerSet::disconnectFromStorageArea):

8:30 AM Changeset in webkit [275885] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[GTK4] WTR crash in PlatformWebView::dismissAllPopupMenus()
https://bugs.webkit.org/show_bug.cgi?id=224487

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-04-13
Reviewed by Philippe Normand.

This is because we are using a for loop to iterate children that are destroyed. We should not be destroying the
children, though, we should just hide them, since they are owned by the web view.

  • WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:

(WTR::PlatformWebView::dismissAllPopupMenus):

7:20 AM Changeset in webkit [275884] by aakash_jain@apple.com
  • 1 edit
    8 deletes in trunk/Tools

Delete various old EWS specific scripts
https://bugs.webkit.org/show_bug.cgi?id=224460

Reviewed by Alexey Proskuryakov.

  • EWSTools/Start-Queue.ps1: Removed.
  • EWSTools/boot.sh: Removed.
  • EWSTools/build-boot-cmd.sh: Removed.
  • EWSTools/screen-config: Removed.
  • EWSTools/start-queue-mac.sh: Removed.
  • EWSTools/start-queue-win.sh: Removed.
  • EWSTools/start-queue.sh: Removed.
  • EWSTools/ubuntu-ews-packages: Removed.
7:10 AM Changeset in webkit [275883] by Peng Liu
  • 5 edits
    2 adds in trunk

[macOS] Netflix videos opened in background tab never become playable after foregrounding
https://bugs.webkit.org/show_bug.cgi?id=224384

Reviewed by Eric Carlson.

Source/WebKit:

When a page calls navigator.requestMediaKeySystemAccess() in a background tab, the request
will be added to a pending request hash map. However, the current implementation of
MediaKeySystemPermissionRequestManager does not send the request when the tab switches
to foreground. This patch fixes this issue by adding the MediaKeySystemPermissionRequestManager
object as a MediaCanStartListener of Document, so that it will send its pending requests
when the tab switches to foreground (mediaCanStart()).

  • WebKit.xcodeproj/project.pbxproj: Add two cpp files to the xcode project.
  • WebProcess/EncryptedMedia/MediaKeySystemPermissionRequestManager.cpp:

Add the object as a MediaCanStartListener so that it can send the MediaKeySystemRequest
to the UI process when the tab switches to foreground.
(WebKit::MediaKeySystemPermissionRequestManager::startMediaKeySystemRequest):
(WebKit::MediaKeySystemPermissionRequestManager::cancelMediaKeySystemRequest):
(WebKit::MediaKeySystemPermissionRequestManager::mediaCanStart):

  • WebProcess/EncryptedMedia/MediaKeySystemPermissionRequestManager.h:

LayoutTests:

  • media/encrypted-media/mock-navigator-requestMediaKeySystemAccess-in-background-expected.txt: Added.
  • media/encrypted-media/mock-navigator-requestMediaKeySystemAccess-in-background.html: Added.
7:08 AM Changeset in webkit [275882] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

ASSERTION FAILED: !m_needExceptionCheck in CloneSerializer::serialize with postMessage({g:42})
https://bugs.webkit.org/show_bug.cgi?id=223785

Patch by Frédéric Wang <fwang@igalia.com> on 2021-04-13
Reviewed by Yusuke Suzuki.

Source/WebCore:

Test: js/dom/missing-exception-check-in-clone-serializer-serialize.html

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::serialize): Use a local throw scope within this method and
handle potential exceptions.
(WebCore::CloneBase::shouldTerminate): Deleted.

LayoutTests:

Add regression test.

  • js/dom/missing-exception-check-in-clone-serializer-serialize-expected.txt: Added.
  • js/dom/missing-exception-check-in-clone-serializer-serialize.html: Added.
6:21 AM Changeset in webkit [275881] by Angelos Oikonomopoulos
  • 2 edits in trunk/JSTests

[JSC] Unskip stress/intl-displaynames.js on ARM
https://bugs.webkit.org/show_bug.cgi?id=224427

Unreviewed test gardening.

  • stress/intl-displaynames.js:
4:38 AM Changeset in webkit [275880] by commit-queue@webkit.org
  • 4 edits in trunk

[GTK][WPE] Avif decoder build broken
https://bugs.webkit.org/show_bug.cgi?id=224232

Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-13
Reviewed by Carlos Garcia Campos.

.:

  • Source/cmake/OptionsGTK.cmake: Require 0.9.0 due to avifIO usage in the decoder.

Source/WebCore:

libavif 0.9.0 introduces an API break. avifDecoderParse() no
longer takes the image data as input. Instead, an avifIO object
needs to be associated with an avifDecoder and the avifDecoder
calls the read() method of the avifIO object to read image data
incrementally.

  • platform/image-decoders/avif/AVIFImageReader.cpp:

(WebCore::AVIFImageReader::parseHeader):
(WebCore::AVIFImageReader::decodeFrame):

4:13 AM WebKitGTK/2.32.x edited by Philippe Normand
(diff)
4:11 AM Changeset in webkit [275879] by commit-queue@webkit.org
  • 177 edits
    1 copy
    5 moves
    17 adds
    19 deletes in trunk/LayoutTests

Unreviewed, reverting r275849.
https://bugs.webkit.org/show_bug.cgi?id=224476

caused few tests to flake

Reverted changeset:

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

3:53 AM Changeset in webkit [275878] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[GStreamer] CaptureDevice monitoring is not implemented
https://bugs.webkit.org/show_bug.cgi?id=222889

Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-13
Reviewed by Xabier Rodriguez-Calvar.

GStreamer capture device events are notified through a message bus associated to the the
GstDeviceMonitor, so we need to watch out for those messages and notify the
RealtimeSourceMediaCenter accordingly.

  • platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.cpp:

(WebCore::GStreamerCaptureDeviceManager::~GStreamerCaptureDeviceManager):
(WebCore::GStreamerCaptureDeviceManager::captureDevices):
(WebCore::GStreamerCaptureDeviceManager::addDevice):
(WebCore::GStreamerCaptureDeviceManager::refreshCaptureDevices):

  • platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.h:
3:26 AM Changeset in webkit [275877] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

ASSERTION FAILED: !m_needExceptionCheck in RTCPeerConnection::CertificateParameters
https://bugs.webkit.org/show_bug.cgi?id=223788

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

Source/WebCore:

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

  • bindings/js/JSDOMConvertNumbers.h:

(WebCore::Converter<IDLFloat>::convert): Handle potential exceptions thrown by toNumber.
(WebCore::Converter<IDLDouble>::convert): Ditto.

LayoutTests:

Add regression test.

  • js/dom/missing-exception-check-in-convertNumbers-expected.txt: Added.
  • js/dom/missing-exception-check-in-convertNumbers.html: Added.
  • platform/win/TestExpectations: Skip test on windows since there is no WebRTC support.
3:17 AM Changeset in webkit [275876] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Skip style update
https://bugs.webkit.org/show_bug.cgi?id=223365

Patch by Rob Buis <rbuis@igalia.com> on 2021-04-13
Reviewed by Ryosuke Niwa.

Skip style update for getting the SVG bounding box
since boundingClientRect already updated style.

  • dom/Element.cpp:

(WebCore::Element::boundingAbsoluteRectWithoutLayout):

  • svg/SVGElement.cpp:

(WebCore::SVGElement::getBoundingBox):

3:04 AM Changeset in webkit [275875] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests/imported/w3c

Unreviewed. Upstream a test.

  • web-platform-tests/css/css-backgrounds/animations/background-position-origin-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/background-position-origin-interpolation.html:
2:26 AM Changeset in webkit [275874] by youenn@apple.com
  • 3 edits
    2 adds in trunk

SFrameTransform should be able to take array buffer views as input
https://bugs.webkit.org/show_bug.cgi?id=224437

Reviewed by Eric Carlson.

Source/WebCore:

Add support for processing ArrayBufferView.
We still output ArrayBuffer as output.

Test: webrtc/sframe-transform-buffer-source.html

  • Modules/mediastream/RTCRtpSFrameTransform.cpp:

(WebCore::transformFrame):
(WebCore::RTCRtpSFrameTransform::createStreams):

LayoutTests:

  • webrtc/sframe-transform-buffer-source-expected.txt: Added.
  • webrtc/sframe-transform-buffer-source.html: Added.
2:14 AM Changeset in webkit [275873] by svillar@igalia.com
  • 8 edits
    1 add in trunk

[css-flexbox] CDC COVID Vaccine Tracker: Safari garbles data table
https://bugs.webkit.org/show_bug.cgi?id=222581

Reviewed by Zalan Bujtas.

PerformanceTests:

  • Layout/nested-flexboxes-percentage-flex-basis.html: Added.

Source/WebCore:

With nested flexboxes in which the flex-basis is a percentage the current code that stretches the item forces a relayout
of the children because it thinks it has percentage height descendants. That happens because we call
computePercentageLogicalHeights() with a mock percentage length to check whether a size is definite and that call performs
the addPercentageHeightDescendants() call. We should avoid calling the latter in those cases as we're just trying to
figure out whether we can compute the flex-basis used value or not.

Adding a new parameter to the aforementioned method so that the percentage height descendants map could be left untouched
in those cases where we just want to test size definiteness.

Apart from making the implementation more correct this brings some performance improvements for the cases described in the
first paragraph as it can be seen in the provided performance test (24.5% of improvement).

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computePercentageLogicalHeight const):

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

(WebCore::RenderFlexibleBox::canComputePercentageFlexBasis const):
(WebCore::RenderFlexibleBox::childMainSizeIsDefinite const):
(WebCore::RenderFlexibleBox::useChildOverridingMainSizeForPercentageResolution):

  • rendering/RenderFlexibleBox.h:

LayoutTests:

2:05 AM Changeset in webkit [275872] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Use WTF::compactMap in HTMLSlotElement
https://bugs.webkit.org/show_bug.cgi?id=224470

Reviewed by Antti Koivisto.

Cleaned up the code in assignedNodes and assignedElements with WTF::compactMap.

  • html/HTMLSlotElement.cpp:

(WebCore::HTMLSlotElement::assignedNodes const):
(WebCore::HTMLSlotElement::assignedElements const):

1:38 AM Changeset in webkit [275871] by commit-queue@webkit.org
  • 9 edits in trunk/Source

[GStreamer] CaptureDevice monitor used from UIProcess
https://bugs.webkit.org/show_bug.cgi?id=222888

Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-13
Source/WebCore:

Reviewed by Youenn Fablet .

Move the device observer infrastructure from the WebKit UserMediaProcessManager to the
RealtimeMediaSourceCenter.

  • platform/mediastream/CaptureDevice.h:

(WebCore::haveDevicesChanged):

  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::RealtimeMediaSourceCenter::RealtimeMediaSourceCenter):
(WebCore::RealtimeMediaSourceCenter::Observer::~Observer):
(WebCore::RealtimeMediaSourceCenter::addDevicesChangedObserver):
(WebCore::RealtimeMediaSourceCenter::removeDevicesChangedObserver):
(WebCore::RealtimeMediaSourceCenter::captureDevicesChanged):
(WebCore::RealtimeMediaSourceCenter::triggerDevicesChangedObservers):
(WebCore::RealtimeMediaSourceCenter::setDevicesChangedObserver): Deleted.

  • platform/mediastream/RealtimeMediaSourceCenter.h:

(WebCore::RealtimeMediaSourceCenter::Observer::devicesChanged):

Source/WebKit:

Reviewed by Youenn Fablet.

GStreamer ports aim to reduce usage of the GStreamer library in the UIProcess and thus
should not relay capture devicechange monitoring to the UIProcess. For the long term we plan
to migrate media processing to the GPUProcess but for now we have to maintain the media
pipelines in the WebProcess. Initializing GStreamer in multiple processes (including the
UIProcess) has a significant performance impact on embedded platforms, that's why we try to
avoid it as much as possible.

The device monitoring code from the UserMediaProcessManager was partly moved to the
RealtimeMediaSourceCenter so that it can be easily reused by GStreamer ports from the
UserMediaPermissionRequestManager.

  • UIProcess/UserMediaProcessManager.cpp:

(WebKit::UserMediaProcessManager::UserMediaProcessManager):
(WebKit::UserMediaProcessManager::updateCaptureDevices):
(WebKit::UserMediaProcessManager::devicesChanged):
(WebKit::UserMediaProcessManager::beginMonitoringCaptureDevices):

  • UIProcess/UserMediaProcessManager.h:
  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::UserMediaPermissionRequestManager):
(WebKit::UserMediaPermissionRequestManager::updateCaptureDevices):
(WebKit::UserMediaPermissionRequestManager::DeviceObserver::devicesChanged):
(WebKit::UserMediaPermissionRequestManager::addDeviceChangeObserver):

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.h:

(WebKit::UserMediaPermissionRequestManager::DeviceObserver::DeviceObserver):

1:34 AM Changeset in webkit [275870] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, casting to unsigned long long to suppress warning
https://bugs.webkit.org/show_bug.cgi?id=224473

  • b3/B3ConstDoubleValue.cpp:

(JSC::B3::ConstDoubleValue::dumpMeta const):

1:08 AM Changeset in webkit [275869] by graouts@webkit.org
  • 20 edits in trunk

calc() simplification for a multiplication should apply the multiplication to each value of an addition
https://bugs.webkit.org/show_bug.cgi?id=224376

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Mark 99 WPT progressions.

  • web-platform-tests/css/css-backgrounds/animations/background-position-origin-interpolation-expected.txt:
  • web-platform-tests/css/css-shapes/animation/shape-outside-interpolation-expected.txt:
  • web-platform-tests/css/css-shapes/shape-outside/values/shape-margin-003-expected.txt:
  • web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-circle-010-expected.txt:
  • web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-circle-011-expected.txt:
  • web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-ellipse-010-expected.txt:
  • web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-ellipse-011-expected.txt:
  • web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-inset-008-expected.txt:
  • web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-inset-009-expected.txt:
  • web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-polygon-006-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt:

Source/WebCore:

An expression such as calc(0.5 * (100% + 100px)) should be simplified to calc(50% + 50px). We produce
these types of expressions when blending between a percentage and a dimension, and they can also be
specified explicitly in style.

  • css/CSSCalculationValue.cpp:

(WebCore::CSSCalcOperationNode::combineChildren):

LayoutTests:

Rebase some non-WPT tests to account for new results.

  • css3/calc/simplification-expected.txt:
  • transitions/background-position-transitions-expected.txt:
  • transitions/background-position-transitions.html:
1:05 AM Changeset in webkit [275868] by Said Abou-Hallawa
  • 6 edits
    2 adds in trunk

SVG paced value animations overwrite user-provided keyTimes
https://bugs.webkit.org/show_bug.cgi?id=109010

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

  • web-platform-tests/svg/animations/scripted/paced-value-animation-overwrites-keyTimes-expected.txt:

Source/WebCore:

If the calcMode is Paced, the 'keyTimes' attribute is ignored. Distances
between the 'values' are used produce an even pace of change across the
animation.

When changing calcMode, times defined in the 'keyTimes' attribute should
be used instead. To fix this, SVGAnimationElement can maintain two lists
for keyTimes: (1) keyTimesFromAttribute (2) keyTimesForPaced.
One of these lists will be picked by a new function 'keyTimes()' based
on the current calcMode.

Specs: https://www.w3.org/TR/SVG11/animate.html#CalcModeAttribute

Test: svg/animations/animate-calcMode-paced-overwrite-key-times.html

  • svg/SVGAnimationElement.cpp:

(WebCore::SVGAnimationElement::parseAttribute):
(WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced):
(WebCore::SVGAnimationElement::keyTimes const):
(WebCore::SVGAnimationElement::calculateKeyTimesIndex const):
(WebCore::SVGAnimationElement::calculatePercentFromKeyPoints const):
(WebCore::SVGAnimationElement::calculatePercentForFromTo const):
(WebCore::SVGAnimationElement::currentValuesFromKeyPoints const):
(WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
(WebCore::SVGAnimationElement::startedActiveInterval):
(WebCore::SVGAnimationElement::updateAnimation):

  • svg/SVGAnimationElement.h:

LayoutTests:

Simplified from the WPT paced-value-animation-overwrites-keyTimes.html.

  • svg/animations/animate-calcMode-paced-overwrite-key-times-expected.html: Added.
  • svg/animations/animate-calcMode-paced-overwrite-key-times.html: Added.
1:04 AM Changeset in webkit [275867] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Reduce functionWithHellaArguments3()'s number of arguments from 5000 to 500.
https://bugs.webkit.org/show_bug.cgi?id=224474
rdar://73614896

Reviewed by Yusuke Suzuki.

Using 5000 arguments seems excessive, and may blow out the stack on more resource
constrained devices. 500 should be high enough.

  • b3/testb3_5.cpp:

(JSC_DEFINE_JIT_OPERATION):
(testCallFunctionWithHellaArguments3):

12:35 AM Changeset in webkit [275866] by ysuzuki@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

[JSC] Remove CodeBlock::m_constantsSourceCodeRepresentation
https://bugs.webkit.org/show_bug.cgi?id=224473

Reviewed by Mark Lam.

CodeBlock::m_constantsSourceCodeRepresentation is identical to UnlinkedCodeBlock::m_constantsSourceCodeRepresentation.

  1. For all constants existing at bytecode compile time, elements of the above vectors are identical.
  2. For lazily added constants from DFG, it is always SourceCodeRepresentation::Other.

And the array is effectively accessed only when compiling DFG code. So we should remove copy of that in CodeBlock, and
get SourceCodeRepresentation from UnlinkedCodeBlock.

  • bytecode/BytecodeDumper.cpp:

(JSC::CodeBlockBytecodeDumper<Block>::dumpConstants):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::setConstantRegisters):
(JSC::CodeBlock::shrinkToFit):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::constants):
(JSC::CodeBlock::addConstant):
(JSC::CodeBlock::addConstantLazily):
(JSC::CodeBlock::constantSourceCodeRepresentation const):
(JSC::CodeBlock::constantsSourceCodeRepresentation): Deleted.

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::constantSourceCodeRepresentation const):

  • bytecode/UnlinkedCodeBlockGenerator.h:

(JSC::UnlinkedCodeBlockGenerator::constantSourceCodeRepresentation const):
(JSC::UnlinkedCodeBlockGenerator::constantsSourceCodeRepresentation): Deleted.

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::registerFrozenValues):

Note: See TracTimeline for information about the timeline view.