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

Timeline



Nov 3, 2021:

11:28 PM Changeset in webkit [285254] by Megan Gardner
  • 3 edits in trunk/Source/WebCore

TextIndicators are flipped when spanning more than one line.
https://bugs.webkit.org/show_bug.cgi?id=232688

We regressed this in https://bugs.webkit.org/show_bug.cgi?id=225557 when text indicators were factored
out to be used for App Highlights. We need to restore the geomitry flipping behavior to have the text
indicatores show up correctly.

Reviewed by Tim Horton.

  • page/cocoa/WebTextIndicatorLayer.mm:

(-[WebTextIndicatorLayer initWithFrame:textIndicator:margin:offset:]):
(-[WebTextIndicatorLayer isFlipped]): Deleted.

  • page/mac/TextIndicatorWindow.mm:

(-[WebTextIndicatorView isFlipped]):
(WebCore::TextIndicatorWindow::setTextIndicator):

9:49 PM Changeset in webkit [285253] by commit-queue@webkit.org
  • 5 edits in trunk/LayoutTests

[GLIB] Update test expectations and baselines. Unreviewed test gardening.
https://bugs.webkit.org/show_bug.cgi?id=232683

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-11-03

  • platform/glib/TestExpectations:
  • platform/glib/http/tests/contentextensions/block-private-click-measurement-expected.txt:
  • platform/gtk/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/wpe/fast/dom/navigator-detached-no-crash-expected.txt:
6:23 PM Changeset in webkit [285252] by achristensen@apple.com
  • 23 edits
    20 deletes in trunk

Remove QuickTimePluginReplacement and YouTubePluginReplacement
https://bugs.webkit.org/show_bug.cgi?id=232400

Reviewed by Chris Dumez.

Source/WebCore:

They were disabled at runtime in https://trac.webkit.org/changeset/275911/webkit

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/plugins/PluginReplacement.h: Removed.
  • Modules/plugins/QuickTimePluginReplacement.css: Removed.
  • Modules/plugins/QuickTimePluginReplacement.h: Removed.
  • Modules/plugins/QuickTimePluginReplacement.idl: Removed.
  • Modules/plugins/QuickTimePluginReplacement.js: Removed.
  • Modules/plugins/QuickTimePluginReplacement.mm: Removed.
  • Modules/plugins/YouTubePluginReplacement.cpp: Removed.
  • Modules/plugins/YouTubePluginReplacement.h: Removed.
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSPluginElementFunctions.cpp:

(WebCore::pluginScriptObject):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • html/HTMLPlugInElement.cpp:

(WebCore::HTMLPlugInElement::createElementRenderer):
(WebCore::HTMLPlugInElement::didAddUserAgentShadowRoot):
(WebCore::HTMLPlugInElement::requestObject):
(): Deleted.
(WebCore::registrar): Deleted.
(WebCore::pluginReplacementForType): Deleted.
(WebCore::HTMLPlugInElement::scriptObjectForPluginReplacement): Deleted.

  • html/HTMLPlugInElement.h:

(WebCore::HTMLPlugInElement::pluginReplacementScriptObject): Deleted.

  • html/shadow/ShadowPseudoIds.cpp:

(WebCore::ShadowPseudoIds::webkitPluginReplacement): Deleted.

  • html/shadow/ShadowPseudoIds.h:
  • html/shadow/YouTubeEmbedShadowElement.cpp: Removed.
  • html/shadow/YouTubeEmbedShadowElement.h: Removed.
  • page/Settings.yaml:

Source/WebInspectorUI:

  • UserInterface/Models/NativeFunctionParameters.js:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/YouTubePluginReplacement.cpp: Removed.

LayoutTests:

  • security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement-expected.txt: Removed.
  • security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement.html: Removed.
5:40 PM Changeset in webkit [285251] by Yousuke.Kimoto@sony.com
  • 2 edits in trunk/Tools

Use 0.0.0.0 when "--all-interfaces" is given for websocket_server
https://bugs.webkit.org/show_bug.cgi?id=231798
<rdar://problem/84540538>

Reviewed by Jonathan Bedard.

When run-webkit-tests runs with "--all-interfaces", servers running
on the host PC should use "0.0.0.0". It will help situations where
host and target systems are discrete so that test programs can
connect to test servers on the host PC.

  • Scripts/webkitpy/layout_tests/servers/websocket_server.py:

(PyWebSocket.init): Fixed a style check error.
(PyWebSocket._prepare_config): Added "0.0.0.0" for --all-interfaces.

5:16 PM Changeset in webkit [285250] by Russell Epstein
  • 1 copy in tags/Safari-612.3.3.0.2

Tag Safari-612.3.3.0.2.

5:14 PM Changeset in webkit [285249] by Russell Epstein
  • 1 copy in tags/Safari-612.3.3.1.2

Tag Safari-612.3.3.1.2.

5:13 PM Changeset in webkit [285248] by Russell Epstein
  • 8 edits in branches/safari-612.3.3.1-branch/Source

Versioning.

WebKit-7612.3.3.1.2

5:12 PM Changeset in webkit [285247] by Russell Epstein
  • 4 edits in branches/safari-612.3.3.1-branch/Source

Revert "Cherry-pick r285241. rdar://problem/84990898"

This reverts commit r285243.

5:05 PM Changeset in webkit [285246] by ysuzuki@apple.com
  • 14 edits in trunk

[JSC] Clean up StructureStubInfo initialization
https://bugs.webkit.org/show_bug.cgi?id=232652

Reviewed by Saam Barati.

Source/JavaScriptCore:

This patch enhances FixedVector to initialize it from the other containers.
So we can simplify baseline StructureStubInfo initialization.
Now, StructureStubInfo::initializeFromUnlinkedStructureStubInfo becomes
StructureStubInfo constructor taking const UnlinkedStructureStubInfo&.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::setupWithUnlinkedBaselineCode):

  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::StructureStubInfo):
(JSC::StructureStubInfo::initializeFromUnlinkedStructureStubInfo): Deleted.

  • bytecode/StructureStubInfo.h:
  • jit/JIT.cpp:

(JSC::JIT::link):

Source/WebCore:

  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::fontForLayoutLabel):

Source/WTF:

  • wtf/FixedVector.h:

(WTF::FixedVector::FixedVector):
(WTF::FixedVector::operator=):

  • wtf/RefCountedArray.h:

(WTF::RefCountedArray::RefCountedArray):
(WTF::RefCountedArray::operator=):

  • wtf/SegmentedVector.h:
  • wtf/Vector.h:

(WTF::VectorTypeOperations::uninitializedCopy):

Tools:

  • TestWebKitAPI/Tests/WTF/FixedVector.cpp:

(TestWebKitAPI::TEST):

4:55 PM Changeset in webkit [285245] by Russell Epstein
  • 1 copy in tags/Safari-612.3.3.1.1

Tag Safari-612.3.3.1.1.

4:55 PM Changeset in webkit [285244] by Russell Epstein
  • 1 delete in tags/Safari-612.3.3.1.1

Delete tag.

4:53 PM Changeset in webkit [285243] by Russell Epstein
  • 4 edits in branches/safari-612.3.3.1-branch/Source

Cherry-pick r285241. rdar://problem/84990898

[macOS] MediaSession coordinator enabled in UIProcess, disabled in WebContent
https://bugs.webkit.org/show_bug.cgi?id=232687
<rdar://84990898>

Reviewed by Eric Carlson.

Source/WebKit:

The default value of defaultMediaSessionCoordinatorEnabled() will be true if the UIProcess has
the correct entitlement. However, this value is not passed across the XPC boundary unless it has
been overridden, which means defaultMediaSessionCoordinatorEnabled() will control the setting
in the WebContent process, which is not entitled.

Have the WebContent process check its parent process's entitlement rather than its own when
determining the default value for defaultMediaSessionCoordinatorEnabled().

  • Shared/WebPreferencesDefaultValues.cpp: (WebKit::defaultMediaSessionCoordinatorEnabled):

Source/WTF:

Have the MediaSessionPlaylistEnabled preference use the same defaults as MediaSessionCoordinatorEnabled.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

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

4:50 PM Changeset in webkit [285242] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WTF

Disable WebXR on tvOS and watchOS
<https://webkit.org/b/232672>
<rdar://problem/84982378>

Reviewed by Brent Fulgham.

  • wtf/PlatformEnableCocoa.h:

(ENABLE_WEBXR):
(ENABLE_WEBXR_HANDS):

  • Disable features on tvOS and watchOS.
4:46 PM Changeset in webkit [285241] by jer.noble@apple.com
  • 4 edits in trunk/Source

[macOS] MediaSession coordinator enabled in UIProcess, disabled in WebContent
https://bugs.webkit.org/show_bug.cgi?id=232687
<rdar://84990898>

Reviewed by Eric Carlson.

Source/WebKit:

The default value of defaultMediaSessionCoordinatorEnabled() will be true if the UIProcess has
the correct entitlement. However, this value is not passed across the XPC boundary unless it has
been overridden, which means defaultMediaSessionCoordinatorEnabled() will control the setting
in the WebContent process, which is not entitled.

Have the WebContent process check its parent process's entitlement rather than its own when
determining the default value for defaultMediaSessionCoordinatorEnabled().

  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultMediaSessionCoordinatorEnabled):

Source/WTF:

Have the MediaSessionPlaylistEnabled preference use the same defaults as MediaSessionCoordinatorEnabled.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
4:29 PM Changeset in webkit [285240] by Russell Epstein
  • 5 edits in branches/safari-613.1.7-branch/Source

Cherry-pick r285110. rdar://problem/84994696

Unreviewed, reverting r285055.

Reverting because this commit may have caused
webgl/1.0.x/conformance/textures/misc/texture-corner-case-
videos.html and webgl/2.0.y/conformance/textures/misc/texture-
corner-case-videos.html to time out

Reverted changeset:

"Avoid sending video data to Web process for
canvas.drawImage(video)"
https://bugs.webkit.org/show_bug.cgi?id=230766
https://commits.webkit.org/r285055

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

3:52 PM Changeset in webkit [285239] by Russell Epstein
  • 13 edits in branches/safari-612.3.3.0-branch

Apply patch. rdar://problem/84982191

3:41 PM Changeset in webkit [285238] by Nikos Mouchtaris
  • 1 edit
    3 copies
    4 adds
    2 deletes in trunk/LayoutTests

Add platform test expectations for imported/w3c/web-platform-tests/mathml/relations/html5-tree/dynamic-childlist-001.html
https://bugs.webkit.org/show_bug.cgi?id=232504

Reviewed by Myles Maxfield.

Fix expectations for Big Sur wk1.

  • platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/dynamic-childlist-001-expected.txt: Added.
  • platform/mac-bigsur/imported/w3c/web-platform-tests/mathml/relations/html5-tree/dynamic-childlist-001-expected.txt: Added.
3:40 PM Changeset in webkit [285237] by Russell Epstein
  • 1 edit in branches/safari-612.3.3.1-branch/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp

Unreviewed build fix. rdar://problem/84987165.

error: no viable constructor or deduction guide for deduction of template arguments of 'WeakPtr'

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

AX: WKAccessibilityWebPageObjectMac.mm should expose accessibilityChildrenInNavigationOrder and NSAccessibilityChildrenInNavigationOrderAttribute
https://bugs.webkit.org/show_bug.cgi?id=232654

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-11-03
Reviewed by Chris Fleizach.

Some clients expect accessibilityChildrenInNavigationOrder and
NSAccessibilityChildrenInNavigationOrderAttribute to be available,
and WKAccessibilityWebPageObjectMac didn't expose them.

Source/WebCore:

  • accessibility/mac/WebAccessibilityObjectWrapperMac.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

