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

Timeline



Feb 27, 2022:

11:07 PM Changeset in webkit [290583] by Dewei Zhu
  • 9 edits in trunk/Tools

'run-benchmark' script should log http requests during benchmark run.
https://bugs.webkit.org/show_bug.cgi?id=237076
<rdar://89270825>

Reviewed by Simon Fraser.

Add support to log http requests during benchmark run for diagnostic purpose.

  • Scripts/webkitpy/init.py: Update 'attr' package version to 20.3.0 so match upgraded twisted version
  • Scripts/webkitpy/autoinstalled/twisted.py: Upgrade twisted version to latest python2 & python3 compatibile

version.

  • Scripts/webkitpy/benchmark_runner/benchmark_runner.py: Ensure benchmark diagnostic directory is created.

(BenchmarkRunner.init):

  • Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py: Add '--log-path'

arugment to allow specify logging output and it defaults to '/tmp/run-benchmark-http.log'

  • Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver.py:

(HTTPServerDriver.set_device_id):
(HTTPServerDriver):
(HTTPServerDriver.set_http_log):

  • Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: Pass http log path to

twisted http server if specified.
(SimpleHTTPServerDriver.init):
(SimpleHTTPServerDriver.serve):
(SimpleHTTPServerDriver.set_http_log):

  • Scripts/webkitpy/benchmark_runner/run_benchmark.py: Fix a tiny bug that default_diagnose_dir() is involked twice in

argument parser help message.
(config_argument_parser):

  • Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py: Set http request log path if diagnostic directory

is specified.
(WebServerBenchmarkRunner.init):

Canonical link: https://commits.webkit.org/247861@main

9:09 PM Changeset in webkit [290582] by sihui_liu@apple.com
  • 10 edits in trunk/Source/WebKit

Add a feature flag for using general storage directory
https://bugs.webkit.org/show_bug.cgi?id=237186
rdar://89521373

Reviewed by Chris Dumez.

  • FeatureFlags/WebKit-appletvos.plist:
  • FeatureFlags/WebKit-ios.plist:
  • FeatureFlags/WebKit-macos.plist:
  • FeatureFlags/WebKit-watchos.plist:
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::defaultShouldUseCustomStoragePaths):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::defaultShouldUseCustomStoragePaths):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:

(WebKit::WebsiteDataStoreConfiguration::WebsiteDataStoreConfiguration):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
8:17 PM Changeset in webkit [290581] by Said Abou-Hallawa
  • 6 edits in trunk/Source

[GPU Process] Deleted unneeded constructors from DisplayList::Recorder classes
https://bugs.webkit.org/show_bug.cgi?id=237261

Reviewed by Wenson Hsieh.

Source/WebCore:

This should have been done in r289594.

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::Recorder):

  • platform/graphics/displaylists/DisplayListRecorder.h:

Source/WebKit:

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
8:01 PM Changeset in webkit [290580] by Jonathan Bedard
  • 71 edits
    2 deletes in trunk

webkitpy: WebSocket server doesn't support Python 3
https://bugs.webkit.org/show_bug.cgi?id=230319
<rdar://problem/58814743>

Reviewed by Fujii Hironori.

Tools:

  • Scripts/new-run-webkit-websocketserver: Change shebang.
  • Scripts/webkitpy/layout_tests/servers/websocket_server.py:

(PyWebSocket._prepare_config): Invoke WebSocket server with Python 3.

LayoutTests:

Make all tests Python 3 compatible, even at the cost of Python 2
compatibility, since WebSocket tests are always invoked with Python 3.

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/binary-frames_wsh.py:

(web_socket_transfer_data):
(all_distinct_bytes):

  • http/tests/websocket/tests/hybi/broken-utf8_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/check-binary-messages_wsh.py:

(web_socket_transfer_data):
(all_distinct_bytes):

  • http/tests/websocket/tests/hybi/client-close-2-expected.txt:
  • http/tests/websocket/tests/hybi/client-close-2.html:
  • http/tests/websocket/tests/hybi/client-close-2_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/client-close-expected.txt:
  • http/tests/websocket/tests/hybi/client-close.html:
  • http/tests/websocket/tests/hybi/client-close_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/close-code-and-reason_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/close-on-unload_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/compressed-control-frame_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/cookie_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/deflate-frame-invalid-parameter_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/deflate-frame_wsh.py:

