Timeline



Aug 4, 2021:

8:31 PM Changeset in webkit [280680] by Wenson Hsieh
  • 3 edits in trunk/LayoutTests

Adjust editing/deleting/ios/backspace-last-character.html to check that pressing backspace deletes one character
https://bugs.webkit.org/show_bug.cgi?id=228806

Reviewed by Tim Horton.

Add test coverage for r280671 by augmenting an existing iOS editing test to verify that hitting backspace only
deletes a single character in a textarea.

  • editing/deleting/ios/backspace-last-character-expected.txt:
  • editing/deleting/ios/backspace-last-character.html:
8:15 PM Changeset in webkit [280679] by Diego Pino Garcia
  • 23 edits
    9 adds in trunk/LayoutTests

[WPE] Unreviewed test gardening. Update baselines after r280672.

  • platform/glib/fast/selectors/unqualified-hover-strict-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
  • platform/glib/media/video-playing-and-pause-expected.png:
  • platform/glib/media/video-playing-and-pause-expected.txt:
  • platform/glib/tables/mozilla/core/col_span-expected.txt:
  • platform/wpe/fast/selectors/unqualified-hover-strict-expected.png: Added.
  • platform/wpe/fast/text/text-letter-spacing-expected.png: Added.
  • platform/wpe/fast/text/text-letter-spacing-expected.txt:
  • platform/wpe/fast/text/wbr-expected.png: Added.
  • platform/wpe/fast/text/wbr-expected.txt:
  • platform/wpe/fast/text/whitespace/span-in-word-space-causes-overflow-expected.png: Added.
  • platform/wpe/fast/text/whitespace/span-in-word-space-causes-overflow-expected.txt:
  • platform/wpe/fast/text/word-break-expected.txt:
  • platform/wpe/http/wpt/webxr/xrSession_end_device_reports_shutdown.https-expected.txt:
  • platform/wpe/http/wpt/webxr/xrSession_ended_by_system.https-expected.txt:
  • platform/wpe/http/wpt/webxr/xrSession_reject_multiple_end.https-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/css-color-adjust/inheritance-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/mediaqueries/test_media_queries-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/webxr/render_state_vertical_fov_inline.https-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrFrame_lifetime.https-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrPose_transform_sameObject.https-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrStationaryReferenceSpace_floorlevel_updates.https-expected.txt:
  • platform/wpe/tables/mozilla/core/col_span-expected.png: Added.
  • platform/wpe/tables/mozilla/marvin/x_col_width_rel-expected.png: Added.
  • platform/wpe/tables/mozilla/marvin/x_col_width_rel-expected.txt:
  • platform/wpe/tables/mozilla/marvin/x_colgroup_width_rel-expected.png: Added.
  • platform/wpe/tables/mozilla/marvin/x_colgroup_width_rel-expected.txt:
  • platform/wpe/tables/mozilla/other/ms-expected.txt:
7:53 PM Changeset in webkit [280678] by commit-queue@webkit.org
  • 7 edits in trunk/LayoutTests

LayoutTests/imported/w3c:
Update some WPT baselines after recent improvements.
https://bugs.webkit.org/show_bug.cgi?id=228804

Unreviewed test gardening. Update baseline after r279978.
This test is already marked as flaky on mac and iOS.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-08-04

  • web-platform-tests/html/semantics/embedded-content/media-elements/error-codes/error-expected.txt:

LayoutTests:
[GLIB] Update some WPT baselines after recent improvements.
https://bugs.webkit.org/show_bug.cgi?id=228804

Update WPT test baselines after r279971, r279978, r279979, and r280310
to account for more passing tests.
Unreviewed test gardening.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-08-04

  • platform/glib/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
7:52 PM Changeset in webkit [280677] by Darin Adler
  • 3 edits in trunk/Source/WebCore

Change WebSocket.cpp to @no-unify, since it’s hard to do that for someone without a Mac
https://bugs.webkit.org/show_bug.cgi?id=228808

Reviewed by Anders Carlsson.

  • Sources.txt: Add @no-unify.
  • WebCore.xcodeproj/project.pbxproj: Add WebSocket.cpp to the WebCore target.
7:46 PM Changeset in webkit [280676] by Devin Rousso
  • 3 edits in trunk/Source/WebCore

REGRESSION (r280374): ASSERTION FAILED: Completion handler should not be called more than once under WebCore::MediaControlsContextMenuProvider::contextMenuItemSelected
https://bugs.webkit.org/show_bug.cgi?id=228725
<rdar://problem/81437221>

Reviewed by Eric Carlson.

The contextmenu system used by (modern) media controls are a bit wonky in that it has to
support both macOS and iOS, which use wildly different mechanisms. The former has distinct
methods for handling when a contextmenu item is selected vs when the menu is dismissed (at
least as of r280374). The latter has a single method that handles both. Additionally, the
(modern) media controls JS expects the following from showMediaControlsContextMenu:

  1. showMediaControlsContextMenu will only return true if the contextmenu will be shown
  2. the callback provided to showMediaControlsContextMenu will always/only be invoked when the contextmenu is dismissed (regardless of whether an item is selected)
  3. if an item is selected, the logic for that will be handled by the MediaControlsHost

This patch primarily addresses #2, but also slightly adjusts the code to fix #1. It does #1
by moving the call that saves the callback further down. On iOS, #2 already works. On macOS,
it does #2 by changing from CompletionHandler to Function, allowing it to be called more
than once, with the understanding that the JS callback will not be invoked more than once.
This way, macOS can match the behavior of iOS by eagerly invoking the JS callback when a
contextmenu item is selected without waiting for the menu to actually dismiss, while still
handling the contextmenu being dismissed without an item being selected (and also not having
to worry about whether the CompletionHandler has already been invoked).

  • Modules/mediacontrols/MediaControlsHost.h:
  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsContextMenuProvider::create):
(WebCore::MediaControlsContextMenuProvider::MediaControlsContextMenuProvider):
(WebCore::MediaControlsContextMenuProvider::didDismissContextMenu):
(WebCore::MediaControlsContextMenuProvider::contextMenuCleared):
(WebCore::MediaControlsHost::showMediaControlsContextMenu):

7:15 PM Changeset in webkit [280675] by Alan Coon
  • 1 copy in tags/Safari-612.1.26.1.3

Tag Safari-612.1.26.1.3.

7:05 PM Changeset in webkit [280674] by Alan Coon
  • 8 edits in branches/safari-612.1.26.1-branch/Source

Versioning.

WebKit-7612.1.26.1.3

6:32 PM Changeset in webkit [280673] by Alan Coon
  • 1 copy in tags/Safari-612.1.26.1.2

Tag Safari-612.1.26.1.2.

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

Bifurcated RemoteLayerBackingStore zooms in every time it repaints
https://bugs.webkit.org/show_bug.cgi?id=228798

Reviewed by Sam Weinig.

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::display):
If applying the scale/flip workaround manually, we need to save the
GraphicsContext state, or it leaks between paints.

4:53 PM Changeset in webkit [280671] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

REGRESSION (r280492): Clicking backspace on sign in fields results in deleting two characters instead of one.
https://bugs.webkit.org/show_bug.cgi?id=228802

Patch by Dana Estra <destra@apple.com> on 2021-08-04
Reviewed by Tim Horton.

No tests yet.

  • page/EventHandler.cpp:

(WebCore::EventHandler::defaultKeyboardEventHandler):

4:47 PM Changeset in webkit [280670] by Jean-Yves Avenard
  • 5 edits in trunk/Source/WebKit

Use Observer in place of VideoFullscreenManagerProxyClient
https://bugs.webkit.org/show_bug.cgi?id=228761
rdar://problem/81489026

Reviewed by Jer Noble.

Use an Observer member rather than creating a child class that would be used
when the PiP state change. This prevents having to deal with lifetime and
potentially setting it up multiple times.
No change in observable behaviour, covered with existing tests.

  • UIProcess/Cocoa/VideoFullscreenManagerProxy.h: Remove VideoFullscreenManagerProxyClient

class. Use WeakHashSet to store observers.

  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:

(WebKit::VideoFullscreenManagerProxy::addVideoInPictureInPictureDidChangeObserver):
Method added, replace older setClient
(WebKit::VideoFullscreenManagerProxy::hasVideoInPictureInPictureDidChange):
Iterate over all observers and call accordingly.

  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:

(-[WKFullScreenWindowController initWithWebView:]): Remove no longer necessary
code.
(-[WKFullScreenWindowController dealloc]): Remove no longer necessary
code.
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
set PiP change observer if none already exists.

  • UIProcess/mac/WKFullScreenWindowController.mm:

(-[WKFullScreenWindowController initWithWindow:webView:page:]): Remove no longer necessary
code.
(-[WKFullScreenWindowController dealloc]): Remove no longer necessary
code.
(-[WKFullScreenWindowController clearVideoFullscreenManagerObserver]):
(-[WKFullScreenWindowController setVideoFullscreenManagerObserver]):
(-[WKFullScreenWindowController didExitPictureInPicture]):
(-[WKFullScreenWindowController windowDidEnterFullScreen:]):
(-[WKFullScreenWindowController windowDidFailToExitFullScreen:]):
(-[WKFullScreenWindowController windowDidExitFullScreen:]):

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

RemoteLayerBackingStore: Adopt a new bifurcated layer switch
https://bugs.webkit.org/show_bug.cgi?id=228800
<rdar://problem/81534641>

Reviewed by Sam Weinig.

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
Let CA know that we're going to hand it both a display list and
backing store ahead of time by setting a new bit.

3:53 PM Changeset in webkit [280668] by fpizlo@apple.com
  • 4 edits in trunk/Source/bmalloc

[libpas] medium size class lookup needs to correctly fence the counting lock read path
https://bugs.webkit.org/show_bug.cgi?id=228799

Reviewed by Tadeu Zagallo.

The medium size class lookup does a binary search on a data structure that may mutate; we
catch that using a counting lock. But the algorithm wasn't fencing the tail end; it's supposed
to reread the count at the end but that read was not fenced.

This adds the fencing using pas_depend. I confirmed that the disassembly does the right thing.
It adds very little code.

Also rebased a test. Libpas tests are very specific about memory usage in some cases, and so
sometimes you will encounter a test run that requires limits to be adjusted. This happens
because some tests can sometimes create very complex heap layouts that really do use more
memory than we asserted, but the assertion had always worked because the test never ran with
the "wrong" kind of layout. This fixes a one-off test failure I saw when debugging this fix.

  • libpas/src/libpas/pas_mutation_count.h:

(pas_mutation_count_matches_with_dependency):
(pas_mutation_count_matches): Deleted.

  • libpas/src/libpas/pas_segregated_heap.c:

(medium_directory_tuple_for_index_impl):
(medium_directory_tuple_for_index_with_lock):
(pas_segregated_heap_medium_directory_tuple_for_index):

  • libpas/src/test/ThingyAndUtilityHeapAllocationTests.cpp:

(std::addLargeHeapTests):

3:24 PM Changeset in webkit [280667] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ MacOS wk1 Release ] media/video-page-visibility-restriction.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=228801

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
3:10 PM Changeset in webkit [280666] by Robert Jenner
  • 2 edits in trunk/LayoutTests

REGRESSION: [ BigSur wk2 rosetta ] compositing/contents-scale/hidpi-compositing-layer-positioned-on-scaled-context.html is a flaky failure
<rdar://68957822>

Uneviewed test expectation removal.

  • platform/mac/TestExpectationsRosetta:
2:54 PM Changeset in webkit [280665] by Alan Coon
  • 8 edits in branches/safari-612.1.26.1-branch/Source

Versioning.

WebKit-7612.1.26.1.2

2:36 PM Changeset in webkit [280664] by Peng Liu
  • 18 edits in trunk

[Catalina][GPUP] Some API tests fail after GPU Process features are enabled
https://bugs.webkit.org/show_bug.cgi?id=228589

Reviewed by Jer Noble.

Source/WebCore:

When "Media in GPU Process" is enabled, AudioSession[IOS|Mac] runs in
the GPU process. HTMLMediaElement, which is an observer of audio session,
runs in a WebContent process. It cannot get its AudioSession's configuration
directly. We need a mechanism to "push" the latest audio session configuration
from the GPU process to the WebContent process.

This patch replaces the MutedStateObserver with an audio session configuration
change observer interface, so that an audio session will notify its observers
after changing its configurations, including buffer size, muted state, sample rate.
Currently, this observer interface is used on macOS only.

No new tests. Fix an API test failure.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::initializeMediaSession):
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::hardwareMutedStateDidChange):

  • html/HTMLMediaElement.h:
  • platform/audio/AudioSession.cpp:

(WebCore::AudioSession::addConfigurationChangeObserver):
(WebCore::AudioSession::removeConfigurationChangeObserver):

  • platform/audio/AudioSession.h:
  • platform/audio/ios/AudioSessionIOS.h:

Move m_interruptionObservers to this class because only AudioSessionIOS
supports interruption observers.

  • platform/audio/mac/AudioSessionMac.h:
  • platform/audio/mac/AudioSessionMac.mm:

(WebCore::AudioSessionMac::handleSampleRateChange):
(WebCore::AudioSessionMac::handleSampleRateChange const):
(WebCore::AudioSessionMac::handleBufferSizeChange):
(WebCore::AudioSessionMac::handleBufferSizeChange const):
(WebCore::AudioSessionMac::sampleRate const):
(WebCore::AudioSessionMac::setPreferredBufferSize):
(WebCore::AudioSessionMac::handleMutedStateChange):
(WebCore::AudioSessionMac::addConfigurationChangeObserver):
(WebCore::AudioSessionMac::removeConfigurationChangeObserver):
(WebCore::AudioSessionMac::addMutedStateObserver): Deleted.
(WebCore::AudioSessionMac::removeMutedStateObserver): Deleted.

Source/WebKit:

When an audio session's configuration changes, let RemoteAudioSessionProxy
in the GPU process send the latest audio session configuration to RemoteAudioSession
in the WebContent process through an IPC message (RemoteAudioSession::ConfigurationChanged).

  • GPUProcess/media/RemoteAudioSessionProxy.cpp:

(WebKit::RemoteAudioSessionProxy::configurationChanged):

  • GPUProcess/media/RemoteAudioSessionProxy.h:
  • GPUProcess/media/RemoteAudioSessionProxyManager.cpp:

(WebKit::RemoteAudioSessionProxyManager::RemoteAudioSessionProxyManager):
(WebKit::RemoteAudioSessionProxyManager::~RemoteAudioSessionProxyManager):
(WebKit::RemoteAudioSessionProxyManager::beginAudioSessionInterruption):
(WebKit::RemoteAudioSessionProxyManager::endAudioSessionInterruption):
(WebKit::RemoteAudioSessionProxyManager::hardwareMutedStateDidChange):
(WebKit::RemoteAudioSessionProxyManager::bufferSizeDidChange):
(WebKit::RemoteAudioSessionProxyManager::sampleRateDidChange):
(WebKit::RemoteAudioSessionProxyManager::configurationDidChange):

  • GPUProcess/media/RemoteAudioSessionProxyManager.h:
  • WebProcess/GPU/media/RemoteAudioSession.cpp:

(WebKit::RemoteAudioSession::addConfigurationChangeObserver):
(WebKit::RemoteAudioSession::removeConfigurationChangeObserver):
(WebKit::RemoteAudioSession::configurationChanged):

  • WebProcess/GPU/media/RemoteAudioSession.h:
  • WebProcess/GPU/media/RemoteAudioSession.messages.in:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/AudioBufferSize.mm:

(TestWebKitAPI::TEST):

2:29 PM Changeset in webkit [280663] by Jonathan Bedard
  • 5 edits in trunk/Tools

[check-github-mirror-integrity] Store remote cache in checkout
https://bugs.webkit.org/show_bug.cgi?id=228792
<rdar://problem/81527357>

Reviewed by Aakash Jain.

  • Scripts/check-github-mirror-integrity: Use the local checkout to store the svn.webkit.org, if possible.
  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py:

(Svn.init): Allow caller to define cache path.
(Svn._cache_path): Deleted.

2:22 PM Changeset in webkit [280662] by Russell Epstein
  • 8 edits in branches/safari-612.1.27.0-branch/Source

Versioning.

WebKit-7612.1.27.0.1

2:19 PM Changeset in webkit [280661] by Russell Epstein
  • 1 copy in branches/safari-612.1.27.2-branch

New branch.

2:18 PM Changeset in webkit [280660] by Russell Epstein
  • 1 copy in branches/safari-612.1.27.3-branch

New branch.

2:17 PM Changeset in webkit [280659] by Yijia Huang
  • 2 edits in trunk/Source/JavaScriptCore

[ARM64] Fix Zoom black screen during video meeting on Safari
https://bugs.webkit.org/show_bug.cgi?id=228776

Reviewed by Saam Barati.