Move #define NSAccessibilityChildrenInNavigationOrderAttribute to
header so it can be used in the WebKit layer.

Source/WebKit:

  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:

(-[WKAccessibilityWebPageObject accessibilityChildrenInNavigationOrder]): Added.
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
Handle NSAccessibilityChildrenInNavigationOrderAttribute.
(-[WKAccessibilityWebPageObject accessibilityAttributeNames:]):
Add NSAccessibilityChildrenInNavigationOrderAttribute.

3:18 PM Changeset in webkit [285235] by jh718.park@samsung.com
  • 7 edits in trunk

border-radius inline style should serialize with valid syntax
https://bugs.webkit.org/show_bug.cgi?id=183994

This patch have border-radius property serializes in canonical order
as specified in https://drafts.csswg.org/css-backgrounds/#border-radius.

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-backgrounds/parsing/border-radius-valid-expected.txt: Add more test case results.
  • web-platform-tests/css/css-backgrounds/parsing/border-radius-valid.html: Add more test cases.

Source/WebCore:

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue const):
(WebCore::StyleProperties::borderRadiusValue const):

  • css/StyleProperties.h:
  • css/parser/CSSPropertyParser.cpp:
3:07 PM Changeset in webkit [285234] by ddkilzer@apple.com
  • 4 edits in trunk/Source/WebCore

Fix consistency issues with localized strings and regenerate localizable.strings
<https://webkit.org/b/232642>

Reviewed by Megan Gardner.

  • en.lproj/Localizable.strings:
  • Regenerate the file using update-webkit-localizable-strings.
  • List of strings realphabetized, except as noted below.

("%@ (%@ Internet plug-in)"): Delete.

  • Removed in r285047 for Bug 232462.
  • platform/LocalizedStrings.cpp:

(WebCore::addTextTrackKindEasyReaderSuffix):

  • Fix unlocalized string that regressed in r278202 for Bug 226361.

(WebCore::useBlockedPlugInContextMenuTitle):

  • Remove unneeded call to WebCore::formatLocalizedString() since there are no placeholders to replace.
  • platform/cocoa/LocalizedStringsCocoa.mm:

(WebCore::contextMenuItemTagSearchWeb):
(WebCore::contextMenuItemTagShowFonts):

  • Switch from calling WebCore::localizedNSString() directly to using WEB_UI_NSSTRING() so these strings will be found by update-webkit-localizable-strings.
3:03 PM Changeset in webkit [285233] by Wenson Hsieh
  • 4 edits in trunk/Source/WebKit

[GPU Process] Rendering backend may stop processing IPC stream messages after a sync message timeout
https://bugs.webkit.org/show_bug.cgi?id=232580

Reviewed by Tim Horton.

Currently, it's possible for sync IPC messages that are sent through IPC streams to time out and subsequently
cause the IPC stream server (e.g. RemoteRenderingBackend) to stop processing IPC stream messages altogether. The
following example illustrates how this might happen:

  1. Web process sends the sync message at offset n (relative to the start of the ring buffer).

Web process then begins to wait for the sync stream response under tryAcquireAll().

  1. GPU process receives the sync message, and takes a while (> 1 sec.) attempting to dispatch it.
  1. Meanwhile in the web process, we hit the IPC timeout and bail from tryAcquireAll(). The client offset

is still at n. Shortly afterwards, the web process tries to send a regular stream message, calling
tryAcquire() and waiting for the client semaphore to be signaled.

  1. The GPU process finally finishes dispatching the sync message from (2), sends a sync reply (unaware that

the web process has already given up waiting), and finally calls releaseAll(), signaling the client
semaphore. The server offset is then reset back to 0.

  1. The web process finishes waiting, returns from tryAcquire(), proceeds to write the new stream

message after offset n, and wakes up the GPU process with the intention of handling this message.

  1. The GPU process wakes up and begins reading from offset 0. The first message it encounters is the

SyncMessageReply it just wrote in step (4), and subsequently bails from the processing loop because it
isn't capable of dispatching this message (which was meant to be consumed in the web process in the
first place).

In summary, the sync IPC timeout causes us to enter a state where the web process continues to encode messages
at the buffer offset prior to timeout (i.e. offset n), while the GPU process is reading from the start of the
buffer (offset 0). To avoid this, simply replace the timeouts when synchronously grabbing image data from the
GPU process. This ensures that we're never in a state where we're continuing to send stream messages to a
rendering backend connection stream after timing out when waiting for a previous sync message to that stream to
finish.

  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::sharedMemoryForGetPixelBuffer):
(WebKit::RemoteRenderingBackendProxy::waitForGetPixelBufferToComplete):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
3:01 PM Changeset in webkit [285232] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Return nullopt in aspect-ratio+intrinsic width case
https://bugs.webkit.org/show_bug.cgi?id=230769

Patch by Rob Buis <rbuis@igalia.com> on 2021-11-03
Reviewed by Javier Fernandez.

Source/WebCore:

Return nullopt in aspect-ratio+intrinsic width case, while
calculating preferred widths we do not know the container width yet,
so we can't determine the logical height reliably from it.

Test: fast/css-grid-layout/aspect-ratio-auto-repeat-crash.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const):

LayoutTests:

  • fast/css-grid-layout/aspect-ratio-auto-repeat-crash-expected.txt: Added.
  • fast/css-grid-layout/aspect-ratio-auto-repeat-crash.html: Added.
2:58 PM Changeset in webkit [285231] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[ iOS ] TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS is crashing
https://bugs.webkit.org/show_bug.cgi?id=232676

Patch by Alex Christensen <achristensen@webkit.org> on 2021-11-03
Reviewed by Eric Carlson.

In r284743 we changed types from raw pointers to WeakPtr, but accessing them in layoutSublayers is not thread safe.
Remove some unsafe early returns.

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(-[WebAVPlayerLayer layoutSublayers]):
(-[WebAVPlayerLayer resolveBounds]):

2:56 PM Changeset in webkit [285230] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[ iOS Debug ] TestWebKitAPI.ResourceLoadStatistics.GrandfatherCallback is failing
https://bugs.webkit.org/show_bug.cgi?id=232675

Patch by Alex Christensen <achristensen@webkit.org> on 2021-11-03
Reviewed by Kate Cheney.

Clearing website data attempts a connection with the daemon.
For now, just tell it not to connect to the daemon.

  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:

(TEST):

2:32 PM Changeset in webkit [285229] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Fix the build.

  • UIProcess/Cocoa/ModelElementControllerCocoa.mm:

(WebKit::ModelElementController::modelElementDidCreatePreview):

2:07 PM Changeset in webkit [285228] by dino@apple.com
  • 4 edits in trunk/Source

REGRESSION: AR Quicklook asset is shared instead of page URL
https://bugs.webkit.org/show_bug.cgi?id=232674
rdar://84220997

Reviewed by Antoine Quint.

There was a typo. ENABLE(ARKIT_QUICK_LOOK_PREVIEW_ITEM)
should be HAVE(ARKIT_QUICK_LOOK_PREVIEW_ITEM).

Source/WebCore/PAL:

  • pal/spi/ios/SystemPreviewSPI.h:

Source/WebKit:

  • UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
1:26 PM Changeset in webkit [285227] by Russell Epstein
  • 6 edits in branches/safari-612.3.3.1-branch/Source/WebKit

Cherry-pick r285177. rdar://problem/84987165

Terminate unresponsive network process by crashing it
https://bugs.webkit.org/show_bug.cgi?id=232603

Reviewed by Chris Dumez.

UI process currently kills network process when it does not respond message in some time (network process being
unresponsive). We've found one common case where network process becomes unresponsive is that it is blocked by
some slow operation on the main thread (like file operation in rdar://84511633). To understand what the
operations are and make a fix, we now ask network process to crash itself on IPC thread. In this way, we can get
crash report that includes the call stack of the main thread. To avoid generating too many crash reports, we
only send the crash message to network process when it becomes unresponsive multiple times in a short time
period.

  • Platform/IPC/Connection.cpp: (IPC::terminateDueToIPCTerminateMessage): (IPC::Connection::processIncomingMessage):
  • Scripts/webkit/model.py:
  • Scripts/webkit/tests/MessageNames.cpp: (IPC::description): (IPC::receiverName): (IPC::isValidMessageName):
  • Scripts/webkit/tests/MessageNames.h:
  • UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::shouldTerminateNetworkProcessBySendingMessage): (WebKit::NetworkProcessProxy::didBecomeUnresponsive):

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

1:26 PM Changeset in webkit [285226] by Russell Epstein
  • 7 edits in branches/safari-612.3.3.1-branch/Source/WebKit

Cherry-pick r285115. rdar://problem/84984094

Increase responsiveness timeout for network process
https://bugs.webkit.org/show_bug.cgi?id=232505

Reviewed by Chris Dumez.

  • UIProcess/AuxiliaryProcessProxy.cpp: (WebKit::AuxiliaryProcessProxy::AuxiliaryProcessProxy):
  • UIProcess/AuxiliaryProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::NetworkProcessProxy): (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
  • UIProcess/ResponsivenessTimer.cpp: (WebKit::ResponsivenessTimer::ResponsivenessTimer): (WebKit::ResponsivenessTimer::timerFired): (WebKit::ResponsivenessTimer::start): (): Deleted.
  • UIProcess/ResponsivenessTimer.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::getNetworkProcessConnection):

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

1:25 PM Changeset in webkit [285225] by Russell Epstein
  • 3 edits in branches/safari-612.3.3.1-branch/Source/WebKit

Cherry-pick r284651. rdar://problem/84984058

Call to [NSURL URLByAppendingPathComponent:] under NetworkSessionCocoa() may be inefficient
https://bugs.webkit.org/show_bug.cgi?id=232098

Reviewed by Alex Christensen.

Call [NSURL URLByAppendingPathComponent:isDirectory:] whenever possible instead of
[NSURL URLByAppendingPathComponent], as it is more efficient.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
  • UIProcess/Cocoa/WKShareSheet.mm: (+[WKShareSheet createRandomSharingDirectoryForFile:]): (+[WKShareSheet writeFileToShareableURL:data:temporaryDirectory:]):

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

1:24 PM Changeset in webkit [285224] by Chris Dumez
  • 10 edits in trunk/Source

Clicking a link should preconnect to destination as first party
https://bugs.webkit.org/show_bug.cgi?id=232668

Reviewed by Alex Christensen.

Clicking a link should preconnect to destination as first party, not third-party. Otherwise, the
preconnect is wasted when session isolation based on registrable domain is enabled. This is a
follow-up to r284730.

Source/WebCore:

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::handleClick):

  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::preconnectIfNeeded):

  • loader/LoaderStrategy.h:

Source/WebKit:

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::preconnectTo):

  • WebProcess/Network/WebLoaderStrategy.h:

Source/WebKitLegacy:

  • WebCoreSupport/WebResourceLoadScheduler.cpp:

(WebResourceLoadScheduler::preconnectTo):

  • WebCoreSupport/WebResourceLoadScheduler.h:
1:14 PM Changeset in webkit [285223] by Russell Epstein
  • 8 edits in branches/safari-612.3.3.0-branch/Source

Versioning.

WebKit-7612.3.3.0.2

1:12 PM Changeset in webkit [285222] by Chris Dumez
  • 5 edits in trunk

_pasteboardWithName should be thread-safe
https://bugs.webkit.org/show_bug.cgi?id=232670

Reviewed by Tim Horton.

Source/WTF:

wtf/Atomics.h uses WTF_MAKE_STRUCT_FAST_ALLOCATED which is declared in
wtf/FastMalloc.h but was failing to include it. This was leading to a
build error when I tried including wtf/Lock.h in WKTR.

  • wtf/Atomics.h:

Tools:

_pasteboardWithName should be thread-safe, to match [NSPasteboard _pasteboardWithName].
This was leading to flaky crashes in _pasteboardWithName getting called off the main
thread from ShareKit code.

  • DumpRenderTree/mac/DumpRenderTreePasteboard.mm:

(+[DumpRenderTreePasteboard _pasteboardWithName:]):
(+[DumpRenderTreePasteboard releaseLocalPasteboards]):

  • WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:

(+[WebKitTestRunnerPasteboard _pasteboardWithName:]):
(+[WebKitTestRunnerPasteboard releaseLocalPasteboards]):

1:11 PM Changeset in webkit [285221] by Ryan Haddad
  • 2 edits in trunk/Tools

[EWS] Add more bots to iOS layout and API test queues
https://bugs.webkit.org/show_bug.cgi?id=232678

Reviewed by Aakash Jain.

  • CISupport/ews-build/config.json:
1:10 PM Changeset in webkit [285220] by Kyle Piddington
  • 3 edits in trunk/Source/ThirdParty/ANGLE

REGRESSION (iOS 15): Tab crashes when trying to render Projector stories
https://bugs.webkit.org/show_bug.cgi?id=231607

Rework vertex buffer caching to allow us to reuse parts
of converted buffers. This dramatically drops the memory usage
of this tab from 4.5 gb to roughly 1.3gb

Reviewed by Dean Jackson.

  • src/libANGLE/renderer/metal/BufferMtl.mm:

(rx::BufferMtl::getVertexConversionBuffer):

  • src/libANGLE/renderer/metal/VertexArrayMtl.mm:

(rx::VertexArrayMtl::convertVertexBuffer):
(rx::VertexArrayMtl::convertVertexBufferCPU):
(rx::VertexArrayMtl::convertVertexBufferGPU):

1:09 PM Changeset in webkit [285219] by jer.noble@apple.com
  • 7 edits in trunk/Source/WebKit

[Catalina] HLS streams will not select HDR variants when GPU Process is enabled
https://bugs.webkit.org/show_bug.cgi?id=232671
<rdar://84686676>

Reviewed by Eric Carlson.

Tested manually.

In Catalina, fall back to a MediaToolbox API for setting a global HDR override in the GPU
process which instructs all AVPlayer instances whether HDR playback is supported for the
current set of displays. Pass the required data across from the UIProcess to the GPU process
at process start up and when the displays are reconfigured.

  • GPUProcess/GPUProcess.h:
  • GPUProcess/GPUProcess.messages.in:
  • GPUProcess/mac/GPUProcessMac.mm:

(WebKit::GPUProcess::setScreenProperties):

  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::setScreenProperties):
(WebKit::GPUProcessProxy::updatePreferences):

  • UIProcess/GPU/GPUProcessProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::screenPropertiesStateChanged):
(WebKit::displayReconfigurationCallBack):

11:40 AM Changeset in webkit [285218] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

Rebaseline http/tests/privateClickMeasurement/attribution-conversion-through-fetch-keepalive.html.
https://bugs.webkit.org/show_bug.cgi?id=231928.

Unreviewed test gardening.

  • platform/ios/http/tests/privateClickMeasurement/attribution-conversion-through-fetch-keepalive-expected.txt:
11:26 AM Changeset in webkit [285217] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

Leak of UUID in WebKit::ModelElementController::modelElementDidCreatePreview()
<https://webkit.org/b/232628>
<rdar://problem/84935290>

Reviewed by Brent Fulgham.

  • UIProcess/Cocoa/ModelElementControllerCocoa.mm:

(WebKit::ModelElementController::modelElementDidCreatePreview):

  • Use adoptNS() to fix the leak.
10:59 AM Changeset in webkit [285216] by Devin Rousso
  • 6 edits
    4 adds in trunk

[Modern Media Controls] should show tracks button/menu for <audio>
https://bugs.webkit.org/show_bug.cgi?id=232597

Reviewed by Eric Carlson.

Source/WebCore:

There's nothing preventing <audio> from having multiple <source>. We should have a
language picker for <audio> just like what we have for <video>.

Tests: media/modern-media-controls/tracks-support/audio-multiple-tracks.html

media/modern-media-controls/tracks-support/audio-single-track.html

  • Modules/modern-media-controls/controls/inline-media-controls.js:

(InlineMediaControls.prototype._rightContainerButtons):

LayoutTests:

  • media/modern-media-controls/tracks-support/audio-multiple-tracks.html: Added.
  • media/modern-media-controls/tracks-support/audio-multiple-tracks-expected.txt: Added.
  • media/modern-media-controls/tracks-support/audio-single-track.html: Added.
  • media/modern-media-controls/tracks-support/audio-single-track-expected.txt: Added.
  • media/modern-media-controls/audio/audio-controls-buttons.html:
  • media/modern-media-controls/audio/audio-controls-buttons-expected.txt:
  • platform/ios-wk2/TestExpectations:
10:47 AM Changeset in webkit [285215] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Display swatch popovers below the swatch by default, not on the left side
https://bugs.webkit.org/show_bug.cgi?id=232577

Reviewed by Devin Rousso.

The new defaults are: below, above, left.

Displaying the swatch popover on the left side covers the relevant property name.
Displaying it below or above doesn't have this problem; below is preferred because
it doesn't hide the CSS selector of the relevant rule.

  • UserInterface/Views/InlineSwatch.js:

(WI.InlineSwatch.prototype._presentPopover):
Introduce a method to remove code duplication.

10:28 AM Changeset in webkit [285214] by Chris Dumez
  • 13 edits
    8 adds in trunk

Javascript URLs do not run in the right context when using frame targeting
https://bugs.webkit.org/show_bug.cgi?id=232382

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/010-expected.txt:

The test is no longer timing out now that we run the javascript URL contained in the <form>'s action in the context
of the "test" iframe instead of the top frame. However, the test is still failing, possibly because the JavaScript
URL is run synchronously.

Source/WebCore:

Javascript URLs did not run in the right context when using frame targeting
(e.g. <a target="foo" src="javascript:...">). We would previously run the
JavaScript URL in the context of the anchor instead of the target frame/window.

Also, we would fail to open a new popup when there is no existing frame with
the given target name.

This patch fixes the issue by doing the executeJavaScriptURL() call later,
inside of FrameLoader::loadWithNavigationAction(), once we've already resolved
the target frame and created a new window if necessary.

This aligns our behavior with both Chrome and Firefox.

Tests: fast/frames/javascript-url-anchor-target-new-window.html

fast/frames/javascript-url-anchor-target.html
fast/frames/javascript-url-form-target-new-window.html
fast/frames/javascript-url-form-target.html

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::executeJavaScriptURL):

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::handleClick):

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::submit):

  • loader/FormSubmission.cpp:

(WebCore::FormSubmission::requestURL const):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::changeLocation):
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):

  • loader/NavigationAction.h:

(WebCore::NavigationAction::shouldReplaceDocumentIfJavaScriptURL const):
(WebCore::NavigationAction::setShouldReplaceDocumentIfJavaScriptURL):

  • loader/NavigationScheduler.cpp:

(WebCore::NavigationScheduler::scheduleFormSubmission):

LayoutTests:

Add layout test coverage. I have verified that these tests are passing in both
Chrome 94 and Firefox 94.

  • fast/frames/javascript-url-anchor-target-expected.txt: Added.
  • fast/frames/javascript-url-anchor-target-new-window-expected.txt: Added.
  • fast/frames/javascript-url-anchor-target-new-window.html: Added.
  • fast/frames/javascript-url-anchor-target.html: Added.
  • fast/frames/javascript-url-form-target-expected.txt: Added.
  • fast/frames/javascript-url-form-target-new-window-expected.txt: Added.
  • fast/frames/javascript-url-form-target-new-window.html: Added.
  • fast/frames/javascript-url-form-target.html: Added.
10:05 AM Changeset in webkit [285213] by Simon Fraser
  • 13 edits in trunk

Expose fuzzy match data in layout test results
https://bugs.webkit.org/show_bug.cgi?id=232523

Reviewed by Jonathan Bedard.

Tools:

For a failing ref (or image) test, include the fuzzy matching data in full_results.json
in the form "image_difference": { "max_difference": 13, "total_pixels": 167 }, and
show that in the image comparison page that's written out for each test result.

Fix some tests that relied on JSON property serialization ordering (we don't serialize
with sort_keys=True).

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager._save_json_files):

  • Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:

(TestResultWriter.write_image_diff_files):

  • Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:

(JSONResultsGenerator.generate_times_ms_file):

  • Scripts/webkitpy/layout_tests/models/test_failures.py:

(FailureImageHashMismatch.formatted_diff_percent):
(FailureImageHashMismatch):
(FailureImageHashMismatch.formatted_fuzzy_data):
(FailureImageHashMismatch.write_failure):
(FailureReftestMismatch.message):
(FailureReftestMismatch.formatted_diff_percent):
(FailureReftestMismatch):
(FailureReftestMismatch.formatted_fuzzy_data):
(FailureReftestMismatch.write_failure):

  • Scripts/webkitpy/layout_tests/models/test_run_results.py:

(_interpret_test_failures):

  • Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:

(InterpretTestFailuresTest.test_interpret_test_failures):

  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

(RunTest.test_retrying_force_pixel_tests):

LayoutTests:

Add some "image_difference" values to the test JSON and update the resulting
files.

  • fast/harness/full_results.json:
  • fast/harness/image-diff-template-expected.txt:
  • fast/harness/image-diff-template.html:
  • fast/harness/results.html:
10:05 AM Changeset in webkit [285212] by Russell Epstein
  • 1 copy in tags/Safari-612.3.3.1.1

Tag Safari-612.3.3.1.1.

9:59 AM Changeset in webkit [285211] by Antti Koivisto
  • 5 edits in trunk

::slotted element style not invalidated correctly in nested case
https://bugs.webkit.org/show_bug.cgi?id=232665

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-scoping/slotted-nested-expected.txt:

Source/WebCore:

We fail to invalidate ::slotted style if the assigned node is not from the current host scope.

  • style/StyleInvalidator.cpp:

(WebCore::Style::invalidateAssignedElements):

Invalidate more accurately by following assigned node chain recursively instead of just invalidating all host children.

(WebCore::Style::Invalidator::invalidateIfNeeded):

Remove the unnecessary and incorrect m_didInvalidateHostChildren optimization.

  • style/StyleInvalidator.h:
9:52 AM Changeset in webkit [285210] by jer.noble@apple.com
  • 5 edits
    2 moves
    2 adds in trunk

[iOS] AVAssetResourceLoadingRequest.request does not include a Range: header on iOS 15.
https://bugs.webkit.org/show_bug.cgi?id=232195
<rdar://84574375>

Reviewed by Darin Adler.

Source/WebCore:

Explicitly add a Range: header for Blob requests which do not have one (but otherwise should).

Test: platform/mac/media/video-blob-request-contains-range-header.html

Drive-by fix: to allow this change to be testable, we must revert a change which calls all the
network delegate callbacks with empty data. This was necessary at the time because (at least for
Cocoa ports) media loading happened outside WebCore's loader path. Currently, all http(s), data,
blob, and custom protocol schemes are loaded through WebCore, leaving file:// URLs as the
remaining protocol type that needs custom handling, and only on Cocoa ports.

Further drive-by fix: WebKitLegacy's network delegate client operates synchronously during
requestResource(), so WebCoreNSURLSession must synthesize an error if that method returns a
nil resource.

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

(WebCore::WebCoreAVFResourceLoader::startLoading):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::loadResource):

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSessionDataTask _restart]):

LayoutTests:

The existing media-blocked-by-willsendrequest.html test only verified that file:// URLs were blocked,
not http://, so this test is moved to the http/tests/ directory where media will use http:// for loading.

  • http/tests/media/media-blocked-by-willsendrequest-expected.txt: Renamed from LayoutTests/media/media-blocked-by-willsendrequest-expected.txt.
  • http/tests/media/media-blocked-by-willsendrequest.html: Renamed from LayoutTests/media/media-blocked-by-willsendrequest.html.
  • platform/mac/media/video-blob-request-contains-range-header.html:
  • platform/mac/media/video-blob-request-contains-range-header-expected.txt: Added.
  • platform/mac/media/video-blob-request-contains-range-header.html: Added.
9:40 AM Changeset in webkit [285209] by Antti Koivisto
  • 4 edits in trunk

::slotted shouldn't match an active <slot>
https://bugs.webkit.org/show_bug.cgi?id=232664

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-scoping/slotted-slot-expected.txt:

Source/WebCore:

https://drafts.csswg.org/css-scoping/#slotted-pseudo

  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::checkOne const):

Avoid matching <slot>.

9:17 AM Changeset in webkit [285208] by Kate Cheney
  • 7 edits
    1 add in trunk

[iOS] Need API for marking file requests as non-app-initiated
https://bugs.webkit.org/show_bug.cgi?id=232506
<rdar://problem/84824703>

Reviewed by Brent Fulgham.

Source/WebKit:

Pass app initiated value through to the WebPage so file loads
can be attributed correctly.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView loadFileRequest:allowingReadAccessToURL:]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::loadFile):

  • UIProcess/WebPageProxy.h:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/file-with-iframe.html: Added.
9:14 AM Changeset in webkit [285207] by beidson@apple.com
  • 2 edits in trunk/Tools

Fix iOS API tests after r285199
https://bugs.webkit.org/show_bug.cgi?id=232649

Unreviewed.

  • TestWebKitAPI/Tests/WebKitCocoa/NotificationAPI.mm: Definitely not ready for these tests to start running.
9:05 AM Changeset in webkit [285206] by Chris Dumez
  • 2 edits in trunk/Source/WebKitLegacy/mac

Unreviewed iOS build fix.

  • WebCoreSupport/WebNotificationClient.mm:

(-[WebNotificationPolicyListener NO_RETURN_DUE_TO_ASSERT]):
(-[WebNotificationPolicyListener denyOnlyThisRequest]): Deleted.
(-[WebNotificationPolicyListener shouldClearCache]): Deleted.

7:37 AM Changeset in webkit [285205] by Chris Lord
  • 12 edits in trunk/Source/WebCore

[GTK][WPE] Use the display refresh to drive scrolling animations (sync scroll)
https://bugs.webkit.org/show_bug.cgi?id=232077

Reviewed by Simon Fraser.

Service sync scroll animations as part of the scroll phase in
Page::updateRendering, which is driven by the display refresh.

No new tests, covered by existing tests.

  • dom/Document.cpp:

(WebCore::serviceScrollAnimationForScrollableArea):
(WebCore::Document::runScrollSteps):

  • page/FrameView.cpp:

(WebCore::FrameView::didStartScrollAnimation):

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

(WebCore::ScrollAnimator::ScrollAnimator):
(WebCore::ScrollAnimator::startAnimationCallback):
(WebCore::ScrollAnimator::stopAnimationCallback):
(WebCore::ScrollAnimator::serviceScrollAnimation):
(WebCore::ScrollAnimator::scrollControllerAnimationTimerFired): Deleted.

  • platform/ScrollAnimator.h:
  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::didStartScrollAnimation):

  • platform/ScrollingEffectsController.cpp:

(WebCore::ScrollingEffectsController::retargetAnimatedScrollBy):

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::didStartScrollAnimation):

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

(WebCore::RenderListBox::didStartScrollAnimation):

  • rendering/RenderListBox.h:
6:37 AM Changeset in webkit [285204] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Display box builder should take visual order into account when computing horizontal positions
https://bugs.webkit.org/show_bug.cgi?id=232655

Reviewed by Antti Koivisto.

In this patch we turn logical horizontal positions into "physical" positions based on the visual order of the runs.
With this change, now IFC can render simple RTL content.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineContent): Move shared code to displayBoxRect.

5:45 AM Changeset in webkit [285203] by ntim@apple.com
  • 2 edits
    1 add
    1 delete in trunk/LayoutTests

Make render-layer-rebuild-z-order-lists.html use an HTML reference
https://bugs.webkit.org/show_bug.cgi?id=232658

Reviewed by Antti Koivisto.

This not only tests the crash, but also tests that the dialog is rendered (which was not
the case at the first iteration of the patch which introduced this test).

Also done some minor cleanups to the test.

  • fast/layers/render-layer-rebuild-z-order-lists-expected.html: Added.
  • fast/layers/render-layer-rebuild-z-order-lists-expected.txt: Removed.
  • fast/layers/render-layer-rebuild-z-order-lists.html:
3:59 AM Changeset in webkit [285202] by Antti Koivisto
  • 9 edits in trunk/Source/WebCore

Use Style::ScopeOrdinal for finding the right scope for ::part matching
https://bugs.webkit.org/show_bug.cgi?id=232562

Reviewed by Simon Fraser.

We are already passing the scope ordinal to the selector checker so we can use it consistently to find
the right scope.

  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::matchRecursively const):

Find the right scope based on the scope ordinal.
Simplify allowMultiplePseudoElements check, invalid cases are not allowed by the parser.

(WebCore::SelectorChecker::checkOne const):

Find the right scope based on the scope ordinal.

  • css/SelectorChecker.h:
  • dom/ShadowRoot.h:
  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::matchPartPseudoElementRulesForScope):

Compute the scope ordinal for nested scopes.
Make iterative instead of recursive.

(WebCore::Style::ElementRuleCollector::ruleMatches):
(WebCore::Style::ElementRuleCollector::matchAllRules):

Flush all remaining rules.

  • style/ElementRuleCollector.h:
  • style/StyleScope.cpp:

(WebCore::Style::Scope::forOrdinal):
(WebCore::Style::assignedSlotForScopeOrdinal):
(WebCore::Style::hostForScopeOrdinal):

Add helpers.

  • style/StyleScope.h:
  • style/StyleScopeOrdinal.h:

(WebCore::Style::operator--):

We now use values less than ContainingHost to present enclosing scopes, similar to slotted matching.

3:36 AM Changeset in webkit [285201] by Pablo Saavedra
  • 2 edits in trunk

[cmake] Check "cortex" string in the CMAKE_SYSTEM_PROCESSOR for defining WTF_CPU_* vars
https://bugs.webkit.org/show_bug.cgi?id=232623

Reviewed by Carlos Alberto Lopez Perez.

  • Source/cmake/WebKitCommon.cmake:
1:23 AM Changeset in webkit [285200] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

REGRESSION(r284603) [GTK][WPE] test fast/frames/flattening/scrolling-in-object.html fails
https://bugs.webkit.org/show_bug.cgi?id=232627

Use UIHelper.waitForTargetScrollAnimationToSettle rather than a timeout to make the test reliable.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-11-03
Reviewed by Martin Robinson.

  • fast/frames/flattening/scrolling-in-object.html:

Nov 2, 2021:

11:53 PM Changeset in webkit [285199] by beidson@apple.com
  • 7 edits in trunk/Source

Notifications on iOS enabled at compile-time, disabled at runtime
https://bugs.webkit.org/show_bug.cgi?id=232649

Reviewed by Tim Horton.

Source/WebCore:

No new tests (Changing compiled behavior but definitely not runtime behavior)

  • Modules/notifications/Notification.idl:
  • Modules/notifications/NotificationPermission.idl:
  • Modules/notifications/NotificationPermissionCallback.idl:
  • bindings/js/WebCoreBuiltinNames.h:

Source/WTF:

  • wtf/PlatformEnableCocoa.h:
8:37 PM Changeset in webkit [285198] by timothy_horton@apple.com
  • 2 edits in trunk/Tools

UnicodeDecodeError in write_reftest copying a non-UTF8 expected result file
https://bugs.webkit.org/show_bug.cgi?id=232643

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:

(TestResultWriter.write_reftest):
If a reftest's -expected.html file is not valid UTF-8, and the test fails,
when we copy the expected file from the layout tests directory to the
test results directory, we attempt to parse it as UTF-8, resulting in
an exception being thrown.

Instead of needlessly reading in the file as a string and immediately
writing it back out, just copy the file...

I'm not sure there are any not-valid-UTF-8 *ref* tests in the tree, but
there is at least one not-valid-UTF-8 *text* test, which can be run
as a ref-test in some scenarios (see r285132), in which case this problem
occurs: fast/css/line-height-determined-by-primary-font.html.

Also, explicitly ensure the output directory exists before copying
to avoid regressing r122505. Previously this was done inside _write_text_file.

8:23 PM Changeset in webkit [285197] by Ross Kirsling
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Add LLInt fast path for OpMod on x86_64
https://bugs.webkit.org/show_bug.cgi?id=232644

Reviewed by Saam Barati and Yusuke Suzuki.

This patch ports the x86_64 fast path for OpMod from baseline JIT to LLInt.

This is quite similar to OpDiv but the implementation avoids using binaryOpCustomStore
because OpMod is not a ProfiledBinaryOp.

Performance results appear negligible with all JIT tiers enabled;
relevant microbenchmarks with JIT off are as follows.

Before After

int-or-other-mod-then-get-by-val 158.0136+-0.9338 39.7698+-0.4394 definitely 3.9732x faster
integer-modulo 15.1972+-0.4197 7.1461+-0.1530 definitely 2.1266x faster
mod-boolean 145.4011+-2.0483 ? 146.1243+-1.6816 ?
mod-boolean-double 145.6148+-1.8530 ? 145.9380+-1.7073 ?
mod-untyped 286.9585+-3.9535 284.0360+-4.1221 might be 1.0103x faster
negative-zero-modulo 1.2951+-0.1275 1.0220+-0.0412 definitely 1.2672x faster

<geometric> 51.5408+-0.8164 34.7341+-0.3365 definitely 1.4839x faster

  • jit/GPRInfo.h: Add assertions.
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
8:08 PM Changeset in webkit [285196] by caitp@igalia.com
  • 15 edits
    3 adds in trunk/Source/WebCore

[WebIDL] Support [Exposed=*] extended attribute
https://bugs.webkit.org/show_bug.cgi?id=231082

Reviewed by Chris Dumez.

Adds a shorthand to expose interfaces/attributes on Window, Workers*,
and the forthcoming ShadowRealm global object.

See https://github.com/heycam/webidl/issues/468 and
https://github.com/heycam/webidl/pull/526 for details.

  • bindings/scripts/CodeGenerator.pm:

(shouldPropertyBeExposed):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateRuntimeEnableConditionalStringForExposed):

  • bindings/scripts/IDLParser.pm:

(parseExtendedAttributeRest2):

  • bindings/scripts/preprocess-idls.pl:
  • bindings/scripts/test/AudioWorkletGlobalScopeConstructors.idl:
  • bindings/scripts/test/DOMWindowConstructors.idl:
  • bindings/scripts/test/DedicatedWorkerGlobalScopeConstructors.idl:
  • bindings/scripts/test/ExposedStar.idl: Added.
  • bindings/scripts/test/JS/JSDOMWindow.cpp:

(WebCore::jsDOMWindow_ExposedStarConstructorGetter):
(WebCore::JSC_DEFINE_CUSTOM_GETTER):

  • bindings/scripts/test/JS/JSDedicatedWorkerGlobalScope.cpp:

(WebCore::jsDedicatedWorkerGlobalScope_ExposedStarConstructorGetter):
(WebCore::JSC_DEFINE_CUSTOM_GETTER):

  • bindings/scripts/test/JS/JSExposedStar.cpp: Added.

(WebCore::JSExposedStarDOMConstructor::prototypeForStructure):
(WebCore::JSExposedStarDOMConstructor::initializeProperties):
(WebCore::JSExposedStarPrototype::finishCreation):
(WebCore::JSExposedStar::JSExposedStar):
(WebCore::JSExposedStar::finishCreation):
(WebCore::JSExposedStar::createPrototype):
(WebCore::JSExposedStar::prototype):
(WebCore::JSExposedStar::getConstructor):
(WebCore::JSC_DEFINE_CUSTOM_GETTER):
(WebCore::jsExposedStarPrototypeFunction_operationForAllContextsBody):
(WebCore::JSC_DEFINE_HOST_FUNCTION):
(WebCore::jsExposedStarPrototypeFunction_operationJustForWindowContextsBody):
(WebCore::jsExposedStarPrototypeFunction_operationJustForWorkerContextsBody):
(WebCore::JSExposedStar::subspaceForImpl):
(WebCore::JSExposedStar::analyzeHeap):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSExposedStar::toWrapped):

  • bindings/scripts/test/JS/JSExposedStar.h: Added.

(WebCore::JSExposedStar::create):
(WebCore::JSExposedStar::createStructure):
(WebCore::JSExposedStar::subspaceFor):
(WebCore::JSExposedStar::wrapped const):
(WebCore::toJS):
(WebCore::toJSNewlyCreated):

  • bindings/scripts/test/JS/JSPaintWorkletGlobalScope.cpp:

(WebCore::jsPaintWorkletGlobalScope_ExposedStarConstructorGetter):
(WebCore::JSC_DEFINE_CUSTOM_GETTER):

  • bindings/scripts/test/JS/JSServiceWorkerGlobalScope.cpp:

(WebCore::jsServiceWorkerGlobalScope_ExposedStarConstructorGetter):
(WebCore::JSC_DEFINE_CUSTOM_GETTER):

  • bindings/scripts/test/PaintWorkletGlobalScopeConstructors.idl:
  • bindings/scripts/test/ServiceWorkerGlobalScopeConstructors.idl:
  • bindings/scripts/test/SupplementalDependencies.dep:
7:26 PM Changeset in webkit [285195] by don.olmstead@sony.com
  • 45 edits in trunk/Source

Non-unified build fixes early November 2021 edition
https://bugs.webkit.org/show_bug.cgi?id=232589

Unreviewed non-unified build fixes.

Source/JavaScriptCore:

  • API/JSAPIGlobalObject.cpp:
  • bytecode/EvalCodeBlock.cpp:
  • bytecode/FunctionCodeBlock.cpp:
  • bytecode/ModuleProgramCodeBlock.cpp:
  • bytecode/ProgramCodeBlock.cpp:
  • jit/JITInlineCacheGenerator.h:
  • runtime/CustomGetterSetter.cpp:
  • runtime/JSScriptFetcher.cpp:
  • runtime/JSSourceCode.cpp:
  • runtime/ShadowRealmObject.cpp:
  • runtime/ShadowRealmPrototype.cpp:
  • runtime/TemporalInstant.cpp:

Source/WebCore:

  • Modules/push-api/PushSubscriptionData.h:
  • animation/CSSPropertyAnimation.cpp:
  • animation/CSSPropertyAnimation.h:
  • animation/CSSTransition.cpp:
  • animation/WebAnimation.cpp:
  • css/SelectorFilter.cpp:
  • dom/Attr.cpp:
  • dom/ComposedTreeIterator.cpp:
  • editing/BreakBlockquoteCommand.cpp:
  • editing/InsertParagraphSeparatorCommand.cpp:
  • editing/SplitElementCommand.cpp:
  • editing/SplitTextNodeContainingElementCommand.cpp:
  • html/HTMLSummaryElement.cpp:
  • html/HTMLTitleElement.cpp:
  • html/track/VTTCue.cpp:
  • inspector/DOMPatchSupport.cpp:
  • inspector/InspectorNodeFinder.cpp:
  • inspector/agents/InspectorPageAgent.cpp:
  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:
  • page/ResizeObservation.cpp:
  • page/scrolling/ScrollingCoordinatorTypes.h:
  • rendering/RenderCounter.cpp:
  • rendering/svg/RenderSVGModelObject.cpp:
  • rendering/svg/SVGResources.cpp:
  • rendering/svg/SVGRootInlineBox.cpp:
  • rendering/svg/SVGTextChunk.cpp:
  • style/ElementRuleCollector.cpp:
  • style/PageRuleCollector.h:

Source/WebKit:

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::createGPUConnectionToWebProcess):
(WebKit::GPUProcess::webProcessConnection const):
(WebKit::GPUProcess::updateCaptureAccess):
(WebKit::GPUProcess::updateCaptureOrigin):
(WebKit::GPUProcess::nowPlayingManager):

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:
7:19 PM Changeset in webkit [285194] by Russell Epstein
  • 1 copy in tags/Safari-613.1.6.7

Tag Safari-613.1.6.7.

7:12 PM Changeset in webkit [285193] by Russell Epstein
  • 8 edits in branches/safari-613.1.6-branch/Source

Versioning.

WebKit-7613.1.6.7

6:47 PM Changeset in webkit [285192] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

Crash in RenderLayer::rebuildZOrderLists
https://bugs.webkit.org/show_bug.cgi?id=230229

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2021-11-02
Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/layers/render-layer-rebuild-z-order-lists.html

To avoid operating on nullptr, allocate posZOrderList if it is null,
similar to how it is done in RenderLayer::collectLayers.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::rebuildZOrderLists):

LayoutTests:

  • fast/layers/render-layer-rebuild-z-order-lists-expected.txt: Added.
  • fast/layers/render-layer-rebuild-z-order-lists.html: Added.
  • platform/win/TestExpectations: Skip due to diag.showModal undefined in win.
6:27 PM Changeset in webkit [285191] by rmorisset@apple.com
  • 5 edits in trunk

Regression (r284330): [ macOS wk1 Debug ] webaudio/AudioBuffer/huge-buffer.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=232244
<rdar://problem/84616427>

Reviewed by Yusuke Suzuki.

Source/WebCore:

The test is verifying that trying to allocate an AudioBuffer with 4GB channels fails cleanly.
It used to work automatically, as AudioBuffer relies on Float32Array under the hood, which was limited to 2GB.
Since r284330, ArrayBuffers can be up to 4GB, so it now takes very long to OOM, and sometimes timeout.
I use the same solution which I used for PixelBuffers in r284330: just test that the length is reasonable
and if it is not then abort as if the allocation of the Float32Array had failed.

No new tests: covered by LayoutTests/webaudio/AudioBuffer/huge-buffer.html

  • Modules/webaudio/AudioBuffer.cpp:

(WebCore::AudioBuffer::AudioBuffer):

  • Modules/webaudio/AudioBuffer.h:

LayoutTests:

  • platform/mac-wk1/TestExpectations:
6:00 PM Changeset in webkit [285190] by Kocsen Chung
  • 1 copy in tags/Safari-612.3.3.0.1

Tag Safari-612.3.3.0.1.

5:21 PM Changeset in webkit [285189] by Dewei Zhu
  • 40 edits
    1 add in trunk/Websites/perf.webkit.org

Add 'paired-parallel' repetition type for A/B testing.
https://bugs.webkit.org/show_bug.cgi?id=229545

Reviewed by Ryosuke Niwa and Alexey Proskuryakov.

Add 'paired-parallel' repetition type for A/B testing.
Add 'TriggerableConfiguration' model to store repetition type information for each (platform, test) pair.
Add new component 'repetition-type-selection' to unify A/B testing UI for repetition type selection.
Extend A/B testing syncing script to update repetition types for each triggerable configuration and only
schedule A/B testing on a builder which supports a given repetition type.

  • browser-tests/custom-analysis-task-configurator-tests.js: Updated unit tests accordingly.

(async createCustomAnalysisTaskConfiguratorWithContext):

  • browser-tests/customizable-test-group-form-tests.js: Updated unit tests accordingly.

(async createCustomizableTestGroupFormWithContext):

  • browser-tests/test-group-form-tests.js: Updated unit tests accordingly.

(async createTestGroupFormWithContext):

  • init-database.sql: Added 'triggerable_configuration_repetition_types' table to store supported

repetition types for each triggerable configuration.
Added 'paired-parallel' repetition type.

  • migrate-database.sql: Updated migration scripts.
  • public/api/update-triggerable.php: Added logic to update repetition types for each tirggerable configurations.
  • public/include/commit-sets-helpers.php: Added support for 'paired-parallel' repetition type.
  • public/include/json-header.php: Extended 'find_triggerable_for_task' to include supported repetition types in

return value.

  • public/include/manifest-generator.php: Added logic to include supported repetition types in manifest.
  • public/privileged-api/add-build-requests.php: Extended API to support 'paired-parallel' repetition type.
  • public/privileged-api/create-analysis-task.php: Extended API to support 'paired-parallel' repetition type.
  • public/privileged-api/create-test-group.php: Extended API to support 'paired-parallel' repetition type.
  • public/v3/commit-set-range-bisector.js:

(CommitSetRangeBisector._closestCommitSetsToBisectingCommitByTime): Fix a bug that error is raise when there is
no middle commit set in a range.

  • public/v3/components/custom-configuration-test-group-form.js: Added code to update supported repetition types

on test config change.
(CustomConfigurationTestGroupForm.prototype.startTesting):
(CustomConfigurationTestGroupForm.prototype.didConstructShadowTree):

  • public/v3/components/customizable-test-group-form.js:

(CustomizableTestGroupForm.prototype.startTesting):

  • public/v3/components/repetition-type-selection.js: Added a new model that stores repetition types information

for each (platform, test) pair.
(RepetitionTypeSelection):
(RepetitionTypeSelection.prototype.didConstructShadowTree):
(RepetitionTypeSelection.prototype.get selectedRepetitionType):
(RepetitionTypeSelection.prototype.set selectedRepetitionType):
(RepetitionTypeSelection.prototype.set disabled):
(RepetitionTypeSelection.prototype.setTestAndPlatform):
(RepetitionTypeSelection.prototype.labelForRepetitionType):
(RepetitionTypeSelection.prototype.render):
(RepetitionTypeSelection.prototype._renderRepetitionTypeList):
(RepetitionTypeSelection.htmlTemplate):

  • public/v3/components/test-group-form.js: Adopt 'repetition-type-selection'.

(TestGroupForm.prototype.setTestAndPlatform):
(TestGroupForm.prototype.updateWithTestGroup):
(TestGroupForm.prototype.startTesting):

  • public/v3/index.html:
  • public/v3/models/manifest.js: Pass 'supportedRepetitionTypes' and 'id' for TriggerableConfiguration.

(Manifest.reset):
(Manifest._didFetchManifest):
(Manifest):

  • public/v3/models/test-group.js: Updated logic to share retry logic of 'alternating' test group with 'paired-parallel'

test group.
(TestGroup.prototype.async scheduleMoreRequestsOrClearFlag):

  • public/v3/models/triggerable.js: Added TriggerableConfiguration model.

Added code to creat TriggerableConfiguration in 'Triggerable' constructor.
(Triggerable):
(Triggerable.findByTestConfiguration):
(prototype.get triggerable):
(prototype.get supportedRepetitionTypes):
(findByTestAndPlatform):

  • public/v3/pages/analysis-task-page.js: Added code to update repetition type in the UI based on (test, platform) pair.