(_get_deflate_frame_extension_processor):
(web_socket_do_extra_handshake):
(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/echo-cookie_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/echo_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/fragmented-binary-frames_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/handshake-fail-by-extensions-header_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-invalid-http-version_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-maxlength_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-mismatch-protocol-header_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-more-extensions-header_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-no-accept-header_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-no-cr_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-accept_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-extensions_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-protocol_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-status-line_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-null-char-in-status_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-prepended-null_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-wrong-accept-header_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-ok-with-http-version-beyond-1_1_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-ok-with-legacy-sec-websocket-response-headers_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-ok-with-legacy-websocket-response-headers_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-invalid-parameter_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-manual_wsh.py:
  • http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-unsolicited-negotiation-response_wsh.py:
  • http/tests/websocket/tests/hybi/imported/blink/permessage-deflate_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/inspector/binary_wsh.py:

(web_socket_transfer_data):
(all_distinct_bytes):

  • http/tests/websocket/tests/hybi/invalid-continuation_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/invalid-encode-length_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/pong_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/protocol-test_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/reserved-bits_wsh.py:

(_get_deflate_frame_extension_processor):
(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/reserved-opcodes_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/send-file-blob_wsh.py:

(web_socket_transfer_data):
(all_distinct_bytes):

  • http/tests/websocket/tests/hybi/too-long-payload_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/unicode_wsh.py:
  • http/tests/websocket/tests/hybi/unmasked-frames_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/workers/resources/binary-frames_wsh.py:

(web_socket_transfer_data):
(all_distinct_bytes):

  • http/tests/websocket/tests/hybi/workers/resources/check-binary-messages_wsh.py:

(web_socket_transfer_data):
(all_distinct_bytes):

  • http/tests/websocket/tests/hybi/workers/resources/no-onmessage-in-sync-op_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/workers/resources/protocol-test_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/zero-length-text_wsh.py:

(web_socket_transfer_data):

  • platform/glib/TestExpectations:
  • platform/ios-wk2/http/tests/websocket/tests/hybi/handshake-fail-by-no-cr-expected.txt:
  • platform/mac-wk2/http/tests/websocket/tests/hybi/client-close-2-expected.txt: Removed.
  • platform/mac-wk2/http/tests/websocket/tests/hybi/client-close-expected.txt: Removed.
  • platform/mac-wk2/http/tests/websocket/tests/hybi/handshake-fail-by-no-cr-expected.txt:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
  • platform/wincairo/TestExpectations:
7:28 PM Changeset in webkit [290579] by commit-queue@webkit.org
  • 9 edits
    2 deletes in trunk

Unreviewed, reverting r290577.
https://bugs.webkit.org/show_bug.cgi?id=237264

Breaks ios-wk2 layout test.

Reverted changeset:

"Compute correct containing block override size for items that
are subgridden in one dimension only."
https://bugs.webkit.org/show_bug.cgi?id=236951
https://commits.webkit.org/r290577

7:24 PM Changeset in webkit [290578] by Wenson Hsieh
  • 8 edits in trunk/Source

Invoking "Markup Image" should preserve the existing selection range
https://bugs.webkit.org/show_bug.cgi?id=237242

Reviewed by Darin Adler.

Source/WebCore:

Move the implementation of replaceNodeFromPasteboard out of the macOS-specific implementation file and into
EditorCocoa instead, so that we can use it on both iOS and macOS to handle the "Markup Image" action. See WebKit
ChangeLog for more details.

  • editing/Editor.h:
  • editing/cocoa/EditorCocoa.mm:

(WebCore::maybeCopyNodeAttributesToFragment):
(WebCore::Editor::replaceNodeFromPasteboard):

Also make a few minor adjustments while we're moving this code:

  • Make this take a reference instead of a pointer (the method always expects a non-null Node pointer anyways).
  • Add a FIXME mentioning that we can just delete setInsertionPasteboard altogether once Mail compose on

macOS uses WebKit2.

  • Unconditionally pass false for whether or not we should enable smart paste when replacing the node. This

prevents us from inserting spaces around the replacement image element when triggering the "Markup Image"
item.

  • Use makeRangeSelectingNode instead of makeRangeSelectingNodeContents when selecting the node to replace.

This allows us to handle the case where the node to replace cannot contain children for editing (in
particular, image elements).

Note that this codepath (replaceNodeFromPasteboard) is currently only exercised by WebKitLegacy service
controls code that was originally intended for use by Mail compose, but never ended up being used.

  • editing/mac/EditorMac.mm:

(WebCore::Editor::pasteWithPasteboard):
(WebCore::maybeCopyNodeAttributesToFragment): Deleted.
(WebCore::Editor::replaceNodeFromPasteboard): Deleted.

Source/WebKit:

Make a few adjustments to replaceWithPasteboardData, such that it attempts to restore the previous selection
range after replacing the target element. If the previous selection is no longer valid (i.e., it was orphaned as
a result of the editing command used to replace the element), then we fall back to restoring the visible
character range of the previous selection, relative to the editable root (or the body if there is none).

API tests will be added in https://webkit.org/b/236519, once we're able to swizzle out the underlying VisionKit
methods in order to make these tests run reliably.

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::OverridePasteboardForSelectionReplacement::OverridePasteboardForSelectionReplacement):
(WebKit::OverridePasteboardForSelectionReplacement::~OverridePasteboardForSelectionReplacement):

Add a helper RAII object that encapsulates logic for setting and unsetting data on the override pasteboard. Use
this in the two methods below.

(WebKit::WebPage::replaceWithPasteboardData):

Switch to using the refactored Editor::replaceNodeFromPasteboard method instead of calling to the adjacent
replaceSelectionWithPasteboardData method below. Using this method allows us to avoid manually selecting the
target element here, and also avoids smart pasteboard replacement (which may insert spaces before or after the
image); the latter is important in order to correctly restore the previous selection's character range in the
case where the previous selection range was orphaned by the replacement.

(WebKit::WebPage::replaceSelectionWithPasteboardData):

Source/WebKitLegacy/mac:

See WebKit and WebCore ChangeLogs for more detail.

  • Misc/WebSharingServicePickerController.mm:

(-[WebSharingServicePickerController didShareImageData:confirmDataIsValidTIFFData:]):

Adjust this call site to pass in a reference instead of a pointer. Also deploy RefPtr in some adjacent code.

7:03 PM Changeset in webkit [290577] by Matt Woodrow
  • 9 edits
    2 adds in trunk

Compute correct containing block override size for items that are subgridden in one dimension only.
https://bugs.webkit.org/show_bug.cgi?id=236951

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Added new WPT similar to auto-track-sizing-001 which adds new variations
with nested subgrids and varying whether the other axis is subgridded.

  • web-platform-tests/css/css-grid/subgrid/auto-track-sizing-002-expected.html: Added.
  • web-platform-tests/css/css-grid/subgrid/auto-track-sizing-002.html: Added.

Source/WebCore:

Items that are subgridded in one dimension will be included in the track sizing algorithm of the
outer grid for that dimension. When measuring their size in the subgridded dimension, we need to
set their containing block size in the other (non-subgridded) dimension, which is only available
from the subgrid's track sizing, not the outer track sizes.

This recurses up to set the override size on the subgrid element instead, and forces a layout
there, which should copy down subgrid track sizes and compute the other dimension, making it
available on the inner item we need.

Test: imported/w3c/web-platform-tests/css/css-grid/subgrid/auto-track-sizing-002.html

  • rendering/GridLayoutFunctions.cpp:

(WebCore::GridLayoutFunctions::extraMarginForSubgridAncestors):

  • rendering/GridLayoutFunctions.h:
  • rendering/GridTrackSizingAlgorithm.cpp:

(WebCore::GridTrackSizingAlgorithmStrategy::updateOverridingContainingBlockContentSizeForChild const):

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::isSubgridOf):

  • rendering/RenderGrid.h:

LayoutTests:

Marked existing WPT as passing.

6:14 PM Changeset in webkit [290576] by Matt Woodrow
  • 4 edits in trunk

Convert grid direction to be relative to subgrid when accounting for extra margin.
https://bugs.webkit.org/show_bug.cgi?id=236954

Reviewed by Dean Jackson.

Source/WebCore:

|direction| is passed as a direction relative to |grid|, so we need to convert it
to be a direction relative to the subgrid item in order to account for margin on
the correct edge.

Marks existing test orthogonal-writing-mode-003.html as passing.

  • rendering/GridLayoutFunctions.cpp:

(WebCore::GridLayoutFunctions::marginLogicalSizeForChild):

LayoutTests:

Marks existing test orthogonal-writing-mode-003.html as passing.

5:24 PM Changeset in webkit [290575] by Chris Dumez
  • 100 edits in trunk

Omit template parameter for SetForScope<> variables
https://bugs.webkit.org/show_bug.cgi?id=237258

Reviewed by Darin Adler.

Source/JavaScriptCore:

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::emitNode):

  • debugger/Debugger.cpp:

(JSC::Debugger::dispatchFunctionToObservers):

  • dfg/DFGByteCodeParser.cpp:

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

  • inspector/InspectorBackendDispatcher.cpp:

(Inspector::BackendDispatcher::dispatch):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::parseAsyncFunctionSourceElements):
(JSC::Parser<LexerType>::parseAsyncGeneratorFunctionSourceElements):
(JSC::Parser<LexerType>::parseFunctionBody):
(JSC::Parser<LexerType>::parseFunctionParameters):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseFunctionDeclaration):
(JSC::Parser<LexerType>::parseAsyncFunctionDeclaration):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parseGetterSetter):
(JSC::Parser<LexerType>::parseFunctionExpression):
(JSC::Parser<LexerType>::parseAsyncFunctionExpression):
(JSC::Parser<LexerType>::parseArrowFunctionExpression):