The problem (rdar://81434487) reports that Zoom turns to a black screen during the video
meeting on Safari. The reproduction of this problem is verified and bisected to the previous patch
(https://bugs.webkit.org/show_bug.cgi?id=228057). Previously, we introduce a pattern
matching for instruction EON-with-shift on ARM64, where the pattern is d = n ((m ShiftType amount) -1).

x = m ShiftType amount
y = x -1
z = n
y

We check canBeInternal() on x but not on y based on the computing cost analysis in that patch,
which is totally wrong. If the pattern matching is triggered, then the compiler would not emit
the corresponding Air of x after lowering, leading to data corruption or system crash since y
depends on x.

In the real world example (Zoom video meeting), we find the B3 IR:

...
Int32 b@528 = SShr(b@526, $31(b@527), Wasm: {opcode: I32ShrS, location: 0x26b})
Int32 b@529 = BitXor(b@528, $-1(b@144), Wasm: {opcode: I32Xor, location: 0x26e})
...
Int32 b@551 = BitXor(b@446, b@529, Wasm: {opcode: I32Xor, location: 0x28e})
...

After Lowering to Air:

...
Not32 %fp, %x2, b@529
...
XorNotRightShift32 %tmp199, %tmp211, $31, %tmp209, b@551
...

Since the implementation of the previous patch does commitInternal() on b@528, the operand of
b@529 turns to a frame pointer. To resolve this problem, we should either check canBeInternal()
on both b@528 and b@529 or not at all.

  • b3/B3LowerToAir.cpp:
2:06 PM Changeset in webkit [280658] by Russell Epstein
  • 1 copy in branches/safari-612.1.27.0-branch

New branch.

2:03 PM Changeset in webkit [280657] by Russell Epstein
  • 1 copy in tags/Safari-612.1.27

Tag Safari-612.1.27.

1:54 PM Changeset in webkit [280656] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ MacOS ] webaudio/silent-audio-interrupted-in-background.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=228796

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
1:44 PM Changeset in webkit [280655] by Jonathan Bedard
  • 2 edits in trunk/Tools

[check-github-mirror-integrity] Compare current time to canonical time
https://bugs.webkit.org/show_bug.cgi?id=228787
<rdar://problem/81524499>

Reviewed by Aakash Jain.

  • Scripts/check-github-mirror-integrity: If the mirror isn't in line with the canonical repository, we should

check against the current time, not the time of last commit on the mirror.

1:28 PM Changeset in webkit [280654] by magomez@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK][WPE] Elliptic radial gradients are not working
https://bugs.webkit.org/show_bug.cgi?id=228771

Reviewed by Žan Doberšek.

Transform the radial circular gradients using the aspect ratio to convert
them into the appropriate elliptic gradients.

  • platform/graphics/cairo/GradientCairo.cpp:

(WebCore::Gradient::createPattern):

1:20 PM Changeset in webkit [280653] by Simon Fraser
  • 2 edits in trunk/Source/WebKit

Crash in DisplayLink::notifyObserversDisplayWasRefreshed() on macOS
https://bugs.webkit.org/show_bug.cgi?id=228790
<rdar://81338621>

Reviewed by Tim Horton.

Defend against DisplayLink::nominalFramesPerSecondFromDisplayLink() returning zero,
which can result in a later divide by zero in m_currentUpdate.nextUpdate().

  • UIProcess/mac/DisplayLink.cpp:

(WebKit::DisplayLink::nominalFramesPerSecondFromDisplayLink):

12:43 PM Changeset in webkit [280652] by Said Abou-Hallawa
  • 2 edits in trunk/Source/WebKit

[GPUProcess] REGRESSION: A noticeable slow down when browsing Live Photos album on iCloud.com
https://bugs.webkit.org/show_bug.cgi?id=228673
<rdar://81353138>

Reviewed by Wenson Hsieh.

RemoteImageBufferProxy::flushDrawingContext() assumes a FlushContext item
is always appended to its DisplayList when it calls flushDrawingContextAsync()
and this is why it waits up to 3 seconds for the DidFlush message. But this
does not happen if the DisplayList of RemoteImageBufferProxy is empty.

In addition to checking whether the DisplayList is empty, we can check also
whether we do not have pending a FlushContext item before appending a new
one.

  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
12:37 PM Changeset in webkit [280651] by mmaxfield@apple.com
  • 5 edits
    2 adds in trunk

[Cocoa] Tweak the formatting for passing NSArrays to TextStreams
https://bugs.webkit.org/show_bug.cgi?id=228766

Reviewed by Simon Fraser.

Source/WTF:

Instead of using -[NSArray description], which puts its output on multiple lines,
instead use the same formatting as WTF::Vector, which puts its output on a single line.

We can also use this opportunity to tweak the implementation of operator<<(id) to
allow it to be called with Core Foundation types in raw C++ code.

  • wtf/text/TextStream.h:
  • wtf/text/cocoa/TextStreamCocoa.mm:

(WTF::TextStream::operator<<):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/cocoa/TextStreamCocoa.cpp: Added.

(TEST):

  • TestWebKitAPI/Tests/WTF/cocoa/TextStreamCocoa.mm: Added.

(TEST):

12:24 PM Changeset in webkit [280650] by commit-queue@webkit.org
  • 6 edits in trunk/Source/JavaScriptCore

Unreviewed, reverting r280609.
https://bugs.webkit.org/show_bug.cgi?id=228791

Broke JSC tests on iOS.

Reverted changeset:

"[ARM64] Use link register instead of pinning a register for
materializing big load constants"
https://bugs.webkit.org/show_bug.cgi?id=228710
https://commits.webkit.org/r280609

11:59 AM Changeset in webkit [280649] by Chris Dumez
  • 4 edits in trunk/LayoutTests

REGRESSION (r280541): [ BigSur Debug ] accessibility/roles-computedRoleString.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=228744
<rdar://problem/81472432>

Unreviewed, the test's JS was getting in some sort of infinite loop. Tweak the code a bit
so that it keeps running without infinite looping.

  • accessibility/roles-computedRoleString.html:
  • platform/mac/TestExpectations:
  • platform/mac/accessibility/roles-computedRoleString-expected.txt:
11:55 AM Changeset in webkit [280648] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

REGRESSION(?): subtitle text sizing is sometimes inconsistent
https://bugs.webkit.org/show_bug.cgi?id=228786
<rdar://problem/80525509>

Reviewed by Eric Carlson.

Tested manually. I'm still not 100% sure of the root cause of this, but after talking with
some folks more familiar with WebKit's media "stack" it seems like this only happens with
in-band non-VTT subtitle tracks that have their own styling. The fix is also pretty obvious.

  • html/track/TextTrackCueGeneric.cpp:

(WebCore::TextTrackCueGeneric::setFontSize):
We should still pass along the new font size (and bool important) even if we don't have a
display tree yet, as the font size (and bool important) are used when the display tree is
created, meaning that we shouldn't have to wait for another setFontSize call after the
display tree is created in order to update the font size.

11:44 AM Changeset in webkit [280647] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

[iOS 15] "Look Up" action is sometimes missing after force pressing images
https://bugs.webkit.org/show_bug.cgi?id=228774
rdar://78040734

Reviewed by Devin Rousso.

On iOS devices that support both 3D Touch and Visual Look Up (i.e., iPhone XS and iPhone XS Max), it's currently
possible to skip the image analysis preflight gesture entirely when showing the context menu over images in the
case where the user triggers the interaction by exceeding the force press threshold in under 100 ms (the current
delay of the image analysis long press gesture).

Mitigate this by teaching WKImageAnalysisGestureRecognizer to trigger image analysis preflight slightly ahead of
the context menu interaction when performing a force press by transitioning to Began state early under
-touchesBegan:withEvent: and -touchesMoved:withEvent:, if the touch's force exceeds a certain (relatively
low) threshold.

  • UIProcess/ios/WKImageAnalysisGestureRecognizer.mm:

(-[WKImageAnalysisGestureRecognizer touchesBegan:withEvent:]):
(-[WKImageAnalysisGestureRecognizer touchesMoved:withEvent:]):
(-[WKImageAnalysisGestureRecognizer beginAfterExceedingForceThresholdIfNeeded:]):

11:39 AM Changeset in webkit [280646] by commit-queue@webkit.org
  • 9 edits
    3 adds in trunk

Unreviewed, reverting r280630.
https://bugs.webkit.org/show_bug.cgi?id=228788

broke some downstream tests

Reverted changeset:

"fast/canvas/canvas-crash.html doesn't test what it intends to
on iOS"
https://bugs.webkit.org/show_bug.cgi?id=228747
https://commits.webkit.org/r280630

11:29 AM Changeset in webkit [280645] by commit-queue@webkit.org
  • 7 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening, update baselines after r280017
https://bugs.webkit.org/show_bug.cgi?id=228783

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-08-04

  • platform/glib/fast/multicol/client-rects-expected.txt:
  • platform/glib/fast/multicol/client-rects-spanners-complex-expected.txt:
  • platform/glib/fast/multicol/client-rects-spanners-expected.txt:
  • platform/glib/fast/multicol/newmulticol/client-rects-expected.txt:
  • platform/gtk/fast/multicol/client-rects-expected.png:
  • platform/gtk/fast/multicol/newmulticol/client-rects-expected.png:
11:28 AM Changeset in webkit [280644] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Update message filters
https://bugs.webkit.org/show_bug.cgi?id=228773
<rdar://problem/81514311>

Reviewed by Brent Fulgham.

Update message filters with enforcement on macOS based on telemetry.

  • WebProcess/com.apple.WebProcess.sb.in:
11:02 AM Changeset in webkit [280643] by Antti Koivisto
  • 3 edits in trunk/Source/WebCore

Use fast malloc for RuleData vectors
https://bugs.webkit.org/show_bug.cgi?id=228770

Reviewed by Chris Dumez.

Revert the change that enabled probabilistic guard malloc as it is not needed anymore.

  • style/RuleFeature.h:
  • style/RuleSet.h:
11:01 AM Changeset in webkit [280642] by Russell Epstein
  • 10 edits
    2 deletes in branches/safari-612.1-branch/Source/WebCore

Revert r280492. rdar://problem/81522050

11:01 AM Changeset in webkit [280641] by Russell Epstein
  • 2 edits in branches/safari-612.1-branch/Source/WebCore

Revert r280501. rdar://problem/81522050

10:58 AM Changeset in webkit [280640] by Jonathan Bedard
  • 7 edits
    1 copy
    2 adds in trunk/Tools

[webkitcorepy] Add shared terminal input code
https://bugs.webkit.org/show_bug.cgi?id=226024
<rdar://problem/78261645>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitcorepy/setup.py: Bump version.
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Export Terminal object, bump version.
  • Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py:

(credentials): Use Terminal.input.

  • Scripts/libraries/webkitcorepy/webkitcorepy/mocks/init.py:
  • Scripts/libraries/webkitcorepy/webkitcorepy/mocks/terminal.py: Added.

(Terminal):
(Terminal.input): Mocking input and raw_input requires so specialized knowledge,
so we should generalize it.

  • Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py: Added.

(Terminal):
(Terminal.input): Python 2/3 compatible input function.
(Terminal.choose): Generic multiple-choice input prompt.

  • Scripts/libraries/webkitcorepy/webkitcorepy/tests/terminal_unittest.py: Added.

(TerminalTests):
(TerminalTests.test_choose_basic):
(TerminalTests.test_choose_strict):
(TerminalTests.test_choose_default):
(TerminalTests.test_choose_triple):
(TerminalTests.test_choose_number):

  • Scripts/webkitpy/common/system/user.py:

(User.prompt): Use Terminal.input.
(User.prompt_with_multiple_lists): Ditto.
(User.prompt_with_list): Ditto.
(User.confirm): Ditto.

  • Scripts/webkitpy/common/system/user_mock.py:

(MockUser.prompt): Use Terminal.input.
(MockUser.prompt_with_list): Ditto.

10:43 AM Changeset in webkit [280639] by Said Abou-Hallawa
  • 3 edits in trunk/Source/WebKit

[GPU Process] REGRESSION: iCloud Photos Web app may crash WebProcess once the GPUProcess is relaunched
https://bugs.webkit.org/show_bug.cgi?id=228665

Reviewed by Simon Fraser.

When the GPUProcess is relaunched, ensure NativeImage is detached from
the RemoteResourceCacheProxy once it is removed from its m_nativeImages.

Otherwise the NativeImage later will ask RemoteResourceCacheProxy to
release its corresponding NativeImage from RemoteResourceCache even
though it was destroyed when the GPUProcess was relaunched.

  • WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp:

(WebKit::RemoteResourceCacheProxy::~RemoteResourceCacheProxy):
(WebKit::RemoteResourceCacheProxy::clearNativeImageMap):
(WebKit::RemoteResourceCacheProxy::remoteResourceCacheWasDestroyed):

  • WebProcess/GPU/graphics/RemoteResourceCacheProxy.h:
10:39 AM Changeset in webkit [280638] by Antti Koivisto
  • 3 edits in trunk/Source/WebCore

Reduce Vector<> wasted capacity in some RuleSet code
https://bugs.webkit.org/show_bug.cgi?id=224160
<rdar://problem/76369555>

Unreviewed, reverting revert r279242.

Reland as this was not related to the crashes seen.

  • style/RuleSet.cpp:

(WebCore::Style::RuleSet::addRulesFromSheet):
(WebCore::Style::RuleSet::evaluateDynamicMediaQueryRules):
(WebCore::Style::shrinkDynamicRules):
(WebCore::Style::RuleSet::shrinkToFit):

  • style/RuleSet.h:
10:33 AM Changeset in webkit [280637] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GLIB] Mark mhtml tests as flaky. Unreviewed test gardening.
https://bugs.webkit.org/show_bug.cgi?id=228778

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-08-04

  • platform/glib/TestExpectations:
9:46 AM Changeset in webkit [280636] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ BigSur Debug ] accessibility/roles-computedRoleString.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=228744

Unreviewed test gardening.

  • platform/mac/TestExpectations:
8:43 AM Changeset in webkit [280635] by Andres Gonzalez
  • 2 edits in trunk/Tools

Add contributor to accessibility watchlist.
https://bugs.webkit.org/show_bug.cgi?id=228775

Reviewed by Chris Fleizach.

  • Scripts/webkitpy/common/config/watchlist: Added Andres Gonzalez to accessibility watchlist.
8:37 AM Changeset in webkit [280634] by Ayumi Kojima
  • 3 edits in trunk/LayoutTests

Removed testexpectations from iPad and updated them in ios-wk2 for 3 editing/pasteboard/smart-paste-paragraph tests.
https://bugs.webkit.org/show_bug.cgi?id=228285

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/ipad/TestExpectations:
7:04 AM Changeset in webkit [280633] by Andres Gonzalez
  • 8 edits
    2 adds in trunk

Add support for aria-selected value changes in table cells.
https://bugs.webkit.org/show_bug.cgi?id=228756
<rdar://problem/81483071>

Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/selected-state-changed-notifications.html

  • Added the AXSelectedStateChangedNotification to notify AX clients that

the selected state of an object has changed.

  • This notification is used in this patch for aria-selected value

changes in table cells.

  • accessibility/AXLogger.cpp:

(WebCore::operator<<):

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::selectedStateChanged):
(WebCore::AXObjectCache::handleAttributeChange):

  • accessibility/AXObjectCache.h:
  • accessibility/ios/AXObjectCacheIOS.mm:

(WebCore::AXObjectCache::notificationPlatformName):

  • accessibility/mac/AXObjectCacheMac.mm:

(WebCore::AXObjectCache::postPlatformNotification):

LayoutTests:

  • accessibility/selected-state-changed-notifications-expected.txt: Added.
  • accessibility/selected-state-changed-notifications.html: Added.
5:57 AM Changeset in webkit [280632] by Martin Robinson
  • 3 edits in trunk/Source/WebCore

Add a HashTraits implementation for LayoutUnit
https://bugs.webkit.org/show_bug.cgi?id=228630

Reviewed by Fujii Hironori.

No new tests. This should not change behavior in an easily-observable way, but
could prevent rare hashing problems in the future.

  • page/scrolling/ScrollSnapOffsetsInfo.cpp:

(WebCore::updateSnapOffsetsForScrollableArea): Use LayoutUnit as the hash, which avoids
and extra conversion to float.

  • platform/LayoutUnit.h: Add a HashTraits implementation for LayoutUnit.
3:57 AM Changeset in webkit [280631] by cathiechen
  • 5 edits in trunk

REGRESSION (r277997) Images get stretched with aspect-ratio and max-width: x%
https://bugs.webkit.org/show_bug.cgi?id=228076

Reviewed by Antti Koivisto.

Source/WebCore:

The image get stretched because constrainLogicalWidthInFragmentByMinMax returns the intrinsic width while computing MinSize.
According to [1], the box's minimum width is its min-content size not the MinIntrinsic width which is used because of
the recursion. To break the recursion, computeIntrinsicLogicalWidthUsing calls computeLogicalWidthFromAspectRatioInternal instead,
then checks children's width.

[1] https://www.w3.org/TR/css-sizing-4/#aspect-ratio-minimum

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::constrainLogicalWidthInFragmentByMinMax const): If shouldComputeLogicalWidthFromAspectRatio,
the length should be treated as MinContent not MinIntrinsic.
(WebCore::RenderBox::computeIntrinsicLogicalWidthUsing const): To break the loop, call computeLogicalWidthFromAspectRatioInternal instead
to get the width from aspect-ratio and if there is child, make sure the min/max logical width not less than content's width.
(WebCore::RenderBox::computeLogicalWidthFromAspectRatioInternal const):
(WebCore::RenderBox::computeLogicalWidthFromAspectRatio const):

  • rendering/RenderBox.h:

LayoutTests:

2:40 AM Changeset in webkit [280630] by timothy_horton@apple.com
  • 9 edits
    1 delete in trunk

fast/canvas/canvas-crash.html doesn't test what it intends to on iOS
https://bugs.webkit.org/show_bug.cgi?id=228747

Reviewed by Simon Fraser.

Source/WebCore:

The test fast/canvas/canvas-crash.html intends to test changes made
to actual canvas code (see r215632); however, on the iOS simulator
the test doesn't even manage to make a canvas context because of
"maximum area" and "maximum backing store size" limits, which differ
per-platform. This results in unique test results for iOS, as well
as the test not actually exercising the code it was intended to.

Fix this by adding an override for the maximum area limit (we already
had one for maximum backing store size), and overriding them in
this test (and another similarly afflicted test).

  • html/HTMLCanvasElement.cpp:

(WebCore::maxCanvasArea):
(WebCore::HTMLCanvasElement::setMaxCanvasAreaForTesting):
(WebCore::HTMLCanvasElement::createImageBuffer const):

  • html/HTMLCanvasElement.h:
  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setMaxCanvasArea):

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

  • fast/canvas/canvas-crash.html:
  • fast/canvas/canvas-skia-excessive-size.html:
  • platform/ios-simulator/fast/canvas/canvas-crash-expected.txt: Removed.
  • platform/ios-simulator/fast/canvas/canvas-skia-excessive-size-expected.txt: Removed.