(AnalysisTaskResultsPane.prototype.setTestGroups):
(AnalysisTaskTestGroupPane.prototype._renderCurrentTestGroup):
(AnalysisTaskTestGroupPane.prototype._renderTestGroupForm):

  • public/v3/pages/chart-pane.js: Adopt 'repetition-type-selection'.

(ChartPane.prototype.didConstructShadowTree):
(ChartPane.prototype.async _analyzeRange):
(ChartPane.prototype._renderActionToolbar):

  • server-tests/api-manifest-tests.js:
  • server-tests/api-update-triggerable-tests.js: Added and updated unit tests.

(updateWithMacWebKitRepositoryGroups):

  • server-tests/api-upload-root-tests.js: Updated unit tests.
  • server-tests/privileged-api-add-build-requests-tests.js: Added and updated unit tests.

(async addTriggerableAndCreateTask):

  • server-tests/privileged-api-create-analysis-task-tests.js: Added and updated unit tests.
  • server-tests/privileged-api-create-test-group-tests.js: Added and updated unit tests.
  • server-tests/privileged-api-update-test-group-tests.js: Updated unit tests.

(async addTriggerableAndCreateTask):

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

(MockData.someTestConfigurationId):
(MockData.otherTestConfigurationId):
(MockData.addMockConfiguration):
(MockData.set mockTestSyncConfigWithSingleBuilder):
(MockData.mockTestSyncConfigWithPatchAcceptingBuilder):
(MockData.mockTestSyncConfigWithTwoBuilders):

  • server-tests/tools-sync-buildbot-integration-tests.js: Added and updated unit tests.
  • tools/js/buildbot-syncer.js: Added code to update supported repetition types on triggerable updates.

Update configuration match code to only scheduler build requests the repetition types of which are both
supported by builder and triggerable configuration.
(BuildbotSyncer):
(BuildbotSyncer.prototype.addTestConfiguration):
(BuildbotSyncer.prototype.matchesConfiguration):
(BuildbotSyncer._loadConfig):

  • tools/js/buildbot-triggerable.js:

(BuildbotTriggerable.prototype.updateTriggerable):
(BuildbotTriggerable.prototype.async syncOnce): Move the code that fetches all related test groups before
invoking 'BuildbotTriggerable._validateRequests' which needs repetition types stored in test group in
'BuildbotSyncer.matchesConfiguration'.

  • tools/js/v3-models.js:
  • unit-tests/buildbot-syncer-tests.js: Added and updated unit tests.

(sampleiOSConfig):
(sampleiOSConfigWithExpansions):
(smallConfiguration):
(smallConfigurationWithCustomRepetitionTypes):
(createSampleBuildRequest):

  • unit-tests/measurement-set-analyzer-tests.js: Updated unit tests.
  • unit-tests/resources/mock-v3-models.js:

(MockModels.inject):

3:19 PM Changeset in webkit [285188] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WTF

[WTF] Minor clean-up for format-related functions
<https://webkit.org/b/232514>

Reviewed by Yusuke Suzuki.

  • wtf/Assertions.cpp:

(WTF::createWithFormatAndArguments):

  • Put WTF_ATTRIBUTE_PRINTF() on its own line to match other functions.

(WTF::vprintf_stderr_with_prefix):
(WTF::vprintf_stderr_with_trailing_newline):

  • Move ALLOW_NONLITERAL_FORMAT_{BEGIN,END} around specific function calls that need them.
3:09 PM Changeset in webkit [285187] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Fails to execute JavaScript when soft stack limit is unlimited
https://bugs.webkit.org/show_bug.cgi?id=232328

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-11-02
Reviewed by Yusuke Suzuki.

Fall back to assuming an 8 MB stack limit when the real limit is unlimited. JSC needs to
have some maximum stack size to work with, and this is as good as any.

  • wtf/StackBounds.cpp:

(WTF::StackBounds::currentThreadStackBoundsInternal):

2:52 PM Changeset in webkit [285186] by don.olmstead@sony.com
  • 20 edits in trunk/Source/WebCore

SVG elements should include SVGElementInlines not ElementInlines
https://bugs.webkit.org/show_bug.cgi?id=232637

Reviewed by Yusuke Suzuki.

Replace usages of ElementInlines.h with SVGElementInlines.h in WebCore/svg. Add
SVGElementInlines.h to files that need them when compiled without unified builds.

  • svg/SVGAElement.cpp:
  • svg/SVGAltGlyphElement.cpp:
  • svg/SVGAnimationElement.cpp:
  • svg/SVGFEImageElement.cpp:
  • svg/SVGFilterPrimitiveStandardAttributes.cpp:
  • svg/SVGFontFaceNameElement.cpp:
  • svg/SVGFontFaceUriElement.cpp:
  • svg/SVGHKernElement.cpp:
  • svg/SVGImageElement.cpp:
  • svg/SVGMaskElement.cpp:
  • svg/SVGPatternElement.cpp:
  • svg/SVGStyleElement.cpp:
  • svg/SVGTRefElement.cpp:
  • svg/SVGTSpanElement.cpp:
  • svg/SVGTextElement.cpp:
  • svg/SVGTextPathElement.cpp:
  • svg/SVGVKernElement.cpp:
  • svg/animation/SVGSMILElement.cpp:
  • svg/properties/SVGAttributeAnimator.cpp:
2:50 PM Changeset in webkit [285185] by don.olmstead@sony.com
  • 3 edits in trunk/Source/WebCore

[MSVC] Remove unused friend class in filter code
https://bugs.webkit.org/show_bug.cgi?id=232636

Reviewed by Yusuke Suzuki.

In r284857 the WTF prefix was removed from ParallelJobs in filter code. During a
non-unified build MSVC thinks that there is a WebCore::ParallelJobs due to a friend
declaration in filter code and fails to build. Remove the friend declaration as they are
not used.

  • platform/graphics/filters/FEGaussianBlur.h:
  • platform/graphics/filters/FETurbulence.h:
2:48 PM Changeset in webkit [285184] by pvollan@apple.com
  • 2 edits in trunk/Tools

REGRESSION (r268421): TestWebKitAPI.WebKit.PreferenceChanges* tests are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=221848
<rdar://problem/70966379>

Reviewed by Brent Fulgham.

After r268421, the preferences are set asynchronously in the WebContent process, which introduced this flakiness.
This patch addresses this by modifying the flaky tests to loop until the preference value is equal to the expected
value.

  • TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm:

(TEST):

2:25 PM Changeset in webkit [285183] by Kocsen Chung
  • 5 edits in branches/safari-612.3.3.1-branch/Source

Cherry-pick r283732. rdar://problem/84944569

Add feature flag for COOP / COEP violation reporting and turn off by default
https://bugs.webkit.org/show_bug.cgi?id=231371

Reviewed by Youenn Fablet.

Add feature flag for COOP / COEP violation reporting and turn off by default since our
implementation doesn't match the latest specification.

Source/WebCore:

  • loader/CrossOriginEmbedderPolicy.cpp: (WebCore::sendCOEPPolicyInheritenceViolation): (WebCore::sendCOEPCORPViolation):
  • loader/CrossOriginOpenerPolicy.cpp: (WebCore::sendViolationReportWhenNavigatingToCOOPResponse): (WebCore::sendViolationReportWhenNavigatingAwayFromCOOPResponse):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

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

2:24 PM Changeset in webkit [285182] by Kocsen Chung
  • 8 edits in branches/safari-612.3.3.1-branch/Source

Versioning.

WebKit-7612.3.3.1.1

2:20 PM Changeset in webkit [285181] by Kocsen Chung
  • 5 edits in branches/safari-612.3.3.0-branch/Source

Cherry-pick r283732. rdar://problem/84944569

Add feature flag for COOP / COEP violation reporting and turn off by default
https://bugs.webkit.org/show_bug.cgi?id=231371

Reviewed by Youenn Fablet.

Add feature flag for COOP / COEP violation reporting and turn off by default since our
implementation doesn't match the latest specification.

Source/WebCore:

  • loader/CrossOriginEmbedderPolicy.cpp: (WebCore::sendCOEPPolicyInheritenceViolation): (WebCore::sendCOEPCORPViolation):
  • loader/CrossOriginOpenerPolicy.cpp: (WebCore::sendViolationReportWhenNavigatingToCOOPResponse): (WebCore::sendViolationReportWhenNavigatingAwayFromCOOPResponse):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

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

2:08 PM Changeset in webkit [285180] by Kocsen Chung
  • 1 copy in branches/safari-612.3.3.1-branch

New branch.

1:44 PM Changeset in webkit [285179] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Crash under WebPage::sendCOEPCORPViolation()
https://bugs.webkit.org/show_bug.cgi?id=232631
<rdar://84919898>

Reviewed by Alex Christensen.

Add missing null checks for the frame after calling WebProcess::singleton().webFrame(frameID).

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::sendCOEPPolicyInheritenceViolation):
(WebKit::WebPage::sendCOEPCORPViolation):
(WebKit::WebPage::sendViolationReportWhenNavigatingToCOOPResponse):
(WebKit::WebPage::sendViolationReportWhenNavigatingAwayFromCOOPResponse):

12:57 PM Changeset in webkit [285178] by commit-queue@webkit.org
  • 27 edits
    7 adds in trunk

[JSC] Implement Temporal.Instant
https://bugs.webkit.org/show_bug.cgi?id=229826

Patch by Philip Chimento <pchimento@igalia.com> on 2021-11-02
Reviewed by Yusuke Suzuki.

JSTests:

  • stress/temporal-instant.js: Added.

(shouldBe):
(shouldNotBe):
(shouldThrow):
(instants.forEach):
(shouldThrow.new.Temporal.Instant):
(const.maxValue.new.Temporal.Instant):
(shouldBe.epoch.subtract):

  • test262/config.yaml: No need to ignore all Temporal.Instant tests anymore, only the ones for the unimplemented methods.

Source/JavaScriptCore:

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • runtime/ISO8601.cpp:

(JSC::ISO8601::parseInstant): Add a parsing function for Instant strings

reusing as much as possible from the other parsing functions.

(JSC::ISO8601::ExactTime::fromISOPartsAndOffset): Static method for

creating from ISO calendar components and UTC offset.

(JSC::ISO8601::checkedCastDoubleToInt128): Helper function for checking

whether a double can fit into an int128 without overflow.

(JSC::ISO8601::ExactTime::add const):
(JSC::ISO8601::ExactTime::round):
(JSC::ISO8601::ExactTime::difference const):
(JSC::ISO8601::ExactTime::round const):

  • runtime/ISO8601.h:

(JSC::ISO8601::ExactTime::ExactTime): Add an ExactTime type that wraps

an Int128 and can do the basic operations. This type can be reused in
Temporal.ZonedDateTime.

(JSC::ISO8601::ExactTime::fromEpochSeconds):
(JSC::ISO8601::ExactTime::fromEpochMilliseconds):
(JSC::ISO8601::ExactTime::fromEpochMicroseconds):
(JSC::ISO8601::ExactTime::epochSeconds const):
(JSC::ISO8601::ExactTime::epochMilliseconds const):
(JSC::ISO8601::ExactTime::epochMicroseconds const):
(JSC::ISO8601::ExactTime::epochNanoseconds const):
(JSC::ISO8601::ExactTime::nanosecondsFraction const):
(JSC::ISO8601::ExactTime::asString const):
(JSC::ISO8601::ExactTime::isValid const):
(JSC::ISO8601::ExactTime::operator< const):
(JSC::ISO8601::ExactTime::operator<= const):
(JSC::ISO8601::ExactTime::operator== const):
(JSC::ISO8601::ExactTime::operator!= const):
(JSC::ISO8601::ExactTime::operator>= const):
(JSC::ISO8601::ExactTime::operator> const):

  • runtime/IntlDateTimeFormat.h:
  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormat::handleDateTimeValue): Add a minimal