Source/WebCore:

  • Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:

(WebCore::IDBServer::MemoryBackingStoreTransaction::abort):

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::performDeferredCacheUpdate):

  • bindings/js/JSCustomElementRegistryCustom.cpp:

(WebCore::JSCustomElementRegistry::define):

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::evaluateModule):
(WebCore::ScriptController::callInWorld):
(WebCore::ScriptController::executeJavaScriptURL):

  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::addFontFaceRule):

  • css/parser/CSSSelectorParser.cpp:

(WebCore::CSSSelectorParser::consumeCompoundSelector):

  • dom/CustomElementReactionQueue.cpp:

(WebCore::CustomElementQueue::invokeAll):

  • dom/Document.cpp:

(WebCore::Document::updateRenderTree):
(WebCore::Document::styleForElementIgnoringPendingStylesheets):
(WebCore::Document::destroyRenderTree):
(WebCore::Document::hitTest):

  • dom/EventTarget.cpp:

(WebCore::EventTarget::fireEventListeners):

  • dom/Microtasks.cpp:

(WebCore::MicrotaskQueue::performMicrotaskCheckpoint):

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::forEachActiveDOMObject const):

  • dom/Traversal.cpp:

(WebCore::NodeIteratorBase::acceptNode):

  • editing/Editor.cpp:

(WebCore::Editor::cut):
(WebCore::Editor::copy):
(WebCore::Editor::copyFont):
(WebCore::Editor::paste):
(WebCore::Editor::pasteAsPlainText):
(WebCore::Editor::pasteAsQuotation):
(WebCore::Editor::pasteFont):

  • history/BackForwardCache.cpp:

(WebCore::BackForwardCache::pruneToSizeNow):
(WebCore::BackForwardCache::removeAllItemsForPage):

  • html/DOMTokenList.cpp:

(WebCore::DOMTokenList::updateAssociatedAttributeFromTokens):

  • html/HTMLButtonElement.cpp:

(WebCore::HTMLButtonElement::defaultEventHandler):

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::focusAndShowValidationMessage):

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::reset):
(WebCore::HTMLFormElement::constructEntryList):

  • html/HTMLTrackElement.cpp:

(WebCore::HTMLTrackElement::scheduleLoad):

  • html/parser/CSSPreloadScanner.cpp:

(WebCore::CSSPreloadScanner::scan):

  • html/shadow/TextControlInnerElements.cpp:

(WebCore::SearchFieldResultsButtonElement::resolveCustomStyle):

  • html/track/LoadableTextTrack.cpp:

(WebCore::LoadableTextTrack::scheduleLoad):

  • loader/ContentFilter.cpp:

(WebCore::ContentFilter::handleProvisionalLoadFailure):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::load):
(WebCore::FrameLoader::clearProvisionalLoadForPolicyCheck):
(WebCore::FrameLoader::dispatchBeforeUnloadEvent):
(WebCore::FrameLoader::loadDifferentDocumentItem):

  • loader/cache/CachedRawResource.cpp:

(WebCore::CachedRawResource::updateBuffer):

  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::pruneLiveResourcesToSize):
(WebCore::MemoryCache::pruneDeadResourcesToSize):

  • page/Chrome.cpp:

(WebCore::Chrome::runModal const):

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::handleContextMenuEvent):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::suspendForBackForwardCache):

  • page/DragController.cpp:

(WebCore::DragController::performDragOperation):

  • page/EventSource.cpp:

(WebCore::EventSource::doExplicitLoadCancellation):

  • page/FrameView.cpp:

(WebCore::FrameView::applyRecursivelyWithVisibleRect):
(WebCore::FrameView::updateEmbeddedObjects):
(WebCore::FrameView::autoSizeIfEnabled):

  • page/FrameViewLayoutContext.cpp:

(WebCore::FrameViewLayoutContext::layout):
(WebCore::FrameViewLayoutContext::runAsynchronousTasks):

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::didReceiveHeaders):

  • page/ios/EventHandlerIOS.mm:

(WebCore::EventHandler::tryToBeginDragAtPoint):

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::commitTreeState):

  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::handleWheelEventAfterMainThread):

  • platform/PreviewConverter.cpp:

(WebCore::PreviewConverter::iterateClients):
(WebCore::PreviewConverter::replayToClient):

  • platform/audio/PlatformMediaSession.cpp:

(WebCore::PlatformMediaSession::clientWillBeginPlayback):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::commitLayerChangesAfterSublayers):

  • platform/graphics/mac/WebLayer.mm:

(-[WebSimpleLayer renderInContext:]):

  • platform/graphics/texmap/TextureMapperGL.cpp:

(WebCore::TextureMapperGL::drawTexture):

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
(WebCore::TextureMapperLayer::paintIntoSurface):
(WebCore::TextureMapperLayer::paintWithIntermediateSurface):
(WebCore::TextureMapperLayer::paintRecursive):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::purgeBackingStores):

  • platform/ios/LegacyTileLayer.mm:

(-[LegacyTileLayer renderInContext:]):

  • platform/mac/ScrollbarThemeMac.mm:

(WebCore::ScrollbarThemeMac::paint):

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):

  • rendering/RenderGeometryMap.cpp:

(WebCore::RenderGeometryMap::pushMappingsToAncestor):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::computeVisibleRectInContainer const):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::flushPendingLayerChanges):

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::updateScrollbarsAfterLayout):

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::layout):

  • rendering/svg/LegacyRenderSVGRoot.cpp:

(WebCore::LegacyRenderSVGRoot::layout):

  • rendering/svg/RenderSVGResourceContainer.cpp:

(WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):

  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::RenderSVGRoot::layout):

  • storage/StorageMap.cpp:

(WebCore::StorageMap::setItemIgnoringQuota):

  • style/StyleBuilder.cpp:

(WebCore::Style::Builder::applyCustomProperty):
(WebCore::Style::Builder::applyCascadeProperty):

  • style/StyleInvalidator.cpp:

(WebCore::Style::Invalidator::invalidateWithMatchElementRuleSets):

  • style/StyleScope.cpp:

(WebCore::Style::Scope::createDocumentResolver):
(WebCore::Style::Scope::createOrFindSharedShadowTreeResolver):
(WebCore::Style::Scope::updateResolver):

  • svg/SVGPathBlender.cpp:

(WebCore::SVGPathBlender::addAnimatedPath):

  • workers/WorkerThread.cpp:

(WebCore::WorkerThread::evaluateScriptIfNecessary):

Source/WebKit:

  • NetworkProcess/storage/QuotaManager.cpp:

(WebKit::QuotaManager::handleRequests):

  • Shared/API/Cocoa/WKRemoteObjectCoder.mm:

(createEncodedObject):
(decodeObject):

  • UIProcess/API/glib/InputMethodFilter.cpp:

(WebKit::InputMethodFilter::filterKeyEvent):

  • UIProcess/API/glib/WebKitWebView.cpp:

(WebKitWebViewClient::frameDisplayed):

  • UIProcess/API/gtk/InputMethodFilterGtk.cpp:

(WebKit::InputMethodFilter::filterKeyEvent):

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::updateTextTouchBar):

  • UIProcess/Inspector/WebInspectorUIProxy.cpp:

(WebKit::WebInspectorUIProxy::open):
(WebKit::WebInspectorUIProxy::closeFrontendPageAndWindow):

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:

(WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren):

  • UIProcess/_WKWebViewPrintFormatter.mm:

(-[_WKWebViewPrintFormatter _setSnapshotPaperRect:]):

  • UIProcess/gtk/ClipboardGtk3.cpp:

(WebKit::Clipboard::write):

  • UIProcess/gtk/WebDateTimePickerGtk.cpp:

(WebKit::WebDateTimePickerGtk::update):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView becomeFirstResponderForWebView]):
(-[WKContentView resignFirstResponderForWebView]):
(-[WKContentView unsuppressSoftwareKeyboardUsingLastAutocorrectionContextIfNeeded]):
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]):
(-[WKContentView _elementDidBlur]):

  • UIProcess/ios/forms/WKDateTimeInputControl.mm:

(-[WKDateTimePicker handleDatePickerPresentationDismissal]):
(-[WKDateTimePicker removeDatePickerPresentation]):

  • WebProcess/Plugins/Plugin.cpp:

(WebKit::Plugin::destroyPlugin):

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::flushPendingLayerChanges):
(WebKit::CompositingCoordinator::purgeBackingStores):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::updateRendering):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::stopLoadingDueToProcessSwap):
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::keyEvent):
(WebKit::WebPage::restoreSessionInternal):
(WebKit::WebPage::dispatchTouchEvent):
(WebKit::WebPage::setInitialFocus):
(WebKit::WebPage::setActivityState):
(WebKit::WebPage::insertTextAsync):
(WebKit::WebPage::createAppHighlightInSelectedRange):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::completeSyntheticClick):
(WebKit::WebPage::requestDragStart):
(WebKit::WebPage::requestAdditionalItemsForDragSession):
(WebKit::WebPage::selectPositionAtPoint):
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::focusTextInputContextAndPlaceCaret):

  • WebProcess/WebPage/wc/DrawingAreaWC.cpp:

(WebKit::DrawingAreaWC::updateRendering):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::prepareToSuspend):

Source/WebKitLegacy/mac:

  • WebView/WebView.mm:

(-[WebView updateTextTouchBar]):

  • WebView/WebViewData.mm:

(WebViewLayerFlushScheduler::layerFlushCallback):

Source/WTF:

  • wtf/RefCounter.h:

(WTF::RefCounter<T>::Count::deref):

Tools:

  • TestWebKitAPI/Tests/WTF/SetForScope.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm:

(TEST):

  • TestWebKitAPI/mac/TestFontOptions.mm:

(-[TestFontOptions setShadowWidth:]):
(-[TestFontOptions setShadowHeight:]):
(-[TestFontOptions setShadowBlurRadius:]):
(-[TestFontOptions setHasShadow:]):
(-[TestFontOptions setForegroundColor:]):
(-[TestFontOptions setBackgroundColor:]):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::reattachPageToWebProcess):

5:16 PM Changeset in webkit [290574] by Cameron McCormack
  • 8 edits in trunk/Source/WebCore

Add a mechanism to request a UA shadow tree update before style
https://bugs.webkit.org/show_bug.cgi?id=237224

Reviewed by Antti Koivisto.

SVG <use> elements register themselves with the document when their
shadow tree contents need updating, and this updating is done in
Document::resolveStyle. For lazy HTML <input> element UA shadow trees
(in bug 236747) we need something similar.

  • dom/Document.cpp:

(WebCore::Document::resolveStyle):
(WebCore::Document::addElementWithPendingUserAgentShadowTreeUpdate):
(WebCore::Document::removeElementWithPendingUserAgentShadowTreeUpdate):

  • dom/Document.h:
  • dom/Element.h:

(WebCore::Element::updateUserAgentShadowTree):

  • svg/SVGDocumentExtensions.cpp:

(WebCore::SVGDocumentExtensions::~SVGDocumentExtensions): Deleted.
(WebCore::SVGDocumentExtensions::addUseElementWithPendingShadowTreeUpdate): Deleted.
(WebCore::SVGDocumentExtensions::removeUseElementWithPendingShadowTreeUpdate): Deleted.

  • svg/SVGDocumentExtensions.h:

(WebCore::SVGDocumentExtensions::useElementsWithPendingShadowTreeUpdate const): Deleted.

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::insertedIntoAncestor):
(WebCore::SVGUseElement::removedFromAncestor):
(WebCore::SVGUseElement::updateUserAgentShadowTree):
(WebCore::SVGUseElement::invalidateShadowTree):
(WebCore::SVGUseElement::updateShadowTree): Deleted.

  • svg/SVGUseElement.h:
3:52 PM Changeset in webkit [290573] by graouts@webkit.org
  • 4 edits in trunk

[web-animations] web-animations/timing-model/animations/setting-the-timeline-of-an-animation.html is a unique failure
https://bugs.webkit.org/show_bug.cgi?id=237257

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark WPT progressions.

  • web-platform-tests/web-animations/timing-model/animations/setting-the-timeline-of-an-animation-expected.txt:

Source/WebCore:

The spec has changed since we initially implemented Animation.playState and we missed one condition for
an animation's play state to be "idle".

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::playState const):

2:19 PM Changeset in webkit [290572] by Matt Woodrow
  • 4 edits in trunk

Handle reverse flow direction when converting iterator coords for a subgrid
https://bugs.webkit.org/show_bug.cgi?id=236955

Reviewed by Dean Jackson.

Source/WebCore:

When recursing into a subgrid via createForSubgrid, we convert the iterator's
position into coordinates relative to the subgrid. This handles the case where
the subgrid has a reverse flow direction (RTL vs LTR) and swaps the position
to be relative to the opposite edge.

Marks existing WPT grid-gap-007.html as passing

  • rendering/Grid.cpp:

(WebCore::GridIterator::createForSubgrid):

LayoutTests:

Marked grid-gap-007.html as now passing, and added bug annotations to
remaining subgrid failures.

2:15 PM Changeset in webkit [290571] by graouts@webkit.org
  • 5 edits in trunk

[svg] flood-opacity should be clamped to the [0,1] range
https://bugs.webkit.org/show_bug.cgi?id=237253

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt:

Source/WebCore:

  • rendering/style/SVGRenderStyle.h:

(WebCore::SVGRenderStyle::setFloodOpacity):

1:19 PM Changeset in webkit [290570] by graouts@webkit.org
  • 5 edits in trunk