Delete the iOS-specific results, and adopt the new overrides in these two tests.

1:19 AM Changeset in webkit [280629] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Add missing null-check in Touch constructor
https://bugs.webkit.org/show_bug.cgi?id=228231

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-08-04
Reviewed by Darin Adler.

  • dom/Touch.cpp:

(WebCore::scaledLocation): Helper to initialize absolutePosition.
(WebCore::Touch::Touch): Use scaledLocation().

Aug 3, 2021:

10:36 PM Changeset in webkit [280628] by Jean-Yves Avenard
  • 2 edits in trunk/Source/WebKit

REGRESSION (r280568): ASSERTION FAILED: videoFullscreenManager->client() == &_videoFullscreenManagerProxyClient
https://bugs.webkit.org/show_bug.cgi?id=228740
rdar://problem/81464301

Reviewed by Jer Noble.

Fix assertion to reflect that the code can be code in two ways.
This will all go away following bug 228761.

  • UIProcess/mac/WKFullScreenWindowController.mm:

(-[WKFullScreenWindowController setVideoFullscreenManagerClient:]):

9:49 PM Changeset in webkit [280627] by Alexey Shvayka
  • 10 edits in trunk

ReadableStream's pipeTo() and pipeThrough() don't properly check for AbortSignal
https://bugs.webkit.org/show_bug.cgi?id=227693

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/streams/piping/abort.any-expected.txt:
  • web-platform-tests/streams/piping/abort.any.worker-expected.txt:
  • web-platform-tests/streams/piping/pipe-through.any-expected.txt:
  • web-platform-tests/streams/piping/pipe-through.any.worker-expected.txt:

Source/WebCore:

This patch introduces @isAbortSignal global private function to replace instanceof
checks that a) were false positive for Object.create(AbortSignal.prototype) and
b) observably performed GetPrototypeOf? and Symbol.hasInstance lookup / call.

Aligns WebKit with Blink and the spec (https://heycam.github.io/webidl/#implements).

Test: imported/w3c/web-platform-tests/streams/piping/abort.any.js

  • Modules/streams/ReadableStream.js:

(pipeThrough):
(pipeTo):

  • Modules/streams/ReadableStreamInternals.js:

(readableStreamPipeToWritableStream):

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::JSC_DEFINE_HOST_FUNCTION):
(WebCore::JSDOMGlobalObject::addBuiltinGlobals):

  • bindings/js/WebCoreBuiltinNames.h:
6:37 PM Changeset in webkit [280626] by commit-queue@webkit.org
  • 6 edits in trunk

Add functions for parsing URL query string
https://bugs.webkit.org/show_bug.cgi?id=228122

Patch by Risul Islam <risul_islam@apple.com> on 2021-08-03
Reviewed by Darin Adler.

Source/WTF:

Added parsing of URL query strings.

  • wtf/KeyValuePair.h:

(WTF::operator== const):

  • wtf/URL.cpp:

(WTF::URL::differingQueryParameters):
(WTF::lengthOfURLIgnoringQueryAndFragments):
(WTF::URL::isEqualIgnoringQueryAndFragments):
(WTF::URL::removeQueryParameters):

  • wtf/URL.h:

Tools:

Added the test functions required for parsing URL query string.

  • TestWebKitAPI/Tests/WTF/URL.cpp:

(TestWebKitAPI::TEST_F):

6:23 PM Changeset in webkit [280625] by Lauro Moura
  • 2 edits
    4 deletes in trunk/LayoutTests

[WPE] Remove deprecated color-scheme baselines and expectations

Unreviewed test gardening.

  • platform/glib/TestExpectations:
  • platform/wpe/imported/w3c/web-platform-tests/css/css-color-adjust/meta/meta-color-scheme-attribute-changes-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-color-adjust/meta/meta-color-scheme-empty-content-value-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-color-adjust/meta/meta-color-scheme-first-valid-applies-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-color-adjust/meta/meta-color-scheme-insert-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-color-adjust/meta/meta-color-scheme-no-content-value-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-color-adjust/meta/meta-color-scheme-presentational-hint-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-color-adjust/meta/meta-color-scheme-remove-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-color-adjust/meta/meta-color-scheme-remove-head-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-color-adjust/meta/meta-color-scheme-single-value-in-body-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-color-adjust/meta/meta-color-scheme-single-value-in-head-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-color-adjust/meta/meta-color-scheme-single-value-in-shadow-tree-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-color-adjust/parsing/color-scheme-computed-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-color-adjust/parsing/color-scheme-invalid-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-color-adjust/parsing/color-scheme-valid-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/mediaqueries/prefers-color-scheme-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/color-scheme/meta-color-scheme-attribute-changes-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/color-scheme/meta-color-scheme-empty-content-value-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/color-scheme/meta-color-scheme-first-valid-applies-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/color-scheme/meta-color-scheme-insert-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/color-scheme/meta-color-scheme-no-content-value-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/color-scheme/meta-color-scheme-presentational-hint-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/color-scheme/meta-color-scheme-remove-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/color-scheme/meta-color-scheme-remove-head-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/color-scheme/meta-color-scheme-single-value-in-body-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/color-scheme/meta-color-scheme-single-value-in-head-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/color-scheme/meta-color-scheme-single-value-in-shadow-tree-expected.txt: Removed.
6:10 PM Changeset in webkit [280624] by Ryan Haddad
  • 12 edits
    1 delete in trunk

Unreviewed, reverting r280531 and r280589.

caused

Reverted changesets:

"[Cocoa] Remove support for AVAssetImageGenerator"
https://bugs.webkit.org/show_bug.cgi?id=228560
https://commits.webkit.org/r280531

"REGRESSION (r280531): multiple modern-media-controls tests
have become flaky timeouts"
https://bugs.webkit.org/show_bug.cgi?id=228714
https://commits.webkit.org/r280589

5:02 PM Changeset in webkit [280623] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Null check self.session after calling _cancel instead of before
https://bugs.webkit.org/show_bug.cgi?id=228757
<rdar://79224868>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-03
Reviewed by Geoffrey Garen.

_cancel already null checks self.session before using it.
It seems to be setting self.session to null after the null check, so move the null check to before we use it.
This should fix an occasional crash during teardown.

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSessionDataTask _restart]):

4:40 PM Changeset in webkit [280622] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitpy] Handle case where no existing simulators are defined
https://bugs.webkit.org/show_bug.cgi?id=228758
<rdar://problem/81484040>

Reviewed by Ryan Haddad.

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDeviceManager._disambiguate_device_type): If there are no available devices,
find the newest device identifier which matches the requested type.

4:14 PM Changeset in webkit [280621] by Jonathan Bedard
  • 2 edits in trunk/Tools

[build.webkit.org] Simulator temp files filling up disk (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=228335
<rdar://problem/81171840>

Reviewed by Ryan Haddad.

  • CISupport/kill-old-processes:

(main): Use tempdir environment variable, link to underlying bug.

3:52 PM Changeset in webkit [280620] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

[iOS] Allow check for nvram "emu" state on internal OS builds
https://bugs.webkit.org/show_bug.cgi?id=228745
<rdar://problem/78363040>

Reviewed by Per Arne Vollan.

Allow access to the 'emu' nvram variable when running on an Apple Internal OS build. This
reduces spurious sandbox violation reports, and improves the performance of test systems.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
3:23 PM Changeset in webkit [280619] by jer.noble@apple.com
  • 4 edits in trunk/Tools

WebKitTestRunner should dump current results in the case of a timeout
https://bugs.webkit.org/show_bug.cgi?id=228706
<rdar://79154019>

Reviewed by Jonathan Bedard.

When WKTR encounters a timeout, it current prints a "PID UNRESPONSIVE" and "FAIL: timed out" message,
but the WebContent process may not actually be unresponsive; it may just be waiting for an event
which hasn't fired, or a condition to become true. In these cases, it would be very helpful to see
the results of the test so far, so as to diagnose what is keeping the test from running to completion.

When, in the WKTR process, TestInvocation's "waitToDumpWatchdogTimer" fires, first try sending a message
to the InjectedBundle, requesting it to "ForceImmediateCompletion". Only if this message fails to be
acted upon will WKTR print the "PID UNRESPONSIVE" message.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::TestInvocation):
(WTR::TestInvocation::waitToDumpWatchdogTimerFired):
(WTR::TestInvocation::initializeWaitForPostDumpWatchdogTimerIfNeeded):
(WTR::TestInvocation::invalidateWaitForPostDumpWatchdogTimer):
(WTR::TestInvocation::waitForPostDumpWatchdogTimerFired):
(WTR::TestInvocation::done):

  • WebKitTestRunner/TestInvocation.h:
3:17 PM Changeset in webkit [280618] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitpy] Narrow set of terminated simulator processes
https://bugs.webkit.org/show_bug.cgi?id=228752
<rdar://problem/81479508>

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDeviceManager.initialize_devices): Only check Simulator.app.
(SimulatedDeviceManager.tear_down): Only kill Simulator.app processes.
(SimulatedDevice._delete): Print error if simctl delete fails, but continue.

3:11 PM Changeset in webkit [280617] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

Re-baseline imported/w3c/web-platform-tests/html/dom/idlharness.https.html.
https://bugs.webkit.org/show_bug.cgi?id=228198.

Unreviewed re-baseline.

  • platform/ipad/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
1:54 PM Changeset in webkit [280616] by Russell Epstein
  • 4 edits in branches/safari-612.1-branch/Source

Cherry-pick r280603. rdar://problem/81473647

[Live Text] [iOS] Provide a presenting UIViewController for machine readable code actions so that they are related to the same view
https://bugs.webkit.org/show_bug.cgi?id=228722

Reviewed by Tim Horton.

Source/WebCore/PAL:

  • pal/spi/cocoa/VisionKitCoreSPI.h:

Source/WebKit:

  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _updateContextMenuForMachineReadableCodeForImageAnalysis:]): Added. (-[WKContentView imageAnalysisGestureDidBegin:]): (-[WKContentView imageAnalysisGestureDidTimeOut:]):

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

1:54 PM Changeset in webkit [280615] by Russell Epstein
  • 2 edits in branches/safari-612.1-branch/Source/WebCore

Cherry-pick r280591. rdar://problem/81471312

Update FirstWithDOMWindowReuseRestriction linked-on-or-after check to latest MacOS/iOS betas
https://bugs.webkit.org/show_bug.cgi?id=228736
<rdar://81419036>

Reviewed by Chris Dumez.

  • platform/cocoa/VersionChecks.h: Delay enabling new behavior to MacOS 12 and iOS 15 SDK since new behavior is enabled for those OS versions.

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

1:54 PM Changeset in webkit [280614] by Russell Epstein
  • 2 edits in branches/safari-612.1-branch/Source/WebCore

Cherry-pick r280589. rdar://problem/81471336

REGRESSION (r280531): multiple modern-media-controls tests have become flaky timeouts
https://bugs.webkit.org/show_bug.cgi?id=228714
<rdar://problem/81426715>

Reviewed by Eric Carlson.

Update preferredRenderingMode() to reflect what setUpVideoRendering() actually does: use
MediaRenderingToContext whenever possible. This will cause setUpVideoRendering() to be
called from updateStates() to create the context, even if the element has been marked as
!isVisible() by RenderVideo upon removal from the DOM.

Also, in renderingModeChanged(), don't attempt to deduce whether scheduleUpdateStates()
should be called; just call it universally.

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::preferredRenderingMode const): (WebCore::MediaPlayerPrivateAVFoundation::renderingModeChanged):

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

1:54 PM Changeset in webkit [280613] by Russell Epstein
  • 4 edits in branches/safari-612.1-branch/Source/WebCore

Cherry-pick r280587. rdar://problem/81473679

Crash in webgl/1.0.x/conformance/textures/misc/texture-with-flip-y-and-premultiply-alpha.html
https://bugs.webkit.org/show_bug.cgi?id=223920
<rdar://problem/76261913>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-08-03
Reviewed by Kenneth Russell.

After enabling WEBGL_depth_texture, the getDataFormat would assert for case of
format == RGBA, type == UNSIGNED_SHORT. UNSIGNED_SHORT is intended for
format == DEPTH_COMPONENT.

Instead, return error if the data conversion cannot be done. This is better in all
cases than doing non-expected data conversion in release build and assertion in
debug builds.

Tested by webgl/1.0.x/conformance/textures/misc/texture-with-flip-y-and-premultiply-alpha.html
(disabled for now).

  • html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::texImageArrayBufferViewHelper):
  • platform/graphics/GraphicsContextGL.cpp: (WebCore::getDataFormat): (WebCore::packPixels): (WebCore::GraphicsContextGL::extractTextureData):
  • platform/graphics/GraphicsContextGL.h:

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

1:37 PM Changeset in webkit [280612] by Russell Epstein
  • 1 copy in branches/safari-612.1-branch

New branch.

1:36 PM Changeset in webkit [280611] by timothy_horton@apple.com
  • 16 edits in trunk/Source/WebKit

Remove unused processDidTransitionTo{Foreground,Background} IPC
https://bugs.webkit.org/show_bug.cgi?id=228328

Reviewed by Wenson Hsieh.

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::processDidTransitionToForeground): Deleted.
(WebKit::GPUProcess::processDidTransitionToBackground): Deleted.

  • GPUProcess/GPUProcess.h:
  • GPUProcess/GPUProcess.messages.in:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::processDidTransitionToForeground): Deleted.
(WebKit::NetworkProcess::processDidTransitionToBackground): Deleted.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformProcessDidTransitionToBackground): Deleted.
(WebKit::NetworkProcess::platformProcessDidTransitionToForeground): Deleted.

  • NetworkProcess/curl/NetworkProcessCurl.cpp:

(WebKit::NetworkProcess::platformProcessDidTransitionToForeground): Deleted.
(WebKit::NetworkProcess::platformProcessDidTransitionToBackground): Deleted.

  • NetworkProcess/soup/NetworkProcessSoup.cpp:

(WebKit::NetworkProcess::platformProcessDidTransitionToForeground): Deleted.
(WebKit::NetworkProcess::platformProcessDidTransitionToBackground): Deleted.

  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::updateProcessAssertion):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::updateProcessAssertion):

  • UIProcess/WebAuthentication/WebAuthnProcessProxy.cpp:

(WebKit::WebAuthnProcessProxy::updateProcessAssertion):

  • WebAuthnProcess/WebAuthnProcess.cpp:

(WebKit::WebAuthnProcess::processDidTransitionToForeground): Deleted.
(WebKit::WebAuthnProcess::processDidTransitionToBackground): Deleted.

  • WebAuthnProcess/WebAuthnProcess.h:
  • WebAuthnProcess/WebAuthnProcess.messages.in:

These messages do nothing.

1:29 PM Changeset in webkit [280610] by timothy_horton@apple.com
  • 2 edits
    1 delete in trunk/LayoutTests

fast/dom/navigator-iOS-userAgent.html fails on iPad because the platform is not "iPhone" or "iPad"
https://bugs.webkit.org/show_bug.cgi?id=228750

Reviewed by Dean Jackson.

  • fast/dom/navigator-iOS-userAgent.html:
  • platform/ipad/fast/dom/navigator-iOS-userAgent-expected.txt: Removed.

This test fails on iPad in the default configuration because navigator.platform is MacIntel
due to desktop-class browsing. To maintain previous behavior of the test, revert to mobile mode.
This lets us delete the iPad-specific results.
Also, fix a typo in the variable names.

1:26 PM Changeset in webkit [280609] by Yijia Huang
  • 6 edits in trunk/Source/JavaScriptCore

[ARM64] Use link register instead of pinning a register for materializing big load constants
https://bugs.webkit.org/show_bug.cgi?id=228710

Reviewed by Mark Lam.

Previously, we pin a register as a temp for materializing a large constant that cannot fit in
Load/Store imm form. This is not efficient since the register allocator has one less register
to allocate from. To solve this problem, we should switch to using the link register as the temp
on ARM64.

  • b3/B3Common.cpp:

(JSC::B3::linkRegister):
(JSC::B3::pinnedExtendedOffsetAddrRegister): Deleted.

  • b3/B3Common.h:
  • b3/air/AirAllocateRegistersAndStackAndGenerateCode.cpp:

(JSC::B3::Air::callFrameAddr):

  • b3/air/AirCode.cpp:

(JSC::B3::Air::Code::Code):

  • b3/air/AirLowerStackArgs.cpp:

(JSC::B3::Air::lowerStackArgs):

1:04 PM Changeset in webkit [280608] by timothy_horton@apple.com
  • 2 edits in trunk/LayoutTests

[ iPad ] fast/dom/collection-iterators.html fails
https://bugs.webkit.org/show_bug.cgi?id=228657

Unreviewed rebaseline.

  • platform/ipad/fast/dom/collection-iterators-expected.txt:

Actually land the expected file, not a diff like in r280494.

12:27 PM Changeset in webkit [280607] by Lauro Moura
  • 4 edits in trunk/LayoutTests

[GLIB] Garden some passing tests

Unreviewed test gardening.

Covering latest WPE expected to fail but passing tests.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
12:24 PM Changeset in webkit [280606] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Fix sandbox violation in GPU process
https://bugs.webkit.org/show_bug.cgi?id=228743
<rdar://problem/81334849>

Reviewed by Brent Fulgham.

Allow reading "hw.product" in the GPU process' sandbox.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
12:15 PM Changeset in webkit [280605] by fpizlo@apple.com
  • 3 edits in trunk/Source/bmalloc

pas_segmented_vector's iterate functions should handle memory ordering correctly
https://bugs.webkit.org/show_bug.cgi?id=228746

Reviewed by Mark Lam.

Also fixed a missing store-store fence in bitfit_directory's use of a segmented vector.

  • libpas/src/libpas/pas_bitfit_directory.c:

(pas_bitfit_directory_get_first_free_view):

  • libpas/src/libpas/pas_segmented_vector.h:
12:00 PM Changeset in webkit [280604] by Jonathan Bedard
  • 6 edits in trunk/Tools

[webkitscmpy] Add access to git config
https://bugs.webkit.org/show_bug.cgi?id=228597
<rdar://problem/81283644>

Reviewed by Aakash Jain.

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:

(Git.config): Return git configuration as dictionary.

  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
  • Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:

(test_config): Test repository configuration.
(test_global_config): Test global configuration.

11:22 AM Changeset in webkit [280603] by Devin Rousso
  • 4 edits in trunk/Source

[Live Text] [iOS] Provide a presenting UIViewController for machine readable code actions so that they are related to the same view
https://bugs.webkit.org/show_bug.cgi?id=228722

Reviewed by Tim Horton.

Source/WebCore/PAL:

  • pal/spi/cocoa/VisionKitCoreSPI.h:

Source/WebKit:

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _updateContextMenuForMachineReadableCodeForImageAnalysis:]): Added.
(-[WKContentView imageAnalysisGestureDidBegin:]):
(-[WKContentView imageAnalysisGestureDidTimeOut:]):

10:49 AM Changeset in webkit [280602] by Jonathan Bedard
  • 2 edits in trunk/Tools

[check-github-mirror-integrity] Handle slow Svn query
https://bugs.webkit.org/show_bug.cgi?id=228741

Reviewed by Aakash Jain.

  • Scripts/check-github-mirror-integrity: Pull commit from GitHub before Subversion.
10:34 AM Changeset in webkit [280601] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Crash while reading WebGL drawing buffer if canvas image buffer allocation fails
https://bugs.webkit.org/show_bug.cgi?id=228737
<rdar://81150042>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-08-03
Reviewed by Brent Fulgham.

Source/WebCore:

The crash would happen for example when running out of memory during snapshot
or printing. Snapshots and printing forces the WebGL canvas to be "painted
to document", which would then trigger the crash.

Other code-paths that invoke CanvasBase::makeRenderingResultsAvailable,
e.g. toDataURL and drawImage will check for the buffer before, and
as such are not testable in the sense that adding the test would trigger
the bug.

Test: webgl/webgl-oom-paint-document-no-crash.html

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::paintRenderingResultsToCanvas):
Check for the nullptr from CanvasBase::buffer(). This might happen
when the ImageBuffer was not allocated due to memory constraints.

LayoutTests:

Add a test for failure to paint the WebGL canvas to document.
Trigger the mode by using printing.

Other code-paths that invoke CanvasBase::makeRenderingResultsAvailable,
e.g. toDataURL and drawImage will check for the buffer before, and
as such are not testable in the sense that adding the test would trigger
the bug.

  • webgl/webgl-oom-paint-document-no-crash-expected.html: Added.
  • webgl/webgl-oom-paint-document-no-crash.html: Added.
10:05 AM Changeset in webkit [280600] by youenn@apple.com
  • 2 edits in trunk/Source/WTF

RealtimeMediaSource::audioSamplesAvailable is calling malloc as part of locking in audio thread
https://bugs.webkit.org/show_bug.cgi?id=228688

Reviewed by Eric Carlson.

Allow allocations in lockSlow since allocations might happen in rare case and not for each lockSlow call.

  • wtf/Lock.cpp:

(WTF::Lock::lockSlow):
(WTF::Lock::unlockSlow):
(WTF::Lock::unlockFairlySlow):

9:54 AM Changeset in webkit [280599] by Antti Koivisto
  • 3 edits
    2 adds in trunk

REGRESSION(r279050): Crash under CSSImageValue::createDeprecatedCSSOMWrapper with cursor images
https://bugs.webkit.org/show_bug.cgi?id=228735

Reviewed by Alex Christensen.

Source/WebCore:

CSSCursorImageValue is not a CSSImageValue. This used to work before r279050 because they had
the URL field in the same offset.

Test: fast/css/cursor-image-cssvalue.html

  • css/CSSValue.cpp:

(WebCore::CSSValue::createDeprecatedCSSOMWrapper const):

Don't do any special handling for CSSCursorImageValue. They are exposed as generic (deprecated)
CSS values with cssText only.

LayoutTests:

  • fast/css/cursor-image-cssvalue-expected.txt: Added.
  • fast/css/cursor-image-cssvalue.html: Added.
9:51 AM Changeset in webkit [280598] by Russell Epstein
  • 1 copy in tags/Safari-612.1.15.4.15

Tag Safari-612.1.15.4.15.

9:50 AM Changeset in webkit [280597] by Russell Epstein
  • 6 edits in branches/safari-612.1.15.4-branch/Source

Speculative build fix. rdar://79147214.

9:44 AM Changeset in webkit [280596] by Russell Epstein
  • 3 edits in branches/safari-612.1.15.4-branch/Source/WebInspectorUI

Cherry-pick r280574. rdar://problem/81466166

Web Inspector: [AppleWin] Speculative internal build fix for copying InspectorBackendCommands.js
https://bugs.webkit.org/show_bug.cgi?id=228716

Reviewed by Maciej Stachowiak.

Speculative fix for AppleWin port internal build by using the correct directory for JSC headers. Also update the
logging message to reflect that the file will by copied later in the build.

  • WebInspectorUI.vcxproj/WebInspectorUI.make:
  • WebInspectorUI.vcxproj/build-webinspectorui.pl:

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

9:42 AM Changeset in webkit [280595] by Russell Epstein
  • 8 edits in branches/safari-612.1.15.4-branch/Source

Versioning.

WebKit-7612.1.15.4.15

9:42 AM Changeset in webkit [280594] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Use WeakPtr instead of manual raw pointer management in URLSearchParams
https://bugs.webkit.org/show_bug.cgi?id=228723

Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-03
Reviewed by Chris Dumez.

This is less error prone.

  • html/DOMURL.cpp:

(WebCore::DOMURL::~DOMURL): Deleted.

  • html/DOMURL.h:
  • html/URLSearchParams.cpp:

(WebCore::URLSearchParams::URLSearchParams):

  • html/URLSearchParams.h:

(WebCore::URLSearchParams::associatedURLDestroyed): Deleted.

8:59 AM Changeset in webkit [280593] by youenn@apple.com
  • 10 edits in trunk

ReadableStream's pipeTo() and pipeThrough() don't handle options in spec-perfect way
https://bugs.webkit.org/show_bug.cgi?id=227690
<rdar://problem/80482144>

LayoutTests/imported/w3c:

Reviewed by Alexey Shvayka .

  • web-platform-tests/streams/piping/general.any-expected.txt:
  • web-platform-tests/streams/piping/general.any.worker-expected.txt:
  • web-platform-tests/streams/piping/pipe-through.any-expected.txt:
  • web-platform-tests/streams/piping/pipe-through.any.js:

(tryPipeThrough):
(test.get assert_equals):

  • web-platform-tests/streams/piping/pipe-through.any.worker-expected.txt:
  • web-platform-tests/streams/piping/throwing-options.any-expected.txt:
  • web-platform-tests/streams/piping/throwing-options.any.worker-expected.txt:

Source/WebCore:

Reviewed by Alexey Shvayka.

Order getters as per spec for pipeTo and pipeThrough.
Handle the case of null dictionaries as if they are undefined
Use getter instead of using 'in' as per WebIDL spec.
If options is undefined, skip calling any getter.

Covered by updated test.

  • Modules/streams/ReadableStream.js:

(pipeThrough):
(pipeTo):

8:50 AM Changeset in webkit [280592] by cathiechen
  • 4 edits
    6 adds in trunk/LayoutTests

Import css/css-sizing/aspect-ratio tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=228734

Reviewed by Rob Buis.

LayoutTests/imported/w3c:

Import css/css-sizing/aspect-ratio tests from WPT commit f76ae81001.

  • web-platform-tests/css/css-sizing/aspect-ratio/abspos-021-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/abspos-021.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-027-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-027.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-028-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-028.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/w3c-import.log:

LayoutTests:

8:33 AM Changeset in webkit [280591] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Update FirstWithDOMWindowReuseRestriction linked-on-or-after check to latest MacOS/iOS betas
https://bugs.webkit.org/show_bug.cgi?id=228736
<rdar://81419036>

Reviewed by Chris Dumez.

  • platform/cocoa/VersionChecks.h:

Delay enabling new behavior to MacOS 12 and iOS 15 SDK since new behavior is enabled for those OS versions.

6:26 AM Changeset in webkit [280590] by Philippe Normand
  • 2 edits in trunk/Tools

[WPE][GTK] SVN_REVISION drifting away if bots don't re-run cmake
https://bugs.webkit.org/show_bug.cgi?id=228290

Reviewed by Michael Catanzaro.

The apply-build-revision-to-files.py script wasn't expanding the BUILD_REVISION beyond the
first run, because it processes files generated by CMake already, and expanding the
BUILD_REVISION once prevents further expansions. So the proposed solution is to always
expand BuildRevision.h.in from that script, and for .pc files, to restore the BUILD_REVISION
template before updating the file.

  • glib/apply-build-revision-to-files.py:

(main):

6:15 AM Changeset in webkit [280589] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION (r280531): multiple modern-media-controls tests have become flaky timeouts
https://bugs.webkit.org/show_bug.cgi?id=228714
<rdar://problem/81426715>

Reviewed by Eric Carlson.

Update preferredRenderingMode() to reflect what setUpVideoRendering() actually does: use
MediaRenderingToContext whenever possible. This will cause setUpVideoRendering() to be
called from updateStates() to create the context, even if the element has been marked as
!isVisible() by RenderVideo upon removal from the DOM.

Also, in renderingModeChanged(), don't attempt to deduce whether scheduleUpdateStates()
should be called; just call it universally.

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:

(WebCore::MediaPlayerPrivateAVFoundation::preferredRenderingMode const):
(WebCore::MediaPlayerPrivateAVFoundation::renderingModeChanged):

2:10 AM Changeset in webkit [280588] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Add standard logical properties to CSS keyword completion
https://bugs.webkit.org/show_bug.cgi?id=228548

Patch by Sonia Singla <soniasingla.1812@gmail.com> on 2021-08-03
Reviewed by Devin Rousso.

  • UserInterface/Models/CSSKeywordCompletions.js:
1:35 AM Changeset in webkit [280587] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Crash in webgl/1.0.x/conformance/textures/misc/texture-with-flip-y-and-premultiply-alpha.html
https://bugs.webkit.org/show_bug.cgi?id=223920
<rdar://problem/76261913>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-08-03
Reviewed by Kenneth Russell.

After enabling WEBGL_depth_texture, the getDataFormat would assert for case of
format == RGBA, type == UNSIGNED_SHORT. UNSIGNED_SHORT is intended for
format == DEPTH_COMPONENT.

Instead, return error if the data conversion cannot be done. This is better in all
cases than doing non-expected data conversion in release build and assertion in
debug builds.

Tested by webgl/1.0.x/conformance/textures/misc/texture-with-flip-y-and-premultiply-alpha.html
(disabled for now).

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::texImageArrayBufferViewHelper):

  • platform/graphics/GraphicsContextGL.cpp:

(WebCore::getDataFormat):
(WebCore::packPixels):
(WebCore::GraphicsContextGL::extractTextureData):

  • platform/graphics/GraphicsContextGL.h:
12:38 AM Changeset in webkit [280586] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Check that shadow root is connected in invalidateStyleAfterStyleSheetChange
https://bugs.webkit.org/show_bug.cgi?id=227383

Patch by Rob Buis <rbuis@igalia.com> on 2021-08-03
Reviewed by Antti Koivisto.

Source/WebCore:

Check that shadow root is connected in invalidateStyleAfterStyleSheetChange.

Test: fast/shadow-dom/shadow-tree-removal-crash.html

  • style/StyleScope.cpp:

(WebCore::Style::Scope::updateActiveStyleSheets):

LayoutTests:

Add test for this.

  • fast/shadow-dom/shadow-tree-removal-crash-expected.txt: Added.
  • fast/shadow-dom/shadow-tree-removal-crash.html: Added.

Aug 2, 2021:

11:54 PM Changeset in webkit [280585] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Align implementation of PositionIterator::isCandidate() on Position::isCandidate()
https://bugs.webkit.org/show_bug.cgi?id=228635

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

The bug fixed in r280381 was due to the fact that PositionIterator::isCandidate() and
Position::isCandidate() had gone out of sync. To prevent future bugs of this kind, this patch
modifies PositionIterator::isCandidate() so that it is aligned with
PositionIterator::isCandidate() (except when an m_anchorType check is needed) and add code
comments in both functions to ensure the same changes are always applied to them.

  • dom/Position.cpp:

(WebCore::Position::isCandidate const): Add a comment to make sure we update PositionIterator
when changing that function. Also use auto for a local variable like in PositionIterator.

  • dom/PositionIterator.cpp:

(WebCore::PositionIterator::isCandidate const): Add a comment to make sure we update Position
when changing that function. Rearrange the code to use positionBeforeOrAfterNodeIsCandidate
and early return when the node is a <html> element (these are not behavior changes). For
block flow / grid / flexbox renderers, add a special handling when the anchor node is a root
editable element ; also change the fallback value returned at the end of the function (these
are two behavior changes).

9:21 PM Changeset in webkit [280584] by Jean-Yves Avenard
  • 10 edits in trunk

Source/WebCore:
[WebAudio] webm; properly trim frames according to the codec delay information
https://bugs.webkit.org/show_bug.cgi?id=228140
rdar://problem/80883882

Reviewed by Eric Carlson.

Add frame-perfect decoding for Opus and Vorbis in WebM container.
Unfortunately, due to a vorbis decoder bug, it is not possible to test that
vorbis decoding returns the right number of frames.
Amend Opus test to ensure the right amount of frames are returned.

  • platform/audio/cocoa/AudioFileReaderCocoa.cpp:

(WebCore::AudioFileReader::demuxWebMData const):
(WebCore::passthroughInputDataCallback): AudioToolbox internal logging could overflow
if we used packet descriptions with offsets, so we take the most commonly used scenario
where we have a single packet to decode at a time.
(WebCore::AudioFileReader::decodeWebMData const):

  • platform/graphics/cocoa/AudioTrackPrivateWebM.cpp:

(WebCore::AudioTrackPrivateWebM::codecDelay const):
(WebCore::AudioTrackPrivateWebM::setDiscardPadding):
(WebCore::AudioTrackPrivateWebM::discardPadding const):

  • platform/graphics/cocoa/AudioTrackPrivateWebM.h:
  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:

(WebCore::SourceBufferParserWebM::OnElementEnd): Fly-by, ensure m_didParseInitializationDataCallback
only ever accessed on client thread.
(WebCore::SourceBufferParserWebM::OnBlockGroupEnd):

  • platform/graphics/cocoa/SourceBufferParserWebM.h: Add trimming data callback.

Only mark WEBCORE_EXPORT the methods that need it.
(WebCore::SourceBufferParserWebM::appendData):
(WebCore::SourceBufferParserWebM::setDidParseTrimmingDataCallback):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::canPlayType const): Make canPlayType(webm/audio; codecs=vorbis)
returns maybe if feature flag set.

LayoutTests:
https://bugs.webkit.org/show_bug.cgi?id=228140
rdar://problem/80883882

Reviewed by Eric Carlson.

https://bugs.webkit.org/show_bug.cgi?id=228140

  • webaudio/decode-audio-data-webm-opus-expected.txt:
  • webaudio/decode-audio-data-webm-opus.html:
9:18 PM Changeset in webkit [280583] by Yijia Huang
  • 8 edits in trunk/Source/JavaScriptCore

Add a new pattern to instruction selector to utilize UMULL supported by ARM64
https://bugs.webkit.org/show_bug.cgi?id=228721

Reviewed by Saam Barati.

Unsigned Multiply Long (UMULL) multiplies two 32-bit register values, and writes the
result to the destination register. This instruction is an alias of the UMADDL instruction.

umull xd wn wm

The equivalent pattern is: d = ZExt32(n) * ZExt32(m)

Given B3 IR:
Int @0 = ArgumentReg(%x0)
Int @1 = Trunc(@0)
Int @2 = ArgumentReg(%x1)
Int @3 = Trunc(@2)
Int @4 = ZExt32(@1)
Int @5 = ZExt32(@3)
Int @6 = Mul(@4, @5)
Void@7 = Return(@6, Terminal)

Old optimized AIR
Move %x0, %x0, @4
Move %x1, %x1, @5
Mul %x0, %x1, %x0, @6
Ret %x0, @7

New optimized AIR
MultiplyZeroExtend %x0, %x1, %x0, @6
Ret %x0, @7

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::multiplyZeroExtend32):

  • assembler/testmasm.cpp:

(JSC::testMultiplyZeroExtend32):

  • b3/B3LowerToAir.cpp:
  • b3/air/AirOpcode.opcodes:
  • b3/testb3.h:
  • b3/testb3_2.cpp:

(testMulArgs32SignExtend):
(testMulArgs32ZeroExtend):

  • b3/testb3_3.cpp:

(addArgTests):

8:53 PM Changeset in webkit [280582] by Chris Dumez
  • 5 edits
    3 adds in trunk

[COOP] Cross-Origin-Opener-Policy header parsing fails when report-to parameter is present
https://bugs.webkit.org/show_bug.cgi?id=228719

Reviewed by Geoff Garen.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now failing a bit later.

  • web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https-expected.txt:

Source/WebCore:

Cross-Origin-Opener-Policy header parsing fails when report-to parameter is present, because
parseStructuredFieldValue() doesn't handle parameters whose value is double-quoted:

Test: http/wpt/cross-origin-opener-policy/header-parsing-with-report-to.https.html

  • platform/network/HTTPParsers.cpp:

(WebCore::parseStructuredFieldValue):

LayoutTests:

Add layout test coverage.

  • http/wpt/cross-origin-opener-policy/header-parsing-with-report-to.https-expected.txt: Added.
  • http/wpt/cross-origin-opener-policy/header-parsing-with-report-to.https.html: Added.
8:39 PM WebKitGTK/2.32.x edited by clopez@igalia.com
(diff)
8:36 PM Changeset in webkit [280581] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

[css-cleanup] Replace webkit- prefix properties with Standard CSS Properties in Source/
https://bugs.webkit.org/show_bug.cgi?id=228697

Patch by Sonia Singla <soniasingla.1812@gmail.com> on 2021-08-02
Reviewed by Frédéric Wang.

  • Modules/mediacontrols/mediaControlsApple.css:

(video::-webkit-media-controls-closed-captions-container h3,):

  • Modules/mediacontrols/mediaControlsBase.css:

(video::-webkit-media-controls-closed-captions-container h3,):
(video::-webkit-media-controls-closed-captions-container li.selected::before,):

  • css/html.css:

(p):
(blockquote):
(figure):
(hr):
(h1):
(:is(article, aside, nav, section) h1):
(:is(article, aside, nav, section) :is(article, aside, nav, section) h1):
(:is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) h1):
(:is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) h1):
(:is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) h1):
(h2):
(h3):
(h4):
(h5):
(h6):
(ul, menu, dir):
(ol):
(dd):
(dl):
(ol ul, ul ol, ul ul, ol ol):
(legend):
(fieldset):

  • css/mathml.css:

(mi):
(msub > mi:first-child, msubsup > mi:first-child):
(msubsup > mi:first-child + * + *):

8:30 PM Changeset in webkit [280580] by Lauro Moura
  • 4 edits in trunk/LayoutTests

[GLIB] Garden some passing tests

Unreviewed test gardening.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
8:11 PM Changeset in webkit [280579] by Yijia Huang
  • 7 edits in trunk/Source/JavaScriptCore

Add new patterns to instruction selector to utilize AND/EOR/ORR-with-shift supported by ARM64
https://bugs.webkit.org/show_bug.cgi?id=228675

Reviewed by Saam Barati.

Bitwise AND (shifted register) performs a bitwise AND of a register value and an optionally-shifted
register value, and writes the result to the destination register.

and wd wn wm ShiftType #amount

The equivalent pattern is: n & (m ShiftType amount)

Given B3 IR:
Int @0 = ArgumentReg(%x0)
Int @1 = ArgumentReg(%x1)
Int @2 = Const32(63)
Int @3 = Shl(@1, $63(@2))
Int @4 = BitAnd(@0, @3)
Void@5 = Return(@4, Terminal)

Old optimized AIR
Lshift %x1, $63, %x1, @3
And %x0, %x1, %x0, @4
Ret %x0, @5

New optimized AIR
AndLeftShift %x0, %x1, $63, %x0, @4
Ret %x0, @5

Bitwise Exclusive OR (shifted register) performs a bitwise Exclusive OR of a register value and an
optionally-shifted register value, and writes the result to the destination register.

eor wd wn wm ShiftType #amount

The equivalent pattern is: n (m ShiftType amount)

Given B3 IR:
Int @0 = ArgumentReg(%x0)
Int @1 = ArgumentReg(%x1)
Int @2 = Const32(63)
Int @3 = Shl(@1, $63(@2))
Int @4 = BitXor(@0, @3)
Void@5 = Return(@4, Terminal)

Old optimized AIR
Lshift %x1, $63, %x1, @3
Xor %x0, %x1, %x0, @4
Ret %x0, @5

New optimized AIR
XorLeftShift %x0, %x1, $63, %x0, @4
Ret %x0, @5

Bitwise OR (shifted register) performs a bitwise (inclusive) OR of a register value and an
optionally-shifted register value, and writes the result to the destination register.

orr wd wn wm ShiftType #amount

The equivalent pattern is: n | (m ShiftType amount)

Given B3 IR:
Int @0 = ArgumentReg(%x0)
Int @1 = ArgumentReg(%x1)
Int @2 = Const32(63)
Int @3 = Shl(@1, $63(@2))
Int @4 = BitOr(@0, @3)
Void@5 = Return(@4, Terminal)

Old optimized AIR
Lshift %x1, $63, %x1, @3
Or %x0, %x1, %x0, @4
Ret %x0, @5

New optimized AIR
OrLeftShift %x0, %x1, $63, %x0, @4
Ret %x0, @5

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::andLeftShift32):
(JSC::MacroAssemblerARM64::andRightShift32):
(JSC::MacroAssemblerARM64::andUnsignedRightShift32):
(JSC::MacroAssemblerARM64::andLeftShift64):
(JSC::MacroAssemblerARM64::andRightShift64):
(JSC::MacroAssemblerARM64::andUnsignedRightShift64):
(JSC::MacroAssemblerARM64::xorLeftShift32):
(JSC::MacroAssemblerARM64::xorRightShift32):
(JSC::MacroAssemblerARM64::xorUnsignedRightShift32):
(JSC::MacroAssemblerARM64::xorLeftShift64):
(JSC::MacroAssemblerARM64::xorRightShift64):
(JSC::MacroAssemblerARM64::xorUnsignedRightShift64):
(JSC::MacroAssemblerARM64::orLeftShift32):
(JSC::MacroAssemblerARM64::orRightShift32):
(JSC::MacroAssemblerARM64::orUnsignedRightShift32):
(JSC::MacroAssemblerARM64::orLeftShift64):
(JSC::MacroAssemblerARM64::orRightShift64):
(JSC::MacroAssemblerARM64::orUnsignedRightShift64):

  • assembler/testmasm.cpp:

(JSC::testAndLeftShift32):
(JSC::testAndRightShift32):
(JSC::testAndUnsignedRightShift32):
(JSC::testAndLeftShift64):
(JSC::testAndRightShift64):
(JSC::testAndUnsignedRightShift64):
(JSC::testXorLeftShift32):
(JSC::testXorRightShift32):
(JSC::testXorUnsignedRightShift32):
(JSC::testXorLeftShift64):
(JSC::testXorRightShift64):
(JSC::testXorUnsignedRightShift64):
(JSC::testOrLeftShift32):
(JSC::testOrRightShift32):
(JSC::testOrUnsignedRightShift32):
(JSC::testOrLeftShift64):
(JSC::testOrRightShift64):
(JSC::testOrUnsignedRightShift64):

  • b3/B3LowerToAir.cpp:
  • b3/air/AirOpcode.opcodes:
  • b3/testb3.h:
  • b3/testb3_2.cpp:

(testAndLeftShift32):
(testAndRightShift32):
(testAndUnsignedRightShift32):
(testAndLeftShift64):
(testAndRightShift64):
(testAndUnsignedRightShift64):
(testXorLeftShift32):
(testXorRightShift32):
(testXorUnsignedRightShift32):
(testXorLeftShift64):
(testXorRightShift64):
(testXorUnsignedRightShift64):
(testOrLeftShift32):
(testOrRightShift32):
(testOrUnsignedRightShift32):
(testOrLeftShift64):
(testOrRightShift64):
(testOrUnsignedRightShift64):
(addBitTests):

6:45 PM Changeset in webkit [280578] by ysuzuki@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

[JSC] Use loadPair / storePair in YarrJIT
https://bugs.webkit.org/show_bug.cgi?id=228687

Reviewed by Mark Lam.

Use loadPair / storePair if possible in YarrJIT. Currently, we are not
deploying Spooler in YarrJIT, but we should do that in the future too.

In this patch, we also add appropriate fallback code in loadPair / storePair:
the offset of these functions are small enough so that we should consider
overflowing case. If it overflows, we use two loads or stores.

This patch also adds loadPair32 and storePair32 to all macro assembler so that
we can call it without CPU(ARM64). Internally, two loads or stores are combined.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::loadPair32):
(JSC::MacroAssemblerARM64::loadPair64):
(JSC::MacroAssemblerARM64::loadPair64WithNonTemporalAccess):
(JSC::MacroAssemblerARM64::storePair32):
(JSC::MacroAssemblerARM64::storePair64):
(JSC::MacroAssemblerARM64::storePair64WithNonTemporalAccess):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::loadPair32):
(JSC::MacroAssemblerARMv7::storePair32):

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::loadPair32):
(JSC::MacroAssemblerMIPS::storePair32):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::loadPair32):
(JSC::MacroAssemblerX86Common::storePair32):

  • assembler/testmasm.cpp:

(JSC::testLoadStorePair32):
(JSC::testLoadStorePair64Int64):

  • yarr/YarrJIT.cpp:
6:11 PM Changeset in webkit [280577] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix accidental narrowing
https://bugs.webkit.org/show_bug.cgi?id=228613

Note that this narrowing does not matter semantically since we mask this value with 0x7f.

  • yarr/YarrJIT.h:

(JSC::Yarr::BoyerMooreBitmap::addCharacters):

6:05 PM Changeset in webkit [280576] by Peng Liu
  • 4 edits in trunk

[GPUP] RemoteAudioSession::setPreferredBufferSize() does not change its preferredBufferSize
https://bugs.webkit.org/show_bug.cgi?id=228720

Reviewed by Jer Noble.

Source/WebKit:

RemoteAudioSession should update its preferredBufferSize in
setPreferredBufferSize(). Otherwise, the preferredBufferSize
will become inconsistent with the value in the GPU process.

No new tests. Fix API test failures.

  • WebProcess/GPU/media/RemoteAudioSession.cpp:

(WebKit::RemoteAudioSession::setPreferredBufferSize):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm:

(TEST_F):

5:55 PM Changeset in webkit [280575] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

[App Privacy Report] Domains are deleted for ephemeral website data stores
https://bugs.webkit.org/show_bug.cgi?id=228708
<rdar://problem/81282432>

Reviewed by Alex Christensen.

No new tests. Since this data is not stored in WebKit, we have no
way to test when it gets deleted or not. I tested manually and requested
an automated test at the correct networking layer.

Only clear Privacy Report data if the website data store is
persistent. Safari calls the SPI to remove website data for ephemeral
data stores in some cases that are unrelated to a user clearing
website data or history and thus should not clear App Privacy Report
data. Additionally, it is unexpected that clearing an ephemeral data
store would clear disk data, as website data is only stored in memory
in this case.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::removeNetworkWebsiteData):

5:55 PM Changeset in webkit [280574] by Patrick Angle
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: [AppleWin] Speculative internal build fix for copying InspectorBackendCommands.js
https://bugs.webkit.org/show_bug.cgi?id=228716

Reviewed by Maciej Stachowiak.

Speculative fix for AppleWin port internal build by using the correct directory for JSC headers. Also update the
logging message to reflect that the file will by copied later in the build.

  • WebInspectorUI.vcxproj/WebInspectorUI.make:
  • WebInspectorUI.vcxproj/build-webinspectorui.pl:
5:49 PM Changeset in webkit [280573] by Jean-Yves Avenard
  • 4 edits
    2 adds in trunk

[WebAudio] Add webm/vorbis container support
https://bugs.webkit.org/show_bug.cgi?id=228139
rdar://80883073

Reviewed by Jer Noble.

Source/WebKit:

Access to the com.apple.audio.AudioComponentRegistrar is denied by the sandbox which
prevents registering the Vorbis Audio Component. So we instantiate the decoder right before
setting up the sandbox.
This is a workaround for rdar://81137953.
Test: webaudio/decode-audio-data-webm-vorbis.html

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::initializeSandbox):

LayoutTests:

  • platform/mac/TestExpectations:
  • webaudio/decode-audio-data-webm-vorbis-expected.txt: Added.
  • webaudio/decode-audio-data-webm-vorbis.html: Added.
5:24 PM Changeset in webkit [280572] by Russell Epstein
  • 1 copy in tags/Safari-612.1.26.0.1

Tag Safari-612.1.26.0.1.

5:19 PM Changeset in webkit [280571] by Russell Epstein
  • 1 copy in tags/Safari-612.1.26.1.1

Tag Safari-612.1.26.1.1.

4:43 PM Changeset in webkit [280570] by ysuzuki@apple.com
  • 4 edits
    3 adds in trunk

[JSC] Yarr BoyerMoore search should support character-class
https://bugs.webkit.org/show_bug.cgi?id=228613

Reviewed by Saam Barati.

JSTests:

  • stress/regexp-bm-search-character-non-fixed-size.js: Added.

(shouldBe):

  • stress/regexp-bm-search-many-candidate-zero-length.js: Added.

(shouldBe):
(regexp.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.0.1.2.3.4.5.6.7.8.9.t.v.n.r):

  • stress/regexp-bm-search-non-fixed-size.js: Added.

(shouldBe):

Source/JavaScriptCore:

This patch adds character-class support for BoyerMoore lookahead search in Yarr.
Currently, we only support fixed-sized character-class. We can extend it for repeat cases in the future.

To apply this character-class thing to jQuery's RegExp, we also allow non-fixed-sized disjunction.
For example, /aaaa.*|bbbb/'s disjunction is not fixed-sized. But still we can use (aaaa|bbbb) prefix since
this part is fixed-sized and we know minimum-size of this disjunction is 4.

Plus, instead of giving up BoyerMoore search when we found non-supported terms, we shorten BoyerMoore search
length not to include this term so that we can still have a chance to leverage BoyerMoore search. In the case
of /aaaa|bbbb|ccc(d|e|f)/, we previously gave up since it finds (d|e|f). But now, instead we shorten the length
from 4 to 3, and construct search pattern with aaa|bbb|ccc.

This patch improves jquery-todomvc-regexp by 20%.

ToT Patched

jquery-todomvc-regexp 545.3561+-0.6968 451.6117+-0.4613 definitely 1.2076x faster

This improves Speedometer2/jQuery-TodoMVC by 2%.

----------------------------------------------------------------------------------------------------------------------------------
| subtest | ms | ms | b / a | pValue (significance using False Discovery Rate) |
----------------------------------------------------------------------------------------------------------------------------------
| Elm-TodoMVC |123.470833 |123.550000 |1.000641 | 0.841600 |
| VueJS-TodoMVC |26.883333 |26.950000 |1.002480 | 0.846732 |
| EmberJS-TodoMVC |127.708333 |127.754167 |1.000359 | 0.934206 |
| BackboneJS-TodoMVC |50.545833 |50.445833 |0.998022 | 0.679610 |
| Preact-TodoMVC |20.879167 |20.791667 |0.995809 | 0.796541 |
| AngularJS-TodoMVC |137.479167 |137.275000 |0.998515 | 0.729817 |
| Vanilla-ES2015-TodoMVC |69.079167 |68.912500 |0.997587 | 0.524325 |
| Inferno-TodoMVC |65.604167 |66.120833 |1.007876 | 0.145549 |
| Flight-TodoMVC |77.029167 |76.708333 |0.995835 | 0.518562 |
| Angular2-TypeScript-TodoMVC |40.516667 |40.812500 |1.007302 | 0.513386 |
| VanillaJS-TodoMVC |54.762500 |54.895833 |1.002435 | 0.647381 |
| jQuery-TodoMVC |255.950000 |250.425000 |0.978414 | 0.000000 (significant) |
| EmberJS-Debug-TodoMVC |341.745833 |342.804167 |1.003097 | 0.219937 |
| React-TodoMVC |88.854167 |88.700000 |0.998265 | 0.568405 |
| React-Redux-TodoMVC |151.266667 |150.804167 |0.996942 | 0.256403 |
| Vanilla-ES2015-Babel-Webpack-TodoMVC |65.783333 |65.645833 |0.997910 | 0.437464 |
----------------------------------------------------------------------------------------------------------------------------------
a mean = 246.52898
b mean = 246.85128
pValue = 0.3927330278
(Bigger means are better.)
1.001 times better
Results ARE NOT significant

  • yarr/YarrJIT.cpp:

(JSC::Yarr::BoyerMooreInfo::shortenLength):
(JSC::Yarr::BoyerMooreInfo::setAll):
(JSC::Yarr::BoyerMooreInfo::addCharacters):
(JSC::Yarr::BoyerMooreInfo::addRanges):

  • yarr/YarrJIT.h:

(JSC::Yarr::BoyerMooreBitmap::add):
(JSC::Yarr::BoyerMooreBitmap::addCharacters):
(JSC::Yarr::BoyerMooreBitmap::addRanges):
(JSC::Yarr::BoyerMooreBitmap::setAll):
(JSC::Yarr::BoyerMooreBitmap::isAllSet const):

4:39 PM Changeset in webkit [280569] by stephan.szabo@sony.com
  • 2 edits in trunk/Source/JavaScriptCore

[PlayStation] Make C files in testapi compile with a C standard rather than C++ one
https://bugs.webkit.org/show_bug.cgi?id=228701

Reviewed by Ross Kirsling.

  • shell/PlatformPlayStation.cmake: Set standard for C files in testapi
4:19 PM Changeset in webkit [280568] by Jean-Yves Avenard
  • 2 edits in trunk/Source/WebKit

Crash in -[WKFullScreenWindowController windowDidExitFullScreen:]
https://bugs.webkit.org/show_bug.cgi?id=228694
rdar://79569881

Reviewed by Jer Noble.

It appears that [WKFullScreenWindowController finishedEnterFullScreenAnimation] can
cause the retain count to be decreased (this is the only explanation that makes any
sense considering the crash and when the regression started following bug 227243).
No test, can't reproduce.

  • UIProcess/mac/WKFullScreenWindowController.mm:

(-[WKFullScreenWindowController setVideoFullscreenManagerClient:]): Add utility method
to remove duplicated code.
(-[WKFullScreenWindowController didExitPictureInPicture]):
(-[WKFullScreenWindowController windowDidEnterFullScreen:]):
(-[WKFullScreenWindowController windowDidFailToExitFullScreen:]):
(-[WKFullScreenWindowController windowDidExitFullScreen:]):
(-[WKFullScreenWindowController _manager]): fly-by make style consistent with other
similar methods.

4:01 PM Changeset in webkit [280567] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Add log when experimental network loader is used
https://bugs.webkit.org/show_bug.cgi?id=227932

