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

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)
Note: See TracTimeline for information about the timeline view.