[svg] stroke-opacity should be clamped to the [0,1] range
https://bugs.webkit.org/show_bug.cgi?id=237254

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:

Source/WebCore:

  • rendering/style/SVGRenderStyle.h:

(WebCore::SVGRenderStyle::setStrokeOpacity):

12:55 PM Changeset in webkit [290569] by graouts@webkit.org
  • 5 edits in trunk

[svg] stop-opacity should be clamped to the [0,1] range
https://bugs.webkit.org/show_bug.cgi?id=237255

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:

Source/WebCore:

  • rendering/style/SVGRenderStyle.h:

(WebCore::SVGRenderStyle::setStopOpacity):

12:31 PM Changeset in webkit [290568] by graouts@webkit.org
  • 5 edits in trunk

[svg] fill-opacity should be clamped to the [0,1] range
https://bugs.webkit.org/show_bug.cgi?id=237252

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt:

Source/WebCore:

  • rendering/style/SVGRenderStyle.h:

(WebCore::SVGRenderStyle::setFillOpacity):

11:54 AM Changeset in webkit [290567] by Matt Woodrow
  • 2 edits in trunk

2022-02-24 Matt Woodrow <Matt Woodrow>

Unreviewed, update my (Matt Woodrow) status to committer.

  • metadata/contributors.json:
11:44 AM Changeset in webkit [290566] by Chris Dumez
  • 28 edits in trunk/Source

Simplify SerializedScriptValue construction
https://bugs.webkit.org/show_bug.cgi?id=237241

Reviewed by Darin Adler.

Source/WebCore:

The 2 main factory functions for SerializedScriptValue now share the same code.
I also dropped some SerializedScriptValue API that was no longer useful.
Finally, I simplified factory functions for MessageEvent.

  • Modules/indexeddb/IDBValue.cpp:

(WebCore::IDBValue::IDBValue):

  • Modules/webaudio/AudioWorkletNode.cpp:

(WebCore::AudioWorkletNode::create):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::SerializedScriptValue::create):
(WebCore::SerializedScriptValue::toString const):
(WebCore::SerializedScriptValue::toString): Deleted.

  • bindings/js/SerializedScriptValue.h:

(WebCore::SerializedScriptValue::wireBytes const):
(WebCore::SerializedScriptValue::SerializedScriptValue):
(WebCore::SerializedScriptValue::adopt): Deleted.
(WebCore::SerializedScriptValue::data const): Deleted.
(WebCore::SerializedScriptValue::toWireBytes const): Deleted.

  • dom/BroadcastChannel.cpp:

(WebCore::BroadcastChannel::dispatchMessage):

  • dom/MessageEvent.cpp:

(WebCore::MessageEvent::MessageEvent):
(WebCore::MessageEvent::create):

  • dom/MessageEvent.h:
  • dom/MessagePort.cpp:

(WebCore::MessagePort::dispatchMessages):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::postMessage):

  • page/EventSource.cpp:

(WebCore::EventSource::dispatchMessageEvent):

  • page/History.cpp:

(WebCore::History::stateObjectAdded):

  • testing/Internals.cpp:

(WebCore::Internals::serializeObject const):
(WebCore::Internals::deserializeBuffer const):

  • workers/WorkerMessagingProxy.cpp:

(WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):

  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::postMessage):

  • workers/shared/SharedWorkerGlobalScope.cpp:

(WebCore::SharedWorkerGlobalScope::postConnectEvent):

Source/WebKit:

Update code base to reflect SerializedScriptValue API changes.

  • Shared/API/APISerializedScriptValue.h:

(API::SerializedScriptValue::createFromWireBytes):
(API::SerializedScriptValue::dataReference const):
(API::SerializedScriptValue::adopt): Deleted.

  • Shared/SessionState.cpp:

(WebKit::PageState::encode const):

  • Shared/UserData.cpp:

(WebKit::UserData::decode):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _evaluateJavaScript:asAsyncFunction:withSourceURL:withArguments:forceUserGesture:inFrame:inWorld:completionHandler:]):

  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp:

(WebKit::WebInspectorUIExtensionControllerProxy::evaluateScriptForExtension):
(WebKit::WebInspectorUIExtensionControllerProxy::evaluateScriptInExtensionTab):

  • UIProcess/UserContent/WebUserContentControllerProxy.cpp:

(WebKit::WebUserContentControllerProxy::didPostMessage):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::runJavaScriptInFrameInScriptWorld):

  • WebProcess/Inspector/WebInspectorUIExtensionController.cpp:

(WebKit::WebInspectorUIExtensionController::evaluateScriptForExtension):
(WebKit::WebInspectorUIExtensionController::evaluateScriptInExtensionTab):

  • WebProcess/UserContent/WebUserContentController.cpp:
  • WebProcess/WebCoreSupport/SessionStateConversion.cpp:

(WebKit::toFrameState):
(WebKit::applyFrameState):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::runJavaScript):

9:54 AM Changeset in webkit [290565] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GStreamer] media/video-src-blob-perf.html timing out likely since update to GStreamer 1.20
https://bugs.webkit.org/show_bug.cgi?id=237256

Unreviewed, gardening

Patch by Philippe Normand <pnormand@igalia.com> on 2022-02-27

  • platform/glib/TestExpectations: Flag test as timing out.
8:38 AM Changeset in webkit [290564] by ntim@apple.com
  • 10 edits in trunk

Force -webkit-user-modify used style to readonly for inert nodes
https://bugs.webkit.org/show_bug.cgi?id=237244

Reviewed by Darin Adler.

This disallows programmatic edition of contenteditable inert nodes. Edition via user-input is
already prevented by forcing pointer-events style to none.

We create a seperate effectiveUserModify, similar to effectiveUserSelect/effectivePointerEvents,
to avoid changing the computed style.

This behaviour also matches Blink & Gecko.

LayoutTests/imported/w3c:

  • web-platform-tests/inert/inert-and-contenteditable.tentative-expected.txt:

Source/WebCore:

Test: imported/w3c/web-platform-tests/inert/inert-and-contenteditable.tentative.html

  • dom/Node.cpp:

(WebCore::computeEditabilityFromComputedStyle):

  • editing/ApplyBlockElementCommand.cpp:

(WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded):

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::doApply):

  • rendering/EventRegion.cpp:

(WebCore::EventRegion::unite):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::styleWillChange):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::effectiveUserModify const):

  • style/StyleTreeResolver.cpp:

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

8:33 AM Changeset in webkit [290563] by Chris Dumez
  • 9 edits in trunk

Call WKNavigationDelegate.didFailProvisionalNavigation even after a cross-origin navigation with COOP
https://bugs.webkit.org/show_bug.cgi?id=237071
<rdar://problem/89354367>

Reviewed by Darin Adler.

Source/WebKit:

When doing a process swap on navigation (PSON), we start a new provisional load in the new provisional
process and ask the committed process to stop all loads. Since we swap in decidePolicyForNavigationAction,
no provisional load has started in the committed process yet. If the provisional process sends us a
didFailProvisionalLoad though, we know the provisional load has failed and we take this into consideration
and notify the client app.