Reviewed by Chris Dumez.

We are seeing some reports of serious loading issues in bugs related to rdar://80330028
and we think they are because of problems related to the experimental network loader, which can be
enabled in experimental features but is not ready for use on the internet yet.
Add a log so we can determine for sure that is what is going on in those cases.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

3:54 PM Changeset in webkit [280566] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Network: sorting of transfer size for failed requests is causing the ordering to change every layout
https://bugs.webkit.org/show_bug.cgi?id=228712

Reviewed by Devin Rousso.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype._generateSortComparator):
Don't change the item order when both values are NaN.

3:37 PM Changeset in webkit [280565] by Fujii Hironori
  • 4 edits in trunk/Source
[Win] ASSERTION FAILED: evt->type() == eventNames().keydownEvent
evt->type() == eventNames().keypressEvent in WebView::interpretKeyEvent since r280492

https://bugs.webkit.org/show_bug.cgi?id=228690

Reviewed by Brent Fulgham.

Source/WebKit:

  • WebProcess/WebPage/win/WebPageWin.cpp:

(WebKit::WebPage::handleEditingKeyboardEvent): Return early unless the event is keydown or keypress.

Source/WebKitLegacy/win:

  • WebView.cpp:

(WebView::handleEditingKeyboardEvent): Return early unless the event is keydown or keypress.

3:23 PM Changeset in webkit [280564] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebCore

Assertion is not acquired in network process when opening a SQLite database
https://bugs.webkit.org/show_bug.cgi?id=228705

Reviewed by Chris Dumez.

Opening database may require database file lock.

  • platform/sql/SQLiteDatabase.cpp:

(WebCore::SQLiteDatabase::open):

3:21 PM Changeset in webkit [280563] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ iOS iPad ] editing/inserting/insert-paragraph-separator-with-html-elements-crash.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=228718.

Unreviewed test gardening.

  • platform/ipad/TestExpectations:
3:04 PM Changeset in webkit [280562] by achristensen@apple.com
  • 4 edits in trunk

Don't change invalid baseURLs from loadData or loadHTMLString to about:blank
https://bugs.webkit.org/show_bug.cgi?id=228717
<rdar://79909343>

Reviewed by Chris Dumez.

Source/WebKit:

r278737 fixed a compatibility bug from r272469 but introduced a crash when the base URL does not successfully parse.
r279450 fixed that crash but introduced a new behavior change that changes the URL to about:blank. This didn't seem
to change anything because window.location is about:blank with and without the change, but WKWebView.URL did change,
which broke at least one app. This undoes the functionality change from r279450 and keeps the crash fix, which are
both covered by API tests. I also manually verified this fixes the app in the radar.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::loadData):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm:

(TEST):

2:55 PM Changeset in webkit [280561] by Lauro Moura
  • 5 edits
    1 delete in trunk/LayoutTests

[GLIB] Gardening some failures and removing deprecated baseline.

Unreviewed test gardening.

Also unified skips for tests loading pdf as img.src.

  • platform/glib/TestExpectations:
  • platform/gtk-wayland/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
  • platform/wpe/imported/w3c/web-platform-tests/dom/events/Event-timestamp-high-resolution-expected.txt: Removed.
2:53 PM Changeset in webkit [280560] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[results.webkit.org] Fix incorrect conditional check
https://bugs.webkit.org/show_bug.cgi?id=228666

Patch by Kevin Neal <kevin_neal@apple.com> on 2021-08-02
Reviewed by Jonathan Bedard.

  • Scripts/libraries/resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:
2:46 PM Changeset in webkit [280559] by rniwa@webkit.org
  • 8 edits
    2 adds in trunk

Add CheckedRef
https://bugs.webkit.org/show_bug.cgi?id=227164

Reviewed by Geoffrey Garen.

Source/WTF:

Like r278344, this patch introduces a new type of smart pointer, CheckedRef,
which lets each object keep track of pointers pointing to the object.

As with CheckedPtr, the purpose of the internal counter for CheckedRef is
to release assert that there is no outstanding pointer at the time of destruction
instead of keeping the object alive when there is one.

This patch also removes makeCheckedPtr in favor of using CheckedPtr with
template argument deduction in C++17.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/CheckedPtr.h:

(WTF::CheckedPtr::CheckedPtr): Added variants which take CheckedRef as arguments.
(WTF::makeCheckedPtr): Deleted.
(WTF::CanMakeCheckedPtr): Moved to CheckedRef.h

  • wtf/CheckedRef.h: Added.

(WTF::CheckedRef::~CheckedRef): Added.
(WTF::CheckedRef::CheckedRef): Added.
(WTF::CheckedRef::isHashTableDeletedValue const): Added.
(WTF::CheckedRef::isHashTableEmptyValue const): Added.
(WTF::CheckedRef::hashTableEmptyValue): Added.
(WTF::CheckedRef::ptrAllowingHashTableEmptyValue const): Added.
(WTF::CheckedRef::ptrAllowingHashTableEmptyValue): Added.
(WTF::CheckedRef::ptr const): Added.
(WTF::CheckedRef::ptr): Added.
(WTF::CheckedRef::get const): Added.
(WTF::CheckedRef::get): Added.
(WTF::CheckedRef::operator-> const): Added.
(WTF::CheckedRef::operator->): Added.
(WTF::CheckedRef::operator const T& const): Added.
(WTF::CheckedRef::operator T&): Added.
(WTF::CheckedRef::operator! const): Added.
(WTF::CheckedRef::operator=): Added.
(WTF::CheckedRef::releasePtr): Added. Returns m_ptr without calling decrementPtrCount.
This is equivalent of leakPtr in Ref but we don't call this that since CheckedRef or
CheckedPtr is generally not used to manage the object lifetime.
(WTF::CheckedRef::poison): Added.
(WTF::CheckedRef::unpoison): Added.
(WTF::is): Added.
(WTF::CheckedRefHashTraits): Added.
(WTF::CheckedRefHashTraits::emptyValue): Added.
(WTF::CheckedRefHashTraits::constructEmptyValue): Added.
(WTF::CheckedRefHashTraits::isEmptyValue): Added.
(WTF::CheckedRefHashTraits::peek): Added.
(WTF::CheckedRefHashTraits::take): Added.
(WTF::CanMakeCheckedPtr): Moved from CheckedPtr.h

  • wtf/Forward.h:

Tools:

Added some unit tests for CheckedRef and updated the unit tests
for CheckedPtr per the removal of makeCheckedPtr.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/CheckedPtr.cpp:

(WTF_CheckedPtr.CheckedRef): Added

  • TestWebKitAPI/Tests/WTF/CheckedRef.cpp: Added.

(TestWebKitAPI..CheckedObject): Added.
(TestWebKitAPI..DerivedCheckedObject): Added.
(WTF_CheckedRef.Basic): Added.
(WTF_CheckedRef.DerivedClass): Added.
(WTF_CheckedRef.HashSet): Added.

2:39 PM Changeset in webkit [280558] by Devin Rousso
  • 8 edits in trunk/Source

[Live Text] SPI for machine readable codes is only available on iOS
https://bugs.webkit.org/show_bug.cgi?id=228711

Reviewed by Tim Horton.

Source/WebCore/PAL:

  • pal/spi/cocoa/VisionKitCoreSPI.h:

Source/WebKit:

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

(-[WKContentView _setUpImageAnalysis]):
(-[WKContentView _tearDownImageAnalysis]):
(-[WKContentView imageAnalysisGestureDidBegin:]):
(-[WKContentView imageAnalysisGestureDidTimeOut:]):
(-[WKContentView continueContextMenuInteraction:]):
(-[WKContentView contextMenuInteraction:willEndForConfiguration:animator:]):

Source/WTF:

  • wtf/PlatformEnableCocoa.h:
  • wtf/PlatformHave.h:
2:20 PM Changeset in webkit [280557] by ap@apple.com
  • 1 delete in trunk/JSTests/test262/test/built-ins/Temporal/now

Remove stale 'now' subdirectory in JSTests/test262/test/built-ins/Temporal, as we ended up with both 'now' and 'Now', breaking checkout on case insensitive file systems

2:09 PM Changeset in webkit [280556] by youenn@apple.com
  • 15 edits in trunk/Source/WebKit

Attribute nw connections to the page bundle identifier
https://bugs.webkit.org/show_bug.cgi?id=228649

Reviewed by Eric Carlson.

Send page identifier from WebProcess to NetworkProcess when creating a WebRTC socket.
Use page identifier to get the attributed bundle identifier.
For that purpose, we need to hop to main thread to get it, then go back to rtc thread to create it.
We do so by using callOnMainRunLoopAndWait when NetworkRTCProvider does not have the information for the provided page identifier.
We then make use of nw_parameters_set_source_application_by_bundle_id to set the bundle identifier on TCP and UDP connections.

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::attributedBundleIdentifierFromPageIdentifier const):

  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::addWebPageNetworkParameters):
(WebKit::NetworkSessionCocoa::removeWebPageNetworkParameters):

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:

(WebKit::NetworkRTCProvider::attributedBundleIdentifierFromPageIdentifier):
(WebKit::NetworkRTCProvider::createUDPSocket):
(WebKit::NetworkRTCProvider::createClientTCPSocket):

  • NetworkProcess/webrtc/NetworkRTCProvider.h:
  • NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
  • NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.h:
  • NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.mm:

(WebKit::NetworkRTCTCPSocketCocoa::createClientTCPSocket):
(WebKit::NetworkRTCTCPSocketCocoa::NetworkRTCTCPSocketCocoa):

  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.h:
  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.mm:

(WebKit::NetworkRTCUDPSocketCocoaConnections::create):
(WebKit::NetworkRTCUDPSocketCocoa::createUDPSocket):
(WebKit::NetworkRTCUDPSocketCocoa::NetworkRTCUDPSocketCocoa):
(WebKit::NetworkRTCUDPSocketCocoaConnections::NetworkRTCUDPSocketCocoaConnections):
(WebKit::NetworkRTCUDPSocketCocoaConnections::configureParameters):

  • Platform/spi/Cocoa/NWParametersSPI.h:
  • WebProcess/Network/webrtc/LibWebRTCProvider.cpp:

(WebKit::RTCSocketFactory::RTCSocketFactory):
(WebKit::RTCSocketFactory::CreateUdpSocket):
(WebKit::RTCSocketFactory::CreateClientTcpSocket):
(WebKit::LibWebRTCProvider::createSocketFactory):

  • WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:

(WebKit::LibWebRTCSocketFactory::createUdpSocket):
(WebKit::LibWebRTCSocketFactory::createClientTcpSocket):

  • WebProcess/Network/webrtc/LibWebRTCSocketFactory.h:
2:07 PM Changeset in webkit [280555] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ MacOS wk2 ] compositing/video/video-object-fit.html is a flaky timeout on EWS.
https://bugs.webkit.org/show_bug.cgi?id=228713

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
1:45 PM Changeset in webkit [280554] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-612.1.26.1-branch

Cherry-pick r280551. rdar://problem/81427001

Calling unobserve on ResizeObserver should not clear existing observations in active targets
https://bugs.webkit.org/show_bug.cgi?id=228693

Reviewed by Chris Dumez.

Source/WebCore:

The bug was caused by ResizeObserver::removeObservation removing it from the active targets.

Note that there is nothing in the specification which alludes to this behavior,
and the new behavior is consistent with Firefox and the way IntersectionObserver works:
https://drafts.csswg.org/resize-observer/#dom-resizeobserver-unobserve

To keep elements alive while they're in the active targets but not in the observation targets,
this patch also makes each element of the active observation as opaque roots of ResizeObserver
in ResizeObserver::isReachableFromOpaqueRoots.

Test: resize-observer/resize-observer-keeps-element-of-queued-entry-alive.html

  • page/ResizeObserver.cpp: (WebCore::ResizeObserver::deliverObservations): (WebCore::ResizeObserver::isReachableFromOpaqueRoots const): (WebCore::ResizeObserver::removeObservation):

LayoutTests:

Added a regression test.

  • resize-observer/resize-observer-keeps-element-of-queued-entry-alive-expected.txt: Added.
  • resize-observer/resize-observer-keeps-element-of-queued-entry-alive.html: Added.

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

1:45 PM Changeset in webkit [280553] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-612.1.26.1-branch

Cherry-pick r280549. rdar://problem/81427001

Source/WebCore:
REGRESSION(r279800): IntersectionObserver may never get a delivery of an observation if the element
has been unobserved and is disconnected
https://bugs.webkit.org/show_bug.cgi?id=228679

Reviewed by Chris Dumez.

The bug was caused by the elements of the pending entries not being considered as opaque roots
of the intersection observer. If the intersection observer is no longer observing those elements,
the JS wrapper of the intersection observer may be collected erroneously.

This patch addresses this issue by explicitly treating the elements of pending entries as
opaque roots of the intersection observer in IntersectionObserver::isReachableFromOpaqueRoots.

Test: intersection-observer/intersection-observer-keeps-element-of-queued-entry-alive.html

  • page/IntersectionObserver.cpp: (WebCore::IntersectionObserver::isReachableFromOpaqueRoots const):

LayoutTests:
REGRESSION(r279800): IntersectionObserver may never get a delivery of an observation if the element has been unobserved and is disconnected
https://bugs.webkit.org/show_bug.cgi?id=228679

Reviewed by Chris Dumez.

Added a regression test.

  • intersection-observer/intersection-observer-keeps-element-of-queued-entry-alive-expected.txt: Added.
  • intersection-observer/intersection-observer-keeps-element-of-queued-entry-alive.html: Added.

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

1:40 PM Changeset in webkit [280552] by Russell Epstein
  • 8 edits in branches/safari-612.1.26.1-branch/Source

Versioning.

WebKit-7612.1.26.1.1

1:03 PM Changeset in webkit [280551] by rniwa@webkit.org
  • 3 edits
    2 adds in trunk

Calling unobserve on ResizeObserver should not clear existing observations in active targets
https://bugs.webkit.org/show_bug.cgi?id=228693

Reviewed by Chris Dumez.

Source/WebCore:

The bug was caused by ResizeObserver::removeObservation removing it from the active targets.

Note that there is nothing in the specification which alludes to this behavior,
and the new behavior is consistent with Firefox and the way IntersectionObserver works:
https://drafts.csswg.org/resize-observer/#dom-resizeobserver-unobserve

To keep elements alive while they're in the active targets but not in the observation targets,
this patch also makes each element of the active observation as opaque roots of ResizeObserver
in ResizeObserver::isReachableFromOpaqueRoots.

Test: resize-observer/resize-observer-keeps-element-of-queued-entry-alive.html

  • page/ResizeObserver.cpp:

(WebCore::ResizeObserver::deliverObservations):
(WebCore::ResizeObserver::isReachableFromOpaqueRoots const):
(WebCore::ResizeObserver::removeObservation):

LayoutTests:

Added a regression test.

  • resize-observer/resize-observer-keeps-element-of-queued-entry-alive-expected.txt: Added.
  • resize-observer/resize-observer-keeps-element-of-queued-entry-alive.html: Added.
12:54 PM Changeset in webkit [280550] by Russell Epstein
  • 4 edits in trunk/Tools

Add basestring compatibility for Python3 in webkitcorepy.
https://bugs.webkit.org/show_bug.cgi?id=228707

Reviewed by Jonathan Bedard.

  • Scripts/libraries/webkitcorepy/setup.py: Bumped version.
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Ditto.
  • Scripts/libraries/webkitcorepy/webkitcorepy/string_utils.py: Added

basestring compatibility for Python3.

12:14 PM Changeset in webkit [280549] by rniwa@webkit.org
  • 3 edits
    2 adds in trunk

Source/WebCore:
REGRESSION(r279800): IntersectionObserver may never get a delivery of an observation if the element
has been unobserved and is disconnected
https://bugs.webkit.org/show_bug.cgi?id=228679

Reviewed by Chris Dumez.

The bug was caused by the elements of the pending entries not being considered as opaque roots
of the intersection observer. If the intersection observer is no longer observing those elements,
the JS wrapper of the intersection observer may be collected erroneously.

This patch addresses this issue by explicitly treating the elements of pending entries as
opaque roots of the intersection observer in IntersectionObserver::isReachableFromOpaqueRoots.

Test: intersection-observer/intersection-observer-keeps-element-of-queued-entry-alive.html

  • page/IntersectionObserver.cpp:

(WebCore::IntersectionObserver::isReachableFromOpaqueRoots const):

LayoutTests:
REGRESSION(r279800): IntersectionObserver may never get a delivery of an observation if the element has been unobserved and is disconnected
https://bugs.webkit.org/show_bug.cgi?id=228679

Reviewed by Chris Dumez.

Added a regression test.

  • intersection-observer/intersection-observer-keeps-element-of-queued-entry-alive-expected.txt: Added.
  • intersection-observer/intersection-observer-keeps-element-of-queued-entry-alive.html: Added.
11:56 AM Changeset in webkit [280548] by Wenson Hsieh
  • 4 edits
    2 adds in trunk

[Live Text] Use iBeam cursor when hovering over selectable text inside image links
https://bugs.webkit.org/show_bug.cgi?id=228700
rdar://81210248

Reviewed by Tim Horton.

Source/WebCore:

Make a couple of small adjustments to allow the cursor to change to an I-beam when hovering over selectable Live
Text inside images in links, but only in the case where the computed cursor type is Auto. Currently, this always
results in a Hand cursor type because of the link ancestor, despite the injected Live Text being selectable.

Test: fast/images/text-recognition/mac/cursor-types-for-recognized-text.html

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::updateWithTextRecognitionResult):

Drive-by fix an adjacent bug, wherein we try to check whether the image element has user-select: none; before
the style has been resolved, which results in injecting selectable Live Text even when the page has explicitly
disabled text selection on the image element. Instead, move this code to right after we update layout after
ensuring the UA shadow DOM structure for Live Text, so that the bool flag is meaningful.

  • page/EventHandler.cpp:

(WebCore::EventHandler::selectCursor):

LayoutTests:

Add a layout test that hovers over Live Text in several different image elements, and checks their respective
cursor types.

  • fast/images/text-recognition/mac/cursor-types-for-recognized-text-expected.txt: Added.
  • fast/images/text-recognition/mac/cursor-types-for-recognized-text.html: Added.
11:46 AM Changeset in webkit [280547] by Chris Dumez
  • 24 edits in trunk

imported/w3c/web-platform-tests/webmessaging/broadcastchannel/blobs.html is a flaky failure since implementing BlobChannel
https://bugs.webkit.org/show_bug.cgi?id=228168
<rdar://problem/80922502>

Reviewed by Alex Christensen.

Source/WebCore:

The test was flaky because it is trying to send a Blob via BroadcastChannel.postMessage()
without keeping the blob alive. When GC triggers, the Blob would go away and trying to
decode the Blob upon receiving would fail.

To address the issue, I introduced a Blob::Handle class that wraps the Blob's internal URL
and keeps the Blob data alive as long as as someone is holding such handle. Previously,
the Blob destructor would unregister the internal URL and the Blob data would go away.

I then updated SerializedScriptValue to hold on to Blob::Handle objects instead of Blob
URLs. This guarantees that when using postMessage() to send a message to a worker, the
Blob data will stay alive until we dispatch the message event on the worker side and try
and deserialized the SerializedScriptValue.

For BroadcastChannel.postMessage() though, we end up going via the network process and
the SerializedScriptValue ends up getting serialized/deserialized over IPC. I added a
CompletionHandler to BroadcastChannelRegistry::postMessage() which only gets called
once the message event has successfully been dispatched. I use this completion handler
to make sure the SerializedScriptValue's Blob URLs stay valid until the the message has
been dispatched by holding on to the Blob::Handles.

No new tests, unskipped existing test.

  • Modules/indexeddb/IDBValue.cpp:

(WebCore::IDBValue::IDBValue):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::serialize):
(WebCore::CloneSerializer::CloneSerializer):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneSerializer::write):
(WebCore::SerializedScriptValue::SerializedScriptValue):
(WebCore::SerializedScriptValue::computeMemoryCost const):
(WebCore::SerializedScriptValue::create):
(WebCore::SerializedScriptValue::blobURLs const):
(WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB):

  • bindings/js/SerializedScriptValue.h:

(WebCore::SerializedScriptValue::hasBlobURLs const):
(WebCore::SerializedScriptValue::blobHandles const):
(WebCore::SerializedScriptValue::SerializedScriptValue):

  • dom/BroadcastChannel.cpp:

(WebCore::BroadcastChannel::postMessage):
(WebCore::BroadcastChannel::dispatchMessageTo):

  • dom/BroadcastChannel.h:
  • dom/BroadcastChannelRegistry.h:
  • fileapi/Blob.cpp:

(WebCore::BlobInternalURL::create):
(WebCore::BlobInternalURL::~BlobInternalURL):
(WebCore::BlobInternalURL::url const):
(WebCore::BlobInternalURL::BlobInternalURL):
(WebCore::Blob::Blob):
(WebCore::Blob::~Blob):
(WebCore::Blob::url const):
(WebCore::Blob::slice const):
(WebCore::Blob::size const):
(WebCore::Blob::handle const):
(WebCore::Blob::Handle::Handle):
(WebCore::Blob::Handle::url const):

  • fileapi/Blob.h:
  • loader/EmptyClients.cpp:

Source/WebKit:

  • NetworkProcess/NetworkBroadcastChannelRegistry.cpp:

(WebKit::NetworkBroadcastChannelRegistry::postMessage):

  • NetworkProcess/NetworkBroadcastChannelRegistry.h:
  • NetworkProcess/NetworkBroadcastChannelRegistry.messages.in:
  • Platform/IPC/HandleMessage.h:

(IPC::handleMessageAsyncWantsConnection):
handleMessageAsyncWantsConnection() had gotten out of sync with handleMessageAsync(). This was causing IPC decoding
failures when using both "Async" and "WantsConnection" for the IPC message.

  • WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.cpp:

(WebKit::WebBroadcastChannelRegistry::postMessage):
(WebKit::WebBroadcastChannelRegistry::postMessageToRemote):

  • WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.h:
  • WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.messages.in:

Source/WebKitLegacy:

  • WebCoreSupport/WebBroadcastChannelRegistry.cpp:

(WebBroadcastChannelRegistry::postMessage):

  • WebCoreSupport/WebBroadcastChannelRegistry.h:

LayoutTests:

Unskip test that is no longer flaky.

  • platform/ios-wk2/TestExpectations:
  • platform/mac/TestExpectations:
11:41 AM Changeset in webkit [280546] by ysuzuki@apple.com
  • 5 edits
    10 deletes in trunk/JSTests

[JSC] Update test262
https://bugs.webkit.org/show_bug.cgi?id=228709

Reviewed by Mark Lam.

  • test262/latest-changes-summary.txt:
  • test262/test/built-ins/Error/prototype/constructor/S15.11.4.1_A1_T1.js: Removed.
  • test262/test/built-ins/Error/prototype/message/15.11.4.3-1.js: Removed.
  • test262/test/built-ins/Error/prototype/message/S15.11.4.3_A1.js: Removed.
  • test262/test/built-ins/Error/prototype/message/S15.11.4.3_A2.js: Removed.
  • test262/test/built-ins/Error/prototype/name/15.11.4.2-1.js: Removed.
  • test262/test/built-ins/Error/prototype/name/S15.11.4.2_A1.js: Removed.
  • test262/test/built-ins/Error/prototype/name/S15.11.4.2_A2.js: Removed.
  • test262/test/built-ins/Error/prototype/toString/S15.11.4.4_A1.js: Removed.
  • test262/test/built-ins/TypedArray/prototype/findLast/return-abrupt-from-this-out-of-bounds.js:
  • test262/test/built-ins/TypedArray/prototype/findLastIndex/return-abrupt-from-this-out-of-bounds.js:
  • test262/test/harness/sta-error.js: Removed.
  • test262/test/harness/sta-override-error.js: Removed.
  • test262/test262-Revision.txt:
11:39 AM Changeset in webkit [280545] by youenn@apple.com
  • 2 edits in trunk/Source/WTF

Enable WebRTCPlatformUDPSocketsEnabled experimental feature by default
https://bugs.webkit.org/show_bug.cgi?id=228689
<rdar://problem/81383711>

Reviewed by Eric Carlson.

Enable WebRTCPlatformUDPSocketsEnabled experimental feature by default, WebRTC proxying being off by default for now.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
10:46 AM Changeset in webkit [280544] by ysuzuki@apple.com
  • 5 edits in trunk/Source

[JSC] Yarr should use Bitmap instead of ByteVector for BoyerMoore search
https://bugs.webkit.org/show_bug.cgi?id=228676

Reviewed by Saam Barati.

Source/JavaScriptCore:

We observed that using Bitmap instead of ByteVector does not pose performance
issue. It was neutral in jquery-todomvc-regexp.js. In that case, we should use
Bitmap since it is 8x smaller.

We also search reusable Bitmap from Vector since comparing 128bit Bitmap is
super fast so we do not need to bother about linear search here (# of Bitmap
is currently up to 4).

To make code simplified, we add regT2 to ARMv7 and MIPS backend of YarrJIT.

ToT Patched

jquery-todomvc-regexp 555.9566+-0.8856 555.0737+-0.9717

  • yarr/YarrJIT.cpp:

(JSC::Yarr::BoyerMooreInfo::index const): Deleted.
(JSC::Yarr::BoyerMooreInfo::setIndex): Deleted.

  • yarr/YarrJIT.h:

(JSC::Yarr::YarrCodeBlock::set8BitCode):
(JSC::Yarr::YarrCodeBlock::set16BitCode):
(JSC::Yarr::YarrCodeBlock::set8BitCodeMatchOnly):
(JSC::Yarr::YarrCodeBlock::set16BitCodeMatchOnly):
(JSC::Yarr::YarrCodeBlock::tryReuseBoyerMooreBitmap const):
(JSC::Yarr::BoyerMooreByteVector::BoyerMooreByteVector): Deleted.
(JSC::Yarr::YarrCodeBlock::tryReuseBoyerMooreByteVector const): Deleted.

Source/WTF:

  • wtf/Bitmap.h:
10:44 AM Changeset in webkit [280543] by Wenson Hsieh
  • 8 edits
    2 adds in trunk

REGRESSION (Safari 15): Unable to repaint canvases with software filters when GPU Process is enabled
https://bugs.webkit.org/show_bug.cgi?id=228682
rdar://79699997

Reviewed by Simon Fraser.

Source/WebCore:

In the case where GPU process is enabled for canvas rendering but is not enabled for DOM rendering, canvas
elements with software CSS filters fail to repaint as the canvas' backing image buffer changes. In this
particular scenario, we first paint the canvas' remotely-backed image buffer into the filter's input buffer,
which is backed by an unaccelerated graphics context. The filter is then applied, producing an output image
buffer which we then paint into the page. The bug occurs during the initial step of painting the contents of the
canvas' remote image buffer into the filter's input context, which involves creating a CGImageRef from the
ImageBufferCGBackend::draw.

When asking for a CGImageRef from the canvas' image buffer (which is backed by an IOSurface that's drawn into in
the GPU process), QuartzCore caches the resulting CGImageRef corresponding to the IOSurface handle in the web
process. Subsequently, when we try to repaint the canvas, we'll end up using this same initial cached CGImageRef
because the graphics context of the IOSurface handle in the web process hasn't been drawn into (because all the
actual draw calls are made in the GPU process). As such, regardless of the current state of the canvas' image
buffer, the input to the filter will always be the initial native image created from the canvas' image buffer.

We avoid this problem when GPU process is disabled because the calls to update the canvas' 2D context in the
web process will clear out the cached CGImageRef in QuartzCore. Additionally, we avoid this problem when drawing
into accelerated contexts because QuartzCore will draw the cached CGImageRef using a codepath that reads back
the up-to-date contents from the IOSurface. However, in the QuartzCore's unaccelerated (ripc) image drawing
codepath, we copy the contents of the cached image right away, causing us to end up with stale image data that
does not reflect the current state of the IOSurface.

To work around this in Safari 15 (in both Monterey as well as downlevel versions of macOS), we deploy a similar
technique as we'd previously used in r201334 to invalidate QuartzCore's cached image, but only:

  1. If the seed value of the backing IOSurface has changed since the last time we've drawn the image buffer, and
  2. The destination context we're painting the image buffer into is unaccelerated.

Test: css3/filters/canvas-with-filter-after-repaint.html

  • platform/graphics/cg/ImageBufferCGBackend.cpp:

(WebCore::ImageBufferCGBackend::draw):
(WebCore::ImageBufferCGBackend::drawPattern):

Call into prepareToDrawIntoContext (see below).

  • platform/graphics/cg/ImageBufferCGBackend.cpp:

(WebCore::ImageBufferCGBackend::prepareToDrawIntoContext):

  • platform/graphics/cg/ImageBufferCGBackend.h:
  • platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:

(WebCore::ImageBufferIOSurfaceBackend::prepareToDrawIntoContext):

Add a new subclassable method on ImageBufferCGBackend that's invoked before drawing the contents of the image
buffer into a given destination GraphicsContext. We use this opportunity in ImageBufferIOSurfaceBackend to
notice if the IOSurface seed count has updated since we've last drawn the image buffer, and intentionally emit a
no-op drawing command (i.e. filling an empty rect) in the graphics context to invalidate QuartzCore's cached
CGImageRef. Note that we only deploy this workaround when drawing into unaccelerated contexts (see above for
more details).

(WebCore::ImageBufferIOSurfaceBackend::invalidateCachedNativeImage const):

Pull the no-op drawing command out into a separate helper method, with a comment describing why this exists.

(WebCore::ImageBufferIOSurfaceBackend::drawConsuming):
(WebCore::ImageBufferIOSurfaceBackend::copyCGImageForEncoding const):

  • platform/graphics/cg/ImageBufferIOSurfaceBackend.h:
  • platform/graphics/cocoa/IOSurface.h:
  • platform/graphics/cocoa/IOSurface.mm:

(WebCore::IOSurface::seed const):

Add a helper method to grab the seed value of an IOSurface.

LayoutTests:

  • css3/filters/canvas-with-filter-after-repaint-expected.html: Added.
  • css3/filters/canvas-with-filter-after-repaint.html: Added.
10:29 AM Changeset in webkit [280542] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[macOS] Remove unneeded sandbox extension member
https://bugs.webkit.org/show_bug.cgi?id=228584

Reviewed by Darin Adler.

Remove unneeded sandbox extension handle member, since this extension is never revoked.

  • WebProcess/WebProcess.h:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::switchFromStaticFontRegistryToUserFontRegistry):

10:28 AM Changeset in webkit [280541] by Chris Dumez
  • 7 edits in trunk

HTMLElement.innerText setter should convert new lines to <br>
https://bugs.webkit.org/show_bug.cgi?id=228605
<rdar://problem/81333038>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline WPT tests that are now passing. Those tests were already passing in Chrome and Firefox.

  • web-platform-tests/html/dom/elements/the-innertext-and-outertext-properties/innertext-setter-expected.txt:
  • web-platform-tests/html/dom/elements/the-innertext-idl-attribute/setter-expected.txt:
  • web-platform-tests/innerText/setter-expected.txt:

Source/WebCore:

HTMLElement.innerText setter should convert new lines to <br>:

Our innerText setter had some logic that was specific to render styles that isn't part of
the specification. It was causing us to not replace the new lines with <br> in some
web-observable cases. I dropped this logic to align with Blink and Gecko.

No new tests, rebaselined existing tests.

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::setInnerText):

10:09 AM Changeset in webkit [280540] by Russell Epstein
  • 8 edits in branches/safari-612.1.26.0-branch/Source

Versioning.

WebKit-7612.1.26.0.1

10:05 AM Changeset in webkit [280539] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Mac wk1 ] imported/w3c/web-platform-tests/mathml/relations/html5-tree/dynamic-childlist-002.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=228704.

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
9:52 AM Changeset in webkit [280538] by Russell Epstein
  • 1 copy in branches/safari-612.1.26.11-branch

New branch.

9:52 AM Changeset in webkit [280537] by Russell Epstein
  • 1 copy in branches/safari-612.1.26.2-branch

New branch.

9:52 AM Changeset in webkit [280536] by Russell Epstein
  • 1 copy in branches/safari-612.1.26.1-branch

New branch.

9:51 AM Changeset in webkit [280535] by Russell Epstein
  • 1 copy in branches/safari-612.1.26.0-branch

New branch.

9:38 AM Changeset in webkit [280534] by weinig@apple.com
  • 6 edits in trunk/Source/WebCore

[Modern Media Controls] Address additional feedback on LayoutTraits refactor
https://bugs.webkit.org/show_bug.cgi?id=227489
<rdar://problem/80215569>

Reviewed by Devin Rousso.

Splitting up larger change to land pieces incrementally.

Part 1:

  • Replaces eval() based lexical lookup with an explicit window.layoutTraitsClasses registry map.
  • Modules/modern-media-controls/controls/ios-layout-traits.js:
  • Modules/modern-media-controls/controls/layout-traits.js:
  • Modules/modern-media-controls/controls/macos-layout-traits.js:
  • Modules/modern-media-controls/controls/watchos-layout-traits.js:
  • Modules/modern-media-controls/media/media-controller.js:

(MediaController.prototype.get layoutTraits):

9:08 AM Changeset in webkit [280533] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iPad ] fast/canvas/canvas-color-space-display-p3.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=228663

Unreviewed test gardening.

  • platform/ipad/TestExpectations:
8:58 AM Changeset in webkit [280532] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS ] fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=228672

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
8:39 AM Changeset in webkit [280531] by jer.noble@apple.com
  • 12 edits
    1 add in trunk

[Cocoa] Remove support for AVAssetImageGenerator
https://bugs.webkit.org/show_bug.cgi?id=228560
LayoutTests/imported/w3c:

Reviewed by Eric Carlson.

The 2x2-green.mp4 file fails to decode as its natural size is too small for the system decoder to handle. Replace with
a media file of more reasonable size.

  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-aspect-ratio.html:
  • web-platform-tests/html/semantics/embedded-content/media-elements/video_loop_base.html:
  • web-platform-tests/media/16x16-green.mp4: Added.

Source/WebCore:

Reviewed by Eric Carlson.

AVAssetImageGenerator is used when there is not yet an available image from
AVPlayerItemVideoOutput. However, AVAssetImageGenerator is a synchronous API call; if data
for the current time is not available, the generator will cause a request for that data to
be issued, and if the main thread is blocked in a synchronous call to the generator, that
request can never be completed, causing a deadlock.

Instead, always block moving to a readyState >= HAVE_CURRENT_DATA until either the
AVPlayerLayer or the AVPlayerItemVideoOutput report having an available frame. This
prevents clients from attempting to paint until a frame is available, and ensures that we
will always have an available frame for painting, removing the need for the synchronous
generator call.

To ensure the readyState is updated when AVPlayerItemVideoOutput has an available image,
register with the output at creation time for a notification as soon as an image is
available. And in the existing delegate object, send a message back to the
MediaPlayerPrivateAVFoundationObjC when that occurs.

No tests needed; this should reduce flakiness of existing tests and cause no regression in
behavior.

Note, changes from last attempt:

AVPlayerLayer will fail to move to the -readyForDisplay state if it's not attached to a
layer tree, so when we remove the HTMLMediaElement from the DOM, we must send MediaPlayer a
acceleratedRenderingStateChanged() notification. This will cause the
MediaPlayerPrivateAVFoundationObjC to throw away its AVPlayerLayer, and will not block
moving to HAVE_CURRENT_DATA waiting for the layer to become readyForDisplay.