implementation of the HandleDateTimeValue abstract op from the
Temporal specification, only covering Temporal.Instant.

(JSC::JSC_DEFINE_HOST_FUNCTION): Use it in the existing

Intl.DateTimeFormat methods.

  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::createFrom): Add an overload that takes an Int128.

  • runtime/JSBigInt.h: Remove declaration for nonexistent toUint64Heap().
  • runtime/JSDateMath.cpp: Move timeToMS() into WTF.
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildrenImpl):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::instantStructure):

  • runtime/TemporalDuration.cpp:

(JSC::TemporalDuration::toLimitedDuration): Added.

  • runtime/TemporalDuration.h:
  • runtime/TemporalInstant.cpp: Added.

(JSC::TemporalInstant::createStructure):
(JSC::TemporalInstant::TemporalInstant):
(JSC::TemporalInstant::create):
(JSC::TemporalInstant::tryCreateIfValid):
(JSC::TemporalInstant::toInstant):
(JSC::TemporalInstant::from):
(JSC::TemporalInstant::fromEpochSeconds):
(JSC::TemporalInstant::fromEpochMilliseconds):
(JSC::TemporalInstant::fromEpochMicroseconds):
(JSC::TemporalInstant::fromEpochNanoseconds):
(JSC::TemporalInstant::compare):

  • runtime/TemporalInstant.h: Added.
  • runtime/TemporalInstantConstructor.cpp: Added.

(JSC::TemporalInstantConstructor::create):
(JSC::TemporalInstantConstructor::createStructure):
(JSC::TemporalInstantConstructor::TemporalInstantConstructor):
(JSC::TemporalInstantConstructor::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/TemporalInstantConstructor.h: Added.
  • runtime/TemporalInstantPrototype.cpp: Added.

(JSC::TemporalInstantPrototype::create):
(JSC::TemporalInstantPrototype::createStructure):
(JSC::TemporalInstantPrototype::TemporalInstantPrototype):
(JSC::TemporalInstantPrototype::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSC_DEFINE_CUSTOM_GETTER):

  • runtime/TemporalInstantPrototype.h: Added.
  • runtime/TemporalObject.cpp:

(JSC::createInstantConstructor): Added.
(JSC::formatSecondsStringPart): Added.
(JSC::abs): Added for clarity.
(JSC::roundNumberToIncrement): Add overload for Int128.

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

Source/WTF:

  • wtf/CheckedArithmetic.h: Don't use builtin operations if int128 is being emulated using WTF::Int128. Also work around Clang/Linux bug where builtin_mul_overflow() doesn't work on int128. See https://bugs.llvm.org/show_bug.cgi?id=16404
  • wtf/DateMath.h:

(WTF::timeToMS): Moved from JSDateMath.h.

12:42 PM Changeset in webkit [285177] by sihui_liu@apple.com
  • 6 edits in trunk/Source/WebKit

Terminate unresponsive network process by crashing it
https://bugs.webkit.org/show_bug.cgi?id=232603

Reviewed by Chris Dumez.

UI process currently kills network process when it does not respond message in some time (network process being
unresponsive). We've found one common case where network process becomes unresponsive is that it is blocked by
some slow operation on the main thread (like file operation in rdar://84511633). To understand what the
operations are and make a fix, we now ask network process to crash itself on IPC thread. In this way, we can get
crash report that includes the call stack of the main thread. To avoid generating too many crash reports, we
only send the crash message to network process when it becomes unresponsive multiple times in a short time
period.

  • Platform/IPC/Connection.cpp:

(IPC::terminateDueToIPCTerminateMessage):
(IPC::Connection::processIncomingMessage):

  • Scripts/webkit/model.py:
  • Scripts/webkit/tests/MessageNames.cpp:

(IPC::description):
(IPC::receiverName):
(IPC::isValidMessageName):

  • Scripts/webkit/tests/MessageNames.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::shouldTerminateNetworkProcessBySendingMessage):
(WebKit::NetworkProcessProxy::didBecomeUnresponsive):

12:38 PM Changeset in webkit [285176] by Russell Epstein
  • 8 edits in branches/safari-612.3.3.0-branch/Source

Versioning.

WebKit 7612.3.3.0.1

12:35 PM Changeset in webkit [285175] by Jonathan Bedard
  • 7 edits in trunk/Tools

[webkitscmpy] Reduce autoinstalls on import
https://bugs.webkit.org/show_bug.cgi?id=232574
<rdar://problem/84894275>

Reviewed by Stephanie Lewis.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Remove whichcraft (webkitcorepy registers it).
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: Remove unused webkitscmpy imports.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py: Remote unused webkitcorepy import.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py: Move whichcraft to function.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py: Move jinja2 to function.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py: Move fasteners, xmltodict import to functions.

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

12:31 PM Changeset in webkit [285174] by Russell Epstein
  • 5 edits in branches/safari-612-branch/Source

Cherry-pick r283732. rdar://problem/84349027

Add feature flag for COOP / COEP violation reporting and turn off by default
https://bugs.webkit.org/show_bug.cgi?id=231371

Reviewed by Youenn Fablet.

Add feature flag for COOP / COEP violation reporting and turn off by default since our
implementation doesn't match the latest specification.

Source/WebCore:

  • loader/CrossOriginEmbedderPolicy.cpp: (WebCore::sendCOEPPolicyInheritenceViolation): (WebCore::sendCOEPCORPViolation):
  • loader/CrossOriginOpenerPolicy.cpp: (WebCore::sendViolationReportWhenNavigatingToCOOPResponse): (WebCore::sendViolationReportWhenNavigatingAwayFromCOOPResponse):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

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

12:26 PM Changeset in webkit [285173] by Ross Kirsling
  • 3 edits in trunk/Source/JavaScriptCore

[JSC][LLInt] Reverse unintended effects of r285152
https://bugs.webkit.org/show_bug.cgi?id=232633

Reviewed by Saam Barati.

The previous patch was not intended to change the generated assembly whatsoever,
but it turns out that 3-argument syntax produces, e.g. vsub instead of sub on x86.

As such, this patch does away with the 3-arg cases and merely clarifies names as rhs, lhs across the board.

(Also: Fix a line from the previous patch where a macro was not referring to a passed label properly.)

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
12:20 PM Changeset in webkit [285172] by Russell Epstein
  • 1 copy in branches/safari-612.3.3.0-branch

New branch.

12:02 PM Changeset in webkit [285171] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Provide bidi properties when constructing TextRun
https://bugs.webkit.org/show_bug.cgi?id=232632

Reviewed by Alan Bujtas.

Enable correct painting of bidi text runs.

  • layout/integration/InlineIteratorBoxModernPath.h:

(WebCore::InlineIterator::BoxModernPath::createTextRun const):
(WebCore::InlineIterator::BoxModernPath::renderText const):
(WebCore::InlineIterator::BoxModernPath::direction const):

11:36 AM Changeset in webkit [285170] by Kate Cheney
  • 12 edits in trunk

PCM: Safari on iOS and macOS are not sending ad click attribution reports for Private Click Measurement
https://bugs.webkit.org/show_bug.cgi?id=228104
<rdar://problem/80991209>

Reviewed by John Wilander.

Source/WebCore:

No new tests. Several existing tests would timeout with the removal of
m_firePendingAttributionRequestsTimer.startOneShot(m_isRunningTest ? 0_s : seconds)
if the fix wasn't in place.

  • loader/PrivateClickMeasurement.cpp:

(WebCore::randomlyBetweenTwentyFourAndFortyEightHours):
(WebCore::PrivateClickMeasurement::attributeAndGetEarliestTimeToSend):

  • loader/PrivateClickMeasurement.h:

Source/WebKit:

firePendingAttributionRequests() was sometimes scheduling the next timer
fire to be the raw time value instead of the difference between now
and the scheduled send time. This was resulting in some reports not being
sent within the 24-48 hour range.

To test this, this patch removes the immediate timer fire for testing
and instead sets the earliest time to send values to both be 1 second.
This will test that the proper timer gets set to send both reports.

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp:

(WebKit::PCM::Database::attributePrivateClickMeasurement):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::startTimer):
(WebKit::PrivateClickMeasurementManager::attribute):
(WebKit::PrivateClickMeasurementManager::randomlyBetweenFifteenAndThirtyMinutes const):
(WebKit::PrivateClickMeasurementManager::firePendingAttributionRequests):
In the case of both times being past due to report, schedule one for
15 - 30 minutes later.

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManager.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementStore.cpp:

(WebKit::PCM::Store::attributePrivateClickMeasurement):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementStore.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:

(TestWebKitAPI::TEST):

11:34 AM Changeset in webkit [285169] by commit-queue@webkit.org
  • 22 edits in trunk

AX: WebKit needs to include NSAccessibilityChildrenInNavigationOrderAttribute in accessibilityAttributeNames
https://bugs.webkit.org/show_bug.cgi?id=232595

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-11-02
Reviewed by Andres Gonzalez.

This patch adds NSAccessibilityChildrenInNavigationOrderAttribute
(a.k.a. AXChildrenInNavigationOrder) to
WebAccessibilityObjectWrapperMac::accessibilityAttributeNames. The Mac
wrapper supported this attribute prior to this patch, but we didn't
advertise that we supported it because we didn't include it in our
exported attribute names.

Source/WebCore:

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

Add NSAccessibilityChildrenInNavigationOrderAttribute to list of base
supported attributes.

LayoutTests:

  • accessibility/image-link-expected.txt:
  • accessibility/image-map2-expected.txt:
  • accessibility/internal-link-anchors2-expected.txt:
  • accessibility/mac/aria-columnrowheaders-expected.txt:
  • accessibility/mac/bounds-for-range-expected.txt:
  • accessibility/mac/document-attributes-expected.txt:
  • accessibility/mac/document-links-expected.txt:
  • accessibility/mac/internal-link-anchors-expected.txt:
  • accessibility/math-multiscript-attributes-expected.txt:
  • accessibility/table-attributes-expected.txt:
  • accessibility/table-cell-spans-expected.txt:
  • accessibility/table-cells-expected.txt:
  • accessibility/table-detection-expected.txt:
  • accessibility/table-one-cell-expected.txt:
  • accessibility/table-sections-expected.txt:
  • accessibility/table-with-rules-expected.txt:
  • accessibility/transformed-element-expected.txt:
  • platform/mac/accessibility/lists-expected.txt:
  • platform/mac/accessibility/parent-delete-expected.txt:

Add expected AXChildrenInNavigationOrder attribute output.

10:50 AM Changeset in webkit [285168] by timothy_horton@apple.com
  • 8 edits in trunk/Tools

dumpAsText() tests don't get the ref-test treatment when using --self-compare-with-header
https://bugs.webkit.org/show_bug.cgi?id=232611

Reviewed by Jonathan Bedard.

One oversight in r285132: a test can disable pixel dumping by calling
dumpAsText(). This causes --self-compare-with-header to fall over because
it expects every test to have pixel results (and that is the whole point).

Add an un-overrideable --force-dump-pixels TestCommand argument,
and adopt it for self-comparison tests.

  • Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:

(SingleTestRunner._run_self_comparison_test):

  • Scripts/webkitpy/port/driver.py:

(DriverInput.init):
(DriverInput.repr):
(Driver._command_from_driver_input):

  • TestRunnerShared/TestCommand.cpp:

(WTR::parseInputLine):

  • TestRunnerShared/TestCommand.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::runTest):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::dumpResults):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

  • WebKitTestRunner/TestInvocation.h:
10:25 AM Changeset in webkit [285167] by sbarati@apple.com
  • 4 edits
    1 add in trunk