When doing a process swap on resource response (due to COOP), we were behaving differently and it was
causing some confusion. Since we swap on resource response, the provisional load has started in the
committed process by the time we process-swap (unlike PSON). We were also not asking for the committed
process to stop/cancel this provisional load. As a result, a provisional load would still be going on
in the committed process while another provisional load starts happening in the provisional page / process.
Then, if the provisional process would send us a didFailProvisional, we would not pass it along to the
client app. Instead we would destroy the ProvisionalPageProxy, which would tell the committed process to
stop loading and send its own didFailProvisionalLoad, and the client app would eventually get notified.

Even though the difference in behavior was confusing, it was working in most cases. There was however
an edge case where it didn't work and we would fail to tell the client app that the provisional load
had failed. In particular, we would run into trouble when navigating cross-site to a site that adopted
the COOP header. We would first do a process-swap on navigation, stop the provisional load in the committed
process A, then start a provisional load in process B. We would then get the COOP header and we would
start a new provisional load in process C. Process B would go away since we cannot have 2 provisional
pages / processes at the same time for the same WebPageProxy. Then if the provisional load fails in
process C, we would ignore the didFailProvisionalLoad from process C and destroy the provisional page.
We would tell the committed process A to stop loading, expecting it to send its own didFailProvisionalLoad
but it wouldn't happen since PSON had already stopped all loading in process A earlier when swapping to
process B.

To address the issue, we align COOP process swap with PSON process swap. We now has the committed process
to stop all loads when process swapping on resource response due to COOP. As a result, when the provisional
load fails in the provisional process, we can simply pass it along to the client, no matter if the process
swap occurred due to PSON or COOP.

Covered by new API test.

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):
We no longer need to tell the committed process to stop loading when the provisional page gets destroyed
and this was a process swap on resource response. The reason is that when process-swapping on navigation
response, we now drop the provisional load in the committed process right away, like in the PSON case.

(WebKit::ProvisionalPageProxy::cancel):
When cancelling a provisional load due to PSON or COOP, we need to notify the client that the provisional
load failed. We used to only to it in the PSON case. We now do it for both PSON and COOP since they
behave the same.

(WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
Similarly as above, now that PSON and COOP behave the same, we need to pass the didFailProvisionalLoad
from the provisional process to the client app for both PSON and COOP (Not just PSON).

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::triggerBrowsingContextGroupSwitchForNavigation):
When triggering a process swap on resource response (due to COOP), we now stop the provisional load going
on in the committed process to be consistent with what we do in the PSON case. This way there is only a
single provisional load going on and it is happening in the provisional page / process.

Tools:

Add API test coverage (Test was written by Alex Christensen).

  • TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:

(TEST):

8:26 AM Changeset in webkit [290562] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Loading a USDZ url as the main resource renders as garbage
https://bugs.webkit.org/show_bug.cgi?id=237240
rdar://88767033

Reviewed by Antoine Quint.

We can't render a USD document if the ModelDocument feature is not enabled.

  • platform/MIMETypeRegistry.cpp:

(WebCore::MIMETypeRegistry::canShowMIMEType):

8:17 AM Changeset in webkit [290561] by graouts@webkit.org
  • 4 edits in trunk

[css-animations] implicit keyframes should be inserted after explicit keyframes with the same offset
https://bugs.webkit.org/show_bug.cgi?id=237246

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Update WPT test added in bug 236838 to match the spec following discussion with Brian Birtles in
https://github.com/web-platform-tests/wpt/pull/32903.

  • web-platform-tests/css/css-animations/KeyframeEffect-getKeyframes.tentative.html:

Source/WebCore:

The CSS Animations spec says the following about implicit keyframes generation:

Let initial keyframe be the keyframe in keyframes with offset 0, timing function default timing
function and composite default composite.

If there is no such keyframe, let initial keyframe be a new empty keyframe with offset 0, timing
function default timing function, composite |default composite, and add it to keyframes after the
last keyframe with offset 0.

Let final keyframe be the keyframe in keyframes with offset 1, timing function default timing
function and composite default composite.

If there is no such keyframe, let final keyframe be a new empty keyframe with offset 1, timing
function default timing function and composite default composite, and add it to keyframes after
the last keyframe with offset 1.

Full details are at https://drafts.csswg.org/css-animations-2/#keyframes.

The KeyframeList::insert() method does the right thing already by adding a new keyframe after all
other keyframes with that same offset, so all we need to do is to use this method rather than
specifying explicit indexes.

  • rendering/style/KeyframeList.cpp:

(WebCore::KeyframeList::fillImplicitKeyframes):

8:03 AM Changeset in webkit [290560] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Use hasAttributeWithoutSynchronisation for checking inert attribute in Adjuster::adjust
https://bugs.webkit.org/show_bug.cgi?id=237248

Reviewed by Dean Jackson.

hasAttributeWithoutSynchronisation should be slightly faster than hasAttribute.

  • style/StyleAdjuster.cpp:

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

6:10 AM Changeset in webkit [290559] by ntim@apple.com
  • 3 edits
    2 adds in trunk

Optimize StyleSharingResolver inert checks
https://bugs.webkit.org/show_bug.cgi?id=237235

Reviewed by Youenn Fablet.

Source/WebCore:

inert is an boolean attribute, the only thing that matters for the StyleAdjuster
inertness adjustment is the presence of the attribute, not its value. E.g.
inert=false is the same as inert=inert or inert=true.

This saves getting and comparing values for those attributes, and also allows
inert=inert and inert=true or inert=false to start sharing style.

  • style/StyleSharingResolver.cpp:

(WebCore::Style::SharingResolver::canShareStyleWithElement const):

LayoutTests:

Add small test that style sharing is not wrongly applied.

  • fast/css/inert-style-sharing-expected.html: Added.
  • fast/css/inert-style-sharing.html: Added.
4:06 AM Changeset in webkit [290558] by youenn@apple.com
  • 7 edits in trunk/Source/WebKit

Exposing RemoteVideoFrameProxy::write is unneeded
https://bugs.webkit.org/show_bug.cgi?id=237212

Reviewed by Eric Carlson.

Exposing RemoteVideoFrameProxy::write is unneeded as RemoteVideoFrameProxy is immutable.
It is best to remove it as calling write() inadvertently would break things.
Renaming read() to newReadReference() to make it clear that we are creating a new read reference
that needs to be sent to GPUProcess to prevent leaks.
No change of behavior.

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::copyTextureFromMedia):

  • WebProcess/GPU/media/RemoteVideoFrameProxy.cpp:

(WebKit::RemoteVideoFrameProxy::~RemoteVideoFrameProxy):
(WebKit::RemoteVideoFrameProxy::newReadReference const):
(WebKit::RemoteVideoFrameProxy::pixelBuffer const):
(WebKit::RemoteVideoFrameProxy::write const): Deleted.
(WebKit::RemoteVideoFrameProxy::read const): Deleted.

  • WebProcess/GPU/media/RemoteVideoFrameProxy.h:
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:

(WebKit::LibWebRTCCodecs::encodeFrame):

  • WebProcess/GPU/webrtc/RemoteVideoFrameObjectHeapProxyProcessor.cpp:

(WebKit::RemoteVideoFrameObjectHeapProxyProcessor::getVideoFrameBuffer):

  • WebProcess/GPU/webrtc/SharedVideoFrame.cpp:

(WebKit::SharedVideoFrameWriter::write):

3:44 AM Changeset in webkit [290557] by youenn@apple.com
  • 4 edits in trunk/Source/WebCore

Simplify CVPixelBuffer data copies in SharedVideoFrameInfo
https://bugs.webkit.org/show_bug.cgi?id=237194

Reviewed by Eric Carlson.

Remove use of vImageUnpremultiplyData_BGRA8888 which might not be correct for canvas data.
Make use of CVPixelBufferGetPlaneCount to share more code between monoplanar and biplanar formats.

Covered by existing tests.

  • platform/cocoa/CoreVideoSoftLink.cpp:
  • platform/cocoa/CoreVideoSoftLink.h:
  • platform/cocoa/SharedVideoFrameInfo.mm:

(WebCore::SharedVideoFrameInfo::isReadWriteSupported const):
(WebCore::copyToCVPixelBufferPlane):
(WebCore::SharedVideoFrameInfo::createPixelBufferFromMemory):
(WebCore::SharedVideoFrameInfo::writePixelBuffer):

3:21 AM Changeset in webkit [290556] by ntim@apple.com
  • 17 edits
    2 adds in trunk/LayoutTests

Re-import inert and <dialog> WPT
https://bugs.webkit.org/show_bug.cgi?id=237243

Reviewed by Youenn Fablet.

Upstream commit: https://github.com/web-platform-tests/wpt/commit/9261ca87db106c1f31f1ab4f54b8f4a2617cbc24

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer-expected.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer-ref.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column-expected.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column-ref.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/w3c-import.log:
  • web-platform-tests/inert/inert-and-contenteditable.tentative-expected.txt: Added.
  • web-platform-tests/inert/inert-and-contenteditable.tentative.html: Added.
  • web-platform-tests/inert/inert-iframe-hittest.tentative-expected.txt:
  • web-platform-tests/inert/inert-iframe-hittest.tentative.html:
  • web-platform-tests/inert/inert-iframe-tabbing.tentative-expected.txt:
  • web-platform-tests/inert/inert-iframe-tabbing.tentative.html:
  • web-platform-tests/inert/w3c-import.log:

LayoutTests:

  • TestExpectations:
  • platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-iframe-hittest.tentative-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-iframe-tabbing.tentative-expected.txt:

Feb 26, 2022:

11:27 PM Changeset in webkit [290555] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebKit

RemoteCaptureSampleManager, UserMediaSampleCaptureManagerProxy create the RemoteVideoFrame in incorrectly
https://bugs.webkit.org/show_bug.cgi?id=237134

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-26
Reviewed by Youenn Fablet.

UserMediaSampleCaptureManagerProxy should not call RemoteVideoFrameObjectHeap::createVideoFrame,
the function should be removed. Instead, UserMediaSampleCaptureManagerProxy should construct a
write reference to insert the media sample -> remote proxy mapping. Then
the result of the insert, a new reference, should be sent as part of the
RemoteVideoFrameProxy::Properties to the WP. This way the sent reference is
constructed as expected. Previously the reference was correct but matched just
by selecting the constants currently used (0).

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:

(WebKit::RemoteCaptureSampleManager::videoSampleAvailable):
(WebKit::RemoteCaptureSampleManager::videoSampleAvailableCV):

  • WebProcess/cocoa/RemoteCaptureSampleManager.h:
  • WebProcess/cocoa/RemoteCaptureSampleManager.messages.in:
11:06 PM Changeset in webkit [290554] by ntim@apple.com
  • 11 edits
    2 adds in trunk

Remove Node::deprecatedIsInert
https://bugs.webkit.org/show_bug.cgi?id=230845

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

This change unfortunately regresses focusability state when dynamically setting inert, due to a cached
computed style invalidation bug. This is minor in practice, since focusability usually gets queried in
user-initiated ways, when style already has fully been updated.

However, making this change will improve performance by avoiding a full DOM ancestor walk when there
is no inert attribute on the page, since we will only check a style bit after this patch.

  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/remove-dialog-should-unblock-document-expected.txt:
  • web-platform-tests/inert/inert-canvas-fallback-content.tentative-expected.txt:
  • web-platform-tests/inert/inert-node-is-unfocusable.tentative-expected.txt:

Source/WebCore:

This change unfortunately regresses focusability state when dynamically setting inert, due to a cached
computed style invalidation bug. This is minor in practice, since focusability usually gets queried in
user-initiated ways, when style already has fully been updated.

However, making this change will improve performance by avoiding a full DOM ancestor walk when there
is no inert attribute on the page, since we will only check a style bit after this patch.

  • dom/Element.cpp:

(WebCore::Element::isFocusable const):
(WebCore::Element::isFocusableWithoutResolvingFullStyle const):
(WebCore::Element::isVisibleWithoutResolvingFullStyle const): Deleted.

  • dom/Element.h:
  • dom/Node.cpp:

(WebCore::Node::deprecatedIsInert const): Deleted.

  • dom/Node.h:
  • html/HTMLAreaElement.cpp:

(WebCore::HTMLAreaElement::isFocusable const):

LayoutTests:

  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-inert-expected.txt: Added.
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt: Added.
4:46 PM Changeset in webkit [290553] by Tyler Wilcock
  • 3 edits in trunk/Source/WebCore

AX: Remove unnecessary AccessibilityRenderObject::init() override
https://bugs.webkit.org/show_bug.cgi?id=237239

Reviewed by Chris Fleizach.

The implementation of AccessibilityRenderObject::init() just calls
AccessibilityNodeObject::init(), so we don't need it as an override.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::init): Deleted.

  • accessibility/AccessibilityRenderObject.h:
3:36 PM Changeset in webkit [290552] by Chris Dumez
  • 12 edits in trunk

Drop Ref<>'s operator==() as it is a bit ambiguous / confusing
https://bugs.webkit.org/show_bug.cgi?id=237231

Reviewed by Darin Adler.

Drop Ref<>'s operator==() as it is a bit ambiguous / confusing. Some people expect it to compare
pointers while other expect it to compare the values we hold references to.
It seems best to omit this operator and be explicit at call sites.

Source/WebCore:

  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:

(WebCore::LibWebRTCRtpSenderBackend::startSource):

  • svg/SVGDocumentExtensions.cpp:

(WebCore::SVGDocumentExtensions::removeElementToRebuild):

  • svg/graphics/filters/SVGFilterBuilder.cpp:

(WebCore::SVGFilterBuilder::buildEffectExpression const):