When we throw away (or create) the AVPlayerLayer, we must conditionally call updateStates
() to recalculate the readyState; but because updateStates() may try to create or destroy
an AVPlayerLayer, we must do this on a task to avoid re-entrancy. Adopt these changes
inside MediaPlayerPrivateAVFoundationCF as well.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::pauseAfterDetachedTask):
(WebCore::HTMLMediaElement::mediaPlayerRenderingCanBeAccelerated):

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:

(WebCore::MediaPlayerPrivateAVFoundation::setUpVideoRendering):
(WebCore::MediaPlayerPrivateAVFoundation::prepareForRendering):
(WebCore::MediaPlayerPrivateAVFoundation::renderingModeChanged):
(WebCore::MediaPlayerPrivateAVFoundation::scheduleUpdateStates):
(WebCore::MediaPlayerPrivateAVFoundation::updateStates):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::hasContextRenderer const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::destroyContextVideoRenderer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
(WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
(-[WebCoreAVFPullDelegate setParent:]):
(-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createImageGenerator): Deleted.
(WebCore::MediaPlayerPrivateAVFoundationObjC::destroyImageGenerator): Deleted.
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator): Deleted.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect): Deleted.

  • platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:

(WebCore::MediaPlayerPrivateAVFoundationCF::createVideoLayer):
(WebCore::MediaPlayerPrivateAVFoundationCF::destroyVideoLayer):

Source/WebKit:

<rdar://problem/81336280>

Reviewed by Eric Carlson.

Drive-by fix: Passing the wrong value down to the GPU process when the acceleratedRenderingStateChanged().
We should be passing the results of MediaPlayer::renderingCanBeAccelerated() which comes down from HTMLMediaElement,
not MediaPlayer::supportsAcceleratedRendering(), which comes up from the GPU process.

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::acceleratedRenderingStateChanged):

8:38 AM Changeset in webkit [280530] by Alan Bujtas
  • 4 edits
    2 adds in trunk

REGRESSION (r273072): Images do not layout correctly on walmart.com/grocery
https://bugs.webkit.org/show_bug.cgi?id=228656
<rdar://80418083>

Reviewed by Sergio Villar Senin.

Source/WebCore:

Take the min/max values into account when computing the definite size (https://drafts.csswg.org/css-sizing-3/#definite)
for the flex child.

Test: fast/flexbox/flex-with-min-max-height.html

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::computeCrossSizeForChildUsingContainerCrossSize const):

LayoutTests:

  • fast/flexbox/flex-with-min-max-height-expected.html: Added.
  • fast/flexbox/flex-with-min-max-height.html: Added.
7:43 AM Changeset in webkit [280529] by Andres Gonzalez
  • 7 edits in trunk

Fix for [WebAccessibilityObjectWrapper lineRectsAndText] to properly handle replacement nodes and SVG text.
https://bugs.webkit.org/show_bug.cgi?id=228336
<rdar://problem/81172124>

Reviewed by Chris Fleizach and Darin Adler.

Source/WebCore:

Test: LayoutTests/accessibility/ios-simulator/element-line-rects-and-text.html

  • Renamed stringsForSimpleRange to better reflect the fact that this

method can return strings and AXObjects.

  • Handles the case where contentForSimpleRange returns AXObjects

corresponding to replacement objects. This fixes the cases of images and
SVG text.

  • Fixed the problem with soft linebreaks where the start of the next

line was skipping the first character in the line.

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper contentForSimpleRange:attributed:]):
(-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
(-[WebAccessibilityObjectWrapper lineRectsAndText]):
(-[WebAccessibilityObjectWrapper stringsForSimpleRange:attributed:]):
Renamed to contentForSimpleRange since it is returns an array of strings
and AXObjects.

LayoutTests:

  • Expanded this test to cover the case of an image element and SVG text.
  • Added the test case of a paragraph with soft linebreaks.
  • accessibility/ios-simulator/element-line-rects-and-text-expected.txt:
  • accessibility/ios-simulator/element-line-rects-and-text.html:
7:30 AM Changeset in webkit [280528] by Lauro Moura
  • 2 edits in trunk/Tools

[GLIB] Make CORS allowlist test wait for promise resolution
https://bugs.webkit.org/show_bug.cgi?id=228695

Reviewed by Michael Catanzaro.

r278456 introduced a CORS allow list test that tries to fetch a
resource using the fetch() function, which returns a promise. This is
working on GTK but in WPE the test fails as the promise is not yet
resolved by the time the test variable is checked.

This commit changes the test to actually report the promise failure
through catch() and wait for its resolution before checking the values.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:

(testWebViewCORSAllowlist):

1:54 AM Changeset in webkit [280527] by Martin Robinson
  • 8 edits in trunk

[css-scroll-snap] Consider all snap areas at a given snap offset when snapping
https://bugs.webkit.org/show_bug.cgi?id=228141

LayoutTests/imported/w3c:

Reviewed by Frédéric Wang.

  • web-platform-tests/css/css-scroll-snap/overflowing-snap-areas-expected.txt:
  • web-platform-tests/css/css-scroll-snap/overflowing-snap-areas.html:

Source/WebCore:

Reviewed by Frédéric Wang.

When deciding whether to snap to snap areas that overflow the snap port, don't
just consider the first snap area at a given snap offset. Instead, keep information
about all snap areas in the ScrolSnapOffsetInfo. In order to avoid iterating over
arrays of hundreds of rectangles, also record whether any of them are larger than
the viewport. This will avoid extra work on the most common usecase of large sets
of snap areas (gridded table layouts).

This change is tested by extending an existing WPT test.

  • page/scrolling/ScrollSnapOffsetsInfo.cpp:

(WebCore::rangeForAxis): Added this helper.
(WebCore::searchForPotentialSnapPoints): When deciding if a particular snap area
overflows the snap port, look at all available snap areas instead of just the
first one.
(WebCore::updateSnapOffsetsForScrollableArea): Instead of only recording the first
snap area, record all of them in the list of snap area rectangles.
(WebCore::convertOffsetInfo): Convert the list of snap ares.

  • page/scrolling/ScrollSnapOffsetsInfo.h:

(WebCore::operator==): Added this operator which is necessary now that snapAreaIndices
is a vector.

Source/WebKit:

Reviewed by Frédéric Wang.

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:

(ArgumentCoder<SnapOffset<float>>::encode): Serialize new members.
(ArgumentCoder<SnapOffset<float>>::decode): Deserialize new members.

Aug 1, 2021:

11:59 PM Changeset in webkit [280526] by Fujii Hironori
  • 3 edits in trunk/LayoutTests

[WinCairo] Unreviewed test gardening

  • platform/wincairo-wk1/TestExpectations:
  • platform/wincairo/TestExpectations:
9:56 PM Changeset in webkit [280525] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

Migrate GlyphOverflow to LayoutUnits instead of ints
https://bugs.webkit.org/show_bug.cgi?id=133040

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

Migrate GlyphOverflow to LayoutUnits instead of ints. This
is another step in the direction of subpixel layout/rendering.

  • platform/graphics/FontCascade.h:
  • rendering/LegacyInlineFlowBox.cpp:

(WebCore::LegacyInlineFlowBox::addTextBoxVisualOverflow):

  • rendering/LegacyRootInlineBox.cpp:

(WebCore::LegacyRootInlineBox::ascentAndDescentForBox const):

  • rendering/RenderText.cpp:

(WebCore::RenderText::computePreferredLogicalWidths):

  • style/InlineTextBoxStyle.cpp:

(WebCore::extendIntToFloat):

7:46 PM Changeset in webkit [280524] by Fujii Hironori
  • 2 edits in trunk/Tools

[Win][DumpRenderTree] Clean up IndexedDB files between tests
https://bugs.webkit.org/show_bug.cgi?id=228692

Reviewed by Ryosuke Niwa.

storage/indexeddb/getdatabases.html was failing because it counted
up the remaining databases of previous tests.

Mac DRT removes IndexedDB after the testing (Bug 192796, r240358).
Win DRT also should do it.

  • DumpRenderTree/win/DumpRenderTree.cpp:

(runTest): Call TestRunner::clearAllDatabases after the testing.

9:02 AM Changeset in webkit [280523] by youenn@apple.com
  • 12 edits in trunk/Source

Introduce an experimental feature to toggle WebRTC socket proxying
https://bugs.webkit.org/show_bug.cgi?id=228681

Reviewed by Eric Carlson.

Source/WebKit:

Decide whether to disable proxying based on experimental feature in WebProcess.
Send the disable relay value from WebProcess to NetworkProcess for TCP sockets.
Manually tested.

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:

(WebKit::NetworkRTCProvider::createClientTCPSocket):

  • NetworkProcess/webrtc/NetworkRTCProvider.h:
  • NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
  • NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.h:
  • NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.mm:

(WebKit::NetworkRTCTCPSocketCocoa::createClientTCPSocket):
(WebKit::NetworkRTCTCPSocketCocoa::NetworkRTCTCPSocketCocoa):

  • WebProcess/Network/webrtc/LibWebRTCProvider.cpp:

(WebKit::RTCSocketFactory::CreateClientTcpSocket):
(WebKit::LibWebRTCProvider::createSocketFactory):

  • WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:

(WebKit::LibWebRTCSocketFactory::createClientTcpSocket):

  • WebProcess/Network/webrtc/LibWebRTCSocketFactory.h:

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
7:10 AM Changeset in webkit [280522] by Alexander Mikhaylenko
  • 2 edits in trunk/Tools

Add myself (Alexander Mikhaylenko) to contributors.json as a committer

Unreviewed.

  • Scripts/webkitpy/common/config/contributors.json:

Jul 31, 2021:

3:48 PM Changeset in webkit [280521] by mjs@apple.com
  • 2 edits in trunk/Source/WebCore

ListAttributeTargetObserver is needlessly created even when there is no list attribute
https://bugs.webkit.org/show_bug.cgi?id=228541

Reviewed by Yusuke Suzuki.

No new tests because no behavior change.

This is possibly a small improvement (~0.5%) on Speedometer subtests that do innerHTML, but not statistically significant.

Ported from a Chromium change by Adithya Srinivasan

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::resetListAttributeTargetObserver): check if there's a list attribute before making an observer.

1:47 PM Changeset in webkit [280520] by ysuzuki@apple.com
  • 4 edits in trunk/Source

[JSC] Move JIT_UNICODE_EXPRESSIONS to ENABLE(YARR_JIT_UNICODE_EXPRESSIONS) in PlatformEnable.h
https://bugs.webkit.org/show_bug.cgi?id=228669

Reviewed by Alexey Shvayka.

Source/JavaScriptCore:

Move JIT_UNICODE_EXPRESSIONS to PlatformEnable.h to align to the other YarrJIT flags.
This makes it easy to read that this is enabled on ARM64 and X86_64.

  • yarr/YarrJIT.cpp:

Source/WTF:

  • wtf/PlatformEnable.h:
1:43 PM Changeset in webkit [280519] by ysuzuki@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

[JSC] Clean up Yarr by using static constexpr
https://bugs.webkit.org/show_bug.cgi?id=228678

Reviewed by Alexey Shvayka.

Modernize Yarr code by using static constexpr.

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::TrustedImm32::TrustedImm32):

  • yarr/YarrCanonicalizeUCS2.cpp:
  • yarr/YarrCanonicalizeUCS2.js:

(set characters.hex.set string_appeared_here):

  • yarr/YarrErrorCode.cpp:

(JSC::Yarr::errorMessage):

  • yarr/YarrJIT.cpp:
10:37 AM Changeset in webkit [280518] by youenn@apple.com
  • 11 edits in trunk/Source

Improve LocalSampleBufferDisplayLayer logging
https://bugs.webkit.org/show_bug.cgi?id=228582

Reviewed by Eric Carlson.

Source/WebCore:

Add logging to correlate a LocalSampleBufferDisplayLayer to its HTMLMediaElement and its MediaStreamTrack.
Introduce setLogIdentifer for that purpose.
No observable change of behavior.

  • platform/graphics/avfoundation/SampleBufferDisplayLayer.h:
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h:
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:

(WebCore::LocalSampleBufferDisplayLayer::enqueueSample):
(WebCore::LocalSampleBufferDisplayLayer::onIrregularFrameRateNotification):

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

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack):

Source/WebKit:

Send through IPC the log identifier to the GPU display layer.

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:

(WebKit::RemoteSampleBufferDisplayLayer::setLogIdentifier):

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in:
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:

(WebKit::SampleBufferDisplayLayer::setLogIdentifier):

  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h:
9:53 AM Changeset in webkit [280517] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

AVVideoCaptureSource should not start/stop the camera if trying to apply the same size/frame rate configuration
https://bugs.webkit.org/show_bug.cgi?id=228634
<rdar://81174160>

Reviewed by Eric Carlson.

In some configurations, pages want to set a frame rate of 30, but the actual frame rate set will be 29.9999.
In that case, our heuristic to not recalibrate the camera fails.
To prevent this, we add checks in AVVideoCaptureSource to validate whether the new presets are the same as the already applied ones.

Manually tested.

  • platform/mediastream/mac/AVVideoCaptureSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::setSessionSizeAndFrameRate):

9:52 AM Changeset in webkit [280516] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

RemoteAudioMediaStreamTrackRendererInternalUnit should handle changes of requested sampleCount
https://bugs.webkit.org/show_bug.cgi?id=228631
<rdar://80690191>

Reviewed by Eric Carlson.

The requested number of samples might change in case the output device changes.
When changing device, we might have a generated buffer of 4096 while 1024 samples are requested.
For each 1024 sample chunk, we will request a buffer of 4096, which cannot be provided by WebProcess.
To prevent this case, we keep track of a requested sample count overshoot so that next time the render callback is called,
we might not request to generate another chunk.

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.cpp:

(WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit::start):
(WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit::render):

8:43 AM Changeset in webkit [280515] by Martin Robinson
  • 4 edits
    2 adds in trunk

REGRESSION(r279564): [GTK] Mouse wheel scrolling scrolls too little (take two)
https://bugs.webkit.org/show_bug.cgi?id=228572

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Test: platform/gtk/fast/scrolling/scroll-wheel-repeated-events.html

When scrolling by a delta with ScrollAnimationSmooth, base the target point
on the current scroll target instead of on the current position. We also
pass the point to updatePerAxisData instead of the delta in order to make
it more explicit what the desired behavior is for this method.

  • platform/ScrollAnimationSmooth.h: Update argument name.
  • platform/ScrollAnimationSmooth.cpp:

(WebCore::ScrollAnimationSmooth::scroll): Base the delta on the target position and
pass that as the argument to updatePerAxisData. When scrolling to a point, simply
pass that to updatePerAxisData.
(WebCore::ScrollAnimationSmooth::updatePerAxisData): Accept a point instead of a
delta, which makes it more obvious how to use this function and allows it to
be used the same way by both version of ScrollAnimationSmooth::scroll.

LayoutTests:

  • platform/gtk/fast/scrolling/scroll-wheel-repeated-events-expected.txt: Added.
  • platform/gtk/fast/scrolling/scroll-wheel-repeated-events.html: Added.
2:43 AM Changeset in webkit [280514] by ysuzuki@apple.com
  • 4773 edits
    322 adds in trunk/JSTests

[JSC] Upgrade test262
https://bugs.webkit.org/show_bug.cgi?id=228627

Reviewed by Ross Kirsling.

  • test262/config.yaml:
  • test262/expectations.yaml:
1:29 AM Changeset in webkit [280513] by jh718.park@samsung.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed. Remove the build warning below since r280493.
warning: variable ‘block’ set but not used [-Wunused-but-set-variable]

  • b3/B3CanonicalizePrePostIncrements.cpp:

(JSC::B3::canonicalizePrePostIncrements):

1:06 AM Changeset in webkit [280512] by ysuzuki@apple.com
  • 1 edit
    9 moves in trunk/LayoutTests

Move DOM-unrelated tests out of fast/regex/dom
https://bugs.webkit.org/show_bug.cgi?id=228661

Reviewed by Saam Barati.

By moving to fast/regex/, we can run them from JSC tests too.

  • fast/regex/lastIndex-expected.txt: Renamed from LayoutTests/fast/regex/dom/lastIndex-expected.txt.
  • fast/regex/lastIndex.html: Renamed from LayoutTests/fast/regex/dom/lastIndex.html.
  • fast/regex/non-pattern-characters-expected.txt: Renamed from LayoutTests/fast/regex/dom/non-pattern-characters-expected.txt.
  • fast/regex/non-pattern-characters.html: Renamed from LayoutTests/fast/regex/dom/non-pattern-characters.html.
  • fast/regex/script-tests/lastIndex.js: Renamed from LayoutTests/fast/regex/dom/script-tests/lastIndex.js.
  • fast/regex/script-tests/non-pattern-characters.js: Renamed from LayoutTests/fast/regex/dom/script-tests/non-pattern-characters.js.
  • fast/regex/script-tests/unicodeCaseInsensitive.js: Renamed from LayoutTests/fast/regex/dom/script-tests/unicodeCaseInsensitive.js.
  • fast/regex/unicodeCaseInsensitive-expected.txt: Renamed from LayoutTests/fast/regex/dom/unicodeCaseInsensitive-expected.txt.
  • fast/regex/unicodeCaseInsensitive.html: Renamed from LayoutTests/fast/regex/dom/unicodeCaseInsensitive.html.
12:52 AM Changeset in webkit [280511] by commit-queue@webkit.org
  • 7 edits
    1 delete in trunk

Unreviewed, reverting r280488.
https://bugs.webkit.org/show_bug.cgi?id=228677

media/modern-media-controls/ tests are failing or timed-out

Reverted changeset:

"[Cocoa] Remove support for AVAssetImageGenerator"
https://bugs.webkit.org/show_bug.cgi?id=228560
https://commits.webkit.org/r280488

Note: See TracTimeline for information about the timeline view.