EnumeratorGetByVal for IndexedMode+OwnStructureMode doesn't always recover the property name
https://bugs.webkit.org/show_bug.cgi?id=231321
<rdar://problem/84211697>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/enumerator-get-by-val-needs-to-recover-property-name.js: Added.

Source/JavaScriptCore:

When running an EnumeratorGetByVal in IndexedMode+OwnStructureMode, we may
go to the slow path. However, we were incorrectly going to the slow path
before recovering the actual property name. Instead, we were passing in
the integer index value to the get by val.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileEnumeratorGetByVal):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

10:11 AM Changeset in webkit [285166] by Kate Cheney
  • 5 edits in trunk/LayoutTests

Followup fix to https://bugs.webkit.org/show_bug.cgi?id=231928

Unreviewed. Update test expectations now that we report HTTP status
code in console messages.

  • http/tests/app-privacy-report/app-attribution-preflight-async-expected.txt:
  • http/tests/app-privacy-report/app-attribution-preflight-sync-expected.txt:
  • http/tests/app-privacy-report/user-attribution-preflight-async-expected.txt:
  • http/tests/app-privacy-report/user-attribution-preflight-sync-expected.txt:
10:09 AM Changeset in webkit [285165] by Simon Fraser
  • 5 edits in trunk/Source/WebKit

Revert the wheel event coalescing added in r277587
https://bugs.webkit.org/show_bug.cgi?id=232602
<rdar://84908023>

Reviewed by Wenson Hsieh.

This wheel event coalescing was added to allow the tail end of momentum scrolls on
120Hz devices to fall back to 60fps for power reasons. However, the OS does this for
us, so we don't need to do our own coalescing.

  • Shared/WebWheelEventCoalescer.cpp:

(WebKit::WebWheelEventCoalescer::shouldDispatchEvent):
(WebKit::WebWheelEventCoalescer::isMomentumPhaseEvent): Deleted.

  • Shared/WebWheelEventCoalescer.h:

(WebKit::WebWheelEventCoalescer::shouldCoalesceEventsDuringDeceleration const): Deleted.
(WebKit::WebWheelEventCoalescer::setShouldCoalesceEventsDuringDeceleration): Deleted.
(): Deleted.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::wheelEventCoalescer):
(WebKit::WebPageProxy::windowScreenDidChange):
(WebKit::WebPageProxy::shouldCoalesceWheelEventsDuringDeceleration const): Deleted.

  • UIProcess/WebPageProxy.h:
10:01 AM Changeset in webkit [285164] by Patrick Angle
  • 7 edits in trunk/Source

WebDriver: [Cocoa] support acceptInsecureCerts capability
https://bugs.webkit.org/show_bug.cgi?id=231789

Reviewed by BJ Burg.

Add necessary plumbing to support the acceptInsecureCerts WebDriver capability.

Source/JavaScriptCore:

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

(Inspector::RemoteInspector::receivedAutomationSessionRequestMessage):

Source/WebKit:

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

(-[_WKAutomationSessionConfiguration init]):
(-[_WKAutomationSessionConfiguration copyWithZone:]):

  • UIProcess/Cocoa/AutomationClient.mm:

(WebKit::AutomationClient::requestAutomationSession):

9:37 AM Changeset in webkit [285163] by Kate Cheney
  • 7 edits in trunk

https://bugs.webkit.org/show_bug.cgi?id=232593
Remove isAppInitiated from _WKSessionState

Reviewed by Brent Fulgham.

Source/WebKit:

After https://bugs.webkit.org/show_bug.cgi?id=232486 we no longer need
the isAppInitiated value on _WKSessionState. It will be set
automatically when session state is retrieved.

No new tests. Confirmed by existing RestoreFromSessionState* API
tests.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _restoreSessionState:andNavigate:]):

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

(-[_WKSessionState _sessionStateWithAppInitiatedValue]): Deleted.

  • UIProcess/API/Cocoa/_WKSessionStateInternal.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm:
9:01 AM Changeset in webkit [285162] by Antti Koivisto
  • 7 edits in trunk/Source/WebCore

[LFC][Integration] Add support for IFC preferred width computation
https://bugs.webkit.org/show_bug.cgi?id=232621

Reviewed by Alan Bujtas.

The functionality is behind a #define and not enabled yet.

  • layout/formattingContexts/inline/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):

Return the cached value if it exists.

  • layout/formattingContexts/inline/InlineFormattingContext.h:
  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::computeIntrinsicWidthConstraints):

Interface with IFC.

  • layout/integration/LayoutIntegrationLineLayout.h:
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::computeAndSetLineLayoutPath):

Factor into a function.

(WebCore::RenderBlockFlow::layoutInlineChildren):
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
(WebCore::RenderBlockFlow::tryComputePreferredWidthsUsingModernPath):

Test if we the content can use the IFC preferred width computation. This way the
feature can be enabled incrementally.

  • rendering/RenderBlockFlow.h:
8:59 AM Changeset in webkit [285161] by Chris Lord
  • 9 edits in trunk/Source/WebCore

[GTK][WPE] Use the display refresh to drive scrolling animations (async scroll)
https://bugs.webkit.org/show_bug.cgi?id=232432

Reviewed by Simon Fraser.

Implement missing API in nicosia async scroll path to have scroll
animations driven by the display refresh instead of a 60Hz timer.

No new tests, covered by existing tests.

  • page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:

(WebCore::ScrollingCoordinatorNicosia::didCompleteRenderingUpdate):
(WebCore::ScrollingCoordinatorNicosia::hasNodeWithAnimatedScrollChanged):

  • page/scrolling/nicosia/ScrollingCoordinatorNicosia.h:
  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:

(WebCore::ScrollingTreeFrameScrollingNodeNicosia::serviceScrollAnimation):

  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h:
  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:

(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::serviceScrollAnimation):

  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h:
  • page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp:

(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::startAnimationCallback):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::stopAnimationCallback):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::serviceScrollAnimation):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::animationTimerFired): Deleted.

  • page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.h:
8:56 AM Changeset in webkit [285160] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Line should keep track of whether the content needs visual reordering
https://bugs.webkit.org/show_bug.cgi?id=232601

Reviewed by Antti Koivisto.

  • layout/formattingContexts/inline/InlineLine.cpp:

(WebCore::Layout::Line::initialize):
(WebCore::Layout::Line::append):

  • layout/formattingContexts/inline/InlineLine.h:

(WebCore::Layout::Line::contentNeedsBidiReordering const):

8:42 AM Changeset in webkit [285159] by Chris Dumez
  • 9 edits in trunk/Source

Use higher QoS for WheelEvent and DisplayWasRefreshed IPCs
https://bugs.webkit.org/show_bug.cgi?id=232458
<rdar://82657744>

Reviewed by Simon Fraser.

Source/WebKit:

Use higher QoS for WheelEvent and DisplayWasRefreshed IPCs since those are high priority. The
UIProcess's main thread has high UserInteractive QoS but the IPC thread has a lower QoS by default.

We cannot raise the QoS of the IPC thread without regressing some performance benchmarks since not
all IPC is high priority.

Making this change helps with responsiveness under heavy load scenarios.

  • Platform/IPC/Connection.cpp:

(IPC::Connection::sendMessage):

  • Platform/IPC/Connection.h:

(IPC::Connection::send):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::sendWheelEvent):

  • UIProcess/mac/DisplayLink.cpp:

(WebKit::DisplayLink::notifyObserversDisplayWasRefreshed):

Source/WTF:

Add dispatchWithQOS() function to WorkQueue to dispatch a task with a given QoS.

  • wtf/WorkQueue.cpp:

(WTF::WorkQueueBase::dispatchWithQOS):

  • wtf/WorkQueue.h:
  • wtf/cocoa/WorkQueueCocoa.cpp:

(WTF::WorkQueueBase::dispatchWithQOS):

8:11 AM Changeset in webkit [285158] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitscmpy] Generalize pull-request title generation.
https://bugs.webkit.org/show_bug.cgi?id=232463
<rdar://problem/84784354>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:

(PullRequest.title_for): Compute pull-request title for a set of commits.
(PullRequest.main): Generalize pull-request title generation.

7:56 AM Changeset in webkit [285157] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Pass in the visual order list to display box construction
https://bugs.webkit.org/show_bug.cgi?id=232600

Reviewed by Antti Koivisto.

In this patch we compute the visual order for the bidi runs if needed. This visual order is then passed
in to the display box builder so that the final display boxes are constructed in the right order (horizontal positions are not yet adjusted).

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineContent):

  • layout/formattingContexts/inline/InlineLine.h:

(WebCore::Layout::Line::contentNeedsBidiReordering const):

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::layoutInlineContent):

  • layout/formattingContexts/inline/InlineLineBuilder.h:
6:56 AM Changeset in webkit [285156] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Use the isLineSpanningInlineBoxStart line run type to update spanning inline box geometry
https://bugs.webkit.org/show_bug.cgi?id=232578

Reviewed by Antti Koivisto.

Now that we have dedicated LineSpanningInlineBoxStart line run type, let's use it to update the associated inline box geometry.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::build):
(WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineContent): Move the update logic over here from the createBoxesAndUpdateGeometryForLineSpanningInlineBoxes loop.
(WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineSpanningInlineBoxes): Deleted.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.h:
1:47 AM Changeset in webkit [285155] by commit-queue@webkit.org
  • 19 edits
    4 adds in trunk

[GTK][WPE] Support setting status code and getting HTTP method in custom URI scheme handlers
https://bugs.webkit.org/show_bug.cgi?id=231880

Patch by Zixing Liu <liushuyu011@gmail.com> on 2021-11-02
Reviewed by Carlos Garcia Campos.

Source/WebKit:

  • SourcesGTK.txt: Added WebKitURISchemeResponse.cpp
  • SourcesWPE.txt: Added WebKitURISchemeResponse.cpp
  • UIProcess/API/glib/WebKitURISchemeRequest.cpp:

(webkit_uri_scheme_request_get_http_method): Added new API function
(webkit_uri_request_finish_with_response): Added new API function

  • UIProcess/API/glib/WebKitURISchemeRequestPrivate.h: Added.
  • UIProcess/API/glib/WebKitURISchemeResponse.cpp: Added.

(webkit_uri_scheme_response_class_init): Added init function for the new type
(webkit_uri_scheme_response_new): Added new API function
(webkit_uri_scheme_response_set_status): Added new API function
(webkit_uri_scheme_response_set_content_type): Added new API function

  • UIProcess/API/glib/WebKitURISchemeResponsePrivate.h: Copied from Source/WebKit/UIProcess/API/glib/WebKitURISchemeRequestPrivate.h.
  • UIProcess/API/gtk/WebKitAutocleanups.h: Register clean-up function for WebkitURISchemeResponse
  • UIProcess/API/gtk/WebKitURISchemeRequest.h: Added function prototype for

webkit_uri_scheme_request_get_http_method

  • UIProcess/API/gtk/WebKitURISchemeResponse.h: Added.
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Added new symbols and new types
  • UIProcess/API/gtk/webkit2.h: Include a new header: WebKitURISchemeResponse.h
  • UIProcess/API/wpe/WebKitURISchemeRequest.h: Added function prototype for

webkit_uri_scheme_request_get_http_method

  • UIProcess/API/gtk/WebKitURISchemeResponse.h: Added.
  • UIProcess/API/wpe/webkit.h: Include a new header: WebKitURISchemeResponse.h
  • UIProcess/API/wpe/docs/wpe-1.0-sections.txt: Added new symbols and new types

Tools:

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:

(testWebContextURIScheme): Added tests to test new public APIs for WebKitGtk

Note: See TracTimeline for information about the timeline view.