Source/WebKit:

  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:

(WebKit::WebProcessProxy::cacheMediaMIMETypes):

  • UIProcess/VisitedLinkStore.cpp:

(WebKit::VisitedLinkStore::removeAll):
(WebKit::VisitedLinkStore::sendStoreHandleToProcess):
(WebKit::VisitedLinkStore::didUpdateSharedStringHashes):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::shouldTerminate):

Source/WTF:

  • wtf/Ref.h:

(WTF::operator==): Deleted.
(WTF::operator!=): Deleted.

  • wtf/Vector.h:

(WTF::Vector::containsIf const):

2:12 PM Changeset in webkit [290551] by basuke.suzuki@sony.com
  • 2 edits in trunk/Source/JavaScriptCore

Remove UNUSED warnings for non-Cocoa platform after r290449
https://bugs.webkit.org/show_bug.cgi?id=237233

Reviewed by Darin Adler.

  • runtime/JSDateMath.cpp:
1:04 PM Changeset in webkit [290550] by Kate Cheney
  • 15 edits in trunk

Update CSP handling of javascript URLs
https://bugs.webkit.org/show_bug.cgi?id=236351
<rdar://problem/88675827>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • web-platform-tests/content-security-policy/navigation/to-javascript-parent-initiated-parent-csp-disallow-expected.txt:
  • web-platform-tests/content-security-policy/navigation/to-javascript-url-script-src-expected.txt:

Source/WebCore:

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::executeJavaScriptURL):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::createWindow):

  • loader/SubframeLoader.cpp:

(WebCore::FrameLoader::SubframeLoader::requestFrame):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::setLocation):

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::allowJavaScriptURLs const):

  • page/csp/ContentSecurityPolicy.h:

LayoutTests:

  • TestExpectations:
  • http/tests/security/contentSecurityPolicy/inline-script-blocked-javascript-url-expected.txt:
  • http/tests/security/contentSecurityPolicy/javascript-url-blocked-by-default-src-star-expected.txt:
  • http/tests/security/contentSecurityPolicy/javascript-url-blocked-expected.txt:
10:44 AM Changeset in webkit [290549] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[RenderTreeBuilder] Clean up descendant floats when a block container becomes float
https://bugs.webkit.org/show_bug.cgi?id=237238
<rdar://79960422>

Reviewed by Antti Koivisto.

Source/WebCore:

When a block box becomes float, it forms a "lockdown" container for the descendant floats by establishing a BFC.
What it means is that such descendant floats can't intrude to sibling block containers anymore.
This patch ensures that we remove such floats from sibling (and their descendant) renderers.

Test: fast/block/float/float-merge-anon-parent-crash.html

  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::normalizeTreeAfterStyleChange):

LayoutTests:

  • fast/block/float/float-merge-anon-parent-crash-expected.txt: Added.
  • fast/block/float/float-merge-anon-parent-crash.html: Added.
10:43 AM Changeset in webkit [290548] by Simon Fraser
  • 7 edits in trunk

No animation when scroll snap scroller is navigated with the keyboard
https://bugs.webkit.org/show_bug.cgi?id=236244

Reviewed by Tim Horton.

Source/WebCore:

Keyboard-driven scrolls in overflow didn't animate, simply because scrollAnimatorEnabled()
wasn't implemented for RenderLayerScrollableArea.

I could not figure out a reliable way to test that we animated the scroll.

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::scrollAnimatorEnabled const):

  • rendering/RenderLayerScrollableArea.h:

LayoutTests:

Turn off the scroll animator for these tests that assume that scrolling is instantaneous.

  • css3/scroll-snap/scroll-padding-overflow-paging.html:
  • fast/events/wheelevent-in-scrolling-div.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-overflow-rtl-with-keyboard.html:
4:07 AM Changeset in webkit [290547] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit

Multiple concurrency violations in LibWebRTCCodecsProxy
https://bugs.webkit.org/show_bug.cgi?id=236767
<rdar://88904160>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-26
Reviewed by Antti Koivisto.

  • ThreadMessageReceivers should not add IPC listeners in constructors,

as the delivery starts right away and uses the unconstructed virtual pointer.

  • The work queue functions should not use GPUConnectionToWebProcess, as that is

main thread object.

  • Locked m_encoders, m_decoders are sometimes accessed without lock.

Instead:

  • Add the IPC listeners in initialize function.
  • Remove the IPC listeners when GPUConnectionToWebProcess disconnects.
  • Store the thread-safe conection, video frame object heap, process identity

objects as member variables.

  • Do not lock m_encoders, m_decoders. If they are work queue instances,

just access them in the work queue functions. Add thread requirements
to the variables so that the compiler checks the access.

  • Use IPC testing assertions when skipping incorrect messages.
  • Use separate atomic counter (bool) to check if allowsExitUnderMemoryPressure.

No new tests, tested with existing tests and ASAN.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::~GPUConnectionToWebProcess):
(WebKit::GPUConnectionToWebProcess::didClose):

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

(WebKit::LibWebRTCCodecsProxy::create):
(WebKit::LibWebRTCCodecsProxy::LibWebRTCCodecsProxy):
(WebKit::LibWebRTCCodecsProxy::stopListeningForIPC):
(WebKit::LibWebRTCCodecsProxy::initialize):
(WebKit::LibWebRTCCodecsProxy::dispatchToThread):
(WebKit::LibWebRTCCodecsProxy::createDecoderCallback):
(WebKit::LibWebRTCCodecsProxy::createH264Decoder):
(WebKit::LibWebRTCCodecsProxy::createH265Decoder):
(WebKit::LibWebRTCCodecsProxy::createVP9Decoder):
(WebKit::LibWebRTCCodecsProxy::releaseDecoder):
(WebKit::LibWebRTCCodecsProxy::createEncoder):
(WebKit::LibWebRTCCodecsProxy::releaseEncoder):
(WebKit::LibWebRTCCodecsProxy::initializeEncoder):
(WebKit::LibWebRTCCodecsProxy::findEncoder):
(WebKit::LibWebRTCCodecsProxy::encodeFrame):
(WebKit::LibWebRTCCodecsProxy::setEncodeRates):
(WebKit::LibWebRTCCodecsProxy::setSharedVideoFrameSemaphore):
(WebKit::LibWebRTCCodecsProxy::setSharedVideoFrameMemory):
(WebKit::LibWebRTCCodecsProxy::allowsExitUnderMemoryPressure const):

2:04 AM Changeset in webkit [290546] by youenn@apple.com
  • 3 edits in trunk/LayoutTests

REGRESSION(r290358): [ Debug EWS ] ASSERTION FAILED: sample && sample->pixelBuffer()
https://bugs.webkit.org/show_bug.cgi?id=237164
<rdar://problem/89442999>

Unreviewed.

ASSERTS are fixed through https://bugs.webkit.org/show_bug.cgi?id=237027.
Removing crash expectations.

  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
Note: See TracTimeline for information about the timeline view.