Timeline



Oct 25, 2021:

9:40 PM Changeset in webkit [284855] by Ryan Haddad
  • 11 edits
    1 copy
    2 moves
    29 adds in trunk

Change default iOS simulator to one with a larger screen size
https://bugs.webkit.org/show_bug.cgi?id=231844

Reviewed by Jonathan Bedard.

Tools:

  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

(RunTest.test_device_type_specific_listing):

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort):
(IPhoneSimulatorPort):

LayoutTests:

  • platform/ios-wk2/TestExpectations:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt: Removed.
  • platform/ios/compositing/backing/page-scale-overlap-in-iframe-expected.txt: Renamed from LayoutTests/platform/ios-wk2/compositing/backing/page-scale-overlap-in-iframe-expected.txt.
  • platform/ios/compositing/contents-format/deep-color-backing-store-expected.txt: Added.
  • platform/ios/fast/events/ios/keyboard-scrolling-distance-expected.txt: Added.
  • platform/ios/fast/events/ios/keyboard-should-not-trigger-resize-expected.txt: Added.
  • platform/ios/fast/events/ios/rotation/zz-no-rotation-expected.txt: Added.
  • platform/ios/fast/forms/ios/accessory-bar-navigation-expected.txt: Added.
  • platform/ios/fast/forms/ios/focus-input-in-fixed-expected.txt: Added.
  • platform/ios/fast/forms/ios/focus-input-in-iframe-expected.txt: Added.
  • platform/ios/fast/forms/ios/focus-input-via-button-expected.txt: Added.
  • platform/ios/fast/forms/ios/focus-input-via-button-no-scaling-expected.txt: Added.
  • platform/ios/fast/forms/ios/focus-long-textarea-expected.txt: Added.
  • platform/ios/fast/forms/ios/zoom-after-input-tap-expected.txt: Added.
  • platform/ios/fast/forms/ios/zoom-after-input-tap-wide-input-expected.txt: Added.
  • platform/ios/fast/scrolling/ios/clipping-ancestor-with-accelerated-scrolling-ancestor-expected.txt:
  • platform/ios/fast/scrolling/ios/overflow-scrolling-ancestor-clip-expected.txt:
  • platform/ios/fast/scrolling/ios/overflow-scrolling-ancestor-clip-size-expected.txt:
  • platform/ios/fast/scrolling/ios/scrolling-content-clip-to-viewport-expected.txt:
  • platform/ios/fast/scrolling/ios/subpixel-overflow-scrolling-with-ancestor-expected.txt: Copied from LayoutTests/platform/ios/fast/scrolling/ios/overflow-scrolling-ancestor-clip-expected.txt.
  • platform/ios/fast/scrolling/ios/touch-stacking-expected.txt:
  • platform/ios/fast/viewport/ios/device-width-viewport-after-changing-view-scale-expected.txt: Added.
  • platform/ios/fast/viewport/ios/non-responsive-viewport-after-changing-view-scale-expected.txt: Added.
  • platform/ios/fast/viewport/ios/responsive-viewport-with-minimum-width-after-changing-view-scale-expected.txt: Added.
  • platform/ios/fast/viewport/ios/shrink-to-fit-for-page-without-viewport-meta-expected.txt: Added.
  • platform/ios/fast/viewport/ios/use-minimum-device-width-for-page-without-viewport-meta-expected.txt: Added.
  • platform/ios/fast/viewport/ios/width-is-device-width-expected.txt: Added.
  • platform/ios/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-expected.txt: Added.
  • platform/ios/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt: Added.
  • platform/ios/fast/viewport/ios/width-is-device-width-overflowing-expected.txt: Added.
  • platform/ios/fast/viewport/ios/width-is-device-width-overflowing-no-shrink-to-fit-expected.txt: Added.
  • platform/ios/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt: Renamed from LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt.
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-form-submission-expected.txt:
  • platform/ios/scrollingcoordinator/ios/fixed-in-frame-layer-reconcile-layer-position-expected.txt: Added.
  • platform/ios/scrollingcoordinator/ios/fixed-in-overflow-scroll-scrolling-tree-expected.txt: Added.
  • platform/ios/scrollingcoordinator/ios/fixed-scrolling-with-keyboard-expected.txt: Added.
  • platform/ios/scrollingcoordinator/ios/ui-scrolling-tree-expected.txt: Added.
9:37 PM Changeset in webkit [284854] by ap@apple.com
  • 2 edits in trunk/Tools

Add perl 5.30 to kill-old-processes
https://bugs.webkit.org/show_bug.cgi?id=232290

Reviewed by Ryan Haddad.

  • CISupport/kill-old-processes:
6:44 PM Changeset in webkit [284853] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Fix issue for transform-origin in SVG
https://bugs.webkit.org/show_bug.cgi?id=232189

Patch by Nikolaos Mouchtaris <Nikos Mouchtaris> on 2021-10-25
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/svg/styling/render/transform-origin-not-explicit-style-ref.svg: Added.
  • web-platform-tests/svg/styling/render/transform-origin-not-explicit-style.svg: Added.

Source/WebCore:

Add temp fix to use previously ignored transform-origin in SVGGraphicsElement::animatedLocalTransform
if not explicitly set in style. Proper fix to come: https://bugs.webkit.org/show_bug.cgi?id=232128.

Tests: imported/w3c/web-platform-tests/svg/styling/render/transform-origin-not-explicit-style-ref.svg

imported/w3c/web-platform-tests/svg/styling/render/transform-origin-not-explicit-style.svg

  • svg/SVGGraphicsElement.cpp:

(WebCore::SVGGraphicsElement::animatedLocalTransform const):

5:34 PM Changeset in webkit [284852] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Fix stale assertion in InternalFunctionAllocationProfile after r284757
https://bugs.webkit.org/show_bug.cgi?id=232269

Reviewed by Robin Morisset.

Now, condition in InternalFunction is changed in r284757. We need to update
this assertion accordingly. It is tested (and crashing) in the existing stress test[1].

[1]: InternalFunctionAllocationProfile-createAllocationStructureFromBase-should-allow-for-same-classInfo-from-different-globals.js

  • bytecode/InternalFunctionAllocationProfile.h:

(JSC::InternalFunctionAllocationProfile::createAllocationStructureFromBase):

5:17 PM Changeset in webkit [284851] by ysuzuki@apple.com
  • 6 edits
    1 add in trunk

[JSC] Don't branch around register allocation in DFG enumerator get by val
https://bugs.webkit.org/show_bug.cgi?id=232260
rdar://84544469

Reviewed by Robin Morisset.

JSTests:

  • stress/dont-branch-around-regalloc-enumerator-get-by-val-float.js: Added.

(foo):

Source/JavaScriptCore:

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByValOnString):
(JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
(JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
(JSC::DFG::SpeculativeJIT::compileGetByValForObjectWithString):
(JSC::DFG::SpeculativeJIT::compileGetByValForObjectWithSymbol):
(JSC::DFG::SpeculativeJIT::compileGetByValOnDirectArguments):
(JSC::DFG::SpeculativeJIT::compileGetByValOnScopedArguments):
(JSC::DFG::SpeculativeJIT::compileEnumeratorGetByVal):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByVal):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByVal):
(JSC::DFG::SpeculativeJIT::compile):

5:16 PM Changeset in webkit [284850] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WTF

[WTF] Make Int128 operator* constexpr
https://bugs.webkit.org/show_bug.cgi?id=232270

Reviewed by Mark Lam.

We remove MSVC X64 (so, Windows only) switching in Int128 operator* since
it breaks constexpr-ness of operator*, which makes writing code difficult.
We can bring this kind of optimization back when C++20 std::is_constant_evaluated()
becomes available.

  • wtf/Int128.h:

(WTF::operator*):

4:41 PM Changeset in webkit [284849] by Kyle Piddington
  • 3 edits
    2 adds in trunk

REGRESSION (iOS 15), safari604.1: Could not link the shader program
https://bugs.webkit.org/show_bug.cgi?id=231475

Renaming regex incorrectly substituted an attribute.
Update to require exact attribute match

Source/ThirdParty/ANGLE:

Reviewed by Dean Jackson

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

(rx::mtl::updateShaderAttributes):

LayoutTests:

Add test to expose bug, verify test passes

Reviewed by Dean Jackson.

  • fast/canvas/webgl/attrib-name-aliasing-bug-expected.txt: Added.
  • fast/canvas/webgl/attrib-name-aliasing-bug.html: Added.
4:39 PM Changeset in webkit [284848] by wilander@apple.com
  • 4 edits in trunk

Remove assert failure expectations after r284846 landed
https://bugs.webkit.org/show_bug.cgi?id=232048
<rdar://problem/84479642>
https://bugs.webkit.org/show_bug.cgi?id=232102
<rdar://problem/84521189>
https://bugs.webkit.org/show_bug.cgi?id=231255
<rdar://problem/83903881>
https://bugs.webkit.org/show_bug.cgi?id=231431
<rdar://problem/84029425>

Unreviewed test gardening.

Depends on this fix: https://trac.webkit.org/changeset/284846/webkit

Source/WebKit:

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::setPrivateClickMeasurementAppBundleIDForTesting):

Removed comment with Bugzilla reference.
I decided to keep the logging since it was so useful in finding the root
cause of the assertion crashes. Logging is only triggered when we will
fail the assertion.

LayoutTests:

  • platform/ios-wk2/TestExpectations:

Removed crash expectations now that the app bundle ID setting for InAppBrowserPrivacy
API tests is being cleared after each test.

4:33 PM Changeset in webkit [284847] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Mac wk1 ] 2 media-capabilities/webrtc tests are flaky failures.
https://bugs.webkit.org/show_bug.cgi?id=232283.

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
4:33 PM Changeset in webkit [284846] by Kate Cheney
  • 2 edits in trunk/Tools

Clean up App Bound Domains tests
https://bugs.webkit.org/show_bug.cgi?id=232278

Reviewed by John Wilander.

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

(TEST):

4:25 PM Changeset in webkit [284845] by Simon Fraser
  • 8 edits in trunk/Tools

webkitpy: Add an explicit ImageDiffResult.passed rather than relying on diff_image being non-None
https://bugs.webkit.org/show_bug.cgi?id=232266

Reviewed by Jonathan Bedard.

A ref test was considered failing if it ImageDiffResult.diff_image was not None, allowing
for confusing unit tests that used a value of True for diff_image.

Fix by giving ImageDiffResult an explicit 'passes' field, and testing it rather than
diff_image.

Also used named arguments when creating ImageDiffResults for readability.

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

(SingleTestRunner._compare_image): Use diff_result.passed as truth for whether the test passed,
and only store the error_string in failure cases (which allows ImageDiff to spew diagnostic errors
without triggering failures).
(SingleTestRunner._compare_output_with_reference):

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

(TestResultWriterTest.test_reftest_diff_image.ImageDiffTestPort.diff_image):
(TestResultWriterTest):

  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

(RunTest.test_tolerance.ImageDiffTestPort.diff_image):

  • Scripts/webkitpy/port/base.py:

(Port.diff_image):

  • Scripts/webkitpy/port/image_diff.py:

(ImageDiffResult.init):
(ImageDiffResult.eq):
(ImageDiffResult.repr):
(ImageDiffer._read):

  • Scripts/webkitpy/port/port_testcase.py:

(PortTestCase.integration_test_image_diff):
(PortTestCase.test_diff_imagemissing_both):
(PortTestCase.test_diff_image
missing_actual):
(PortTestCase.test_diff_imagemissing_expected):
(PortTestCase.test_diff_image):
(PortTestCase.test_diff_image_passed):
(PortTestCase.test_diff_image_failed):
(PortTestCase.test_diff_image_crashed):

  • Scripts/webkitpy/port/test.py:
4:20 PM Changeset in webkit [284844] by Chris Fleizach
  • 5 edits
    2 adds in trunk

WebKit should use img@title as label even if img@alt is exlicitly empty
https://bugs.webkit.org/show_bug.cgi?id=173870
<rdar://problem/33010427>

Reviewed by Andres Gonzalez.

Source/WebCore:

alt="" usually means to ignore an image. However, when it also carries other
descriptive attributes, that is probably the wrong decision.
Other browsers are not ignoring these images, WebKit should follow suit.

This issue has been raised with
https://github.com/w3c/accname/issues/27

Test: accessibility/img-no-alt-not-ignored-with-title.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const):

LayoutTests:

  • accessibility/img-no-alt-not-ignored-with-title-expected.txt: Added.
  • accessibility/img-no-alt-not-ignored-with-title.html: Added.
  • platform/ios-simulator/TestExpectations:
  • platform/win/TestExpectations:
4:10 PM Changeset in webkit [284843] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Rename a few variable and parameter names in WKContentViewInteraction.mm
https://bugs.webkit.org/show_bug.cgi?id=232275

Reviewed by Tim Horton.

The ProceedWithTextSelectionInImage enum flag was being stored in a variable named
ProceedWithTextSelectionInImage in a few places, likely due to mass renaming when upstreaming WebKit support
for Live Text. Rename this so that we use lowercase for these variable names.

No change in behavior.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView _doAfterPendingImageAnalysis:]):
(-[WKContentView _invokeAllActionsToPerformAfterPendingImageAnalysis:]):
(-[WKContentView _contextMenuInteraction:configurationForMenuAtLocation:completion:]):

4:06 PM Changeset in webkit [284842] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

Update test expectations for fast/scrolling/mac/scrollbars/overlay-scrollbar-hovered.html.
https://bugs.webkit.org/show_bug.cgi?id=232282.

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:16 PM Changeset in webkit [284841] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Catalina wk1 ] 2 embedded-content/media-elements are flaky failures.
https://bugs.webkit.org/show_bug.cgi?id=232277.

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
3:09 PM Changeset in webkit [284840] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ macOS wk1 ] imported/w3c/web-platform-tests/html/interaction/focus/the-autofocus-attribute/spin-by-blocking-style-sheet.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=232276

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
2:56 PM Changeset in webkit [284839] by commit-queue@webkit.org
  • 9 edits
    1 copy
    1 add
    2 deletes in trunk/LayoutTests

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

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-10-25

  • platform/glib/TestExpectations:
  • platform/glib/imported/w3c/web-platform-tests/css/css-cascade/layer-counter-style-override-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/layer-counter-style-override-expected.txt.
  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/layer-counter-style-override-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
2:51 PM Changeset in webkit [284838] by Alan Coon
  • 7 edits in branches/safari-612-branch

Cherry-pick r284532. rdar://problem/84625267

Source/WebKit:
[WebAuthn] Obtain consent to create new credential when platform authenticator in excludedCredentials
https://bugs.webkit.org/show_bug.cgi?id=219813
<rdar://problem/72484635>

Patch by John Pascoe <J Pascoe> on 2021-10-20
Reviewed by Brent Fulgham.

Currently, whenever the platform authenticator is within excludedCredentials during makeCredential we
always return NotAllowedError and merely flash a consent screen. This does not match the spec per Step 3.1
of makeCredential (https://w3c.github.io/webauthn/#sctn-op-make-cred). Instead, we should always obtain consent
and return a different error depending on consent was obtained.

A fixme to add this was inadvertently removed in https://bugs.webkit.org/attachment.cgi?id=393180&action=prettypatch

Added api test TestWebKitAPI.WebAuthenticationPanel.LADuplicateCredentialWithConsent

  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: (WebKit::LocalAuthenticator::makeCredential):

Tools:
[WebAuthn] Obtain consent to create new credential when platform authenticator in excludedCredentials
https://bugs.webkit.org/show_bug.cgi?id=219813
<rdar://problem/72484635>

Patch by John Pascoe <J Pascoe> on 2021-10-20
Reviewed by Brent Fulgham.

Currently, whenever the platform authenticator is within excludedCredentials during makeCredential we
always return NotAllowedError and merely flash a consent screen. This does not match the spec per Step 3.1
of makeCredential (https://w3c.github.io/webauthn/#sctn-op-make-cred). Instead, we should always obtain consent
and return a different error depending on consent was obtained.

This adds a test to confirm a different path is taken whenever consent is obtained.

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST):

LayoutTests:
WebAuthn] Obtain consent to create new credential when platform authenticator in excludedCredentials
https://bugs.webkit.org/show_bug.cgi?id=219813
<rdar://problem/72484635>

Patch by John Pascoe <J Pascoe> on 2021-10-20
Reviewed by Brent Fulgham.

Modify layout tests to reflect different exception returned when consent is provided

  • http/wpt/webauthn/public-key-credential-create-failure-local-silent.https.html:
  • http/wpt/webauthn/public-key-credential-create-failure-local.https.html:

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

2:51 PM Changeset in webkit [284837] by Alan Coon
  • 5 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r284294. rdar://problem/84630302

[iOS] Screen Sharing doesn't switch to AirPlay when <video> enters fullscreen mode
https://bugs.webkit.org/show_bug.cgi?id=231807
<rdar://82995799>

Reviewed by Eric Carlson.

WebKit will allow AVPlayer to switch to AirPlay Video mode from Screen Sharing when a
<video> element is in fullscreen mode. However, the fullscreen state this code depends on
is not stored in the GPU process.

Implement RemoteMediaPlayerProxy::mediaPlayerFullscreenMode()
and ::mediaPlayerIsVideoFullscreenStandby().

  • GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode): (WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged): (WebKit::RemoteMediaPlayerProxy::mediaPlayerFullscreenMode const): (WebKit::RemoteMediaPlayerProxy::mediaPlayerIsVideoFullscreenStandby const):
  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::videoFullscreenStandbyChanged):

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

2:51 PM Changeset in webkit [284836] by Alan Coon
  • 3 edits
    2 adds in branches/safari-612-branch

Cherry-pick r284247. rdar://problem/84629726

REGRESSION (r276370): Elements with animated transform property might not properly rendered
https://bugs.webkit.org/show_bug.cgi?id=230753

Reviewed by Myles C. Maxfield.

Source/WebCore:

The change in r276370 was incorrect, resulting in the geometry map being used when
an element had a transform and transform-style: preserves-3d.

Fix by going back to testing for the presence of the various transform properties which
affect geometry. hasTransformRelatedProperty() is still useful as a fast bit-check.

Test: fast/repaint/transform-preserve-3d-repaint.html

  • rendering/RenderGeometryMap.cpp: (WebCore::canMapBetweenRenderersViaLayers):

LayoutTests:

  • fast/repaint/transform-preserve-3d-repaint-expected.txt: Added.
  • fast/repaint/transform-preserve-3d-repaint.html: Added.

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

2:51 PM Changeset in webkit [284835] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/ThirdParty/ANGLE

Cherry-pick r284125. rdar://problem/84630015

Upstream ANGLE: PrimitiveRestart tests fail due to incorrect draw commands
https://bugs.webkit.org/show_bug.cgi?id=231626
<rdar:/problem/84167241>

Primitive restart draw commands were being encoded
incorrectly. Single element ranges were being disregarded,
and a maximum draw size was not being enforced when the
index buffer was aliased / reused.

Cherry-pick from upstream anglebug.com/6535

Reviewed by Kenneth Russell.

  • src/libANGLE/renderer/metal/VertexArrayMtl.mm: (rx::VertexArrayMtl::getDrawIndices):

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

2:51 PM Changeset in webkit [284834] by Alan Coon
  • 7 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r284102. rdar://problem/84630200

WebGL video texture upload is very slow due to excessive transfer of the video pixel buffer
https://bugs.webkit.org/show_bug.cgi?id=231425

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-10-13
Reviewed by Youenn Fablet.

Typical WebGL content requests the videos to be uploaded to a texture
once per render loop update, even though the video has not changed.
The video pixel buffer is slow to transfer across IPC. It should be transferred
only when it has changed.

MediaPlayerPrivateAVFoundationObjC and MediaPlayerPrivateMediaSourceAVFObjC hold
the last requested pixel buffer ref. They will update it or discard it only
when pixelBufferForCurrentTime() is called.

Cache the pixel buffer to MediaPlayerPrivateRemote (GPUP side proxy)
Cache the pixel buffer to RemoteMediaPlayerProxy (WebP side proxy)

The caches increase the total memory use only during the duration
of the call, since after the ref has been updated, it refers
to the one always held in the original objects (MediaPlayerPrivateAVFoundationObjC
and MediaPlayerPrivateMediaSourceAVFObjC)

No new tests, fixes a perf regression wrt GPUP media.

  • GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::invalidate):
  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
  • GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm: (WebKit::RemoteMediaPlayerProxy::nativeImageForCurrentTime): (WebKit::RemoteMediaPlayerProxy::pixelBufferForCurrentTimeIfChanged): (WebKit::RemoteMediaPlayerProxy::pixelBufferForCurrentTime): Deleted.
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
  • WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm: (WebKit::MediaPlayerPrivateRemote::pixelBufferForCurrentTime):

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

2:51 PM Changeset in webkit [284833] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r284007. rdar://problem/84630339

Cocoa GraphicsContextGLOpenGL uses depth and stencil for pbuffers on ANGLE Metal
https://bugs.webkit.org/show_bug.cgi?id=231424

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-10-12
Reviewed by Dean Jackson.

ANGLE Metal allocates depth and stencil buffers when a pbuffer is bound to
a texture via eglBindTexImage.
To side-step this performance issue, allocate the gl context with EGLConfig
that disables depth and stencil. The config is used for the video texture
upload context, video texture upload pbuffers as well as other pbuffers.

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):

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

2:51 PM Changeset in webkit [284832] by Alan Coon
  • 3 edits
    2 adds in branches/safari-612-branch

Cherry-pick r283979. rdar://problem/84630712

WebGL first clear is lost when scissor is used for preserveDrawingBuffer:true in some conditions
https://bugs.webkit.org/show_bug.cgi?id=230618
<rdar://problem/83668270>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-10-12
Reviewed by Dean Jackson.

Source/WebCore:

Disable scissor for the duration of the blit from drawing buffer
to display buffer.
Not testable via WebGL conformance test suite as it affects the compositing.

Test: webgl/gl-clear-preserve-drawing-buffer-bug.html

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLOpenGL::prepareTextureImpl):

LayoutTests:

Add a pixel test to verify that scissor is not applied when blitting drawing buffer
to display buffer in preserveDrawingBuffer: true case.

  • webgl/gl-clear-preserve-drawing-buffer-bug-expected.html: Added.
  • webgl/gl-clear-preserve-drawing-buffer-bug.html: Added.

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

2:51 PM Changeset in webkit [284831] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r283975. rdar://problem/84630618

Error the encoder in case we cannot create a RemoteVideoSample
https://bugs.webkit.org/show_bug.cgi?id=231505
<rdar://83975229>

Reviewed by Eric Carlson.

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: (WebKit::LibWebRTCCodecs::encodeFrame): RemoteVideoSample::create can return nullptr if we cannot get an IOSurface from the pixel buffer or if pixel buffer is null due to VTPixelBufferConformerCopyConformedPixelBuffer failing. In that case, we error the encoder instead of trying to encode the frame.

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

2:50 PM Changeset in webkit [284830] by Alan Coon
  • 3 edits
    1 add in branches/safari-612-branch

Cherry-pick r283600. rdar://problem/84625586

Don't pass DontBuildStrings to next token after parsing an empty parameter list
https://bugs.webkit.org/show_bug.cgi?id=225094
<rdar://problem/77231778>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/dont-pass-DontBuildStrings-when-building-empty-arguments-list.js: Added. (main.a.prototype.g.toString.string_appeared_here): (main.a): (main):

Source/JavaScriptCore:

We might need the string, it turns out!

  • parser/Parser.cpp: (JSC::Parser<LexerType>::parseArguments):

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

2:50 PM Changeset in webkit [284829] by Alan Coon
  • 8 edits
    1 add in branches/safari-612-branch/Source

Cherry-pick r283592. rdar://problem/84625519

[iOS] Transcode videos selected from UIImagePickerController
https://bugs.webkit.org/show_bug.cgi?id=230639
rdar://79665678

Reviewed by Tim Horton.

Source/WebCore:

  • en.lproj/Localizable.strings:

Add a localizable string for the message displayed while transcoding
video.

Source/WebCore/PAL:

Add AVFoundation API needed to transcode video.

  • pal/cocoa/AVFoundationSoftLink.h:
  • pal/cocoa/AVFoundationSoftLink.mm:

Source/WebKit:

File inputs on iOS allow users to choose images/videos from the system
photo picker, using UIImagePickerController. In single selection mode,
UIImagePickerController transcodes the selected video to H.264. However,
in multiple selection mode, video is not transcoded and is left in its
original format.

Today, videos on most iOS devices are encoded with HEVC by default.
However, some sites, such as Twitter, only accept H.264 encoded video.
Thus, the current video upload behavior is problematic, as users may be
unable to upload video.

Unfortunately, the photo picking functionality of UIImagePickerController
is deprecated. The best solution would be to adopt PHPickerViewController,
the replacement API, which performs transcoding when retrieving selected
items (regardless of single/multiple selection). However,
PHPickerViewController currently lacks other functionality that WebKit
requires, preventing adoption.

Consequently, the short term solution is to transcode the videos in
WebKit, ensuring H.264 encoded video is always provided to sites. See
below for implementation details.

  • Platform/spi/ios/PhotosUISPI.h: Added.
  • UIProcess/ios/forms/WKFileUploadPanel.mm: (-[_WKFileUploadItem setFileURL:]):

Add a setter to update the file URL. Called after transcoding a _WKFileUploadItem.

(-[WKFileUploadMediaTranscoder initWithItems:videoCount:completionHandler:]):

Introduce WKFileUploadMediaTranscoder to manage transcoding of videos
and the display of progress UI. Transcoding is performed serially
(one video at a time), but occurs off the main thread.

(-[WKFileUploadMediaTranscoder start]):

Begin transcoding. Run a timer to update the progress UI, as
AVAssetExportSession does not provide progress updates on its own.

The progress UI is implemented using PUActivityProgressController, to
match system Photos UI.

(-[WKFileUploadMediaTranscoder _processItemAtIndex:]):

Transcode a single video, using AVAssetExportSession. If transcoding
fails for any reason, the original video is used as a fallback.
Transcoding can also be cancelled using the progress UI, in which case
no more videos are processed.

(-[WKFileUploadMediaTranscoder _finishedProcessing]):
(-[WKFileUploadMediaTranscoder _dismissProgress]):
(-[WKFileUploadMediaTranscoder _updateProgress:]):
(-[WKFileUploadMediaTranscoder _temporaryDirectoryCreateIfNecessary]):
(-[WKFileUploadPanel _chooseMediaItems:]):

Refactor the common aspects of single/multiple media selection into a
single method.

(-[WKFileUploadPanel imagePickerController:didFinishPickingMediaWithInfo:]):
(-[WKFileUploadPanel imagePickerController:didFinishPickingMultipleMediaWithInfo:]):
(-[WKFileUploadPanel _processMediaInfoDictionaries:successBlock:failureBlock:]):
(-[WKFileUploadPanel _processMediaInfoDictionaries:atIndex:processedResults:successBlock:failureBlock:]):
(-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):

Remove redundant platform conditional.

(-[WKFileUploadPanel _uploadMediaItemsTranscodingVideo:]):

If any videos were selected, transcode them prior to uploading.

  • WebKit.xcodeproj/project.pbxproj:

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

2:50 PM Changeset in webkit [284828] by Alan Coon
  • 7 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r283489. rdar://problem/84630680

Regression (r283238)[ MacOS wk1 ] fast/mediacapturefromelement/CanvasCaptureMediaStream-webgl-events.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=231022

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-10-04
Reviewed by Youenn Fablet.

Originally the implementation would always return red frame, and the test would pass.
r283238 changed the implementation to not return a sample if there is not a display buffer,
as logically such cannot be used as a sample.
This broke the test case since the CanvasCaptureMediaStreamTrack would try to capture
the canvas display buffer during next runloop iteration (0s timeout) after each modification.
This does not work, as the display buffer is composed during "prepare for display"
phase.

Add CanvasBase observers to observe that display buffer has been prepared, and capture
the media sample after that observer has fired.

The test would work for wk2 due to timing related differences, preparation would have
typically run before the canvas capture 0s timeout.

Fixes fast/mediastream/captureStream/canvas3d.html for wk1.

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp: (WebCore::CanvasCaptureMediaStreamTrack::Source::startProducingData): (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasChanged): (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasDisplayBufferPrepared):
  • Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
  • html/CanvasBase.cpp: (WebCore::CanvasBase::addDisplayBufferObserver): (WebCore::CanvasBase::removeDisplayBufferObserver): (WebCore::CanvasBase::notifyObserversCanvasDisplayBufferPrepared):
  • html/CanvasBase.h: (WebCore::CanvasBase::hasDisplayBufferObservers const):
  • html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::prepareForDisplay): Move the "prepare only when the owner element is in the tree" logic to its correct place to the caller, e.g. to the element itself.

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

2:50 PM Changeset in webkit [284827] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r283299. rdar://problem/84629227

Cocoa GraphicsContextGLOpenGL should be more robust in destruction
https://bugs.webkit.org/show_bug.cgi?id=230940

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

Delete resources based on checking if they exist, not based on
a flag that should cause them to exist. Currently the constructor can return early,
so various resources might not exist even if their flag condition would
indicate they should.

No new tests, refactor.

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: (WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL):

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

2:50 PM Changeset in webkit [284826] by Alan Coon
  • 4 edits in branches/safari-612-branch

Cherry-pick r282627. rdar://problem/84630078

webgl/2.0.y/conformance/extensions/webgl-compressed-texture-s3tc-srgb.html fails on Intel+AMD Metal
https://bugs.webkit.org/show_bug.cgi?id=229941

Zero-initialize compressed textures explicitly, as they aren't implicitly initalized in Metal.
Reviewed by Kenneth Russell <kbr@chromium.org>.

Source/ThirdParty/ANGLE:

  • src/libANGLE/renderer/metal/mtl_utils.h:
  • src/libANGLE/renderer/metal/mtl_utils.mm: (rx::mtl::GetCompressedBufferForTextureWithFormat): (rx::mtl::InitializeCompressedTextureContents): (rx::mtl::InitializeTextureContents):

LayoutTests:

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

2:50 PM Changeset in webkit [284825] by Alan Coon
  • 3 edits
    8 adds in branches/safari-612-branch

Cherry-pick r281547. rdar://problem/84629691

ANGLE Metal infinities and NaNs generated with incorrect syntax
https://bugs.webkit.org/show_bug.cgi?id=229439
<rdar://81033366>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-08-24
Reviewed by Dean Jackson.

Source/ThirdParty/ANGLE:

Generate NaN and infinity constant values correctly.
An else was missing from if-block, causing double processing.

  • src/compiler/translator/TranslatorMetalDirect/EmitMetal.cpp: (GenMetalTraverser::emitSingleConstant):
  • src/libANGLE/renderer/metal/mtl_utils.mm: (rx::mtl::CreateShaderLibrary):

LayoutTests:

Add tests that test some aspects of NaN and -+inf that the GLSL ES 3.00 spec
talks about.

  • webgl/pending/conformance2/glsl3/float-constant-expressions-expected.txt: Added.
  • webgl/pending/conformance2/glsl3/float-constant-expressions.html: Added.
  • webgl/pending/resources/webgl_test_files/conformance2/glsl3/float-constant-expressions.html: Added.
  • webgl/pending/resources/webgl_test_files/js/glsl-conformance-test.js: Added.

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

2:50 PM Changeset in webkit [284824] by Alan Coon
  • 9 edits
    2 adds in branches/safari-612-branch

Cherry-pick r283515. rdar://problem/84624826

[WebAuthn] Prefer internal user verification if available over pin entry.
https://bugs.webkit.org/show_bug.cgi?id=213903
<rdar://problem/65359269>

Patch by John Pascoe <J Pascoe> on 2021-10-04
Reviewed by Brent Fulgham.

Source/WebCore:

This adds an option to mock internal user verification in tests.

  • testing/MockWebAuthenticationConfiguration.h: (WebCore::MockWebAuthenticationConfiguration::HidConfiguration::encode const): (WebCore::MockWebAuthenticationConfiguration::HidConfiguration::decode):
  • testing/MockWebAuthenticationConfiguration.idl:

Source/WebKit:

  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp: (WebKit::MockHidConnection::feedReports):
  • UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp: (WebKit::CtapAuthenticator::makeCredential): (WebKit::CtapAuthenticator::getAssertion): (WebKit::fido::toStatus): Deleted. (WebKit::fido::isPinError): Deleted.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-internal-uv.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-internal-uv.html: Added.

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

2:33 PM Changeset in webkit [284823] by achristensen@apple.com
  • 6 edits in trunk/Source

Use xpc_connection_copy_invalidation_reason where available for debugging daemon connection failures
https://bugs.webkit.org/show_bug.cgi?id=232152

Reviewed by Brady Eidson.

Source/WebKit:

  • Platform/IPC/cocoa/DaemonConnectionCocoa.mm:

(WebKit::Daemon::ConnectionToMachService<Traits>::initializeConnectionIfNeeded const):

  • Shared/Daemon/DaemonUtilities.mm:

(WebKit::startListeningForMachServiceConnections):

Source/WTF:

  • wtf/PlatformHave.h:
  • wtf/spi/darwin/XPCSPI.h:
2:32 PM Changeset in webkit [284822] by Ayumi Kojima
  • 10 edits
    1 move
    2 adds in trunk/Source

Unreviewed, reverting r284742.

Reverting because this commit may have casued a regression on
imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-
speak-events.html

Reverted changeset:

"AX: Unify speech synthesizer platform usage for Mac/iOS"
https://bugs.webkit.org/show_bug.cgi?id=231895
https://commits.webkit.org/r284742

2:27 PM Changeset in webkit [284821] by Chris Dumez
  • 11 edits in trunk

Form navigations with target=_blank should not have an opener
https://bugs.webkit.org/show_bug.cgi?id=232243

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Merge https://github.com/web-platform-tests/wpt/pull/31368 from upstream WPT to fix outdated expectations in
WPT tests.

  • web-platform-tests/content-security-policy/form-action/form-action-self-allowed-target-blank.html:
  • web-platform-tests/content-security-policy/form-action/form-action-src-allowed-target-blank.sub.html:
  • web-platform-tests/content-security-policy/form-action/form-action-src-redirect-allowed-target-blank.sub.html:
  • web-platform-tests/html/semantics/forms/form-submission-target/resources/reltester.js:

(formUsesTargetBlank):
(relTester):

Source/WebCore:

Form navigations with target=_blank should not have an opener (unless rel="opener" is specified
on the <form>), similarly to link navigations. This is a bit better for security as Web developers
may not realize that popups opened via target=_blank get an opener link by default and do things
like post messages to their opener, or navigate it. Not having an opener relationship also enables
us to process-swap in more cases for better site isolation.

This behavior is behind the same experimental feature flag as the behavior for anchors with target=_blank
since WebKit is the only engine implementing this at the moment (despite this behavior having been
standardized).

No new tests, updated existing tests.

  • html/HTMLFormElement.cpp:

(WebCore::parseFormRelAttributes):
(WebCore::HTMLFormElement::submit):

1:34 PM Changeset in webkit [284820] by Jonathan Bedard
  • 2 edits in trunk

Add GitHub usernames for bedison and darinadler

Unreviewed.

  • metadata/contributors.json: Add beidson and darinadler.
1:24 PM Changeset in webkit [284819] by Kate Cheney
  • 3 edits
    6 adds in trunk

[App Privacy Report] CORS preflight requests attributed incorrectly
https://bugs.webkit.org/show_bug.cgi?id=232221
<rdar://problem/84116159>

Reviewed by Brent Fulgham.

Source/WebKit:

HTTP redirects should already be marked as app-initiated or not based
on the NSURLRequest that initiated the redirect, either because the
same NSURLRequest is used or because it is set in the completion
handler of the networkDataTask->willPerformHTTPRedirection call in
NetworkSessionCocoa.

However, checking the request before calling the completion handler
can initiate CORS preflight checks that create loads that are incorrectly
marked for App Privacy Report. This patch sets the app initiated value
in the ResourceRequest object before the new NetworkDataTask is created to fix this.

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):

LayoutTests:

Layout test coverage.

  • http/tests/app-privacy-report/app-attribution-cors-preflight-redirect-expected.txt: Added.
  • http/tests/app-privacy-report/app-attribution-cors-preflight-redirect.html: Added.
  • http/tests/app-privacy-report/resources/cors-preflight.py: Added.
  • http/tests/app-privacy-report/resources/redirect-with-cors-preflight-check.py: Added.
  • http/tests/app-privacy-report/user-attribution-cors-preflight-redirect-expected.txt: Added.
  • http/tests/app-privacy-report/user-attribution-cors-preflight-redirect.html: Added.
1:15 PM Changeset in webkit [284818] by Chris Dumez
  • 5 edits in trunk/LayoutTests

imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-submission-algorithm.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=232117

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Merge https://github.com/web-platform-tests/wpt/pull/31359 from upstream WPT to address the timeout and
rebaseline the test now that it is fully passing.

  • web-platform-tests/html/semantics/forms/form-submission-0/form-submission-algorithm-expected.txt:
  • web-platform-tests/html/semantics/forms/form-submission-0/resources/targetted-form.js:

(populateForm):

LayoutTests:

Unskip test that no longer times out.

12:30 PM Changeset in webkit [284817] by Chris Dumez
  • 6 edits in trunk/LayoutTests

Regression (r284610): [ iOS BigSur wk2 ] http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html is failing
https://bugs.webkit.org/show_bug.cgi?id=232151
<rdar://problem/84552682>

Unreviewed follow-up to r284723 since the test is still flaky on iOS.

  • TestExpectations:
  • http/tests/security/resources/anchor-tag-with-blank-target.html:
  • http/tests/security/resources/page-executing-javascript.html:
  • http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox-expected.txt:
  • http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html:
12:25 PM Changeset in webkit [284816] by commit-queue@webkit.org
  • 8 edits in trunk

WebKit ought to be able to play videos without Content-Length HTTP header fields and without range support
https://bugs.webkit.org/show_bug.cgi?id=232174

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-25
Reviewed by Geoff Garen.

LayoutTests/imported/w3c:

  • web-platform-tests/service-workers/service-worker/fetch-audio-tainting.https-expected.txt:

Source/WebCore:

AVFoundation doesn't like it when you give it a range like 0-1/* because it doesn't know the content length.
To work around this, wait until the entire video is loaded then respond with a known length.
This isn't great, but it's better than not playing the video at all.

In order to fix this, I noticed that the setHTTPHeaderField and setHTTPStatusCode calls were not being reflected in the new NSURLResponse,
so I added a call to initNSURLResponse to update the NSURLResponse. I'm concerned about what other videos were not having the synthesized
response updated, and I'm surprised non-range-response-supporting videos played without this change.

This makes it so we can play videos like https://trac.webkit.org/export/284633/webkit/trunk/Tools/TestWebKitAPI/Tests/WebKit/test.mp4
which can play in Chrome and Firefox. Covered by an API test.

  • platform/network/cf/ResourceResponse.h:
  • platform/network/cocoa/RangeResponseGenerator.mm:

(WebCore::synthesizedResponseForRange):
(WebCore::RangeResponseGenerator::giveResponseToTaskIfBytesInRangeReceived):

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSessionDataTask resource:receivedResponse:completionHandler:]):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm:

(TestWebKitAPI::TEST):

12:10 PM Changeset in webkit [284815] by Alan Coon
  • 10 edits in branches/safari-612-branch

Cherry-pick r284692. rdar://problem/84553142

Followup to r284652: ensure file handle is closed in web process
https://bugs.webkit.org/show_bug.cgi?id=232127

Reviewed by Youenn Fablet.

Source/WebCore:

Covered by test: storage/filesystemaccess/sync-access-handle-close-worker.html

  • Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp: (WebCore::FileSystemSyncAccessHandle::~FileSystemSyncAccessHandle): make sure file handle is closed when FileSystemSyncAccessHandle is destroyed. (WebCore::FileSystemSyncAccessHandle::closeInternal): (WebCore::FileSystemSyncAccessHandle::close):
  • Modules/filesystemaccess/FileSystemSyncAccessHandle.h:

Source/WebKit:

  • NetworkProcess/storage/FileSystemStorageHandle.cpp: (WebKit::FileSystemStorageHandle::~FileSystemStorageHandle): (WebKit::FileSystemStorageHandle::createSyncAccessHandle): (WebKit::FileSystemStorageHandle::close):
  • NetworkProcess/storage/FileSystemStorageHandle.h:
  • Platform/IPC/cocoa/SharedFileHandleCocoa.cpp: an extra fd is created here and does not get closed. (IPC::SharedFileHandle::decode):

LayoutTests:

  • storage/filesystemaccess/resources/sync-access-handle-close.js: (testSyncFunction): (async testAsyncFunction): (async testFunctions): (async testMultipleHandles): (async test):
  • storage/filesystemaccess/sync-access-handle-close-worker-expected.txt:

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

12:10 PM Changeset in webkit [284814] by Alan Coon
  • 7 edits
    3 adds in branches/safari-612-branch

Cherry-pick r284652. rdar://problem/84517013

FileSystemSyncAccessHandle should close platform file handle on close()
https://bugs.webkit.org/show_bug.cgi?id=232067
<rdar://problem/84517013>

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker-expected.txt:

Source/WebCore:

This patch also ensures no request is sent after close() is called.

Test: storage/filesystemaccess/sync-access-handle-close-worker.html

  • Modules/filesystemaccess/FileSystemFileHandle.cpp: (WebCore::FileSystemFileHandle::createSyncAccessHandle):
  • Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp: (WebCore::FileSystemSyncAccessHandle::FileSystemSyncAccessHandle): (WebCore::FileSystemSyncAccessHandle::~FileSystemSyncAccessHandle): (WebCore::FileSystemSyncAccessHandle::isClosingOrClosed const): (WebCore::FileSystemSyncAccessHandle::truncate): (WebCore::FileSystemSyncAccessHandle::getSize): (WebCore::FileSystemSyncAccessHandle::flush): (WebCore::FileSystemSyncAccessHandle::close): (WebCore::FileSystemSyncAccessHandle::didClose): (WebCore::FileSystemSyncAccessHandle::read): (WebCore::FileSystemSyncAccessHandle::write):
  • Modules/filesystemaccess/FileSystemSyncAccessHandle.h:

LayoutTests:

  • storage/filesystemaccess/resources/sync-access-handle-close.js: Added. (finishTest): (async testFunctions): (async test):
  • storage/filesystemaccess/sync-access-handle-close-worker-expected.txt: Added.
  • storage/filesystemaccess/sync-access-handle-close-worker.html: Added.

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

12:10 PM Changeset in webkit [284813] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r284712. rdar://problem/81586485

AX: Inform AX when the injected bundle sends a synchronous message
https://bugs.webkit.org/show_bug.cgi?id=232159

Reviewed by Andres Gonzalez.

When an injected bundle sends a synchronous message we need to inform accessibility clients, so they don't get
stuck trying to message the WebContent process. This is already handled for synchronous messages
generated from the WebPage.

  • WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::postSynchronousMessage):

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

12:10 PM Changeset in webkit [284812] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/JavaScriptCore

Cherry-pick r284699. rdar://problem/84340372

canDoFastSpread should also check that the Structure is from the global object we're watching
https://bugs.webkit.org/show_bug.cgi?id=231976
<rdar://84340372>

Reviewed by Keith Miller.

Just reorder the checks for clarity.

  • dfg/DFGGraph.cpp: (JSC::DFG::Graph::canDoFastSpread):

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

12:10 PM Changeset in webkit [284811] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r284644. rdar://problem/84153991

Rare crash under DisplayLink::displayLinkCallback()
https://bugs.webkit.org/show_bug.cgi?id=232101
<rdar://84153991>

Reviewed by Tim Horton.

The crash was a divide by zero under m_currentUpdate.nextUpdate(), indicating that
m_currentUpdate.updatesPerSecond was zero. Previous assumptions that this was caused
by weird display configs were wrong. The actual issue is a race condition where
the callback can fire while we're still inside CVDisplayLinkStart(), or at least
before we've updated m_currentUpdate.

The fix is to initialize m_currentUpdate before we call CVDisplayLinkStart().

  • UIProcess/mac/DisplayLink.cpp: (WebKit::DisplayLink::addObserver):

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

12:10 PM Changeset in webkit [284810] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/JavaScriptCore

Cherry-pick r284623. rdar://problem/84375007

Add missing overflow check to DFGIntegerRangeOptimizationPhase::filterConstant()
https://bugs.webkit.org/show_bug.cgi?id=232058

Reviewed by Robin Morisset.

Added overflow check.

  • dfg/DFGIntegerRangeOptimizationPhase.cpp:

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

12:10 PM Changeset in webkit [284809] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/JavaScriptCore

Cherry-pick r284585. rdar://problem/84338648

[JSC] ArithAbs should care about INT32_MIN
https://bugs.webkit.org/show_bug.cgi?id=232051
rdar://84338648

Reviewed by Michael Saboff.

ArithAbs (without overflow check) can return negative value if the input is INT32_MIN with Int32Use.

  • dfg/DFGIntegerRangeOptimizationPhase.cpp:

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

12:10 PM Changeset in webkit [284808] by Alan Coon
  • 6 edits in branches/safari-612-branch/Source/JavaScriptCore

Cherry-pick r284576. rdar://problem/84338462

We should watch isHavingABadTime if we read from the structureCache
https://bugs.webkit.org/show_bug.cgi?id=232019

Reviewed by Yusuke Suzuki.

We should lock the structure cache when we clear it, and the compiler thread should
watch isHavingABadTime in the case that the cache might get cleared.

  • dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
  • dfg/DFGConstantFoldingPhase.cpp: (JSC::DFG::ConstantFoldingPhase::foldConstants):
  • runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::haveABadTime):
  • runtime/StructureCache.cpp: (JSC::StructureCache::clear):
  • runtime/StructureCache.h: (JSC::StructureCache::clear): Deleted.

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

12:09 PM Changeset in webkit [284807] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/JavaScriptCore

Cherry-pick r284573. rdar://problem/84329018

Add missing overflow checks to DFGIntegerRangeOptimizationPhase::isEquivalentTo()
https://bugs.webkit.org/show_bug.cgi?id=232024

Reviewed by Tadeu Zagallo.

Added overflow check before comparing for equality.

  • dfg/DFGIntegerRangeOptimizationPhase.cpp:

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

12:09 PM Changeset in webkit [284806] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/JavaScriptCore

Cherry-pick r284506. rdar://problem/84340372

canDoFastSpread should also check that the Structure is from the global object we're watching
https://bugs.webkit.org/show_bug.cgi?id=231976
<rdar://84340372>

Reviewed by Keith Miller.

  • dfg/DFGGraph.cpp: (JSC::DFG::Graph::canDoFastSpread):

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

12:09 PM Changeset in webkit [284805] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/JavaScriptCore

Cherry-pick r284467. rdar://problem/84327812

Wasm Table can take arbitrary default value
https://bugs.webkit.org/show_bug.cgi?id=231933
rdar://84327812

Reviewed by Robin Morisset.

  • wasm/WasmTable.cpp: (JSC::Wasm::Table::grow):

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

12:09 PM Changeset in webkit [284804] by Alan Coon
  • 6 edits
    4 adds in branches/safari-612-branch

Cherry-pick r284436. rdar://problem/83753956

Make createImageBitmap() take EXIF orientation into account correctly
https://bugs.webkit.org/show_bug.cgi?id=231063
<rdar://problem/83753956>

Reviewed by Myles Maxfield and Said Abou-Hallawa.

LayoutTests/imported/w3c:

  • web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation.html: Added.
  • web-platform-tests/html/canvas/element/manual/imagebitmap/resources/squares.jpg: Added.

Source/WebCore:

Test: imported/w3c/web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation.html

This makes us treat {imageOrientation:"none"} as meaning "apply EXIF
orientation without any additional transformation", and
{imageOrientation:"flipY"} as meaning "apply EXIF orientation and then
apply an additional vertical flip". This behavior matches Firefox;
https://github.com/whatwg/html/issues/7210 is open on clarifying this
behavior in the HTML spec.

  • html/ImageBitmap.cpp: (WebCore::ImageBitmap::createPromise): (WebCore::ImageBitmap::createFromBuffer): (WebCore::imageOrientationForOrientation): Deleted.
  • html/ImageBitmapOptions.h: (WebCore::ImageBitmapOptions::resolvedImageOrientation const):
  • html/ImageBitmapOptions.idl:
  • platform/graphics/ImageOrientation.h: (WebCore::ImageOrientation::withFlippedY const):

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

12:09 PM Changeset in webkit [284803] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r283628. rdar://problem/83729357

CoreAudioSharedUnit should not clear its persistentID when device capture changes
https://bugs.webkit.org/show_bug.cgi?id=231280

Reviewed by Eric Carlson.

Manually tested.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp: (WebCore::CoreAudioSharedUnit::cleanupAudioUnit): Partially reverting https://commits.webkit.org/r280702 which was clearing m_persistentID in cleanUpAudioUnit. The issue is that when unit is capturing and is changing capturing device, it will set m_persistentID then cleanUpAudioUnit as part of its reconfiguration. This was making m_persistentID being empty. When starting to capture, we often receive a notification of changed devices and we would check whether the new devices set contains m_persistentID. If not (which is the case since m_persistentID is empty), we would fail the capture.

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

12:09 PM Changeset in webkit [284802] by Alan Coon
  • 4 edits
    6 adds in branches/safari-612-branch

Cherry-pick r283590. rdar://problem/80837616

ASSERT(m_callback->hasCallback()) under IntersectionObserver::notify()
https://bugs.webkit.org/show_bug.cgi?id=231235
<rdar://80837616>

Reviewed by Ryosuke Niwa.

Source/WebCore:

IntersectionObserver's JS callback stays alive as long as its JS wrapper and
its JS wrapper's lifetime relies on the IntersectionObserver::isReachableFromOpaqueRoots()
implementation. isReachableFromOpaqueRoots() keeps the wrapper alive as long
as the JS wrappers of observation / pending targets are alive. However, as per specification,
we always need to dispatch an observation for an observation target, even if that target
is not connected. Our code was already taking care of dispatching such observation. However,
there was nothing keeping the observation target alive in this case and thus nothing keeping
the JS callback alive either.

To address the issue, I am introducing a new m_targetsWaitingForFirstObservation data member
which holds a strong ref to the observation target until the next time we call notify().
This makes sure that the observation target (and its JS wrapper) stays alive long enough for
us to dispatch the first observation for it. I also updated isReachableFromOpaqueRoots() to
return true as long as m_targetsWaitingForFirstObservation is non-empty so that the
IntersectionObserver's JS wrapper (and thus the JS callback) stay alive long enough too.

Tests: intersection-observer/observe-disconnected-target-crash.html

intersection-observer/observe-disconnected-target.html

  • page/IntersectionObserver.cpp: (WebCore::IntersectionObserver::observe): (WebCore::IntersectionObserver::unobserve): (WebCore::IntersectionObserver::removeAllTargets): (WebCore::IntersectionObserver::notify): (WebCore::IntersectionObserver::isReachableFromOpaqueRoots const):
  • page/IntersectionObserver.h:

LayoutTests:

Add layout test coverage both for the crash and the Web facing behavior.

  • intersection-observer/observe-disconnected-target-crash-expected.txt: Added.
  • intersection-observer/observe-disconnected-target-crash.html: Added.
  • intersection-observer/observe-disconnected-target-expected.txt: Added.
  • intersection-observer/observe-disconnected-target.html: Added.

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

12:09 PM Changeset in webkit [284801] by Alan Coon
  • 21 edits
    8 copies
    1 add in branches/safari-612-branch

Cherry-pick r282984. rdar://problem/77587429

Web Inspector: Graphics: add instrumentation for new CanvasRenderingContext2DSettings
https://bugs.webkit.org/show_bug.cgi?id=225180
<rdar://problem/77587429>

Reviewed by BJ Burg.

Source/JavaScriptCore:

  • inspector/protocol/Canvas.json: Add colorSpace and desynchronized to Canvas.ContextAttributes.

Source/WebCore:

  • inspector/InspectorCanvas.cpp: (WebCore::buildObjectForCanvasContextAttributes): Added. (WebCore::InspectorCanvas::buildObjectForCanvas): (WebCore::InspectorCanvas::buildInitialState): Unify the two cases where we fetch canvas attributes into a single method so that both get the same data. This means that the canvas recorder now also uses Canvas.ContextAttributes.

LayoutTests:

  • inspector/canvas/context-attributes-expected.txt:
  • inspector/canvas/recording-2d-frameCount-expected.txt:
  • inspector/canvas/recording-2d-full-expected.txt:
  • inspector/canvas/recording-2d-memoryLimit-expected.txt:
  • inspector/canvas/recording-bitmaprenderer-frameCount-expected.txt:
  • inspector/canvas/recording-bitmaprenderer-full-expected.txt:
  • inspector/canvas/recording-bitmaprenderer-memoryLimit-expected.txt:
  • inspector/canvas/recording-html-2d-expected.txt:
  • inspector/canvas/recording-webgl-frameCount-expected.txt:
  • inspector/canvas/recording-webgl-full-expected.txt:
  • inspector/canvas/recording-webgl-memoryLimit-expected.txt:
  • inspector/canvas/recording-webgl-snapshots-expected.txt:
  • inspector/canvas/recording-webgl2-frameCount-expected.txt:
  • inspector/canvas/recording-webgl2-full-expected.txt:
  • inspector/canvas/recording-webgl2-memoryLimit-expected.txt:
  • inspector/canvas/recording-webgl2-snapshots-expected.txt:

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

11:37 AM Changeset in webkit [284800] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 ] imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.worker.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=231544

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:06 AM Changeset in webkit [284799] by Ryan Haddad
  • 5 edits in trunk/Tools

Bring up queues for Monterey
https://bugs.webkit.org/show_bug.cgi?id=232186

Reviewed by Alexey Proskuryakov.

  • CISupport/build-webkit-org/config.json:
  • CISupport/build-webkit-org/factories_unittest.py:

(TestExpectedBuildSteps):

  • CISupport/build-webkit-org/public_html/dashboard/Scripts/WebKitBuildbot.js:

(WebKitBuildbot):

  • CISupport/build-webkit-org/wkbuild.py:

(_should_file_trigger_build):

11:04 AM Changeset in webkit [284798] by Andres Gonzalez
  • 4 edits in trunk/Source/WebCore

Remove childrenInitialized() from the AXCoreObject interface.
https://bugs.webkit.org/show_bug.cgi?id=232241
<rdar://problem/84613750>

Reviewed by Chris Fleizach.

Follow up to https://bugs.webkit.org/show_bug.cgi?id=232130

AXCoreObject::childrenInitialized is an internal housekeeping method to
the AccessibilityObject class hierarchy, thus it is unnecessary to
expose in the AXCoreObject interface.

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::childrenInitialized const):

  • accessibility/AccessibilityObjectInterface.h:

(WebCore::AXCoreObject::isDescendantOfObject const): No need to check
for childrenInitialized in this function.

  • accessibility/isolatedtree/AXIsolatedObject.h:
11:00 AM Changeset in webkit [284797] by Kocsen Chung
  • 1 copy in tags/Safari-613.1.6.2

Tag Safari-613.1.6.2.

10:58 AM Changeset in webkit [284796] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

AX: Keyboard-focusable leaf nodes with labels should be accessible elements on iOS
https://bugs.webkit.org/show_bug.cgi?id=232126

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-10-25
Reviewed by Andres Gonzalez.

Source/WebCore:

Consider any focusable leaf node that has a label to be an
accessible element on iOS. See Google Maps JS API usecase
in: https://bugs.webkit.org/show_bug.cgi?id=223492

Test: accessibility/ios-simulator/keyboard-focusable-leaf-nodes.html

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
Rather than returning false as a fallback, call an element accessible
if it focusable, has a label, and is a leaf node (has no accessible
children).
(-[WebAccessibilityObjectWrapper accessibilityLabel]):
Don't compute axTitle, axDescription, interactiveDescription, and
interactiveVideoDescription until we actually need them (this is
a refactor unrelated to the patch title).

LayoutTests:

Add test ensuring focusable leaf nodes with labels are accessible elements on iOS.

  • accessibility/ios-simulator/labeled-focusable-leaf-nodes-expected.txt: Added.
  • accessibility/ios-simulator/labeled-focusable-leaf-nodes.html: Added.
10:56 AM Changeset in webkit [284795] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ iOS15 Sim Release ] imported/w3c/web-platform-tests/webrtc/RTCDtlsTransport-state.html is a flaky failure (Harness Error (TIMEOUT)).
https://bugs.webkit.org/show_bug.cgi?id=232252.

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
10:56 AM Changeset in webkit [284794] by Kocsen Chung
  • 8 edits in branches/safari-613.1.6-branch/Source

Versioning.

WebKit-7613.1.6.2

10:52 AM Changeset in webkit [284793] by Ziran Sun
  • 6 edits in trunk

[CSS-grid] Need to set prefer width dirty for the child that has constraints to the grid area
https://bugs.webkit.org/show_bug.cgi?id=232140

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

Update the test expectation file for the following tests. These tests are now passing.

  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-002-expected.txt:
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002-expected.txt:
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-002-expected.txt:

Source/WebCore:

For a child with relative width constraints to the grid area, such as percentaged paddings, we reset the
overridingContainingBlockContentSizeForChild value for columns when we are executing a definite strategy
for columns. Since we have updated the overridingContainingBlockContentSizeForChild inline-axis/width value
in GridTrackSizingAlgorithmStrategy::minContentForChild, we might need to recompute the child's relative
width. For some cases, we probably will not be able to do it during the RenderGrid::layoutGridItems() function
as the grid area does't change there any more. Since we are doing a layout inside
GridTrackSizingAlgorithmStrategy::logicalHeightForChild() function, this CL takes the advantage and set the
preferredLogicalWidth dirty before this layout call.

  • rendering/GridTrackSizingAlgorithm.cpp:

(WebCore::GridTrackSizingAlgorithmStrategy::minContentForChild const):

10:48 AM Changeset in webkit [284792] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk

Source/WebCore:
ASSERT(node) triggered after surroundNodeRangeWithElement for node without editable style
https://bugs.webkit.org/show_bug.cgi?id=232133

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2021-10-25
Reviewed by Wenson Hsieh.

If the last styled node was not parent node of a current text node, but we
wish to style the text node, we will add a style span to surround the text node.
However, this requires the parent to have an editable style, or
we will not properly insert the span in the right location, which
later leads to a traversal into an invalid node. This change
makes it so we return early if the parent node does not have an
editable style, but modifying the existing
CompositeEditCommand::insertNodeBefore to return a boolean in the
early return case.

Test: fast/editing/apply-relative-font-style-change-crash-003.html

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::insertNodeBefore):

  • editing/CompositeEditCommand.h:

LayoutTests:
ASSERT(node) triggered after surroundNodeRangeWithElement for node without editable style
https://bugs.webkit.org/show_bug.cgi?id=232133

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2021-10-25
Reviewed by Wenson Hsieh.

  • fast/editing/apply-relative-font-style-change-crash-003-expected.txt: Added.
  • fast/editing/apply-relative-font-style-change-crash-003.html: Added.
10:40 AM Changeset in webkit [284791] by Jonathan Bedard
  • 3 edits in trunk/Tools

[webkitscmpy] Log based tests fail in different timezones
https://bugs.webkit.org/show_bug.cgi?id=232197
<rdar://problem/84615646>

Reviewed by Dewei Zhu.

Tests based on git log need to be timezone aware.

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
  • Scripts/libraries/webkitscmpy/webkitscmpy/test/log_unittest.py:
10:39 AM Changeset in webkit [284790] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS Debug ] fast/selectors/ backtracking tests are timing out.
https://bugs.webkit.org/show_bug.cgi?id=230988

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
10:25 AM Changeset in webkit [284789] by Darin Adler
  • 2 edits in trunk/Source/WebCore

Restore strict parsing behavior in parseStringArrayFromDictionaryToUInt16Vector
https://bugs.webkit.org/show_bug.cgi?id=232218

Reviewed by Sam Weinig.

  • platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:

(WebCore::parseStringArrayFromDictionaryToUInt16Vector): Make sure the entire parse
fails if any of the elements in the array are either not strings, or do not parse
successfully as a uint16_t.

10:02 AM Changeset in webkit [284788] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

[JSC][32bit] Don't speculate Cell on PutByVal
https://bugs.webkit.org/show_bug.cgi?id=232242

Patch by Mikhail R. Gadelha <Mikhail R. Gadelha> on 2021-10-25
Reviewed by Yusuke Suzuki.

This patch is similar to https://bugs.webkit.org/show_bug.cgi?id=232052
but smaller: given that we have more registers available, we don't have
to speculate Cells anymore.

This patch removes the Cell speculation during the DFG FixUp phase and
adjust the operationPutByVal* calls to use the generic version (instead
of the Cell versions).

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

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

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

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
8:37 AM Changeset in webkit [284786] by Wenson Hsieh
  • 18 edits
    1 add in trunk

REGRESSION (r284079): Audio continues playing on hulu.com in private browsing mode after closing the tab
https://bugs.webkit.org/show_bug.cgi?id=232113
rdar://84399283

Reviewed by Chris Dumez.

Source/WebKit:

I inadvertently introduced a ref-counting cycle between RemoteRenderingBackend and RemoteDisplayListRecorder
after IPC stream refactoring in r284079, since RemoteDisplayListRecorder directly strongly refs the rendering
backend, and the rendering backend indirectly holds on to RemoteDisplayListRecorders through remote image
buffers in the resource cache. Since RemoteRenderingBackend also strongly refs GPUConnectionToWebProcess as
well, this caused the entire GPUConnectionToWebProcess to leak after tearing down the connected web process, if
the web process ever installed a remote rendering backend for 2D canvas.

To avoid this cycle, turn RemoteDisplayListRecorder's m_renderingBackend into a RefPtr instead of a Ref, and
clear it out in stopListeningForIPC(). This also means that we no longer need a separate boolean flag to
ensure that RemoteDisplayListRecorder::stopListeningForIPC() is idempotent, so we also remove
m_isListeningForIPC altogether.

Test: GPUProcess.DoNotLeakConnectionAfterClosingWebPage

  • GPUProcess/GPUConnectionToWebProcess.cpp:

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

  • GPUProcess/GPUConnectionToWebProcess.h:

(WebKit::GPUConnectionToWebProcess::objectCountForTesting):

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::webProcessConnectionCountForTesting):

Add support for a testing-only SPI hook to ask for the live GPUConnectionToWebProcess count. This retrieves a
statically incremented/decremented count of the GPUConnectionToWebProcess instances that exist in the GPU
process; importantly, this is different from asking the GPUProcess for the number of connections in
m_webProcessConnections, since the latter will be 0 even when one or more GPUConnectionToWebProcesses are
still alive.

  • GPUProcess/GPUProcess.h:
  • GPUProcess/GPUProcess.messages.in:
  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::RemoteDisplayListRecorder):

Also fix a leak caused by RemoteDisplayListRecorder and RemoteImageBuffer strongly reffing each other. Since
RemoteImageBuffer owns RemoteDisplayListRecorder, the backpointer from RemoteDisplayListRecorder to the image
buffer should be weak, not strong.

(WebKit::RemoteDisplayListRecorder::startListeningForIPC):
(WebKit::RemoteDisplayListRecorder::stopListeningForIPC):
(WebKit::RemoteDisplayListRecorder::paintFrameForMedia):

  • GPUProcess/graphics/RemoteDisplayListRecorder.h:

(): Deleted.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::stopListeningForIPC):

Adjust this logic to ensure that we finish pending work and destroy cached resources *right before* we stop
listening for all stream IPC messages. Since RemoteDisplayListRecorder now clears out its pointer to the
rendering backend in stopListeningForIPC(), we'll need to ensure that any pending IPC stream messages that
might cause RemoteDisplayListRecorder to call into the back end are processed before we sever the IPC stream
connection for good by removing all receivers.

  • UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:

Add the new testing SPI (see above for more details).

  • UIProcess/API/Cocoa/WKWebViewTesting.mm:

(-[WKWebView _gpuToWebProcessConnectionCountForTesting:]):

  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::webProcessConnectionCountForTesting):

  • UIProcess/GPU/GPUProcessProxy.h:

Tools:

Add a new API test to verify that the GPU to web prcoess connection isn't leaked in the GPU process. See WebKit
ChangeLog for more details.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/canvas-image-data.html: Added.
  • TestWebKitAPI/cocoa/TestWKWebView.h:
  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[WKWebView gpuToWebProcessConnectionCount]):

8:26 AM Changeset in webkit [284785] by Simon Fraser
  • 9 edits in trunk/Tools

webkitpy: have diff_image() return a ImageDiffResult
https://bugs.webkit.org/show_bug.cgi?id=232222

Reviewed by Jonathan Bedard.

diff_image() returned a list which resulted in hard to read code. In addition, the
presence of a diff_image is used to indicate failure; future patches will change this,
so having diff_image() return a class makes that easier.

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

(SingleTestRunner._compare_image):
(SingleTestRunner._compare_output_with_reference):

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

(TestResultWriterTest.test_reftest_diff_image.ImageDiffTestPort.diff_image):
(TestResultWriterTest):

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

(FailureReftestMismatch.write_failure):

  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

(RunTest.test_tolerance.ImageDiffTestPort.diff_image):

  • Scripts/webkitpy/port/base.py:

(Port.diff_image):

  • Scripts/webkitpy/port/image_diff.py:

(ImageDiffResult):
(ImageDiffResult.init):
(ImageDiffResult.eq):
(ImageDiffResult.ne):
(ImageDiffResult.repr):
(ImageDiffer._read):

  • Scripts/webkitpy/port/port_testcase.py:

(PortTestCase.integration_test_image_diff):
(PortTestCase.test_diff_imagemissing_both):
(PortTestCase.test_diff_image
missing_actual):
(PortTestCase.test_diff_imagemissing_expected):
(PortTestCase.test_diff_image):
(PortTestCase.test_diff_image_passed):
(PortTestCase.test_diff_image_failed):
(PortTestCase.test_diff_image_crashed):

  • Scripts/webkitpy/port/test.py:
8:17 AM Changeset in webkit [284784] by clopez@igalia.com
  • 2 edits in trunk/Tools

[webkitpy] webkit-test-runner doesn't report all results when a test is run several times
https://bugs.webkit.org/show_bug.cgi?id=231790

Reviewed by Jonathan Bedard.

WTR was only picking one of the failure results when a test was run more than once
(for example with the flag --repeat-each=X), so it was not reporting all the values
that the test generated. This is a major issue when searching for flaky tests.

This patch adds a dictionary to store all the results of a given test on the repeated
repeats and then it ensures those values are taken into account when reporting the
final results for the test. It marks the test as flaky if more than one different value
was generated.

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

(TestRunResults.init):
(TestRunResults.add):
(TestRunResults.merge):
(summarize_results):

7:36 AM Changeset in webkit [284783] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

Add support for fast-cq mode to webkit-patch land-safely command
https://bugs.webkit.org/show_bug.cgi?id=232196

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/tool/steps/postdiffforcommit.py:

(PostDiffForCommit):
(PostDiffForCommit.run):

  • Scripts/webkitpy/tool/commands/upload_unittest.py: Added unit-test.

(test_land_safely_with_fast_cq):

7:35 AM Changeset in webkit [284782] by Alan Bujtas
  • 4 edits in trunk

[LFC][IFC] Check across inline box boundaries for breakable position
https://bugs.webkit.org/show_bug.cgi?id=232219

Reviewed by Antti Koivisto.

Source/WebCore:

This patch expands the "can we break before" check across multiple runs.
There are cases when, while the content is break-all, we need to look at adjacent runs to decided whether the
run boundary is a valid breaking position.
e.g
<div style="width: 1ch; word-break: break-all"><span>X</span><span>.</span></div>

'break-all' tells us to break after 'X]' but the punctuation character prevents us to do so.
This should work even when the content is in separate runs ([X]. e.g. inline-box boundary or simply
they represent individual DOM nodes)

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::canBreakBefore):
(WebCore::Layout::findLastValidBreakingPosition): Let's find the last valid breaking position in this run including the run end boundary.
(WebCore::Layout::midWordBreak):
(WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const):
(WebCore::Layout::previousTextRunIndex): Deleted.

LayoutTests:

6:55 AM Changeset in webkit [284781] by commit-queue@webkit.org
  • 20 edits
    1 delete in trunk/Source/JavaScriptCore

[JSC][32bit] Use DataIC in Baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=232079

Patch by Geza Lore <gezalore@gmail.com> on 2021-10-25
Reviewed by Yusuke Suzuki.

This patch ports the JSVALUE32_64 baseline JIT to use DataICs.

The majority of the involved opcodes (all but one) could be easily
modified to use a common implementation between JSVALUE64 and
JSVALUE32_64 platforms by abstracting over machine registers holding a
JSValue using JSValueReg types instead of GPRReg.

The only non-trivial additional abstraction needed was over the ideal
argument registers used in a function call, so loading the arguments
from memory can put them straight in the ABI specific argument
register whenever possible, or appropriate temporaries otherwise. For
this I added CCallHelpers::preferredArgumentGPR (for passing host
pointers and other primitive types that fit in a machine register on
the host platform), and CCallHelpers::preferredArgumentJSR (for
passing JSValue/EncodedJSValue). Please see the description of these
in the code.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • assembler/ARMv7Assembler.h:

(JSC::ARMv7Assembler::strb):

  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::emitFastPathImpl):
(JSC::CallLinkInfo::emitDataICFastPath):

  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::initializeFromUnlinkedStructureStubInfo):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::branchIfNotObject):

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::sizeOfArg):
(JSC::CCallHelpers::pickJSR):
(JSC::CCallHelpers::preferredArgumentJSR):
(JSC::CCallHelpers::preferredArgumentGPR):

  • jit/CallFrameShuffler.h:
  • jit/GPRInfo.h:

(JSC::JSValueRegs::operator== const):
(JSC::JSValueRegs::operator!= const):
(JSC::JSValueRegs::tagGPR const):
(JSC::JSValueRegs::payloadGPR const):
(JSC::JSValueRegs::uses const):
(JSC::JSValueRegs::overlaps const):
(JSC::JSValueRegs::JSValueRegs):
(JSC::JSValueRegs::payloadOnly):

  • jit/JIT.cpp:

(JSC::JIT::compileAndLinkWithoutFinalizing):
(JSC::JIT::link):

  • jit/JIT.h:
  • jit/JITCall.cpp:

(JSC::JIT::emit_op_ret):
(JSC::JIT::emitPutCallResult):
(JSC::JIT::compileSetupFrame):
(JSC::JIT::compileCallEval):
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileTailCall):
(JSC::JIT::compileOpCall):
(JSC::JIT::emit_op_iterator_open):
(JSC::JIT::emitSlow_op_iterator_open):
(JSC::JIT::emit_op_iterator_next):
(JSC::JIT::emitSlow_op_iterator_next):

  • jit/JITCall32_64.cpp: Removed.
  • jit/JITCode.h:

(JSC::JITCode::useDataIC):

  • jit/JITInlineCacheGenerator.cpp:

(JSC::generateGetByIdInlineAccess):
(JSC::JITGetByIdGenerator::generateBaselineDataICFastPath):
(JSC::JITGetByIdWithThisGenerator::generateBaselineDataICFastPath):
(JSC::JITPutByIdGenerator::generateBaselineDataICFastPath):
(JSC::JITInByIdGenerator::generateBaselineDataICFastPath):

  • jit/JITInlineCacheGenerator.h:
  • jit/JITInlines.h:

(JSC::JIT::emitArrayProfilingSiteWithCell):
(JSC::JIT::emitJumpSlowCaseIfNotJSCell):

  • jit/JITOpcodes.cpp:
  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::generateGetByValSlowCase):
(JSC::JIT::slow_op_get_by_val_prepareCallGenerator):
(JSC::JIT::emit_op_get_private_name):
(JSC::JIT::emitSlow_op_get_private_name):
(JSC::JIT::emit_op_set_private_brand):
(JSC::JIT::emitSlow_op_set_private_brand):
(JSC::JIT::emit_op_check_private_brand):
(JSC::JIT::emitSlow_op_check_private_brand):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emit_op_put_by_val_direct):
(JSC::JIT::emitSlow_op_put_by_val):
(JSC::JIT::slow_op_put_by_val_prepareCallGenerator):
(JSC::JIT::emit_op_put_private_name):
(JSC::JIT::emitSlow_op_put_private_name):
(JSC::JIT::slow_op_put_private_name_prepareCallGenerator):
(JSC::JIT::emit_op_del_by_id):
(JSC::JIT::emitSlow_op_del_by_id):
(JSC::JIT::emit_op_del_by_val):
(JSC::JIT::emitSlow_op_del_by_val):
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emitSlow_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emitSlow_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::emit_op_in_by_id):
(JSC::JIT::emitSlow_op_in_by_id):
(JSC::JIT::emit_op_in_by_val):
(JSC::JIT::emitSlow_op_in_by_val):
(JSC::JIT::emitHasPrivate):
(JSC::JIT::emitHasPrivateSlow):
(JSC::JIT::emit_op_enumerator_get_by_val):

  • jit/JITPropertyAccess32_64.cpp:
6:34 AM Changeset in webkit [284780] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Rename TextUtil::midWordBreak to breakWord
https://bugs.webkit.org/show_bug.cgi?id=232217

Reviewed by Antti Koivisto.

This function may "break" the content at the left/right boundary. This is also in preparation for
using midWordBreak term to indicate a position somewhere within the word boundary.

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::midWordBreak):
(WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const):

  • layout/formattingContexts/inline/text/TextUtil.cpp:

(WebCore::Layout::TextUtil::breakWord):
(WebCore::Layout::TextUtil::midWordBreak): Deleted.

  • layout/formattingContexts/inline/text/TextUtil.h:
6:12 AM Changeset in webkit [284779] by commit-queue@webkit.org
  • 2 edits in trunk

Add zdobersek's GitHub name to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=232234

Unreviewed.

Patch by Zan Dobersek <zdobersek@igalia.com> on 2021-10-25

  • metadata/contributors.json:
5:35 AM Changeset in webkit [284778] by Chris Lord
  • 3 edits
    2 adds in trunk

[GTK][WPE] REGRESSION(r284596): Scrolling sometimes jumps to the top of the page during smooth mouse-wheel scrolling
https://bugs.webkit.org/show_bug.cgi?id=232229

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Make sure that retargeting a smooth scroll animation before a frame
callback is called works correctly.

Test: fast/scrolling/gtk/repeated-mouse-wheel-smooth.html

  • platform/ScrollAnimationSmooth.cpp:

(WebCore::ScrollAnimationSmooth::startAnimatedScrollToDestination):

LayoutTests:

Add test to make sure that retargeted smooth scrolling doesn't jump to
the top of the page unexpectedly.

  • fast/scrolling/gtk/repeated-mouse-wheel-smooth-expected.txt: Added.
  • fast/scrolling/gtk/repeated-mouse-wheel-smooth.html: Added.
5:11 AM Changeset in webkit [284777] by Martin Robinson
  • 2 edits in trunk

Add mrobinson's GitHub name to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=232232

Unreviewed.

  • metadata/contributors.json:
4:28 AM Changeset in webkit [284776] by commit-queue@webkit.org
  • 38 edits in trunk/LayoutTests

[GLIB] Update test baselines after r284521
https://bugs.webkit.org/show_bug.cgi?id=232231

Unreviewed test gardening.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-10-25

  • platform/glib/fast/block/float/014-expected.txt:
  • platform/glib/fast/box-sizing/percentage-height-expected.txt:
  • platform/glib/fast/css-generated-content/016-expected.txt:
  • platform/glib/fast/css/first-letter-recalculation-expected.txt:
  • platform/glib/fast/multicol/pagination/nested-transforms-expected.txt:
  • platform/gtk/fast/block/float/029-expected.txt:
  • platform/gtk/fast/block/float/independent-align-positioning-expected.txt:
  • platform/gtk/fast/block/positioning/window-height-change-expected.txt:
  • platform/gtk/fast/css-generated-content/014-expected.txt:
  • platform/gtk/fast/css-generated-content/hover-style-change-expected.txt:
  • platform/gtk/fast/dom/HTMLHeadElement/head-link-style-href-check-expected.txt:
  • platform/gtk/fast/forms/button-cannot-be-nested-expected.txt:
  • platform/gtk/fast/lists/003-expected.txt:
  • platform/gtk/fast/lists/003-vertical-expected.txt:
  • platform/gtk/fast/table/text-field-baseline-expected.txt:
  • platform/gtk/fast/text/basic/013-expected.txt:
  • platform/gtk/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt:
  • platform/gtk/ietestcenter/css3/text/textshadow-002-expected.txt:
  • platform/gtk/ietestcenter/css3/text/textshadow-009-expected.txt:
  • platform/gtk/tables/mozilla/bugs/bug73321-expected.txt:
  • platform/wpe/fast/block/float/029-expected.txt:
  • platform/wpe/fast/block/float/independent-align-positioning-expected.txt:
  • platform/wpe/fast/block/float/multiple-float-positioning-expected.txt:
  • platform/wpe/fast/block/margin-collapse/101-expected.txt:
  • platform/wpe/fast/block/positioning/window-height-change-expected.txt:
  • platform/wpe/fast/css-generated-content/014-expected.txt:
  • platform/wpe/fast/css-generated-content/hover-style-change-expected.txt:
  • platform/wpe/fast/dom/HTMLHeadElement/head-link-style-href-check-expected.txt:
  • platform/wpe/fast/lists/003-expected.txt:
  • platform/wpe/fast/lists/003-vertical-expected.txt:
  • platform/wpe/fast/text/basic/013-expected.txt:
  • platform/wpe/fast/text/line-breaks-after-white-space-expected.txt:
  • platform/wpe/fast/text/updateNewFont-expected.txt:
  • platform/wpe/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-different-width-001-expected.txt:
  • platform/wpe/ietestcenter/css3/text/textshadow-002-expected.txt:
  • platform/wpe/tables/mozilla/bugs/bug73321-expected.txt:
4:07 AM Changeset in webkit [284775] by Sam Sneddon
  • 25 edits in trunk

[Python] rename assertEquals/assertNotEquals
https://bugs.webkit.org/show_bug.cgi?id=232214

Reviewed by Alexey Proskuryakov.

This is assert(Not)?Equals -> assert(\1)Equal

Python 3.11 (currently CPython main branch) removes the deprecated
aliases assertEquals/assertNotEquals. These have long been deprecated,
and the modern names exist all the way back to Python 2.7, hence there's
no reason not to switch.

Source/WebKit:

  • Scripts/webkit/messages_unittest.py:

(GeneratedFileContentsTest.assertGeneratedFileContentsEqual):

  • Scripts/webkit/model_unittest.py:
  • Scripts/webkit/parser_unittest.py:

(ParsingTest.check_message):
(ParsingTest.test_receiver):

Tools:

  • Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py:

(TaskPoolUnittest.test_multiple):

  • Scripts/webkitpy/common/attribute_saver_unittest.py:

(AttributeSaverTest.test_class):
(AttributeSaverTest.test_normal_default):
(AttributeSaverTest.test_normal_value):
(AttributeSaverTest.test_normal_value_on_exception):
(AttributeSaverTest.test_normal_value_on_normal_exit):
(AttributeSaverTest.test_normal_value_with_finally_on_exception):
(AttributeSaverTest.test_normal_value_with_finally_on_normal_exit):
(AttributeSaverTest.test_normal_value_with_else_on_exception):
(AttributeSaverTest.test_normal_value_with_else_on_normal_exit):

  • Scripts/webkitpy/common/checkout/scm/stub_repository_unittest.py:

(StubRepositoryTest.test_find_checkout_root):

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

(TestConfigurationTest.test_eq):

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

(MiscTests.test_parse_warnings_are_logged_if_not_in_lint_mode):

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

(SummarizedResultsTest.test_svn_revision_exists):
(SummarizedResultsTest.test_svn_revision):
(SummarizedResultsTest.test_svn_revision_git):

  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

(RunTest.test_tests_options):

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

(TestHttpServer.test_win32_start_and_stop):

  • Scripts/webkitpy/port/driver_unittest.py:
  • Scripts/webkitpy/port/gtk_unittest.py:

(GtkPortTest.test_gtk4_expectations_binary_only):
(GtkPortTest.test_gtk3_expectations_binary_only):
(GtkPortTest.test_gtk_expectations_both_binaries):

  • Scripts/webkitpy/style/checkers/test_expectations_unittest.py:

(TestExpectationsTestCase.assert_lines_lint):

  • Scripts/webkitpy/tool/steps/preparechangelog_unittest.py:
  • Scripts/webkitpy/w3c/test_converter_unittest.py:

(verify_test_harness_paths):

  • Scripts/webkitpy/w3c/test_exporter_unittest.py:

(TestExporterTest.test_export):
(TestExporterTest.test_export_with_specific_branch):

  • Scripts/webkitpy/w3c/test_importer_unittest.py:
  • Scripts/webkitpy/w3c/test_parser_unittest.py:
  • Scripts/webkitpy/w3c/wpt_runner_unittest.py:

(WPTRunnerTest.MockSpawnWPT.call):
(WPTRunnerTest.test_prepare_wpt_checkout):
(WPTRunnerTest.test_prepare_wpt_checkout_specified_path):

  • Scripts/webkitpy/xcode/device_type_unittest.py:

(DeviceTypeTest.test_iphone_initialization):
(DeviceTypeTest.test_ipad_initialization):
(DeviceTypeTest.test_generic_ios_device):
(DeviceTypeTest.test_watch_initialization):
(DeviceTypeTest.test_tv_initialization):

  • Scripts/webkitpy/xcode/sdk_unittest.py:

(SDKTest.test_iphoneos):
(SDKTest.test_iphonesim):
(SDKTest.test_macos):
(SDKTest.test_appletvos):
(SDKTest.test_appletvsim):
(SDKTest.test_watchos):
(SDKTest.test_watchsimulator):
(SDKTest.test_prodos):

  • Scripts/webkitpy/xcode/simulated_device_unittest.py:
1:58 AM Changeset in webkit [284774] by ntim@apple.com
  • 4 edits in trunk/LayoutTests

Fix imported/w3c/web-platform-tests/css/selectors/focus-visible-009.html flaky failure on macOS wk1
https://bugs.webkit.org/show_bug.cgi?id=231647

Reviewed by Antti Koivisto.

This only tests a CSS selector feature, use waitUntilStableAutofocusState() helper which is more stable on wk1
to make this test pass.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/focus-visible-009.html:

LayoutTests:

  • platform/mac-wk1/TestExpectations:
1:35 AM Changeset in webkit [284773] by Ziran Sun
  • 4 edits in trunk

[css-writing-modes] Fix sizing of orthogonal elements with percentage margins
https://bugs.webkit.org/show_bug.cgi?id=231951

Reviewed by Manuel Rego Casasnovas.
Source/WebCore:

This is to modify RenderBox::FillAvailableMeasure() to handle the case of
orthogonal elements when computing the margins. Spec reference is at
https://www.w3.org/TR/css-writing-modes-3/#dimension-mapping

The change is an import of Chromium CL at
https://chromium-review.googlesource.com/c/chromium/src/+/968522/

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::fillAvailableMeasure const):

LayoutTests:

Oct 24, 2021:

11:47 PM Changeset in webkit [284772] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

ImageBitmap should report its memory cost
https://bugs.webkit.org/show_bug.cgi?id=187964

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-10-24
Reviewed by Simon Fraser.

Add memory cost reporting for ImageBitmap. In order to avoid storing a lock, computing the
memory cost many times and querying the thread-unsafe image buffer, compute it only when the
image buffer updates and cache the value.

It is unclear how to test this with current infrastructure.

  • html/ImageBitmap.cpp:

(WebCore::ImageBitmap::ImageBitmap):
(WebCore::ImageBitmap::takeImageBitmapBacking):
(WebCore::ImageBitmap::updateMemoryCost):
(WebCore::ImageBitmap::memoryCost const):

  • html/ImageBitmap.h:
  • html/ImageBitmap.idl:
7:48 PM Changeset in webkit [284771] by Lauro Moura
  • 2 edits in trunk/Source/WebCore

[GLIB] REGRESSION(r284670): Tentative LTS build fix

Unreviewed build fix.

  • platform/glib/LowPowerModeNotifierGLib.cpp:

(WebCore::LowPowerModeNotifier::LowPowerModeNotifier):

5:04 PM Changeset in webkit [284770] by Jean-Yves Avenard
  • 3 edits in trunk/Source/WebCore

Fix typo in MediaPlayerPrivateAVFoundationObjC::updateVideoTracks()
https://bugs.webkit.org/show_bug.cgi?id=232194

Reviewed by Darin Adler.

Reset video tracks' properties when video tracks are changing rather
than the audio ones.

There should be no observable changes, resetting the audio track properties
would have been a no-op as AudioTrackPrivateAVFObjC is just a wrapper around
AVPlayerItemTrack and properties are kept in sync thorough playback.
Not calling resetPropertiesFromTrack on the video track wouldn't have mattered
as the operation is called when the track is constructed above in the
determineChangedTracksFromNewTracksAndOldItems method.
So this code only improves readability, and could be removed entirely.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):

  • platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:
3:28 PM Changeset in webkit [284769] by commit-queue@webkit.org
  • 19 edits in trunk/Source/WebCore

AX: AccessibilityObject::m_haveChildren and AXCoreObject::hasChildren() are misleadingly named
https://bugs.webkit.org/show_bug.cgi?id=232130

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-10-24
Reviewed by Chris Fleizach.

The names of AccessibilityObject::m_haveChildren and AXCoreObject::hasChildren()
imply that the given object has one or more children. However, what these
really indicate is whether the object has tried to initialize its children.
Both m_haveChildren and hasChildren() can be true for objects that have no children,
which is confusing.

This patch:

  • Renames m_haveChildren to m_childrenInitialized and hasChildren() to childrenInitialized().
  • Removes AXPropertyName::HasChildren rather than renaming it because isolated object children are always initialized.
  • Fixes a bug in AccessibilityRenderObject::updateRoleAfterChildrenCreation caused by the poor names (we intended to change the role if there were no children, not if !hasChildren()).
  • accessibility/AccessibilityARIAGrid.cpp:

(WebCore::AccessibilityARIAGrid::addChildren):

  • accessibility/AccessibilityListBox.cpp:

(WebCore::AccessibilityListBox::addChildren):
(WebCore::AccessibilityListBox::selectedChildren):
(WebCore::AccessibilityListBox::visibleChildren):

  • accessibility/AccessibilityMenuList.cpp:

(WebCore::AccessibilityMenuList::addChildren):

  • accessibility/AccessibilityMenuListPopup.cpp:

(WebCore::AccessibilityMenuListPopup::addChildren):
(WebCore::AccessibilityMenuListPopup::childrenChanged):

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::addChildren):

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::updateChildrenIfNecessary):
(WebCore::AccessibilityObject::clearChildren):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:

(WebCore::AXCoreObject::isDescendantOfObject const):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::addCanvasChildren):
(WebCore::AccessibilityRenderObject::updateRoleAfterChildrenCreation):
(WebCore::AccessibilityRenderObject::addChildren):
(WebCore::AccessibilityRenderObject::ariaListboxVisibleChildren):

  • accessibility/AccessibilityScrollView.cpp:

(WebCore::AccessibilityScrollView::addChildren):

  • accessibility/AccessibilitySlider.cpp:

(WebCore::AccessibilitySlider::addChildren):

  • accessibility/AccessibilitySpinButton.cpp:

(WebCore::AccessibilitySpinButton::incrementButton):
(WebCore::AccessibilitySpinButton::decrementButton):
(WebCore::AccessibilitySpinButton::addChildren):

  • accessibility/AccessibilityTable.cpp:

(WebCore::AccessibilityTable::addChildren):

  • accessibility/AccessibilityTableColumn.cpp:

(WebCore::AccessibilityTableColumn::addChildren):

  • accessibility/AccessibilityTableHeaderContainer.cpp:

(WebCore::AccessibilityTableHeaderContainer::addChildren):

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

Stop setting AXPropertyName::HasChildren because it no longer exists.
(WebCore::AXIsolatedObject::initializeAttributeData):

  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/isolatedtree/AXIsolatedTree.h:

Delete AXPropertyName::HasChildren.

1:57 PM Changeset in webkit [284768] by Wenson Hsieh
  • 3 edits in trunk/Source/WebKit

RemoteRenderingBackend should not send IPC in the middle of destruction
https://bugs.webkit.org/show_bug.cgi?id=232179

Reviewed by Darin Adler.

Make a couple of minor adjustments to RemoteRenderingBackend (see below for more details). This is necessary in
order to avoid flaky crashes after fixing bug #232113, after which the RemoteRenderingBackend will no longer be
leaked in the GPU process.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::startListeningForIPC):
(WebKit::RemoteRenderingBackend::stopListeningForIPC):
(WebKit::RemoteRenderingBackend::didCreateImageBufferBackend):
(WebKit::RemoteRenderingBackend::releaseRemoteResourceWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::~RemoteRenderingBackend): Deleted.

Move logic to flush remaining incoming IPC messages in the GPU process out of the destructor, and into
stopListeningForIPC() instead. This is because the act of processing certain stream IPC messages (such as
CreateImageBuffer or FlushContext) may cause RemoteRenderingBackend to try and send IPC back to the web process.
However, if RemoteRenderingBackend is in the middle of destruction, it will crash when attempting to do so (when
attempting to call into IPC::MessageSender).

To avoid this, we need to do this work earlier, after we've already stopped listening for further IPC messages.

  • GPUProcess/graphics/RemoteRenderingBackend.h:

Turn m_remoteDisplayLists into a regular hash map containing RemoteDisplayListRecorders by their process-
qualified rendering resource identifiers. Since this map may be modified from different threads, we (1) don't
want to be using weak pointers here, and (2) need to ensure that access to this table is guarded behind a lock.
To avoid reference cycles, entries in this table are cleared out when the remote image buffer corresponding to
each RemoteDisplayListRecorder is released in the GPU process.

1:43 PM Changeset in webkit [284767] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

The code decoding std::optional<ImagePaintingOptions> can't be compiled by PlayStation due to the ImagePaintingOptions template constructor
https://bugs.webkit.org/show_bug.cgi?id=231980
<rdar://problem/84478389>

Reviewed by Darin Adler.

r284566 didn't actually fix the problem. The problem was that the
first template argument of ImagePaintingOptions template construct
can instantiated with std::optional<ImagePaintingOptions>. It
should be a type of that setOption can take.

  • platform/graphics/ImagePaintingOptions.h: Added a template

variable isOptionType, and use it for SFINAE.

1:39 PM Changeset in webkit [284766] by Wenson Hsieh
  • 6 edits
    2 adds in trunk

REGRESSION (iOS 15): Safari shows zoom callout even if -webkit-user-select is none
https://bugs.webkit.org/show_bug.cgi?id=231161
rdar://83863266

Reviewed by Darin Adler.

Source/WebKit:

Make several minor tweaks to prevent the text interaction assistant's loupe gesture from beginning when long
pressing inside content with -webkit-user-select: none;. Importantly, this prevents both the text
interaction's haptic feedback and the text selection magnifier UI (introduced in iOS 15) from showing up. See
comments below for more details.

Test: editing/selection/ios/do-not-allow-text-selection-in-user-select-none.html

  • Shared/ios/InteractionInformationAtPosition.h:

(WebKit::InteractionInformationAtPosition::isSelectable const):

Add a helper method to return whether the selectability flag is equal to Selectable, and use this in places
where we current check the isSelectable flag.

  • Shared/ios/InteractionInformationAtPosition.mm:

(WebKit::InteractionInformationAtPosition::encode const):
(WebKit::InteractionInformationAtPosition::decode):

Break the current isSelectable flag out into different enum types, which enumerate the reasons why we might
need to treat hit-tested content as non-user-selectable. Importantly, this allows us to only early return inside
-textInteractionGesture:shouldBeginAtPoint: below if the element has an explicit -webkit-user-select: none;,
and not because of the other reasons (i.e. large element bounds or the fact that we're long pressing editable
text while not editing).

This nuance is important in order to continue allowing the loupe gesture (which manifests as a floating caret)
to begin when long pressing inside a focused a text field.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):

Return NO here in the case where we're recognizing a loupe gesture (i.e. long press) inside content with
-webkit-user-select: none; (by consulting the new selectability enumeration). This allows us to prevent both
haptic feedback as well as the new magnifier UI from triggering when long pressing inside content that has
explicitly disabled text selection.

(-[WKContentView closestPositionToPoint:]):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::selectionPositionInformation):
(WebKit::WebPage::positionInformation):

Additionally populate the selectability flag even when long pressing inside images and links. Instead of
putting the call to selectionPositionInformation behind the isLink/isImage check, move that condition into
selectionPositionInformation in the form of an early return, and always populate selectability in either
case.

LayoutTests:

See Source/WebKit/ChangeLog for more details.

  • editing/selection/ios/do-not-allow-text-selection-in-user-select-none-expected.txt: Added.
  • editing/selection/ios/do-not-allow-text-selection-in-user-select-none.html: Added.
11:24 AM Changeset in webkit [284765] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

REGRESSION(r282686) [GTK] Tests are flaky due to spurious "MainFrameView: mouseEnteredContentArea" messages in the log
https://bugs.webkit.org/show_bug.cgi?id=232142

Add MockScrollAnimatorEnabled to the list of preferences to reset
between tests in TestOptions.cpp.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-10-24
Reviewed by Carlos Garcia Campos.

  • WebKitTestRunner/TestOptions.cpp:

(WTR::TestOptions::defaults):

11:22 AM Changeset in webkit [284764] by Simon Fraser
  • 4 edits in trunk/Tools

Add an ImageDiff option to print out WPT-style pixel differences
https://bugs.webkit.org/show_bug.cgi?id=232212

Reviewed by NOBODY (OOPS!).

When passed --difference, ImageDiff will compute and print out the "maxDifference=;totalPixels="
values documented at https://web-platform-tests.org/writing-tests/reftests.html. With these values,
there is no built-in tolerance as there is with the legacy difference computation.

Rename variables related to the legacy computation.

  • ImageDiff/ImageDiff.cpp:

(processImages):
(main):

  • ImageDiff/PlatformImage.cpp:

(ImageDiff::PlatformImage::difference):

  • ImageDiff/PlatformImage.h:
11:13 AM Changeset in webkit [284763] by Darin Adler
  • 10 edits in trunk/Source

[Cocoa] Adopt bridge_cast and makeVector in a few more places, including cases where adoptCF/NS was used incorrectly
https://bugs.webkit.org/show_bug.cgi?id=232200

Reviewed by Anders Carlsson.

Source/WebCore:

  • platform/cocoa/SharedBufferCocoa.mm:

(WebCore::SharedBuffer::create): Use bridge_cast.
(WebCore::SharedBuffer::append): Ditto.
(WebCore::SharedBuffer::createNSData const): Ditto. Here we are replacing
a leakRef/adoptNS pair, so this fixes an ARC incompatibility.
(WebCore::SharedBuffer::createCFData const): Ditto. Here we are replacing
a leakRef/adoptCF pair, so this fixes an ARC incompatibility.
(WebCore::SharedBuffer::createFromReadingFile): Tweaked coding style.

  • platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:

(WebCore::parseStringArrayFromDictionaryToUInt16Vector): Use dynamic_cf_cast,
dynamic_objc_cast, and makeVector to reduce code without behavior changes.

  • platform/mac/PasteboardWriter.mm:

(WebCore::toUTI): Use bridge_cast.
(WebCore::toUTIUnlessAlreadyUTI): Use bridge_cast after doing adoptCF
rather than first casting and then doing an adoptNS, relying on it doing the
correct thing for a CF object. This fixes an ARC incompatibility.
(WebCore::createPasteboardWriter): Ditto.

Source/WebKit:

  • Shared/Cocoa/ArgumentCodersCocoa.mm:

(-[WKSecureCodingURLWrapper encodeWithCoder:]): Use bridge_cast.
(-[WKSecureCodingURLWrapper initWithCoder:]): Use bridge_cast
after calling adoptCF rather than first doing a bridging cast and
then doing adoptNS and relying on it correctly adopting a CF object.
This fixes an ARC incompatibility.
(IPC::encodeDataInternal): Use bridge_cast.
(IPC::decodeDataInternal): Use bridge_cast/WTFMove instead of
adoptNS/cast/leakRef. This fixes an ARC incompatibility
(IPC::encodeDateInternal): Use bridge_cast.
(IPC::decodeDateInternal): Use bridge_cast/WTFMove as above.
(IPC::encodeNumberInternal): Use bridge_cast.
(IPC::decodeNumberInternal): Use bridge_cast/WTFMove as above.
(IPC::decodeSecureCodingInternal): Use bridge_cast.
(IPC::encodeStringInternal): Use bridge_cast.
(IPC::decodeStringInternal): Use bridge_cast/WTFMove as above.
(IPC::encodeURLInternal): Use bridge_cast.
(IPC::decodeURLInternal): Use bridge_cast/WTFMove as above.

  • UIProcess/API/Cocoa/WKConnection.mm:

(didReceiveMessage): Use bridge_cast and remove unneeded use of
RetainPtr/get on the body.

  • UIProcess/Plugins/mac/PluginInfoStoreMac.mm:

(WebKit::PluginInfoStore::pluginPathsInDirectory): Use bridge_cast
and makeVectort.

Source/WTF:

  • wtf/cocoa/URLCocoa.mm:

(WTF::URL::URL): Use bridge_cast.
(WTF::URL::createCFURL const): Ditto, using the RetainPtr version to avoid
retain count churn.

10:47 AM Changeset in webkit [284762] by Simon Fraser
  • 5 edits in trunk/Tools

Allow ImageDiff to read from files
https://bugs.webkit.org/show_bug.cgi?id=232201

Reviewed by Darin Adler.

For improved hackability when working on pixel tolerance, allow ImageDiff to read from
files by adding support for reading two file path arguments.

Also add some nice --help output, and preliminary support for --verbose.

  • ImageDiff/ImageDiff.cpp:

(processImages):
(main):

  • ImageDiff/PlatformImage.h:
  • ImageDiff/cairo/PlatformImageCairo.cpp:

(ImageDiff::PlatformImage::createFromFile):

  • ImageDiff/cg/PlatformImageCG.cpp:

(ImageDiff::PlatformImage::createFromFile):

10:37 AM Changeset in webkit [284761] by Alexey Shvayka
  • 14 edits
    4 adds in trunk

Assertions in IDBTransaction::request*() methods fail on cross-realm methods
https://bugs.webkit.org/show_bug.cgi?id=230128

Reviewed by Sihui Liu.

LayoutTests/imported/w3c:

  • web-platform-tests/IndexedDB/idbindex-cross-realm-methods-expected.txt: Added.
  • web-platform-tests/IndexedDB/idbindex-cross-realm-methods.html: Added.
  • web-platform-tests/IndexedDB/idbobjectstore-cross-realm-methods-expected.txt: Added.
  • web-platform-tests/IndexedDB/idbobjectstore-cross-realm-methods.html: Added.

Source/WebCore:

Except when used with constructors, [CallWith=GlobalObject] WebIDL attribute passes
_current_ global object [1], one that the function was created in.

A method from another realm has different ScriptExecutionContext than the IDBTransaction,
and it's fine: function's global object is used only for IDBKey parsing and structure
cloning as per spec [2].

This patch removes incorrect assertions, fixing IDBObjectStore / IDBIndex cross-realm
methods not to crash --debug build, and removes now unused JSGlobalObject parameters.

[1] https://html.spec.whatwg.org/multipage/webappapis.html#concept-current-everything
[2] https://www.w3.org/TR/IndexedDB/#ref-for-retrieve-a-value-from-an-object-store

Tests: imported/w3c/web-platform-tests/IndexedDB/idbindex-cross-realm-methods.html

imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-cross-realm-methods.html

  • Modules/indexeddb/IDBCursor.cpp:

(WebCore::IDBCursor::deleteFunction):

  • Modules/indexeddb/IDBCursor.h:
  • Modules/indexeddb/IDBCursor.idl:
  • Modules/indexeddb/IDBIndex.cpp:

(WebCore::IDBIndex::doOpenCursor):
(WebCore::IDBIndex::openCursor):
(WebCore::IDBIndex::doOpenKeyCursor):
(WebCore::IDBIndex::openKeyCursor):
(WebCore::IDBIndex::count):
(WebCore::IDBIndex::doCount):
(WebCore::IDBIndex::get):
(WebCore::IDBIndex::doGet):
(WebCore::IDBIndex::getKey):
(WebCore::IDBIndex::doGetKey):
(WebCore::IDBIndex::doGetAll):
(WebCore::IDBIndex::getAll):
(WebCore::IDBIndex::doGetAllKeys):
(WebCore::IDBIndex::getAllKeys):

  • Modules/indexeddb/IDBIndex.h:
  • Modules/indexeddb/IDBIndex.idl:
  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::doOpenCursor):
(WebCore::IDBObjectStore::openCursor):
(WebCore::IDBObjectStore::doOpenKeyCursor):
(WebCore::IDBObjectStore::openKeyCursor):
(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::getKey):
(WebCore::IDBObjectStore::putOrAdd):
Use IDBObjectStore's context instead of _current_ global object for private browsing
check as per recommendation for spec authors [1]. This doesn't seem to be observable.

(WebCore::IDBObjectStore::deleteFunction):
(WebCore::IDBObjectStore::doDelete):
(WebCore::IDBObjectStore::clear):
(WebCore::IDBObjectStore::createIndex):
(WebCore::IDBObjectStore::count):
(WebCore::IDBObjectStore::doCount):
(WebCore::IDBObjectStore::doGetAll):
(WebCore::IDBObjectStore::getAll):
(WebCore::IDBObjectStore::doGetAllKeys):
(WebCore::IDBObjectStore::getAllKeys):

  • Modules/indexeddb/IDBObjectStore.h:
  • Modules/indexeddb/IDBObjectStore.idl:
  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::requestOpenCursor):
(WebCore::IDBTransaction::doRequestOpenCursor):
(WebCore::IDBTransaction::requestGetAllObjectStoreRecords):
(WebCore::IDBTransaction::requestGetAllIndexRecords):
(WebCore::IDBTransaction::requestGetRecord):
(WebCore::IDBTransaction::requestGetValue):
(WebCore::IDBTransaction::requestGetKey):
(WebCore::IDBTransaction::requestIndexRecord):
(WebCore::IDBTransaction::requestCount):
(WebCore::IDBTransaction::requestDeleteRecord):
(WebCore::IDBTransaction::requestClearObjectStore):
(WebCore::IDBTransaction::requestPutOrAdd):

  • Modules/indexeddb/IDBTransaction.h:
  • inspector/agents/InspectorIndexedDBAgent.cpp:
10:14 AM Changeset in webkit [284760] by commit-queue@webkit.org
  • 22 edits in trunk/Source/WebCore

AX: Any addition of children should funnel through AccessibilityObject::addChild
https://bugs.webkit.org/show_bug.cgi?id=231914

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-10-24
Reviewed by Chris Fleizach.

All addition of children now goes through
AccessibilityObject::addChild. This is good for two reasons:

  1. It ensures we aren't inserting ignored elements into the tree.

insertChild (downstream of addChild) checks this. Prior to this
patch, there were cases where we could insert ignored children into the
tree because no check was made.

  1. We can reliably set state on the child based on the state of the

parent at insertion time. For example, children can set a flag if
any of their ancestors have an application or document role, which can
be useful for some AX clients.

  • accessibility/AccessibilityARIAGrid.cpp:

(WebCore::AccessibilityARIAGrid::addTableCellChild):
(WebCore::AccessibilityARIAGrid::addChildren):

  • accessibility/AccessibilityLabel.cpp:

(WebCore::AccessibilityLabel::insertChild):
Add DescendIfIgnored parameter.

  • accessibility/AccessibilityLabel.h:
  • accessibility/AccessibilityListBox.cpp:

(WebCore::AccessibilityListBox::addChildren):

  • accessibility/AccessibilityMenuList.cpp:

(WebCore::AccessibilityMenuList::addChildren):

  • accessibility/AccessibilityMenuListOption.cpp:

(WebCore::AccessibilityMenuListOption::AccessibilityMenuListOption):
(WebCore::AccessibilityMenuListOption::isVisible const):
(WebCore::AccessibilityMenuListOption::elementRect const):

  • accessibility/AccessibilityMenuListOption.h:

(WebCore::AccessibilityMenuListOption::setParent):
(WebCore::AccessibilityMenuListOption::parentObject const):
Add missing parentObject (and corresponding setParent) methods.
Prior to this patch, these objects always returned nullptr from
the AccessibilityObject::parentObject().

  • accessibility/AccessibilityMenuListPopup.cpp:

(WebCore::AccessibilityMenuListPopup::addChildren):

  • accessibility/AccessibilityObject.cpp:

(WebCore::isTableComponent): Added.
(WebCore::AccessibilityObject::insertChild):
(WebCore::AccessibilityObject::addChild):
Add DescendIfIgnored::{Yes, No} to control whether or not
these functions descend to and add the child's children if the given
child is ignored.

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::addImageMapChildren):
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
(WebCore::AccessibilityRenderObject::addRemoteSVGChildren):

  • accessibility/AccessibilityScrollView.cpp:

(WebCore::AccessibilityScrollView::addChildScrollbar):

  • accessibility/AccessibilitySlider.cpp:

(WebCore::AccessibilitySlider::addChildren):

  • accessibility/AccessibilitySpinButton.cpp:

(WebCore::AccessibilitySpinButton::addChildren):

  • accessibility/AccessibilityTable.cpp:

(WebCore::AccessibilityTable::addChildren):
(WebCore::AccessibilityTable::addTableCellChild):

  • accessibility/AccessibilityTableColumn.cpp:

(WebCore::AccessibilityTableColumn::addChildren):

  • accessibility/AccessibilityTableHeaderContainer.cpp:

(WebCore::AccessibilityTableHeaderContainer::addChildren):

  • accessibility/AccessibilityTableRow.cpp:

(WebCore::AccessibilityTableRow::addChildren):

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::addChild):
(WebCore::AXIsolatedObject::insertChild):
Add DescendIfIgnored parameter.

  • accessibility/isolatedtree/AXIsolatedObject.h:
9:53 AM Changeset in webkit [284759] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKitLegacy/mac

Enable the modules verifier for WebKitLegacy in Apple internal when using a new enough Xcode
https://bugs.webkit.org/show_bug.cgi?id=232190

Patch by Ian Anderson <iana@apple.com> on 2021-10-24
Reviewed by David Kilzer.

Add WK_XCODE_VERSION_BEFORE_13_1 build settings to WebKitLegacy and then
use them to enable the modules verifier in Xcode 13.1 and later.

  • Configurations/Base.xcconfig:
  • Configurations/WebKitLegacy.xcconfig:
9:01 AM Changeset in webkit [284758] by Alexey Shvayka
  • 18 edits
    5 adds in trunk

document.open() and friends use incorrect document as a source for reseted document's URL
https://bugs.webkit.org/show_bug.cgi?id=230131

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/origin-check-in-document-open-same-origin-domain.sub-expected.txt:
  • web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/url-entry-document-incumbent-frame.html: Added.
  • web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-entry-document-sync-call.window-expected.txt: Added.
  • web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-entry-document-sync-call.window.html: Added.
  • web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-entry-document-sync-call.window.js: Added.

Source/WebCore:

With this patch, Document's open() / write() / writeln() methods receive entry global
object's document [1] as an argument, which is used to perform same-origin security check
and to set the URL of reseted document from. Aligns WebKit with Blink and Gecko.

Instead of maintaining consistency with FirstWindow, EntryDocument is named to match
the spec and because it's not always the "first" (topmost) document, but rather a document
of closest <script> or inline event handler.

ResponsibleDocument is removed because it's now unused and, in terms of implementation,
a poor man's IncumbentWindow. Also, the spec describes different concept by that name [2].

[1] https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#opening-the-input-stream:entry-global-object
[2] https://html.spec.whatwg.org/multipage/webappapis.html#responsible-document

Tests: http/tests/security/aboutBlank/security-context-grandchildren-lexical.html

http/tests/security/aboutBlank/security-context-grandchildren-write-lexical.html
http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical.html
imported/w3c/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-entry-document-sync-call.window.html

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::responsibleDocument): Deleted.

  • bindings/js/JSDOMWindowBase.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateCallWith):

  • bindings/scripts/IDLAttributes.json:
  • dom/Document+HTML.idl:
  • dom/Document.cpp:

(WebCore::Document::open):
(WebCore::Document::write):
(WebCore::Document::writeln):

  • dom/Document.h:

LayoutTests:

  • http/tests/security/aboutBlank/security-context-grandchildren-lexical.html:
  • http/tests/security/aboutBlank/security-context-grandchildren-write-lexical.html:
  • http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical.html:

Tweak javascript: URLs to evaluate as undefined so the tests could be run in Firefox.

  • http/tests/security/aboutBlank/security-context-grandchildren-lexical-expected.txt:
  • http/tests/security/aboutBlank/security-context-grandchildren-write-lexical-expected.txt:
  • http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical-expected.txt:

Align expectations with Blink and Gecko.

  • http/tests/security/resources/parent-document-open.html: Added.
  • http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml:

The test relied on behavior that wasn't spec-compliant, causing timeouts once document.open() is fixed.
This patch preserves the test semantics of calling document.open() with iframe's global object.
Similar Blink bug: crbug.com/579493.

8:32 AM Changeset in webkit [284757] by commit-queue@webkit.org
  • 3 edits
    1 add in trunk

InternalFunction::createSubclassStructure() should use prototype's global object
https://bugs.webkit.org/show_bug.cgi?id=231874

Patch by Alexey Shvayka <ashvayka@apple.com> on 2021-10-24
Reviewed by Yusuke Suzuki.

JSTests:

  • stress/internal-function-subclass-structure-realm.js: Added.

Source/JavaScriptCore:

In case NewTarget has a cross-realm "prototype" object, even though the instance
structure is created with correct Prototype?, it's m_globalObject is of NewTarget's
realm instead of prototype's.

That is observable in various places, including when calling CustomAccessor, fast paths
for iteration protocol / collection constructors, isHavingABadTime() handling etc.

This patch fixes structure's global object to be correct: per spec [1], we fallback to
NewTarget's realm only if "prototype" is a primitive.

[1]: https://tc39.es/ecma262/#sec-getprototypefromconstructor (step 3.b)

  • runtime/InternalFunction.cpp:

(JSC::InternalFunction::createSubclassStructure):

8:18 AM Changeset in webkit [284756] by Alexey Shvayka
  • 2 edits in trunk

Add my GitHub username to contributors.json and update credentials

Unreviewed.

  • metadata/contributors.json:
7:50 AM Changeset in webkit [284755] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[css-contain] Support contain:style for counters
https://bugs.webkit.org/show_bug.cgi?id=226458

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

Remove unneeded logic from r284642 change.

  • rendering/RenderCounter.cpp:

(WebCore::previousInPreOrder):

Oct 23, 2021:

9:31 PM Changeset in webkit [284754] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Null check in traverseNodesForSerialization
https://bugs.webkit.org/show_bug.cgi?id=230704

Patch by Rob Buis <rbuis@igalia.com> on 2021-10-23
Reviewed by Wenson Hsieh.

Source/WebCore:

Pass startNode by value instead of by pointer to
traverseNodesForSerialization.

Test: editing/pasteboard/copy-with-shadow-tree-crash.html

  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::serializeNodes):
(WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):

LayoutTests:

  • editing/pasteboard/copy-with-shadow-tree-crash-expected.txt: Added.
  • editing/pasteboard/copy-with-shadow-tree-crash.html: Added.
8:02 PM Changeset in webkit [284753] by Alan Bujtas
  • 4 edits in trunk/Source

Addressing post-commit review (r284744).

Source/WebCore:

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::midWordBreak):

Source/WTF:

  • wtf/unicode/CharacterNames.h:
7:56 PM Changeset in webkit [284752] by Cameron McCormack
  • 8 edits in trunk/LayoutTests

LayoutTests/imported/w3c:
Tweak test tolerance
https://bugs.webkit.org/show_bug.cgi?id=231959
<rdar://problem/84417651>

Unreviewed.

  • web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-drawImage.html:
  • web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY.html:

LayoutTests:
Update WPT test tolerance and mark some failures as simulator-only
https://bugs.webkit.org/show_bug.cgi?id=231959
<rdar://problem/84417651>

Unreviewed test gardening.

The ipad failures are really iPad simulator failures.

  • platform/ios-simulator/TestExpectations:
  • platform/ipad/TestExpectations:
  • platform/mac/TestExpectations:
5:47 PM Changeset in webkit [284751] by commit-queue@webkit.org
  • 48 edits
    14 moves
    12 adds in trunk/JSTests

update test262
https://bugs.webkit.org/show_bug.cgi?id=232005

Patch by Phillip Mates <Phillip Mates> on 2021-10-23
Reviewed by Yusuke Suzuki.

  • test262/expectations.yaml:
  • test262/latest-changes-summary.txt:
  • test262/test/built-ins/Array/prototype/concat/Array.prototype.concat_large-typed-array.js:

(concatTypedArray):

  • test262/test/built-ins/Array/prototype/concat/Array.prototype.concat_small-typed-array.js:

(concatTypedArray):

  • test262/test/built-ins/Array/prototype/copyWithin/non-negative-target-and-start.js:
  • test262/test/built-ins/Function/internals/Call/class-ctor-realm.js:
  • test262/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-44.js:
  • test262/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-49.js:
  • test262/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-b-2.js:
  • test262/test/built-ins/ShadowRealm/prototype/evaluate/globalthis-available-properties.js: Added.
  • test262/test/built-ins/ShadowRealm/prototype/evaluate/globalthis-config-only-properties.js: Added.

(const.remainingNames.names.filter.name.esNonConfigValues.includes):
(hasOwn.call):

  • test262/test/built-ins/ShadowRealm/prototype/evaluate/globalthis-orginary-object.js: Added.
  • test262/test/built-ins/ShadowRealm/prototype/evaluate/throws-error-from-ctor-realm.js: Added.
  • test262/test/built-ins/ShadowRealm/prototype/evaluate/validates-realm-object.js:
  • test262/test/built-ins/ShadowRealm/prototype/evaluate/wrapped-function-proto-from-caller-realm.js:

(checkArgWrapperFn.realm.evaluate.string_appeared_here.assert.sameValue.checkArgWrapperFn):

  • test262/test/built-ins/ShadowRealm/prototype/importValue/not-constructor.js:
  • test262/test/built-ins/Temporal/PlainDate/prototype/since/largestunit-higher-units.js:
  • test262/test/built-ins/Temporal/PlainMonthDay/prototype/toPlainDate/basic.js:
  • test262/test/intl402/NumberFormat/prototype/format/signDisplay-currency-de-DE.js:
  • test262/test/intl402/NumberFormat/prototype/format/signDisplay-currency-en-US.js:
  • test262/test/intl402/NumberFormat/prototype/format/signDisplay-currency-ja-JP.js:
  • test262/test/intl402/NumberFormat/prototype/format/signDisplay-currency-ko-KR.js:
  • test262/test/intl402/NumberFormat/prototype/format/signDisplay-currency-zh-TW.js:
  • test262/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-currency-de-DE.js:
  • test262/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-currency-en-US.js:
  • test262/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-currency-ja-JP.js:
  • test262/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-currency-ko-KR.js:
  • test262/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-currency-zh-TW.js:
  • test262/test/intl402/Temporal/Instant/prototype/toLocaleString/locales-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/Instant/prototype/toLocaleString/locales-undefined.js.
  • test262/test/intl402/Temporal/Instant/prototype/toLocaleString/options-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/Instant/prototype/toLocaleString/options-undefined.js.
  • test262/test/intl402/Temporal/PlainDate/prototype/toLocaleString/locales-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/toLocaleString/locales-undefined.js.
  • test262/test/intl402/Temporal/PlainDate/prototype/toLocaleString/options-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/toLocaleString/options-undefined.js.
  • test262/test/intl402/Temporal/PlainDateTime/prototype/toLocaleString/locales-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/toLocaleString/locales-undefined.js.
  • test262/test/intl402/Temporal/PlainDateTime/prototype/toLocaleString/options-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/toLocaleString/options-undefined.js.
  • test262/test/intl402/Temporal/PlainMonthDay/prototype/toLocaleString/locales-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainMonthDay/prototype/toLocaleString/locales-undefined.js.
  • test262/test/intl402/Temporal/PlainMonthDay/prototype/toLocaleString/options-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainMonthDay/prototype/toLocaleString/options-undefined.js.
  • test262/test/intl402/Temporal/PlainTime/prototype/toLocaleString/locales-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/toLocaleString/locales-undefined.js.
  • test262/test/intl402/Temporal/PlainTime/prototype/toLocaleString/options-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/toLocaleString/options-undefined.js.
  • test262/test/intl402/Temporal/PlainYearMonth/prototype/toLocaleString/locales-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/toLocaleString/locales-undefined.js.
  • test262/test/intl402/Temporal/PlainYearMonth/prototype/toLocaleString/options-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/toLocaleString/options-undefined.js.
  • test262/test/intl402/Temporal/ZonedDateTime/prototype/toLocaleString/locales-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/ZonedDateTime/prototype/toLocaleString/locales-undefined.js.
  • test262/test/intl402/Temporal/ZonedDateTime/prototype/toLocaleString/options-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/ZonedDateTime/prototype/toLocaleString/options-undefined.js.
  • test262/test/language/computed-property-names/basics/number.js:
  • test262/test/language/computed-property-names/basics/string.js:
  • test262/test/language/computed-property-names/basics/symbol.js:
  • test262/test/language/computed-property-names/class/method/generator.js:
  • test262/test/language/computed-property-names/class/method/number.js:
  • test262/test/language/computed-property-names/class/method/string.js:
  • test262/test/language/computed-property-names/class/method/symbol.js:
  • test262/test/language/computed-property-names/object/method/generator.js:
  • test262/test/language/computed-property-names/object/method/number.js:
  • test262/test/language/computed-property-names/object/method/string.js:
  • test262/test/language/computed-property-names/object/method/symbol.js:
  • test262/test/language/computed-property-names/to-name-side-effects/numbers-object.js:
  • test262/test/language/computed-property-names/to-name-side-effects/object.js:
  • test262/test/language/identifiers/part-unicode-14.0.0-escaped.js: Added.
  • test262/test/language/identifiers/part-unicode-14.0.0.js: Added.
  • test262/test/language/identifiers/start-unicode-14.0.0-escaped.js: Added.
  • test262/test/language/identifiers/start-unicode-14.0.0.js: Added.
  • test262/test/language/rest-parameters/arrow-function.js:
  • test262/test/language/rest-parameters/no-alias-arguments.js:

(f):

  • test262/test/language/rest-parameters/with-new-target.js:

(Base):
(Child):

  • test262/test/language/statements/class/definition/fn-length-static-precedence-order.js:
  • test262/test/language/statements/class/definition/fn-name-static-precedence-order.js:
  • test262/test/language/statements/class/static-init-arguments-functions.js:
  • test262/test/language/statements/class/static-init-arguments-methods.js:
  • test262/test/language/statements/class/subclass/builtin-objects/Array/contructor-calls-super-multiple-arguments.js:
  • test262/test/language/statements/class/subclass/builtin-objects/Array/regular-subclassing.js:
  • test262/test262-Revision.txt:
4:58 PM Changeset in webkit [284750] by dino@apple.com
  • 2 edits in trunk/Source/WebKit

Disable PiP when HAVE(UIKIT_WEBKIT_INTERNALS)
https://bugs.webkit.org/show_bug.cgi?id=232206
rdar://84516632

Reviewed by Tim Horton.

In preparation for moving to AVPictureInPictureController, disable
PiP when HAVE(UIKIT_WEBKIT_INTERNALS) is true so that we are
no longer creating an AVPlayerViewController. The rationale for the
move is to use API rather than SPI, and this will allow changes to
be made to AVPlayerViewController in this special configuration.

  • WebProcess/cocoa/VideoFullscreenManager.mm:

(WebKit::VideoFullscreenManager::supportsVideoFullscreen const): Only support regular
fullscreen, not PiP.
(WebKit::VideoFullscreenManager::supportsVideoFullscreenStandby const): Don't support
"video fullscreen standby", which is another name for PiP.

3:26 PM Changeset in webkit [284749] by Chris Dumez
  • 19 edits
    2 adds in trunk

Add support for rel="noopener/noreferrer" on <form> elements
https://bugs.webkit.org/show_bug.cgi?id=232170

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline WPT tests that are now passing.

  • web-platform-tests/html/semantics/forms/form-submission-target/rel-base-target-expected.txt:
  • web-platform-tests/html/semantics/forms/form-submission-target/rel-button-target-expected.txt:
  • web-platform-tests/html/semantics/forms/form-submission-target/rel-form-target-expected.txt:
  • web-platform-tests/html/semantics/forms/form-submission-target/rel-input-target-expected.txt:

Source/WebCore:

Add support for rel="opener/noopener/noreferrer" on <form> elements:

This patch also adds support for the rel and relList attributes on <form>.

Test: fast/forms/form-relList.html

  • html/HTMLFormElement.cpp:

(WebCore::parseFormRelAttributes):
(WebCore::HTMLFormElement::submit):
(WebCore::HTMLFormElement::parseAttribute):
(WebCore::HTMLFormElement::relList):

  • html/HTMLFormElement.h:
  • html/HTMLFormElement.idl:
  • loader/FormSubmission.h:

(WebCore::FormSubmission::newFrameOpenerPolicy const):
(WebCore::FormSubmission::setNewFrameOpenerPolicy):
(WebCore::FormSubmission::referrerPolicy const):
(WebCore::FormSubmission::setReferrerPolicy):

  • loader/NavigationScheduler.cpp:

LayoutTests:

  • fast/forms/form-relList-expected.txt: Added.
  • fast/forms/form-relList.html: Added.

Add test coverage for the new form.relList attribute.

  • http/tests/navigation/resources/target-blank-opener-post-window.py:
  • http/tests/navigation/target-blank-opener-post-expected.txt:
  • http/tests/navigation/target-blank-opener-post.html:

Update existing layout test to reflect behavior change.

  • platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:

Rebaseline WPT tests now that more checks are passing.

2:35 PM Changeset in webkit [284748] by ysuzuki@apple.com
  • 8 edits
    1 add
    3 deletes in trunk

[WTF] Replace current LLVM flang's Int128 with abseil-cpp's Int128
https://bugs.webkit.org/show_bug.cgi?id=232129

Reviewed by Darin Adler.

Source/WTF:

We found that flang's signed Int128 implementation is not tested,
and it has several issues about sign extension and division.

Instead, we import abseil-cpp[1]'s int128 implementation.
abseil-cpp is more battle-tested, and abseil is already used
in WebKit too (ANGLE and libwebrtc use abseil-cpp as their utility
library).

For Apple readers, abseil-cpp for WebKit is approved in OSS-351.

[1]: https://github.com/abseil/abseil-cpp

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/Int128.cpp: Added.

(WTF::UInt128Impl::UInt128Impl):
(WTF::operator/):
(WTF::operator%):
(WTF::operator<<):
(WTF::Int128Impl::Int128Impl):

  • wtf/Int128.h:

(WTF::UInt128Max):
(std::numeric_limits<WTF::UInt128Impl>::min):
(std::numeric_limits<WTF::UInt128Impl>::lowest):
(std::numeric_limits<WTF::UInt128Impl>::max):
(std::numeric_limits<WTF::UInt128Impl>::epsilon):
(std::numeric_limits<WTF::UInt128Impl>::round_error):
(std::numeric_limits<WTF::UInt128Impl>::infinity):
(std::numeric_limits<WTF::UInt128Impl>::quiet_NaN):
(std::numeric_limits<WTF::UInt128Impl>::signaling_NaN):
(std::numeric_limits<WTF::UInt128Impl>::denorm_min):
(WTF::Int128Max):
(WTF::Int128Min):
(std::numeric_limits<WTF::Int128Impl>::min):
(std::numeric_limits<WTF::Int128Impl>::lowest):
(std::numeric_limits<WTF::Int128Impl>::max):
(std::numeric_limits<WTF::Int128Impl>::epsilon):
(std::numeric_limits<WTF::Int128Impl>::round_error):
(std::numeric_limits<WTF::Int128Impl>::infinity):
(std::numeric_limits<WTF::Int128Impl>::quiet_NaN):
(std::numeric_limits<WTF::Int128Impl>::signaling_NaN):
(std::numeric_limits<WTF::Int128Impl>::denorm_min):
(WTF::MakeUInt128):
(WTF::UInt128Impl::operator=):
(WTF::UInt128Impl::operator<<=):
(WTF::UInt128Impl::operator>>=):
(WTF::UInt128Impl::operator+=):
(WTF::UInt128Impl::operator-=):
(WTF::UInt128Impl::operator*=):
(WTF::UInt128Impl::operator/=):
(WTF::UInt128Impl::operator%=):
(WTF::UInt128Low64):
(WTF::UInt128High64):
(WTF::UInt128Impl::UInt128Impl):
(WTF::UInt128Impl::operator bool const):
(WTF::UInt128Impl::operator char const):
(WTF::UInt128Impl::operator signed char const):
(WTF::UInt128Impl::operator unsigned char const):
(WTF::UInt128Impl::operator char16_t const):
(WTF::UInt128Impl::operator char32_t const):
(WTF::UInt128Impl::operator ABSL_INTERNAL_WCHAR_T const):
(WTF::UInt128Impl::operator short const):
(WTF::UInt128Impl::operator unsigned short const):
(WTF::UInt128Impl::operator int const):
(WTF::UInt128Impl::operator unsigned int const):
(WTF::UInt128Impl::operator long const):
(WTF::UInt128Impl::operator unsigned long const):
(WTF::UInt128Impl::operator long long const):
(WTF::UInt128Impl::operator unsigned long long const):
(WTF::UInt128Impl::operator float const):
(WTF::UInt128Impl::operator double const):
(WTF::UInt128Impl::operator long double const):
(WTF::operator==):
(WTF::operator!=):
(WTF::operator<):
(WTF::operator>):
(WTF::operator<=):
(WTF::operator>=):
(WTF::operator+):
(WTF::operator-):
(WTF::operator!):
(WTF::operator~):
(WTF::operator|):
(WTF::operator&):
(WTF::operator):
(WTF::UInt128Impl::operator|=):
(WTF::UInt128Impl::operator&=):
(WTF::UInt128Impl::operator
=):
(WTF::operator<<):
(WTF::operator>>):
(WTF::int128_internal::AddResult):
(WTF::int128_internal::SubstructResult):
(WTF::operator*):
(WTF::UInt128Impl::operator++):
(WTF::UInt128Impl::operator--):
(WTF::MakeInt128):
(WTF::Int128Impl::operator=):
(WTF::Int128Impl::operator+=):
(WTF::Int128Impl::operator-=):
(WTF::Int128Impl::operator*=):
(WTF::Int128Impl::operator/=):
(WTF::Int128Impl::operator%=):
(WTF::Int128Impl::operator|=):
(WTF::Int128Impl::operator&=):
(WTF::Int128Impl::operator=):
(WTF::Int128Impl::operator<<=):
(WTF::Int128Impl::operator>>=):
(WTF::int128_internal::BitCastToSigned):
(WTF::Int128Low64):
(WTF::Int128High64):
(WTF::Int128Impl::Int128Impl):
(WTF::Int128Impl::operator bool const):
(WTF::Int128Impl::operator char const):
(WTF::Int128Impl::operator signed char const):
(WTF::Int128Impl::operator unsigned char const):
(WTF::Int128Impl::operator char16_t const):
(WTF::Int128Impl::operator char32_t const):
(WTF::Int128Impl::operator ABSL_INTERNAL_WCHAR_T const):
(WTF::Int128Impl::operator short const):
(WTF::Int128Impl::operator unsigned short const):
(WTF::Int128Impl::operator int const):
(WTF::Int128Impl::operator unsigned int const):
(WTF::Int128Impl::operator long const):
(WTF::Int128Impl::operator unsigned long const):
(WTF::Int128Impl::operator long long const):
(WTF::Int128Impl::operator unsigned long long const):
(WTF::Int128Impl::operator float const):
(WTF::Int128Impl::operator double const):
(WTF::Int128Impl::operator long double const):
(WTF::int128_internal::SignedAddResult):
(WTF::int128_internal::SignedSubstructResult):
(WTF::Int128Impl::operator++):
(WTF::Int128Impl::operator--):
(WTF::Int128Impl::operator+ const): Deleted.
(WTF::Int128Impl::operator~ const): Deleted.
(WTF::Int128Impl::operator- const): Deleted.
(WTF::Int128Impl::operator! const): Deleted.
(WTF::Int128Impl::operator std::uint64_t const): Deleted.
(WTF::Int128Impl::operator std::int64_t const): Deleted.
(WTF::Int128Impl::high const): Deleted.
(WTF::Int128Impl::low const): Deleted.
(WTF::Int128Impl::operator& const): Deleted.
(WTF::Int128Impl::operator | const): Deleted.
(WTF::Int128Impl::operator
const): Deleted.
(WTF::Int128Impl::operator<< const): Deleted.
(WTF::Int128Impl::operator>> const): Deleted.
(WTF::Int128Impl::operator* const): Deleted.
(WTF::Int128Impl::operator/ const): Deleted.
(WTF::Int128Impl::operator% const): Deleted.
(WTF::Int128Impl::operator< const): Deleted.
(WTF::Int128Impl::operator<= const): Deleted.
(WTF::Int128Impl::operator== const): Deleted.
(WTF::Int128Impl::operator!= const): Deleted.
(WTF::Int128Impl::operator>= const): Deleted.
(WTF::Int128Impl::operator> const): Deleted.
(WTF::Int128Impl::leadingZeroes const): Deleted.

  • wtf/LeadingZeroBitCount.cpp: Removed.
  • wtf/LeadingZeroBitCount.h: Removed.

Tools:

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/Int128.cpp:

(TestWebKitAPI::TYPED_TEST):
(TestWebKitAPI::TEST):
(TestWebKitAPI::ToNativeUInt128):
(TestWebKitAPI::FromNativeUInt128):
(TestWebKitAPI::ToNativeInt128):
(TestWebKitAPI::FromNativeInt128):
(TestWebKitAPI::TestBinaryUInt128):
(TestWebKitAPI::TestBinaryInt128):
(TestWebKitAPI::TestVsNativeUInt128):
(TestWebKitAPI::TestVsNativeInt128):
(TestWebKitAPI::TestUnary): Deleted.
(TestWebKitAPI::TestBinary): Deleted.
(TestWebKitAPI::ToNative): Deleted.
(TestWebKitAPI::FromNative): Deleted.
(TestWebKitAPI::TestVsNative): Deleted.

  • TestWebKitAPI/Tests/WTF/LeadingZeroBitCount.cpp: Removed.
2:05 PM Changeset in webkit [284747] by Alan Bujtas
  • 6 edits in trunk

LFC][IFC] Unexpected content wrap when the containing block width is relative (take 2)
https://bugs.webkit.org/show_bug.cgi?id=232192

Reviewed by Antti Koivisto.

Source/WebCore:

This is a more generic workaround (see r279678) for the block vs. inline measuring issue
where the block width is stored in a LayoutUnit while the inline layout uses float exclusively.
The implicit float flooring at computing the block width may produce an unexpectedly short available space.
e.g

<div style="font-family: Monospace; width: 3ch; overflow-wrap: anywhere">foobar</div>

assume the resolved 3ch is: 17.79999999px (float).
It should allow us to put [foo] on the first line.
However during a float -> LayoutUnit conversion, the resolved value becomes 17.79px.
This floored value leads to an early, unexpected breaking position at [fo].

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processInlineContent):
(WebCore::Layout::InlineContentBreaker::processOverflowingContentWithText const):

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::handleFloatContent):
(WebCore::Layout::availableWidth):
(WebCore::Layout::LineBuilder::handleInlineContent):
(WebCore::Layout::LineBuilder::rebuildLineForTrailingSoftHyphen):

LayoutTests:

1:18 PM Changeset in webkit [284746] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk

WebContent crash when sending invalid IPC message using IPC testing API
https://bugs.webkit.org/show_bug.cgi?id=232060

Patch by Brandon Stewart <Brandon> on 2021-10-23
Reviewed by Wenson Hsieh.

Source/WebKit:

Do not trigger a crash in WebContent Process when sending an invalid IPC message using the
IPC testing API.

Test: ipc/send-invalid-message.html

  • Platform/IPC/Connection.cpp:

(IPC::Connection::dispatchSyncMessage):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeConnection):

LayoutTests:

Add IPC test to verify that an invalid IPC message will not cause a crash in WebContent Process
when using the IPC testing API.

  • TestExpectations:
  • ipc/send-invalid-message-expected.txt: Added.
  • ipc/send-invalid-message.html: Added.
9:35 AM Changeset in webkit [284745] by Chris Dumez
  • 6 edits in trunk

anchor.relList.supports("opener") should return true
https://bugs.webkit.org/show_bug.cgi?id=232182

Reviewed by Darin Adler.

Source/WebCore:

anchor.relList.supports("opener") should return true since we support "opener" on
anchor elements.

No new tests, updated existing test.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::relList):

LayoutTests:

Add layout test coverage.

  • fast/dom/DOMTokenList-supports-expected.txt:
  • fast/dom/DOMTokenList-supports.html:
8:54 AM Changeset in webkit [284744] by Alan Bujtas
  • 4 edits in trunk/Source

[LFC][IFC] Breaking before hyphen is only allowed when line-break is loose
https://bugs.webkit.org/show_bug.cgi?id=232191

Reviewed by Antti Koivisto.

Source/WebCore:

This is in preparation for enabling the fix for webkit.org/b/232192.

Two hyphenation related WPT tests (line-break-normal-hyphens-002.html, line-break-strict-hyphens-002.html)
simply pass because of a LayoutUnit (block width) vs. float (measured text width) precision mismatching bug.
This precision issue makes the line breaking code believe that fewer characters fit the line
producing the expected results for those two tests.
Let's fix the line breaking logic first by adding "breaks before hyphens" rules,
so that when webkit.org/b/232192 is addressed, we won't be seeing any WPT regressions.

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::midWordBreak):

Source/WTF:

  • wtf/unicode/CharacterNames.h:
8:21 AM Changeset in webkit [284743] by ddkilzer@apple.com
  • 4 edits in trunk/Source/WebCore

WebAVPlayerController should use WeakPtr<> for C++ instance variables
<https://webkit.org/b/231919>

Reviewed by Eric Carlson.

  • platform/ios/PlaybackSessionInterfaceAVKit.h:

(WebCore::PlaybackSessionInterfaceAVKit):

  • Make RefCounted-class also subclass CanMakeWeakPtr<>.
  • platform/ios/WebAVPlayerController.h:
  • Add comments that delegate and playbackSessionInterface instance variables are held weakly. The compiler won't allow weak to be used on non-Objective-C types, though.
  • platform/ios/WebAVPlayerController.mm:
  • Add WeakPtr<> instance variables for delegate and playbackSessionInterface properties.

(-[WebAVPlayerController delegate]): Add.
(-[WebAVPlayerController setDelegate:]): Add.
(-[WebAVPlayerController playbackSessionInterface]): Add.
(-[WebAVPlayerController setPlaybackSessionInterface:]): Add.

  • Implement getter/setter methods for delegate and playbackSessionInterface properties that use WeakPtr<> instance variables.
12:46 AM Changeset in webkit [284742] by Chris Fleizach
  • 10 edits
    1 move
    2 deletes in trunk/Source

AX: Unify speech synthesizer platform usage for Mac/iOS
https://bugs.webkit.org/show_bug.cgi?id=231895
<rdar://problem/84372479>

Reviewed by Andres Gonzalez.

Source/WebCore:

AVSpeechSynthesizer has been fully supported on macOS for a number of years. This allows us to unify platform usage.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/cocoa/PlatformSpeechSynthesizerCocoa.mm: Renamed from Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm.

(getAVSpeechUtteranceDefaultSpeechRate):
(getAVSpeechUtteranceMaximumSpeechRate):
(-[WebSpeechSynthesisWrapper initWithSpeechSynthesizer:]):
(-[WebSpeechSynthesisWrapper mapSpeechRateToPlatformRate:]):
(-[WebSpeechSynthesisWrapper speakUtterance:]):
(-[WebSpeechSynthesisWrapper pause]):
(-[WebSpeechSynthesisWrapper resume]):
(-[WebSpeechSynthesisWrapper cancel]):
(-[WebSpeechSynthesisWrapper speechSynthesizer:didStartSpeechUtterance:]):
(-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeechUtterance:]):
(-[WebSpeechSynthesisWrapper speechSynthesizer:didPauseSpeechUtterance:]):
(-[WebSpeechSynthesisWrapper speechSynthesizer:didContinueSpeechUtterance:]):
(-[WebSpeechSynthesisWrapper speechSynthesizer:didCancelSpeechUtterance:]):
(-[WebSpeechSynthesisWrapper speechSynthesizer:willSpeakRangeOfSpeechString:utterance:]):
(WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
(WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
(WebCore::PlatformSpeechSynthesizer::pause):
(WebCore::PlatformSpeechSynthesizer::resume):
(WebCore::PlatformSpeechSynthesizer::speak):
(WebCore::PlatformSpeechSynthesizer::cancel):
(WebCore::PlatformSpeechSynthesizer::resetState):

  • platform/mac/PlatformSpeechSynthesizerMac.mm: Removed.

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/cocoa/AVFoundationSoftLink.h:
  • pal/cocoa/AVFoundationSoftLink.mm:
  • pal/spi/cocoa/AXSpeechManagerSPI.h:
  • pal/spi/mac/SpeechSynthesisSPI.h: Removed.

Source/WTF:

  • wtf/PlatformHave.h:

Oct 22, 2021:

10:58 PM Changeset in webkit [284741] by Jean-Yves Avenard
  • 15 edits
    2 adds in trunk

video appears blank with only audio playing if video element isn't appended to the dom tree
https://bugs.webkit.org/show_bug.cgi?id=232124
rdar://83438282

Reviewed by Eric Carlson.

Source/WebCore:

If the renderer isn't accelerated, the current playback policity is to
not have the video tracks visible on screen.
The HTMLMediaElement could only check if the renderer was accelerated if
it was part of the DOM.
On iPhone, for historical reasons, inline playback isn't allowed but
will play fullscreen instead.

This is a temporary workaround until bug 232125 is comlpeted which would provide
a more elegant and universal solution.

Test: media/video-element-fullscreen-not-in-dom-accelerated-iphone.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerRenderingCanBeAccelerated):

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

(WebCore::Internals::mediaPlayerRenderingCanBeAccelerated):

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

Source/WebKit:

Ensure that we inform the GPU process whenever
MediaPlayer::renderingCanBeAccelerated value could have changed.

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::load):
(WebKit::MediaPlayerPrivateRemote::readyStateChanged):
(WebKit::MediaPlayerPrivateRemote::checkAcceleratedRenderingState):
(WebKit::MediaPlayerPrivateRemote::updateConfiguration):
(WebKit::MediaPlayerPrivateRemote::setVideoFullscreenLayer):
(WebKit::MediaPlayerPrivateRemote::setVideoFullscreenGravity):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:

LayoutTests:

  • TestExpectations:
  • media/remove-video-element-in-pip-from-document-expected.txt:
  • media/remove-video-element-in-pip-from-document.html: update test to improve coverage.
  • media/video-element-fullscreen-not-in-dom-accelerated-iphone-expected.txt: Added.
  • media/video-element-fullscreen-not-in-dom-accelerated-iphone.html: Added.
  • platform/ios/TestExpectations:
  • platform/ipad/TestExpectations:
9:07 PM Changeset in webkit [284740] by Said Abou-Hallawa
  • 3 edits
    2 adds in trunk

[GPU Process] REGRESSION: Drawing a large SVG image on a canvas may take too much memory
https://bugs.webkit.org/show_bug.cgi?id=230886
rdar://83628607

Reviewed by Simon Fraser.

Source/WebCore:

For the GPUProcess rendering on a canvas, we have to draw the SVGImage to
a temporary ImageBuffer, get a NativeImage from this ImageBuffer and send
it to GPUProcess through a DrawNativeImage display list item.

The fix is:

  1. Make sure the size of temporary ImageBuffer is scaled to the Graphics Context CTM.
  2. Clamp the scaled size to the MaxClampedArea. So ImageBuffer::create() returns a valid ImageBuffer.
  3. Scale the destination GraphicsContext to the reciprocal of the scaling factor before drawing the NativeImage.

Test: fast/canvas/canvas-draw-large-svg-image.html

  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::drawAsNativeImage):

LayoutTests:

  • fast/canvas/canvas-draw-large-svg-image-expected.html: Added.
  • fast/canvas/canvas-draw-large-svg-image.html: Added.
8:57 PM Changeset in webkit [284739] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Source/WebCore:
https://bugs.webkit.org/show_bug.cgi?id=232177
Check if start and end positions are still valid after updating them through mergeEndWithNextIfIdentical

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2021-10-22
Reviewed by Alan Bujtas.

We currently check if start and end positions are still valid after
updating them through mergeEndWithNextIfIdentical, but not through
mergeStartWithPreviousIfIdentical. Add this check to avoid trying to
deref a nullptr in ApplyStyleCommand::mergeEndWithNextIfIdentical.

Test: fast/editing/create-link-inline-style-change-crash-001.html

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::applyInlineStyle):

LayoutTests:
Check if start and end positions are still valid after updating them through mergeStartWithPreviousIfIdentical
https://bugs.webkit.org/show_bug.cgi?id=232177

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2021-10-22
Reviewed by Alan Bujtas.

  • fast/editing/create-link-inline-style-change-crash-001-expected.txt: Added.
  • fast/editing/create-link-inline-style-change-crash-001.html: Added.
8:25 PM Changeset in webkit [284738] by Simon Fraser
  • 16 edits
    1 add in trunk

Content offset in this codepen when switching tabs
https://bugs.webkit.org/show_bug.cgi?id=231989

Reviewed by Tim Horton.

Source/WebCore:

There were two problems that occurred with async-scrollable iframes when their associated
WKWebView was removed and re-added to the view hierarchy (e.g. when switching tabs).
These resulted in misplaced position:fixed content, and the first user scroll in the
iframe causing the scroll position to jump back to the top.

The positon:fixed issue was caused by an ordering problem in
ScrollingTreeFrameScrollingNode::commitStateBeforeChildren() which resulted in the layout
viewport being computed incorrectly; we called updateViewportForCurrentScrollPosition()
before setting the min and max scroll position, so we'd always clamp the layout viewport to
a location of 0,0.

The second scroll position reset issue was caused by the ScrollingTreeScrollingNode's
m_currentScrollPosition reverting to a stale after re-attaching the iframe's scrolling
subtree. ScrollingTreeScrollingNode::commitStateBeforeChildren() has code to set
m_currentScrollPosition from the state tree node's scroll position on first commit;
the issue was that ScrollingStateScrollingNode's scrollPosition() was not updated on every
scroll, only when something triggered a scrolling tree commit.

Fix by updating ScrollingStateScrollingNode's scrollPosition() for frame nodes on detach
(overflow scrolling nodes have their scroll positions updated eagerly).

Both fixes are tested by the ScrollingCoordinatorTests.ScrollingTreeAfterDetachReattach API test.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::frameViewWillBeDetached):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::frameViewWillBeDetached):

  • page/scrolling/ScrollingStateScrollingNode.cpp:

(WebCore::ScrollingStateScrollingNode::hasScrollPositionRequest const):

  • page/scrolling/ScrollingStateScrollingNode.h:
  • page/scrolling/ScrollingStateTree.cpp:

(WebCore::ScrollingStateTree::insertNode):

  • page/scrolling/ScrollingTreeFrameScrollingNode.cpp:

(WebCore::ScrollingTreeFrameScrollingNode::commitStateBeforeChildren):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeScrollingNode::dumpProperties const):

  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::commitTreeStateIfNeeded):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::detachRootLayer):

Tools:

API test that scrolls an iframe via wheel events, then detached and re-attaches the view.

The two wheel scrolls are necessary to exercise the "stale ScrollingStateScrollingNode
scroll position" issue.

The scrolling tree dumps validate the layout viewport part of the fix.

Also correct some functions where the sense of 'isWaitingForJavaScript' was flipped.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/mac/ScrollingCoordinatorTests.mm: Added.

(TestWebKitAPI::synthesizeWheelEvents):
(TestWebKitAPI::waitForScrollEventAndReturnScrollY):
(TestWebKitAPI::scrollingTreeElidingLastCommittedScrollPosition):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[WKWebView objectByEvaluatingJavaScript:]):
(-[WKWebView objectByEvaluatingJavaScriptWithUserGesture:]):
(-[WKWebView objectByCallingAsyncFunction:withArguments:error:]):

LayoutTests:

New baselines.

  • tiled-drawing/scrolling/clamp-out-of-bounds-scrolls-expected.txt:
  • tiled-drawing/scrolling/scrolling-tree-after-scroll-expected.txt:
7:34 PM Changeset in webkit [284737] by eric.carlson@apple.com
  • 6 edits in trunk/Source/WebCore

[Cocoa] Fairplay encrypted video fails to play when loaded in a display:none element
https://bugs.webkit.org/show_bug.cgi?id=232155
rdar://83419159

Reviewed by Jer Noble.

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:

(WebCore::MediaPlayerPrivateAVFoundation::currentRenderingMode const): MediaRenderingMode
was changed from an enum to an enum class so its values can be logged.
(WebCore::MediaPlayerPrivateAVFoundation::preferredRenderingMode const): Only return
MediaRenderingMode::MediaRenderingToContext if we have been asked to paint once
readyState is HaveMetadata or higher.
(WebCore::MediaPlayerPrivateAVFoundation::setUpVideoRendering): MediaRenderingMode change.
(WebCore::MediaPlayerPrivateAVFoundation::setNeedsRenderingModeChanged): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::prepareForRendering): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::setPageIsVisible): Ditto.
(WebCore::convertEnumerationToString): MediaRenderingMode logging function.

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:

(WebCore::MediaPlayerPrivateAVFoundation::haveBeenAskedToPaint const):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::hasAvailableVideoFrame const): MediaRenderingMode change.
(WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastPixelBuffer): Set m_haveBeenAskedToPaint.

6:54 PM Changeset in webkit [284736] by commit-queue@webkit.org
  • 42 edits
    3 adds in trunk/Source

Add a module map file for PrivateFrameworks/WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=230735

Patch by Ian Anderson <iana@apple.com> on 2021-10-22
Reviewed by David Kilzer.

Source/WebCore:

Change a few quoted includes to framework style angle includes to
support modularization.
Make sure to define the TARGET_ macros before using them.

  • platform/ios/WebItemProviderPasteboard.h:
  • platform/ios/wak/WAKAppKitStubs.h:
  • platform/ios/wak/WAKResponder.h:
  • platform/ios/wak/WAKView.h:
  • platform/ios/wak/WAKWindow.h:
  • platform/ios/wak/WKContentObservation.h:
  • platform/ios/wak/WebCoreThreadMessage.h:

Source/WebKitLegacy:

Add module map files for WebKitLegacy. The public module is empty
because there are no public headers. The private module map sets
PrivateHeaders as the umbrella directory because there isn't an umbrella
header already. Then it makes an explicit submodule for each header so
as to mimic the non-modular environment.

  • Modules/WebKitLegacy.modulemap: Added.
  • Modules/WebKitLegacy.private.modulemap: Added.
  • WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/ios:

WebGeolocationCoreLocationProvider.h is an Objective-C++ header, but the
WebKitLegacy module should be usable by plain Objective-C clients. Add
C++ guards so that it can be included in the module.
Add a missing include to WebFixedPositionContent.h.

  • Misc/WebGeolocationCoreLocationProvider.h:
  • WebCoreSupport/WebFixedPositionContent.h:

Source/WebKitLegacy/mac:

Define modules for the Cocoa Touch environment. macOS can't define
modules in WebKitLegacy because it's a nested framework on that
platform.
Set up the modules verifier tool for Apple Internal (it's not supported
in the public Xcode). Don't enable it yet because some of the Safari
builders use too old of an Xcode.
Add the Apple Internal guards for NSURLDownload from WebDownload.h
NSURLDownloadSPI.h so it can be included in the module.
WebCreateFragmentInternal.h is an Objective-C++ header, but the
WebKitLegacy module should be usable by plain Objective-C clients.
C++ guards so that it can be included in the module.
Switch a few quoted includes to framework style angle includes, which
are required for modules.
Add some missing includes.

  • Configurations/WebKitLegacy.xcconfig:
  • DOM/DOMEventListener.h:
  • DOM/DOMEventTarget.h:
  • DOM/DOMNodeFilter.h:
  • DOM/DOMXPathNSResolver.h:
  • DOM/WebDOMOperationsPrivate.h:
  • History/WebHistoryItemPrivate.h:
  • Misc/NSURLDownloadSPI.h:
  • Misc/WebCache.h:
  • Misc/WebDownload.h:
  • Misc/WebKitErrorsPrivate.h:
  • Misc/WebLocalizableStrings.h:
  • Misc/WebUserContentURLPattern.h:
  • Plugins/Hosted/WebKitPluginHostTypes.h:
  • Plugins/WebPlugin.h:
  • Plugins/WebPluginContainer.h:
  • Storage/WebDatabaseManagerPrivate.h:
  • Storage/WebDatabaseQuotaManager.h:
  • Storage/WebStorageManagerPrivate.h:
  • WebCoreSupport/WebCreateFragmentInternal.h:
  • WebCoreSupport/WebSecurityOriginPrivate.h:
  • WebView/WebDeviceOrientation.h:
  • WebView/WebDeviceOrientationProvider.h:
  • WebView/WebDeviceOrientationProviderMock.h:
  • WebView/WebEditingDelegatePrivate.h:
  • WebView/WebFormDelegatePrivate.h:
  • WebView/WebGeolocationPosition.h:
  • WebView/WebResourceLoadDelegatePrivate.h:
6:25 PM Changeset in webkit [284735] by Kocsen Chung
  • 1 copy in tags/Safari-612.3.2.1.1

Tag Safari-612.3.2.1.1.

6:22 PM Changeset in webkit [284734] by Kocsen Chung
  • 10 edits in branches/safari-612.3.2.1-branch

Cherry-pick r284692. rdar://problem/84553142

Followup to r284652: ensure file handle is closed in web process
https://bugs.webkit.org/show_bug.cgi?id=232127

Reviewed by Youenn Fablet.

Source/WebCore:

Covered by test: storage/filesystemaccess/sync-access-handle-close-worker.html

  • Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp: (WebCore::FileSystemSyncAccessHandle::~FileSystemSyncAccessHandle): make sure file handle is closed when FileSystemSyncAccessHandle is destroyed. (WebCore::FileSystemSyncAccessHandle::closeInternal): (WebCore::FileSystemSyncAccessHandle::close):
  • Modules/filesystemaccess/FileSystemSyncAccessHandle.h:

Source/WebKit:

  • NetworkProcess/storage/FileSystemStorageHandle.cpp: (WebKit::FileSystemStorageHandle::~FileSystemStorageHandle): (WebKit::FileSystemStorageHandle::createSyncAccessHandle): (WebKit::FileSystemStorageHandle::close):
  • NetworkProcess/storage/FileSystemStorageHandle.h:
  • Platform/IPC/cocoa/SharedFileHandleCocoa.cpp: an extra fd is created here and does not get closed. (IPC::SharedFileHandle::decode):

LayoutTests:

  • storage/filesystemaccess/resources/sync-access-handle-close.js: (testSyncFunction): (async testAsyncFunction): (async testFunctions): (async testMultipleHandles): (async test):
  • storage/filesystemaccess/sync-access-handle-close-worker-expected.txt:

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

6:22 PM Changeset in webkit [284733] by Kocsen Chung
  • 7 edits
    3 adds in branches/safari-612.3.2.1-branch

Cherry-pick r284652. rdar://problem/84517013

FileSystemSyncAccessHandle should close platform file handle on close()
https://bugs.webkit.org/show_bug.cgi?id=232067
<rdar://problem/84517013>

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker-expected.txt:

Source/WebCore:

This patch also ensures no request is sent after close() is called.

Test: storage/filesystemaccess/sync-access-handle-close-worker.html

  • Modules/filesystemaccess/FileSystemFileHandle.cpp: (WebCore::FileSystemFileHandle::createSyncAccessHandle):
  • Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp: (WebCore::FileSystemSyncAccessHandle::FileSystemSyncAccessHandle): (WebCore::FileSystemSyncAccessHandle::~FileSystemSyncAccessHandle): (WebCore::FileSystemSyncAccessHandle::isClosingOrClosed const): (WebCore::FileSystemSyncAccessHandle::truncate): (WebCore::FileSystemSyncAccessHandle::getSize): (WebCore::FileSystemSyncAccessHandle::flush): (WebCore::FileSystemSyncAccessHandle::close): (WebCore::FileSystemSyncAccessHandle::didClose): (WebCore::FileSystemSyncAccessHandle::read): (WebCore::FileSystemSyncAccessHandle::write):
  • Modules/filesystemaccess/FileSystemSyncAccessHandle.h:

LayoutTests:

  • storage/filesystemaccess/resources/sync-access-handle-close.js: Added. (finishTest): (async testFunctions): (async test):
  • storage/filesystemaccess/sync-access-handle-close-worker-expected.txt: Added.
  • storage/filesystemaccess/sync-access-handle-close-worker.html: Added.

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

5:58 PM Changeset in webkit [284732] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

Updated test expectations for imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-perfect-negotiation-stress-glare.https.html.
https://bugs.webkit.org/show_bug.cgi?id=229569.

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
5:49 PM Changeset in webkit [284731] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

REGRESSION: [Win] fast/ruby/generated-before-counter-doesnt-crash.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=232188

Unreviewed test gardening.

  • platform/win/TestExpectations: Mark test as flaky.
5:19 PM Changeset in webkit [284730] by Chris Dumez
  • 3 edits in trunk/Source

Preconnect to link's target on click
https://bugs.webkit.org/show_bug.cgi?id=232147

Reviewed by Alex Christensen.

Preconnect to link's target on click, for reduced page load time. This is a confirmed
progression on some of our page load time benchmarks.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::handleClick):

5:04 PM Changeset in webkit [284729] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 Debug ] ASSERTION FAILED: sockets.empty().
https://bugs.webkit.org/show_bug.cgi?id=231451

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
4:51 PM Changeset in webkit [284728] by commit-queue@webkit.org
  • 42 edits
    1 delete in trunk/Source

Unreviewed, reverting r284713.
https://bugs.webkit.org/show_bug.cgi?id=232187

Broke some Apple internal builds

Reverted changeset:

"Add a module map file for PrivateFrameworks/WebKitLegacy"
https://bugs.webkit.org/show_bug.cgi?id=230735
https://commits.webkit.org/r284713

4:50 PM Changeset in webkit [284727] by Ayumi Kojima
  • 4 edits in trunk/LayoutTests

[ iOS macOS Debug ] imported/w3c/web-platform-tests/html/dom/idlharness.worker.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231030

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/mac/TestExpectations:
4:31 PM Changeset in webkit [284726] by Justin Michaud
  • 3 edits in trunk/Source/JavaScriptCore

Fix nits from 232019
https://bugs.webkit.org/show_bug.cgi?id=232180

Reviewed by Saam Barati.

We only need one write barrier, since we only need to guarantee that we read the status of the write barrier before we read from the structure cache.
If we are delayed in watching the watchpoint, it does not change any of the interleavings.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

4:21 PM Changeset in webkit [284725] by commit-queue@webkit.org
  • 6 edits
    8 adds in trunk

Integer interpolation in animations should be rounded towards positive infinity, not away from zero.
https://bugs.webkit.org/show_bug.cgi?id=232013

Currently, interpolation of <integer> is rounding away from 0.
The interpolation's result should be rounded according to the spec,
https://drafts.csswg.org/css-values-4/#combine-integers, which is

"the result is converted to an <integer> by rounding
to the nearest integer, with values halfway between
adjacent integers rounded towards positive infinity."

LayoutTests/imported/w3c:

Patch by Joonghun Park <pjh0718@gmail.com> on 2021-10-22
Reviewed by Darin Adler.

  • web-platform-tests/css/css-values/integer_interpolation_round_half_towards_positive_infinity_order-expected.txt: Added.
  • web-platform-tests/css/css-values/integer_interpolation_round_half_towards_positive_infinity_order.html: Added.
  • web-platform-tests/css/css-values/integer_interpolation_round_half_towards_positive_infinity_z_index-expected.txt: Added.
  • web-platform-tests/css/css-values/integer_interpolation_round_half_towards_positive_infinity_z_index.html: Added.

Source/WebCore:

This patch also removes redundant static_cast<double>s
and potential overflow(e.g.'to' is the maximum integer and 'from' is
the minimum integer) from blend in AnimationUtilities.h.

Patch by Joonghun Park <pjh0718@gmail.com> on 2021-10-22
Reviewed by Darin Adler.

Tests: animations/animation-order-overflow.html

animations/animation-z-order-overflow.html
imported/w3c/web-platform-tests/css/css-values/integer_interpolation_round_half_towards_positive_infinity_order.html
imported/w3c/web-platform-tests/css/css-values/integer_interpolation_round_half_towards_positive_infinity_z_index.html

  • platform/animation/AnimationUtilities.h:

(WebCore::blend):

Source/WTF:

Patch by Joonghun Park <pjh0718@gmail.com> on 2021-10-22
Reviewed by Darin Adler.

  • wtf/MathExtras.h:

(roundTowardsPositiveInfinity):

LayoutTests:

This patch also removes redundant static_cast<double>s
and potential overflow(e.g.'to' is the maximum integer and 'from' is
the minimum integer) from blend in AnimationUtilities.h.

Patch by Joonghun Park <pjh0718@gmail.com> on 2021-10-22
Reviewed by Darin Adler.

  • animations/animation-order-overflow-expected.txt: Added.
  • animations/animation-order-overflow.html: Added.
  • animations/animation-z-order-overflow-expected.txt: Added.
  • animations/animation-z-order-overflow.html: Added.
4:20 PM Changeset in webkit [284724] by Chris Dumez
  • 4 edits in trunk/LayoutTests

Regression (r284610?): [ iOS BigSur wk2 ]imported/w3c/web-platform-tests/html/cross-origin-opener-policy/coop-csp-sandbox.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=232184
<rdar://problem/84567378>

LayoutTests/imported/w3c:

Unreviewed, rebaseline test.

  • web-platform-tests/html/cross-origin-opener-policy/coop-csp-sandbox.https-expected.txt:

LayoutTests:

Unreviewed, dump CONSOLE messages to stderr to address flakiness.

3:53 PM Changeset in webkit [284723] by Chris Dumez
  • 4 edits in trunk/LayoutTests

Regression (r284610): [ iOS BigSur wk2 ] http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html is failing
https://bugs.webkit.org/show_bug.cgi?id=232151
<rdar://problem/84552682>

Reviewed by Ryan Haddad.

The test expects a CONSOLE message to get logged to indicate that a load was blocked.
Rely on internals.setConsoleMessageListener to wait for this CONSOLE message instead
of using a timer in order the address the flakiness.

  • http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html:
  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
3:44 PM Changeset in webkit [284722] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[iOS EWS] imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=232181

Unreviewed test gardening.

  • platform/ios/TestExpectations: Mark test as flaky.
3:32 PM Changeset in webkit [284721] by Ryan Haddad
  • 2 edits in trunk/Tools

[ iOS15 EWS ] TestWebKitAPI.AppPrivacyReport.LoadSimulatedRequest tests are timing out
https://bugs.webkit.org/show_bug.cgi?id=232166

Unreviewed test gardening.

  • TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: Disable these tests.
3:27 PM Changeset in webkit [284720] by Alan Coon
  • 1 copy in tags/Safari-612.3.2.0.1

Tag Safari-612.3.2.0.1.

3:26 PM Changeset in webkit [284719] by Alan Coon
  • 8 edits in branches/safari-612.3.2.1-branch/Source

Versioning.

WebKit-7612.3.2.1.1

3:17 PM Changeset in webkit [284718] by commit-queue@webkit.org
  • 19 edits
    1 move in trunk/Source/WebCore

Rename ClipPathOperation to PathOperation
https://bugs.webkit.org/show_bug.cgi?id=232167

Patch by Kiet Ho <Kiet Ho> on 2021-10-22
Reviewed by Simon Fraser.

No functional changes, no tests required.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):

  • css/CSSBasicShapes.cpp:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • rendering/PathOperation.h: Renamed from Source/WebCore/rendering/ClipPathOperation.h.

(WebCore::PathOperation::operator!= const):
(WebCore::PathOperation::isSameType const):
(WebCore::PathOperation::PathOperation):

  • rendering/ReferencedSVGResources.cpp:

(WebCore::ReferencedSVGResources::referencedSVGResourceIDs):
(WebCore::ReferencedSVGResources::referencedClipperRenderer):

  • rendering/ReferencedSVGResources.h:
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::hitTestClipPath const):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::willCompositeClipPath const):
(WebCore::RenderLayer::computeClipPath const):
(WebCore::RenderLayer::setupClipPath):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateMaskingLayerGeometry):
(WebCore::RenderLayerBacking::updateMaskingLayer):

  • rendering/style/BasicShapes.cpp:
  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::clipPath const):
(WebCore::RenderStyle::initialClipPath):
(WebCore::RenderStyle::setClipPath):

  • rendering/style/StyleRareNonInheritedData.h:
  • rendering/svg/SVGRenderSupport.cpp:

(WebCore::isPointInCSSClippingArea):
(WebCore::SVGRenderSupport::clipContextToCSSClippingArea):
(WebCore::SVGRenderSupport::pointInClippingArea):

  • rendering/svg/SVGRenderTreeAsText.cpp:

(WebCore::writeResources):

  • rendering/svg/SVGRenderingContext.cpp:

(WebCore::SVGRenderingContext::prepareToRenderSVGContent):

  • rendering/svg/SVGResources.cpp:

(WebCore::SVGResources::buildCachedResources):

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertClipPath):

3:05 PM Changeset in webkit [284717] by Alan Coon
  • 1 copy in branches/safari-612.3.2.1-branch

New branch.

2:56 PM Changeset in webkit [284716] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] GetTypedArrayLengthAsInt52 must be inserted only when we ensure that input is TypedArray via array-mode-based filtering
https://bugs.webkit.org/show_bug.cgi?id=232168
rdar://84366658

Reviewed by Robin Morisset.

JSTests:

  • stress/gettypedarraylengthasint52-must-be-emitted-for-typedarray.js: Added.

(foo):

Source/JavaScriptCore:

GetTypedArrayLengthAsInt52 works only when input is TypedArray, which should be validated via array-mode (and already inserted checks in fixup).
Accidentally we were inserting it without checking typed-array condition in SSA lowering phase. This patch adds a condition which ensures it
is TypedArray.

  • dfg/DFGSSALoweringPhase.cpp:

(JSC::DFG::SSALoweringPhase::handleNode):
(JSC::DFG::SSALoweringPhase::lowerBoundsCheck):

2:47 PM Changeset in webkit [284715] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Change Heap::writeBarrier() to do the cheaper check first.
https://bugs.webkit.org/show_bug.cgi?id=232172

Reviewed by Robin Morisset.

It's cheaper to do a check using incoming args (which are already loaded in
registers) than to do a check which requires memory loads.

  • heap/HeapInlines.h:

(JSC::Heap::writeBarrier):

2:40 PM Changeset in webkit [284714] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS Debug ] fast/selectors/ backtracking tests are timing out.
https://bugs.webkit.org/show_bug.cgi?id=230988

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
2:28 PM Changeset in webkit [284713] by commit-queue@webkit.org
  • 42 edits
    3 adds in trunk/Source

Add a module map file for PrivateFrameworks/WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=230735

Patch by Ian Anderson <iana@apple.com> on 2021-10-22
Reviewed by David Kilzer.

Source/WebCore:

Change a few quoted includes to framework style angle includes to
support modularization.
Make sure to define the TARGET_ macros before using them.

  • platform/ios/WebItemProviderPasteboard.h:
  • platform/ios/wak/WAKAppKitStubs.h:
  • platform/ios/wak/WAKResponder.h:
  • platform/ios/wak/WAKView.h:
  • platform/ios/wak/WAKWindow.h:
  • platform/ios/wak/WKContentObservation.h:
  • platform/ios/wak/WebCoreThreadMessage.h:

Source/WebKitLegacy:

Add module map files for WebKitLegacy. The public module is empty
because there are no public headers. The private module map sets
PrivateHeaders as the umbrella directory because there isn't an umbrella
header already. Then it makes an explicit submodule for each header so
as to mimic the non-modular environment.

  • Modules/WebKitLegacy.modulemap: Added.
  • Modules/WebKitLegacy.private.modulemap: Added.
  • WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/ios:

WebGeolocationCoreLocationProvider.h is an Objective-C++ header, but the
WebKitLegacy module should be usable by plain Objective-C clients. Add
C++ guards so that it can be included in the module.
Add a missing include to WebFixedPositionContent.h.

  • Misc/WebGeolocationCoreLocationProvider.h:
  • WebCoreSupport/WebFixedPositionContent.h:

Source/WebKitLegacy/mac:

Define modules for the Cocoa Touch environment. macOS can't define
modules in WebKitLegacy because it's a nested framework on that
platform.
Enable the modules verifier tool for Apple Internal (it's not supported
in the public Xcode).
Add the Apple Internal guards for NSURLDownload from WebDownload.h to
NSURLDownloadSPI.h so it can be included in the module.
WebCreateFragmentInternal.h is an Objective-C++ header, but the
WebKitLegacy module should be usable by plain Objective-C clients. Add
C++ guards so that it can be included in the module.
Switch a few quoted includes to framework style angle includes, which
are required for modules.
Add some missing includes.

  • Configurations/WebKitLegacy.xcconfig:
  • DOM/DOMEventListener.h:
  • DOM/DOMEventTarget.h:
  • DOM/DOMNodeFilter.h:
  • DOM/DOMXPathNSResolver.h:
  • DOM/WebDOMOperationsPrivate.h:
  • History/WebHistoryItemPrivate.h:
  • Misc/NSURLDownloadSPI.h:
  • Misc/WebCache.h:
  • Misc/WebDownload.h:
  • Misc/WebKitErrorsPrivate.h:
  • Misc/WebLocalizableStrings.h:
  • Misc/WebUserContentURLPattern.h:
  • Plugins/Hosted/WebKitPluginHostTypes.h:
  • Plugins/WebPlugin.h:
  • Plugins/WebPluginContainer.h:
  • Storage/WebDatabaseManagerPrivate.h:
  • Storage/WebDatabaseQuotaManager.h:
  • Storage/WebStorageManagerPrivate.h:
  • WebCoreSupport/WebCreateFragmentInternal.h:
  • WebCoreSupport/WebSecurityOriginPrivate.h:
  • WebView/WebDeviceOrientation.h:
  • WebView/WebDeviceOrientationProvider.h:
  • WebView/WebDeviceOrientationProviderMock.h:
  • WebView/WebEditingDelegatePrivate.h:
  • WebView/WebFormDelegatePrivate.h:
  • WebView/WebGeolocationPosition.h:
  • WebView/WebResourceLoadDelegatePrivate.h:
1:45 PM Changeset in webkit [284712] by Chris Fleizach
  • 2 edits in trunk/Source/WebKit

AX: Inform AX when the injected bundle sends a synchronous message
https://bugs.webkit.org/show_bug.cgi?id=232159

Reviewed by Andres Gonzalez.

When an injected bundle sends a synchronous message we need to inform accessibility clients, so they don't get
stuck trying to message the WebContent process. This is already handled for synchronous messages
generated from the WebPage.

  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::postSynchronousMessage):

1:22 PM Changeset in webkit [284711] by aboya@igalia.com
  • 8 edits in trunk

[MSE][GStreamer] Honor MP4 edit lists, bis
https://bugs.webkit.org/show_bug.cgi?id=231019

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

This patch takes into consideration the GstSegment attached to a
sample to offset the PTS and DTS. This ensures accurate timestamps are
obtained for MP4 files containing edit lists (commonly necessary for
files containing video with B frames to have PTS starting at zero).

Before this was implemented, a workaround was in place based on a
heuristic (DTS = 0 && PTS > 0 && PTS < 0.1). The workaround is
preserved for the sake of content without proper edit lists, but
any edit list takes preference.

The time fudge factor has been modified from 0.083 seconds up to
0.100 seconds to accomodate the size of the empty edit in test.mp4
used by Web Platform Tests.

This test fixes improves expectation results and fixes two subtests in
imported/w3c/web-platform-tests/media-source/mediasource-remove.html.

This is a reworked version that avoids using gst_sample_set_buffer()
which is not available on GStreamer 1.14, and fixes an issue where
frames that would get a negative DTS were not being enqueued properly.

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::currentTimeFudgeFactor):

  • platform/graphics/SourceBufferPrivate.h:

(WebCore::SourceBufferPrivate::timeFudgeFactor const):

  • platform/graphics/gstreamer/GStreamerCommon.h:

(WebCore::toGstClockTime):

  • platform/graphics/gstreamer/MediaSampleGStreamer.cpp:

(WebCore::MediaSampleGStreamer::MediaSampleGStreamer):

  • platform/graphics/gstreamer/mse/AppendPipeline.cpp:

(WebCore::bufferTimeToStreamTime):
(WebCore::AppendPipeline::appsinkNewSample):

LayoutTests:

Update expectations for mediasource-remove.html in the GStreamer
ports, as a couple subtests get fixed.

  • platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-remove-expected.txt:
12:50 PM Changeset in webkit [284710] by commit-queue@webkit.org
  • 19 edits in trunk/Source/WebKit

Use C++17 nested namespace syntax for WebKit::PCM
https://bugs.webkit.org/show_bug.cgi?id=232162

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

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementClientImpl.cpp:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementConnection.cpp:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDaemonClient.cpp:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDaemonClient.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDebugInfo.cpp:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDebugInfo.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManagerInterface.cpp:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManagerProxy.cpp:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementNetworkLoader.cpp:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementNetworkLoader.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementStore.cpp:
  • NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementConnectionCocoa.mm:
  • NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementNetworkLoaderCocoa.mm:
  • NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementXPCUtilities.h:
  • NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementXPCUtilities.mm:
  • Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonConnectionSet.mm:
12:22 PM Changeset in webkit [284709] by Chris Dumez
  • 2 edits
    2 deletes in trunk/LayoutTests

Unreviewed, drop custom iOS expectations for noopener-noreferrer-sizing.window.html.

It looks like the test is now passing on iOS/iPhone too, not just macOS and iOS/iPad.

  • platform/ios-wk2/TestExpectations:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-sizing.window-expected.txt: Removed.
  • platform/ipad/imported/w3c/web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-sizing.window-expected.txt: Removed.
12:19 PM Changeset in webkit [284708] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

Update test expectations for imported/w3c/web-platform-tests/content-security-policy/script-src/script-src-multiple-policies-multiple-hashing-algorithms.html.
https://bugs.webkit.org/show_bug.cgi?id=232120.

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
12:00 PM Changeset in webkit [284707] by Alan Coon
  • 3 edits
    3 adds in branches/safari-612-branch

Cherry-pick r283952. rdar://problem/84558050

[COOP] Crash under ReportingEndpointsCache::addEndpointFromDictionary()
https://bugs.webkit.org/show_bug.cgi?id=231537
<rdar://83530643>

Reviewed by Geoffrey Garen.

Source/WebCore:

Make sure we don't crash under addEndpointFromDictionary() when the Report-To HTTP header
contains more than one endpoint URL for a given group.

The loop inside addEndpointFromDictionary() should bail as soon as we find a viable
endpoint URL (since we don't currently support having several URLs for a given group).
The crash was due to a use-after-move of the |group|.

Test: http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints.html

  • loader/ReportingEndpointsCache.cpp: (WebCore::ReportingEndpointsCache::addEndpointFromDictionary):

LayoutTests:

Add layout test coverage.

  • http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints-expected.txt: Added.
  • http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints.html: Added.
  • http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints.html.headers: Added.

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

11:57 AM Changeset in webkit [284706] by Eric Hutchison
  • 3 edits in trunk/LayoutTests

http/wpt/fetch/fetch-response-body-stop-in-worker.html is failing on iOS15 was well.
https://bugs.webkit.org/show_bug.cgi?id=225528.

Unreviewed test gardening.

  • platform/ios-14-wk2/TestExpectations:
  • platform/ios-wk2/TestExpectations:
11:55 AM Changeset in webkit [284705] by Alan Coon
  • 8 edits in branches/safari-612-branch/Source

Versioning.

WebKit-7612.3.3

11:53 AM Changeset in webkit [284704] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

webkitpy/autoinstalled/pyobjc_frameworks.py should install wheel distribution
https://bugs.webkit.org/show_bug.cgi?id=232156

Patch by Roy Reapor <rreapor@apple.com> on 2021-10-22
Reviewed by Stephanie Lewis.

Install wheel version of framweorks.

  • Scripts/webkitpy/autoinstalled/pyobjc_frameworks.py:
11:41 AM Changeset in webkit [284703] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Add required syscall
https://bugs.webkit.org/show_bug.cgi?id=232153
<rdar://84523250>

Reviewed by Brent Fulgham.

Add required syscall to WP sandbox on iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
11:35 AM Changeset in webkit [284702] by commit-queue@webkit.org
  • 9 edits
    39 adds in trunk

Change WebAssembly module import linking time to evaluate step.
https://bugs.webkit.org/show_bug.cgi?id=231114

Patch by Asumu Takikawa <asumu@igalia.com> on 2021-10-22
Reviewed by Yusuke Suzuki.

JSTests:

Added test cases based on Wasm/ESM proposal examples from:

https://github.com/WebAssembly/esm-integration/blob/main/proposals/esm-integration/EXAMPLES.md

The new tests cases cover the bindings made for both JS<->Wasm
and Wasm<->JS cyclic module cases, and importing values from JS
into Wasm modules. The tests do not cover importing memory values
as this does not work yet.

  • wasm/modules/wasm-js-cycle.js:
  • wasm/modules/wasm-js-cycle/entry-global.wasm:
  • wasm/modules/wasm-js-cycle/entry-global.wat:
  • wasm/modules/wasm-js-cycle/entry-table.wasm:
  • wasm/modules/wasm-js-cycle/entry-table.wat:
  • wasm/modules/wasm-js-cycle/global.js:

(from.string_appeared_here.export.incrementGlobal): Deleted.

  • wasm/modules/wasm-js-cycle/table.js:

(from.string_appeared_here.export.setTable): Deleted.

  • wasm/modules/js-wasm-cycle.js:

(then):

  • wasm/modules/js-wasm-cycle/entry-function.js: Added.

(f):

  • wasm/modules/js-wasm-cycle/entry-i32-global.js: Added.
  • wasm/modules/js-wasm-cycle/entry-i32-value.js: Added.
  • wasm/modules/js-wasm-cycle/entry-memory.js: Added.
  • wasm/modules/js-wasm-cycle/entry-table.js: Added.
  • wasm/modules/js-wasm-cycle/entry-wasm-global.js: Added.

(f):

  • wasm/modules/js-wasm-cycle/entry-wasm-memory.js: Added.

(f):

  • wasm/modules/js-wasm-cycle/entry-wasm-table.js: Added.

(f):

  • wasm/modules/js-wasm-cycle/function.wasm: Added.
  • wasm/modules/js-wasm-cycle/function.wat: Added.
  • wasm/modules/js-wasm-cycle/i32-global.wasm: Added.
  • wasm/modules/js-wasm-cycle/i32-global.wat: Added.
  • wasm/modules/js-wasm-cycle/i32-value.wasm: Added.
  • wasm/modules/js-wasm-cycle/i32-value.wat: Added.
  • wasm/modules/js-wasm-cycle/memory.wasm: Added.
  • wasm/modules/js-wasm-cycle/memory.wat: Added.
  • wasm/modules/js-wasm-cycle/table.wasm: Added.
  • wasm/modules/js-wasm-cycle/table.wat: Added.
  • wasm/modules/js-wasm-cycle/wasm-global.wasm: Added.
  • wasm/modules/js-wasm-cycle/wasm-global.wat: Added.
  • wasm/modules/js-wasm-cycle/wasm-memory.wasm: Added.
  • wasm/modules/js-wasm-cycle/wasm-memory.wat: Added.
  • wasm/modules/js-wasm-cycle/wasm-table.wasm: Added.
  • wasm/modules/js-wasm-cycle/wasm-table.wat: Added.
  • wasm/modules/wasm-imports-js-exports.js:
  • wasm/modules/wasm-imports-js-exports/global.js: Added.
  • wasm/modules/wasm-imports-js-exports/global.wasm: Added.
  • wasm/modules/wasm-imports-js-exports/global.wat: Added.
  • wasm/modules/wasm-imports-js-exports/table.js: Added.
  • wasm/modules/wasm-imports-js-exports/table.wasm: Added.
  • wasm/modules/wasm-imports-js-exports/table.wat: Added.
  • wasm/modules/wasm-js-cycle.js:
  • wasm/modules/wasm-js-cycle/entry-global.wasm: Added.
  • wasm/modules/wasm-js-cycle/entry-global.wat: Added.
  • wasm/modules/wasm-js-cycle/entry-memory.wasm: Added.
  • wasm/modules/wasm-js-cycle/entry-memory.wat: Added.
  • wasm/modules/wasm-js-cycle/entry-table.wasm: Added.
  • wasm/modules/wasm-js-cycle/entry-table.wat: Added.
  • wasm/modules/wasm-js-cycle/global.js: Added.

(export.incrementGlobal):

  • wasm/modules/wasm-js-cycle/memory.js: Added.

(from.string_appeared_here.export.setMemory):

  • wasm/modules/wasm-js-cycle/table.js: Added.

(export.setTable):

Source/JavaScriptCore:

Moves the Wasm module import linking code to execute in the
module evaluation step, which is the behavior specified in the
Wasm/ESM-integration proposal:

https://github.com/WebAssembly/esm-integration/tree/main/proposals/esm-integration#evaluate

  • runtime/AbstractModuleRecord.cpp:

(JSC::AbstractModuleRecord::link):
(JSC::AbstractModuleRecord::evaluate):

  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::finalizeCreation):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):
(JSC::WebAssemblyModuleRecord::initializeImportsAndExports):
(JSC::WebAssemblyModuleRecord::linkImpl): Deleted.

  • wasm/js/WebAssemblyModuleRecord.h:
11:35 AM Changeset in webkit [284701] by Ayumi Kojima
  • 3 edits in trunk/LayoutTests

Regression (r284610): [ iOS BigSur wk2 ] http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=232151

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
11:31 AM Changeset in webkit [284700] by commit-queue@webkit.org
  • 8 edits in trunk/Source/JavaScriptCore

[JSC][32bit] Re-enable compileEnumeratorGetByVal fast path
https://bugs.webkit.org/show_bug.cgi?id=232052

Patch by Mikhail R. Gadelha <Mikhail R. Gadelha> on 2021-10-22
Reviewed by Yusuke Suzuki.

In https://bugs.webkit.org/show_bug.cgi?id=229543, the compileEnumeratorGetByVal
fast path had to be disabled in 32 bits due to not having enough registers.
There are enough registers available now, so we can re-enable the fast path and
removed the speculation that the baseEdge of both enumeratorGetByVal and
getByVal is a Cell in 32 bits.

I've also updated the 32 bits version of compileGetByVal to be closer to the 64
bits version: using DFG_CRASH instead of RELEASE_ASSERT_NOT_REACHED, using nullptr
instead of 0, and removed some whitespaces.

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • dfg/DFGOperations.h:
  • dfg/DFGSpeculativeJIT.cpp:

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

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByVal):
(JSC::DFG::SpeculativeJIT::compileEnumeratorGetByVal): Deleted.

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compileEnumeratorGetByVal): Deleted.

11:23 AM Changeset in webkit [284699] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

canDoFastSpread should also check that the Structure is from the global object we're watching
https://bugs.webkit.org/show_bug.cgi?id=231976
<rdar://84340372>

Reviewed by Keith Miller.

Just reorder the checks for clarity.

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::canDoFastSpread):

11:22 AM Changeset in webkit [284698] by Takashi.Komori@sony.com
  • 3 edits in trunk/Source/WebKit

WKErrorRef.h does't have some error definitions
https://bugs.webkit.org/show_bug.cgi?id=232116

Reviewed by Alex Christensen.

Add error definitions which exist in APIrror.h but do not exist in WKErrorRef.h

kWKErrorCodeCancelled
kWKErrorCodeFileDoesNotExist

No test as this patch does not change code behavior.

  • Shared/API/c/WKErrorRef.cpp:

(WKErrorGetErrorCode):

  • Shared/API/c/WKErrorRef.h:
11:11 AM Changeset in webkit [284697] by Alan Coon
  • 3 edits
    3 adds in branches/safari-612.3.2.0-branch

Cherry-pick r283952. rdar://problem/84533339

[COOP] Crash under ReportingEndpointsCache::addEndpointFromDictionary()
https://bugs.webkit.org/show_bug.cgi?id=231537
<rdar://83530643>

Reviewed by Geoffrey Garen.

Source/WebCore:

Make sure we don't crash under addEndpointFromDictionary() when the Report-To HTTP header
contains more than one endpoint URL for a given group.

The loop inside addEndpointFromDictionary() should bail as soon as we find a viable
endpoint URL (since we don't currently support having several URLs for a given group).
The crash was due to a use-after-move of the |group|.

Test: http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints.html

  • loader/ReportingEndpointsCache.cpp: (WebCore::ReportingEndpointsCache::addEndpointFromDictionary):

LayoutTests:

Add layout test coverage.

  • http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints-expected.txt: Added.
  • http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints.html: Added.
  • http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints.html.headers: Added.

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

11:09 AM Changeset in webkit [284696] by Alan Coon
  • 8 edits in branches/safari-612.3.2.0-branch/Source

Versioning.

WebKit-7612.3.2.0.1

11:09 AM Changeset in webkit [284695] by Wenson Hsieh
  • 10 edits in trunk/Source/WebKit

RemoteRenderingBackend::CreateImageBuffer should be an async IPC stream message
https://bugs.webkit.org/show_bug.cgi?id=231970

Reviewed by Kimmo Kinnunen.

This patch reverts the changes in r284476, which worked around a race when adding receive queues for newly
created IPC stream destinations and simultaneously dispatching IPC messages to those destinations. Rather than
making the IPC message that creates and adds the new image buffer's RemoteDisplayListRecorder synchronous, we
instead keep that message async and make adjustments to ensure that incoming out-of-stream IPC messages for
RemoteDisplayListRecorder can always be mapped to an appropriate receive queue. See below for more details.

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::startListeningForIPC):

Move the main runloop bounce down to StreamServerConnectionBase::startReceivingMessagesImpl() instead (to deal
with the fact that addMessageReceiveQueue currently needs to be invoked on the main runloop). This allows us
to call StreamServerConnection::startReceivingMessages() from the processing queue while creating a remote
image buffer, which (in turn) ensures that incoming out-of-stream messages from the IPC thread will be sent to
the correct RemoteDisplayListRecorder destination by the time they're dispatched on the work queue thread.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::startListeningForIPC):
(WebKit::RemoteRenderingBackend::stopListeningForIPC):

Additionally register a "0-destination" receiver to ensure that all RemoteDisplayListRecorder messages (even
without pre-existing destinations) will be enqueued on the same IPC stream connection as this remote rendering
backend.

(WebKit::RemoteRenderingBackend::createImageBuffer):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/graphics/RemoteRenderingBackend.messages.in:

Make CreateImageBuffer an async stream message once again.

  • Platform/IPC/StreamConnectionWorkQueue.cpp:

(IPC::StreamConnectionWorkQueue::processStreams):

  • Platform/IPC/StreamConnectionWorkQueue.h:

Change m_connections into a HashCountedSet (from a HashSet), to ensure that the same server connection object
can be added to and removed from the work queue multiple times, without removing the connection from the map
early.

  • Platform/IPC/StreamServerConnection.cpp:

(IPC::StreamServerConnectionBase::startReceivingMessagesImpl):
(IPC::StreamServerConnectionBase::stopReceivingMessagesImpl):

  • Platform/IPC/StreamServerConnection.h:

(IPC::StreamServerConnection::startReceivingMessages):
(IPC::StreamServerConnection::stopReceivingMessages):

Add new methods to start and stop receiving all messages for a given ReceiverName, regardless of incoming
destination ID. RemoteRenderingBackend now uses this to register a "catch-all" listener for all
RemoteDisplayListRecorder messages.

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::createRemoteImageBuffer):

11:03 AM Changeset in webkit [284694] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove release assertion in MediaResourceClient::responseReceived
https://bugs.webkit.org/show_bug.cgi?id=232121

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-22
Reviewed by David Kilzer.

I tried and was unable to reproduce this, even with multipart responses which can call didReceiveResponse multiple times in the same load.
In any case, it's clear where the crash is and that this assertion can be hit. Not continuing with the response is better than crashing.
Keep the debug assertion because if it is hit, we want to notice.

  • platform/network/cocoa/RangeResponseGenerator.mm:
9:56 AM Changeset in webkit [284693] by Antti Koivisto
  • 38 edits in trunk/Source/WebCore

Factor style resolver context arguments into a struct
https://bugs.webkit.org/show_bug.cgi?id=232137

Reviewed by Antoine Quint.

Add Style::ResolutionContext struct and use it to consistently pass around all context argument needed
for resolving style instead of just passing around individual arguments as separate function parameter.

An immediately benefit is that we can remove the stateful setOverrideDocumentElementStyle hack.
This also makes the style system more flexible and extensible for future work.

Most of the patch is mechanically replacing a parent style argument in various places with a context
struct argument.

  • animation/AnimationEffect.h:
  • animation/CSSAnimation.cpp:

(WebCore::CSSAnimation::create):

  • animation/CSSAnimation.h:
  • animation/CSSTransition.cpp:

(WebCore::CSSTransition::create):
(WebCore::CSSTransition::resolve):

  • animation/CSSTransition.h:
  • animation/DeclarativeAnimation.cpp:

(WebCore::DeclarativeAnimation::initialize):

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

(WebCore::KeyframeEffect::updateBlendingKeyframes):
(WebCore::KeyframeEffect::computeDeclarativeAnimationBlendingKeyframes):
(WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes):
(WebCore::KeyframeEffect::apply):
(WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):

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

(WebCore::KeyframeEffectStack::applyKeyframeEffects):

  • animation/KeyframeEffectStack.h:
  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::resolve):
(WebCore::WebAnimation::commitStyles):

  • animation/WebAnimation.h:
  • css/MediaQueryMatcher.cpp:

(WebCore::MediaQueryMatcher::documentElementUserAgentStyle const):

  • css/StyleMedia.cpp:

(WebCore::StyleMedia::matchMedium const):

  • dom/Document.cpp:

(WebCore::Document::styleForElementIgnoringPendingStylesheets):

  • dom/Element.cpp:

(WebCore::Element::resolveStyle):
(WebCore::Element::resolveCustomStyle):

  • dom/Element.h:
  • html/HTMLTitleElement.cpp:

(WebCore::HTMLTitleElement::computedTextWithDirection):

  • html/shadow/DateTimeFieldElement.cpp:

(WebCore::DateTimeFieldElement::resolveCustomStyle):

  • html/shadow/DateTimeFieldElement.h:
  • html/shadow/SliderThumbElement.cpp:

(WebCore::SliderThumbElement::resolveCustomStyle):
(WebCore::SliderContainerElement::resolveCustomStyle):

  • html/shadow/SliderThumbElement.h:
  • html/shadow/TextControlInnerElements.cpp:

(WebCore::TextControlInnerContainer::resolveCustomStyle):
(WebCore::TextControlInnerElement::resolveCustomStyle):
(WebCore::TextControlInnerTextElement::resolveCustomStyle):
(WebCore::TextControlPlaceholderElement::resolveCustomStyle):
(WebCore::SearchFieldResultsButtonElement::resolveCustomStyle):
(WebCore::SearchFieldCancelButtonElement::resolveCustomStyle):

  • html/shadow/TextControlInnerElements.h:
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::computeFirstLineStyle const):
(WebCore::RenderElement::getUncachedPseudoStyle const):

  • rendering/style/KeyframeList.cpp:

(WebCore::KeyframeList::fillImplicitKeyframes):

  • style/StyleResolver.cpp:

(WebCore::Style::Resolver::Resolver):
(WebCore::Style::Resolver::styleForElement):
(WebCore::Style::Resolver::styleForKeyframe):
(WebCore::Style::Resolver::keyframeStylesForAnimation):
(WebCore::Style::Resolver::pseudoStyleForElement):

  • style/StyleResolver.h:

(WebCore::Style::Resolver::overrideDocumentElementStyle const): Deleted.
(WebCore::Style::Resolver::setOverrideDocumentElementStyle): Deleted.

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::Scope::Scope):
(WebCore::Style::TreeResolver::Scope::~Scope):
(WebCore::Style::TreeResolver::styleForStyleable):
(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::resolvePseudoStyle):
(WebCore::Style::TreeResolver::makeResolveContext):
(WebCore::Style::TreeResolver::makeResolveContextForPseudoElement):
(WebCore::Style::TreeResolver::parentBoxStyleForPseudoElement const):
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):
(WebCore::Style::TreeResolver::parentBoxStyleForPseudo const): Deleted.

  • style/StyleTreeResolver.h:
  • style/Styleable.cpp:

(WebCore::Styleable::updateCSSAnimations const):
(WebCore::updateCSSTransitionsForStyleableAndProperty):

  • style/Styleable.h:

(WebCore::Styleable::applyKeyframeEffects const):

  • svg/SVGElement.cpp:

(WebCore::SVGElement::resolveCustomStyle):

  • svg/SVGElement.h:
  • svg/SVGElementRareData.h:

(WebCore::SVGElementRareData::overrideComputedStyle):

  • testing/Internals.cpp:

(WebCore::Internals::highlightPseudoElementColor):

9:52 AM Changeset in webkit [284692] by sihui_liu@apple.com
  • 10 edits in trunk

Followup to r284652: ensure file handle is closed in web process
https://bugs.webkit.org/show_bug.cgi?id=232127

Reviewed by Youenn Fablet.

Source/WebCore:

Covered by test: storage/filesystemaccess/sync-access-handle-close-worker.html

  • Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp:

(WebCore::FileSystemSyncAccessHandle::~FileSystemSyncAccessHandle): make sure file handle is closed when
FileSystemSyncAccessHandle is destroyed.
(WebCore::FileSystemSyncAccessHandle::closeInternal):
(WebCore::FileSystemSyncAccessHandle::close):

  • Modules/filesystemaccess/FileSystemSyncAccessHandle.h:

Source/WebKit:

  • NetworkProcess/storage/FileSystemStorageHandle.cpp:

(WebKit::FileSystemStorageHandle::~FileSystemStorageHandle):
(WebKit::FileSystemStorageHandle::createSyncAccessHandle):
(WebKit::FileSystemStorageHandle::close):

  • NetworkProcess/storage/FileSystemStorageHandle.h:
  • Platform/IPC/cocoa/SharedFileHandleCocoa.cpp: an extra fd is created here and does not get closed.

(IPC::SharedFileHandle::decode):

LayoutTests:

  • storage/filesystemaccess/resources/sync-access-handle-close.js:

(testSyncFunction):
(async testAsyncFunction):
(async testFunctions):
(async testMultipleHandles):
(async test):

  • storage/filesystemaccess/sync-access-handle-close-worker-expected.txt:
9:47 AM Changeset in webkit [284691] by Alan Coon
  • 1 copy in branches/safari-612.3.2.0-branch

New branch.

9:36 AM Changeset in webkit [284690] by rmorisset@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

--reportBytecodeCompileTimes=1 should correctly report the bytecode size
https://bugs.webkit.org/show_bug.cgi?id=232118

Reviewed by Michael Saboff.

generate() calls m_writer.finalize() which moves m_instructions, so when we later query its size we get 0.
The solution is simply to put the size in an out-parameter just before calling finalize().

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::generate):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::generate):

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

REGRESSION (Safari 15 - iOS15): [WebRTC] Increased audio latency while playing webrtc audio stream over audio element
https://bugs.webkit.org/show_bug.cgi?id=230903
<rdar://problem/83692944>

Reviewed by Eric Carlson.

We used to render audio tracks in process and are now doing rendering in GPU process.
Current implementation requests data with a fixed chunk size, that we were setting as the max of preferred buffer size and web audio chunk size.
If we are reading too close to the end of data in AudioSampleDataSource, we will delay reading the data by this buffer size. This triggers delay but allows getting a consistent rendering.
To reduce delay, we are now using the maximum of web audio chunk size and 10 ms chunk size, as WebRTC tracks are usually manipulating 10 ms chunks.

Manually tested.

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.cpp:
9:27 AM Changeset in webkit [284688] by guijemont@igalia.com
  • 2 edits in trunk

Add Guillaume Emont's github username to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=232144

Unreviewed.

  • metadata/contributors.json:
9:23 AM Changeset in webkit [284687] by Ayumi Kojima
  • 14 edits in trunk/Source/WebCore

Unreviewed, reverting r284606.

Reverting because this commit caused accessibility/ios-
simulator/accessibility-aria-table-children.html to fail

Reverted changeset:

"AX: Any addition of children should funnel through
AccessibilityObject::addChild"
https://bugs.webkit.org/show_bug.cgi?id=231914
https://commits.webkit.org/r284606

9:05 AM Changeset in webkit [284686] by Chris Dumez
  • 4 edits in trunk/LayoutTests

[ iOS15 iPad Debug ] imported/w3c/web-platform-tests/webmessaging/MessagePort_onmessage_start.any.worker.html is a flaky failure (reached unreachable code)
https://bugs.webkit.org/show_bug.cgi?id=231609
<rdar://problem/84164701>

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Merge https://github.com/web-platform-tests/wpt/pull/31317 from upstream WPT to address
test flakiness.

  • web-platform-tests/webmessaging/MessagePort_onmessage_start.any.js:

(async_test):

LayoutTests:

Unskip test that should no longer be flaky.

  • platform/ipad/TestExpectations:
9:04 AM Changeset in webkit [284685] by Ayumi Kojima
  • 15 edits
    1 delete in trunk

Unreviewed, reverting r284654.

Reverting because this commit caused scrolling tests to fail

Reverted changeset:

"Content offset in this codepen when switching tabs"
https://bugs.webkit.org/show_bug.cgi?id=231989
https://commits.webkit.org/r284654

8:50 AM Changeset in webkit [284684] by Simon Fraser
  • 4 edits in trunk/Source/WebCore

Do GrpahicsContext and EventRegion clipping-related save/restore via RAII objects
https://bugs.webkit.org/show_bug.cgi?id=231985

Reviewed by Antti Koivisto.

Remove all but one of the bare context.save() calls in RenderLayer by passing a
GraphicsContextStateSaver to clipToRect() and setupClipPath().

Also pass a EventRegionContextStateSaver for the equivalent save/restore on EventRegionContext.

This allows us to remove restoreClip() entirely.

  • rendering/EventRegion.h:

(WebCore::EventRegionContextStateSaver::EventRegionContextStateSaver):
(WebCore::EventRegionContextStateSaver::~EventRegionContextStateSaver):
(WebCore::EventRegionContextStateSaver::pushClip):
(WebCore::EventRegionContextStateSaver::context const):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::clipToRect):
(WebCore::RenderLayer::paintLayerWithEffects):
(WebCore::RenderLayer::setupClipPath):
(WebCore::RenderLayer::applyFilters):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintTransformedLayerIntoFragments):
(WebCore::RenderLayer::paintBackgroundForFragments):
(WebCore::RenderLayer::paintForegroundForFragments):
(WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
(WebCore::RenderLayer::paintOutlineForFragments):
(WebCore::RenderLayer::paintMaskForFragments):
(WebCore::RenderLayer::paintChildClippingMaskForFragments):
(WebCore::RenderLayer::paintOverflowControlsForFragments):
(WebCore::RenderLayer::restoreClip): Deleted.

  • rendering/RenderLayer.h:
8:17 AM Changeset in webkit [284683] by Alan Bujtas
  • 4 edits in trunk

[LFC][IFC] Check the parent style for content wrapping when collecting wrap opportunities
https://bugs.webkit.org/show_bug.cgi?id=232056

Reviewed by Antti Koivisto.

Source/WebCore:

See the comment in LineBuilder::handleInlineContent.

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::handleInlineContent):

LayoutTests:

7:53 AM Changeset in webkit [284682] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Add needed syscall
https://bugs.webkit.org/show_bug.cgi?id=232110
<rdar://84519690>

Reviewed by Brent Fulgham.

Add required syscall in WP sandbox.

  • WebProcess/com.apple.WebProcess.sb.in:
7:38 AM Changeset in webkit [284681] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebKit

StreamConnectionWorkQueue::processStreams() has a incorrect protection ref
https://bugs.webkit.org/show_bug.cgi?id=232070

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-10-22
Reviewed by Wenson Hsieh.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::~RemoteRenderingBackend):
Additionally remove redundant protection ref from RemoteRenderingBackend
cleanup task. Since m_workQueue->stop() is run after dispatching the
task, and since stop() waits until queue has executed the
all the tasks, the m_workQueue ref outlives the protection ref.

  • Platform/IPC/StreamConnectionWorkQueue.cpp:

(IPC::StreamConnectionWorkQueue::processStreams):
Remove the redundant protection ref so it does not cause confusion.
The protection ref cannot hold the last ref, as that would mean
that the StreamConnectionWorkQueue thread would run the code to
destroy the work queue itself. There has to be a external ref for
queue->stop() that outlives the protection ref, as the stop() will
wait until the queue thread stops.

(IPC::StreamConnectionWorkQueue::stopAndWaitForCompletion):
(IPC::StreamConnectionWorkQueue::stop): Deleted.

  • Platform/IPC/StreamConnectionWorkQueue.h:

Rename stop() to stopAndWaitForCompletion() to signify what
the function does.

7:31 AM Changeset in webkit [284680] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[LFC][IFC] Add missing isAtSoftWrapOpportunity check when between two whitespace inline items
https://bugs.webkit.org/show_bug.cgi?id=232055

Reviewed by Antti Koivisto.

Source/WebCore:

Due to the isWrappingAllowed checks in isAtSoftWrapOpportunity() to speed up line breaking,
we may end up with adjacent whitespace content with different wrapping styles (embedded in separate inline boxes).
e.g. <span style="white-space: no-wrap">XXX </span><span style="white-space: normal"> X</span

Test: fast/inline/white-space-nowrap-and-normal-inline-box.html

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::isVisuallyEmptyWhitespaceContent):

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::isAtSoftWrapOpportunity):

LayoutTests:

  • fast/inline/white-space-nowrap-and-normal-inline-box-expected.html: Added.
  • fast/inline/white-space-nowrap-and-normal-inline-box.html: Added.
6:48 AM Changeset in webkit [284679] by berto@igalia.com
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix typo in the WebKitWebInspector documentation.

  • UIProcess/API/gtk/WebKitWebInspector.cpp:
6:44 AM Changeset in webkit [284678] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Add support for checking leading collapsible whitespace in InlineContentBreaker::processOverflowingContent
https://bugs.webkit.org/show_bug.cgi?id=232091

Reviewed by Antti Koivisto.

This patch ensures that the leading collapsible whitespace on the continuous run is taken
into account when checking if the otherwise overflowing content may fit the line.
e.g.
<span style="white-space: nowrap">no_wrap </span><span> yes_wrap</span>
The " yes_wrap" content has a collapsible leading whitespace here.
(This is also a preparation for fixing a regression and a WPT test.)

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::isVisuallyEmptyWhitespaceContent):
(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::append):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::reset):

  • layout/formattingContexts/inline/InlineContentBreaker.h:

(WebCore::Layout::InlineContentBreaker::ContinuousContent::leadingCollapsibleWidth const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::trailingCollapsibleWidth const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::hasCollapsibleContent const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::isFullyCollapsible const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::collapsibleLogicalWidth const): Deleted.
(WebCore::Layout::InlineContentBreaker::ContinuousContent::nonCollapsibleLogicalWidth const): Deleted.
(WebCore::Layout::InlineContentBreaker::ContinuousContent::hasTrailingCollapsibleContent const): Deleted.

6:24 AM Changeset in webkit [284677] by Alan Bujtas
  • 4 edits in trunk

FontCascade::widthForSimpleText fails to produce matching measured width for monospace font
https://bugs.webkit.org/show_bug.cgi?id=232104
<rdar://83991027>

Reviewed by Antti Koivisto.

Source/WebCore:

Adjust widthForSimpleText to match WidthIterator's logic as the comment says:

"This is needed only to match the result of the slow path

Same glyph widths but different floating point arithmetic can produce different run width."

(see r213008)

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::widthForSimpleText const):

LayoutTests:

  • platform/ios-wk2/TestExpectations:
3:05 AM Changeset in webkit [284676] by Carlos Garcia Campos
  • 4 edits in trunk

[GTK][a11y] Localized role name doesn't work with ATSPI enabled
https://bugs.webkit.org/show_bug.cgi?id=232136

Reviewed by Adrian Perez de Castro.

Source/WebCore:

I switched to use SortedArrayMap in AccessibilityAtspi::localizedRoleName() but I didn't realize the array was
not actually sorted. We just need to sort it for SortedArrayMap to work as expected.

  • accessibility/atspi/AccessibilityAtspi.cpp:

Tools:

Add a few tests for localized role name.

  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(testAccessibleBasicHierarchy):

1:51 AM Changeset in webkit [284675] by Carlos Garcia Campos
  • 17 edits
    1 add in trunk

[GTK][a11y] Add implementation of text interface when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=230258

Reviewed by Adrian Perez de Castro.

Source/WebCore:

  • SourcesGTK.txt:
  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::postTextStateChangeNotification):
(WebCore::AXObjectCache::postTextReplacementNotification):
(WebCore::AXObjectCache::postTextReplacementNotificationForTextControl):
(WebCore::AXObjectCache::enqueuePasswordValueChangeNotification):

  • accessibility/AXObjectCache.h:
  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::textIteratorBehaviorForTextRange const):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::indexForVisiblePosition const):

  • accessibility/atspi/AXObjectCacheAtspi.cpp:

(WebCore::AXObjectCache::postTextStateChangePlatformNotification):
(WebCore::AXObjectCache::postTextReplacementPlatformNotificationForTextControl):
(WebCore::AXObjectCache::postTextReplacementPlatformNotification):
(WebCore::AXObjectCache::nodeTextChangePlatformNotification): Deleted.

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::textChanged):
(WebCore::AccessibilityAtspi::textAttributesChanged):
(WebCore::AccessibilityAtspi::textCaretMoved):
(WebCore::AccessibilityAtspi::textSelectionChanged):

  • accessibility/atspi/AccessibilityAtspi.h:
  • accessibility/atspi/AccessibilityAtspiEnums.h:
  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::roleIsTextType):
(WebCore::AccessibilityObjectAtspi::interfacesForObject):
(WebCore::AccessibilityObjectAtspi::path):
(WebCore::AccessibilityObjectAtspi::buildInterfaces const):

  • accessibility/atspi/AccessibilityObjectAtspi.h:
  • accessibility/atspi/AccessibilityObjectTextAtspi.cpp: Added.

(WebCore::AccessibilityObjectAtspi::atspiBoundaryToTextGranularity):
(WebCore::AccessibilityObjectAtspi::atspiGranularityToTextGranularity):
(WebCore::offsetMapping):
(WebCore::UTF16OffsetToUTF8):
(WebCore::UTF8OffsetToUTF16):
(WebCore::AccessibilityObjectAtspi::text const):
(WebCore::AccessibilityObject::getLengthForTextRange const):
(WebCore::AccessibilityObject::allowsTextRanges const):
(WebCore::AccessibilityObjectAtspi::textInserted):
(WebCore::AccessibilityObjectAtspi::textDeleted):
(WebCore::AccessibilityObjectAtspi::boundaryOffset const):
(WebCore::AccessibilityObjectAtspi::textAtOffset const):
(WebCore::AccessibilityObjectAtspi::characterAtOffset const):
(WebCore::AccessibilityObjectAtspi::boundsForRange const):
(WebCore::AccessibilityObjectAtspi::textExtents const):
(WebCore::AccessibilityObjectAtspi::offsetAtPoint const):
(WebCore::AccessibilityObjectAtspi::boundsForSelection const):
(WebCore::AccessibilityObjectAtspi::selectedRange const):
(WebCore::AccessibilityObjectAtspi::selectionBounds const):
(WebCore::AccessibilityObjectAtspi::setSelectedRange):
(WebCore::AccessibilityObjectAtspi::selectRange):
(WebCore::AccessibilityObjectAtspi::selectionChanged):
(WebCore::AccessibilityObjectAtspi::textAttributes const):
(WebCore::AccessibilityObjectAtspi::textAttributesWithUTF8Offset const):
(WebCore::AccessibilityObjectAtspi::textAttributesChanged):
(WebCore::AccessibilityObjectAtspi::scrollToMakeVisible const):
(WebCore::AccessibilityObjectAtspi::scrollToPoint const):

  • editing/atspi/FrameSelectionAtspi.cpp:

(WebCore::FrameSelection::notifyAccessibilityForSelectionChange):

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setInnerTextValue):

Tools:

Add unit tests for the text interface.

  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(AtspiTextRangeDeleter::operator() const):
(AccessibilityTest::startEventMonitor):
(AccessibilityTest::stopEventMonitor):
(AccessibilityTest::findEvent):
(testTextBasic):
(testTextSurrogatePair):
(testTextIterator):
(testTextExtents):
(testTextSelections):
(testTextAttributes):
(testTextStateChanged):
(beforeAll):

1:44 AM Changeset in webkit [284674] by youenn@apple.com
  • 18 edits in trunk/Source

Audio over peer connection becomes latent when changing the output
https://bugs.webkit.org/show_bug.cgi?id=231110
<rdar://problem/84049005>

Reviewed by Eric Carlson.

Source/WebCore:

Add support for detecting change of timeline by looking at sample times. This happens when changing audio output.
Make AudioMediaStreamTrackRendererInternalUnit call a callback to let the unit deal with it.
When switching output, audio data is kept growing but is not read for some time by the remote unit, even though the remote unit is running.
The unit can ask its sources to update their offset to not keep extra buffered data.

Manually tested.

  • platform/audio/cocoa/AudioSampleDataSource.h:
  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererCocoa.cpp:
  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererCocoa.h:
  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererInternalUnit.cpp:
  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererInternalUnit.h:
  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.cpp:
  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.h:

Source/WebKit:

When detecting an audio timeline change, send it from GPUProcess to WebProcess.
Let the WebProcess reset the sources to properly restart.

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.cpp:
  • WebProcess/GPU/GPUProcessConnection.cpp:
  • WebProcess/GPU/GPUProcessConnection.h:
  • WebProcess/GPU/GPUProcessConnection.messages.in:
  • WebProcess/GPU/webrtc/AudioMediaStreamTrackRendererInternalUnitManager.cpp:
  • WebProcess/GPU/webrtc/AudioMediaStreamTrackRendererInternalUnitManager.h:
  • WebProcess/WebProcess.cpp:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp:
1:44 AM Changeset in webkit [284673] by commit-queue@webkit.org
  • 9 edits
    1 move in trunk

.:
Enable logging under non-systemd linux distros
https://bugs.webkit.org/show_bug.cgi?id=232080

Patch by Pablo Correa Gómez <ablocorrea@hotmail.com> on 2021-10-22
Reviewed by Michael Catanzaro.

  • Source/cmake/FindJournald.cmake: Renamed from Source/cmake/FindSystemd.cmake.
  • Source/cmake/OptionsGTK.cmake: Replace USE_SYSTEMD for

ENABLE_JOURNALD_LOG

  • Source/cmake/OptionsWPE.cmake: Replace USE_SYSTEMD for

ENABLE_JOURNALD_LOG

Source/WTF:
Enable logging in under non-systemd linux distros
https://bugs.webkit.org/show_bug.cgi?id=232080

Patch by Pablo Correa Gómez <ablocorrea@hotmail.com> on 2021-10-22
Reviewed by Michael Catanzaro.

  • wtf/Assertions.h: Rename USE(JOURNALD) to ENABLE(JOURNALD_LOG)
  • wtf/Logger.h:

(WTF::Logger::willLog const): Rename USE(JOURNALD) to
ENABLE(JOURNALD_LOG)

  • wtf/PlatformGTK.cmake: Use renamed Journald library
  • wtf/PlatformWPE.cmake: Use renamed Journald library
1:19 AM Changeset in webkit [284672] by Antti Koivisto
  • 3 edits in trunk/Source/WebCore

Remove Style::Resolver::m_isDeleted
https://bugs.webkit.org/show_bug.cgi?id=232089

Reviewed by Kimmo Kinnunen.

Not useful anymore.

  • style/StyleResolver.cpp:

(WebCore::Style::Resolver::~Resolver):
(WebCore::Style::Resolver::styleForElement):
(WebCore::Style::Resolver::styleForKeyframe):
(WebCore::Style::Resolver::styleForPage):

  • style/StyleResolver.h:
1:18 AM Changeset in webkit [284671] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

StreamConnectionWorkQueue is not thread-safe
https://bugs.webkit.org/show_bug.cgi?id=232068

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-10-22
Reviewed by Wenson Hsieh.

Make StreamConnectionWorkQueue thread-safe so that
addStreamConnection works from multiple threads.
In the future, this will be called when a new RemoteDisplayListRecorder is
added during the StreamConnectionWorkQueue message processing
invocation for RemoteRenderingBackend::createRemoteImageBuffer.

  • Platform/IPC/StreamConnectionWorkQueue.cpp:

(IPC::StreamConnectionWorkQueue::~StreamConnectionWorkQueue):
(IPC::StreamConnectionWorkQueue::dispatch):
(IPC::StreamConnectionWorkQueue::addStreamConnection):
(IPC::StreamConnectionWorkQueue::removeStreamConnection):
Change semantics so that adding and removing connections during
shutdown is ok. This is required for simpler code since
during stop we must dispatch all pending messages, but during
message code we might have unconditional start listening when
the message creates a new RemoteDisplayListRecorder.
As a consequence it's not an error to add a connection,
stop and destroy the work queue without removing it.
(IPC::StreamConnectionWorkQueue::stop):
(IPC::StreamConnectionWorkQueue::startProcessingThread):
(IPC::StreamConnectionWorkQueue::wakeUpProcessingThread): Deleted.

  • Platform/IPC/StreamConnectionWorkQueue.h:
1:07 AM Changeset in webkit [284670] by Patrick Griffis
  • 3 edits in trunk/Source/WebCore

[GTK] Rewrite LowPowerModeNotifier to use GPowerProfileMonitor
https://bugs.webkit.org/show_bug.cgi?id=231958

Reviewed by Carlos Garcia Campos.

This replaces the previous direct use of UPower with some advantages:

  • Fixes support while being sandboxed without UPower DBus access
  • Respects a system-wide low power mode rather than only being enabled when the battery is low

I decided to remove the old behavior entirely as it is a very
different behavior than the new one and subjectively worse.

  • platform/LowPowerModeNotifier.h:
  • platform/glib/LowPowerModeNotifierGLib.cpp:

(WebCore::LowPowerModeNotifier::LowPowerModeNotifier):
(WebCore::LowPowerModeNotifier::powerSaverEnabledNotifyCallback):
(WebCore::LowPowerModeNotifier::~LowPowerModeNotifier):

12:35 AM Changeset in webkit [284669] by commit-queue@webkit.org
  • 9 edits
    2 adds in trunk

WebGL low-power and high-performance contexts should use different ANGLE Metal EGLDisplays
https://bugs.webkit.org/show_bug.cgi?id=231012
<rdar://problem/83971417>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-10-22
Reviewed by Dean Jackson.

Source/WebCore:

Use per-power preference EGLDisplay when creating Metal
contexts.

Adds a new API test.

  • platform/RuntimeApplicationChecks.cpp:

(WebCore::setAuxiliaryProcessTypeForTesting):

  • platform/RuntimeApplicationChecks.h:

Add a test function to reset the process type after test has set a specific type and then
run to completion. process for the duration of the test. The volatile context flag in

GraphicsContextGLOpenGL depends on condition isWebProcess
isGPUProcess.
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::releaseThreadResources):

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::initializeEGLDisplay):
(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):
(WebCore::GraphicsContextGLOpenGL::setContextVisibility):
(WebCore::GraphicsContextGLOpenGL::displayWasReconfigured):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:

Tools:

Add a API test to test GraphicsContextGLOpenGL
Cocoa implementation regarding the bug where
the GraphicsContextGLOpenGL instances would use
the GPU that was selected by the first instance.

  • TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLOpenGLCocoa.mm: Added.

(TestWebKitAPI::WebCore::TestedGraphicsContextGLOpenGL::create):
(TestWebKitAPI::WebCore::TestedGraphicsContextGLOpenGL::TestedGraphicsContextGLOpenGL):
(TestWebKitAPI::hasMultipleGPUs):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/WebCoreUtilities.h: Added.

(TestWebKitAPI::ScopedSetAuxiliaryProcessTypeForTesting::ScopedSetAuxiliaryProcessTypeForTesting):
(TestWebKitAPI::ScopedSetAuxiliaryProcessTypeForTesting::~ScopedSetAuxiliaryProcessTypeForTesting):
Add a utility state setter to set the process type for the
duration of a test.

12:19 AM Changeset in webkit [284668] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Remove unneeded Heap::m_vm.
https://bugs.webkit.org/show_bug.cgi?id=232132

Reviewed by Yusuke Suzuki.

Heap::vm() already computes the associated VM& using offset math. This entails
subtracting a constant from Heap's this pointer, which is faster than loading from
a field.

  • heap/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::lastChanceToFinalize):
(JSC::Heap::releaseDelayedReleasedObjects):
(JSC::Heap::protect):
(JSC::Heap::unprotect):
(JSC::Heap::finalizeUnconditionalFinalizers):
(JSC::Heap::completeAllJITPlans):
(JSC::Heap::iterateExecutingAndCompilingCodeBlocks):
(JSC::Heap::gatherJSStackRoots):
(JSC::Heap::gatherScratchBufferRoots):
(JSC::Heap::removeDeadCompilerWorklistEntries):
(JSC::Heap::gatherExtraHeapData):
(JSC::Heap::deleteAllCodeBlocks):
(JSC::Heap::deleteAllUnlinkedCodeBlocks):
(JSC::Heap::finishChangingPhase):
(JSC::Heap::collectInMutatorThread):
(JSC::Heap::finishRelinquishingConn):
(JSC::Heap::deleteSourceProviderCaches):
(JSC::Heap::didFinishCollection):
(JSC::Heap::isValidAllocation):
(JSC::Heap::addCoreConstraints):

  • heap/Heap.h:

Oct 21, 2021:

10:05 PM Changeset in webkit [284667] by cathiechen
  • 7 edits
    2 adds in trunk

The intrisic size of picture image inside a template is always zero
https://bugs.webkit.org/show_bug.cgi?id=227682

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/embedded-content/the-img-element/adoption-expected.txt:

Source/WebCore:

When the picture element is inside a template element, it belongs to a template document which does not
have frame or RenderView, this would affect the source selection and size calculation. Though it calls
sourcesChanged to adjust the source in HTMLPictureElement::didMoveToNewDocument, but at this point
the image element is still inside the template document, so it does not help with this scenario. To
fix it, call sourcesChanged in HTMLImageElement::didMoveToNewDocument instead.

Test: fast/picture/picture-inside-template.html

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::didMoveToNewDocument):

  • html/HTMLPictureElement.cpp:

(WebCore::HTMLPictureElement::didMoveToNewDocument): Deleted.

  • html/HTMLPictureElement.h:

LayoutTests:

  • fast/picture/picture-inside-template-expected.txt: Added.
  • fast/picture/picture-inside-template.html: Added.
9:57 PM Changeset in webkit [284666] by eric.carlson@apple.com
  • 2 edits in trunk

Add GitHub name to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=232131

Add my github username to contributors.json

Unreviewed.

  • metadata/contributors.json:
9:52 PM Changeset in webkit [284665] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Two null box iterators from different paths fail to compare equal
https://bugs.webkit.org/show_bug.cgi?id=232093

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2021-10-21
Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/clip/clip-hit-null-iterator-path-comparison.html

  • layout/integration/InlineIteratorBox.cpp:

(WebCore::InlineIterator::BoxIterator::operator== const):

LayoutTests:

  • fast/clip/clip-hit-null-iterator-path-comparison-expected.txt: Added.
  • fast/clip/clip-hit-null-iterator-path-comparison.html: Added.
9:31 PM Changeset in webkit [284664] by sbarati@apple.com
  • 11 edits in trunk/Source

Clean up some code around checking the state of Watchpoints
https://bugs.webkit.org/show_bug.cgi?id=232111

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

No need to have state() and stateOnJSThread(), since they're now the same.
Also, there is no need to check the allocation watchpoint twice for the
function/internal function allocation profiles.

  • bytecode/Watchpoint.h:

(JSC::WatchpointSet::isStillValid const):
(JSC::WatchpointSet::stateOnJSThread const): Deleted.
(JSC::WatchpointSet::isStillValidOnJSThread const): Deleted.
(JSC::InlineWatchpointSet::stateOnJSThread const): Deleted.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • runtime/ArrayPrototype.cpp:

(JSC::speciesWatchpointIsValid):
(JSC::canUseDefaultArrayJoinForToString):

  • runtime/InferredValue.h:

(JSC::InferredValue::notifyWrite):
(JSC::InferredValue::stateOnJSThread const): Deleted.

  • runtime/JSArrayBufferPrototypeInlines.h:

(JSC::speciesWatchpointIsValid):

  • runtime/ObjectPropertyChangeAdaptiveWatchpoint.h:

Source/WebCore:

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::getOwnPropertySlot):

7:15 PM Changeset in webkit [284663] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Remove an unused field: Heap::m_copyingRememberedSet.
https://bugs.webkit.org/show_bug.cgi?id=232119

Reviewed by Robin Morisset.

  • heap/Heap.h:
6:32 PM Changeset in webkit [284662] by commit-queue@webkit.org
  • 2 edits
    1 add in trunk/Source/WebKit

Add webpushd plist
https://bugs.webkit.org/show_bug.cgi?id=231981

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

This can be done once rdar://83086960 is approved.

  • WebKit.xcodeproj/project.pbxproj:
  • webpushd/com.apple.webkit.webpushd.plist: Added.
5:46 PM Changeset in webkit [284661] by achristensen@apple.com
  • 3 edits in trunk/Source/WebKit

Unreviewed, reverting r284570.

No longer needed

Reverted changeset:

"Remove com.apple.webkit.adattributiond.plist from build
temporarily"
https://bugs.webkit.org/show_bug.cgi?id=232045
https://commits.webkit.org/r284570

5:46 PM Changeset in webkit [284660] by Chris Dumez
  • 3 edits
    2 adds in trunk

Form submission should be cancelled if the form gets detached from inside the formdata event handler
https://bugs.webkit.org/show_bug.cgi?id=232114

Reviewed by Alex Christensen.

Source/WebCore:

Per the HTML specification [1], form submission should abort if the form cannot navigate (which is true
when the form is detached). The algorithm in the specification does the check twice, once at the very
beginning (Step 1 in the spec), and again after calling the "constructing the entry list" algorithm
(step 9 in the spec). The reason we need to do the check again is that the "constructing the entry list"
algorithm fires the "formdata" event and may thus run JavaScript and the JS can detach the form element.

In HTMLFormElement::submit(), we were doing only the "form is connected" check only at the beginning
of the function and failing to do so after constructing the FormSubmission object (which ends up constructing
the entry list). This patch fixes that.

[1] https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-form-submit

Test: fast/forms/remove-form-inside-formdata-event.html

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::submit):

LayoutTests:

Add layout test coverage.

  • fast/forms/remove-form-inside-formdata-event-expected.txt: Added.
  • fast/forms/remove-form-inside-formdata-event.html: Added.
5:33 PM Changeset in webkit [284659] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ iOS15 Sim EWS ]imported/w3c/web-platform-tests/content-security-policy/script-src/script-src-multiple-policies-multiple-hashing-algorithms.html is a text failure.
https://bugs.webkit.org/show_bug.cgi?id=232120.

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
5:11 PM Changeset in webkit [284658] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, add bug number for skipped test in TestExpectations.

5:10 PM Changeset in webkit [284657] by Ryan Haddad
  • 3 edits in trunk/Tools

WebGL bot should run tests with GPU Process enabled
https://bugs.webkit.org/show_bug.cgi?id=232107

Reviewed by Jonathan Bedard.

  • CISupport/build-webkit-org/config.json:
  • CISupport/build-webkit-org/factories_unittest.py:
5:09 PM Changeset in webkit [284656] by Chris Dumez
  • 3 edits
    2 adds in trunk

RELEASE_ASSERT(result) under FormSubmission::create()
https://bugs.webkit.org/show_bug.cgi?id=232112

Reviewed by Geoffrey Garen.

Source/WebCore:

form.submit() should early return if the form's |constructing entry list| flag is true, as per:

We were missing this check. As a result, we would call FormSubmission::create(), which would call
form.constructEntryList(). This would end up returning an unexpected nullptr because the
form's |constructing entry list| flag is set and we would hit the RELEASE_ASSERT(result) in
FormSubmission::create().

Test: fast/forms/submit-form-inside-formdata-event.html

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::submit):

  • loader/FormSubmission.cpp:

(WebCore::FormSubmission::create):

LayoutTests:

Add layout test coverage.

  • fast/forms/submit-form-inside-formdata-event-expected.txt: Added.
  • fast/forms/submit-form-inside-formdata-event.html: Added.
5:08 PM Changeset in webkit [284655] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

REGRESSION (r275641): [ iPad Debug ] accessibility/ios-simulator/scroll-in-overflow-div.html is asserting
https://bugs.webkit.org/show_bug.cgi?id=228622

Reviewed by Alan Bujtas.

The test was hitting ASSERT(!m_visibleContentStatusDirty). It seems harmless to clear
repaint rects when m_visibleContentStatusDirty is true.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::clearRepaintRects):

4:58 PM Changeset in webkit [284654] by Simon Fraser
  • 15 edits
    1 add in trunk

Content offset in this codepen when switching tabs
https://bugs.webkit.org/show_bug.cgi?id=231989

Reviewed by Tim Horton.

Source/WebCore:

There were two problems that occurred with async-scrollable iframes when their associated
WKWebView was removed and re-added to the view hierarchy (e.g. when switching tabs).
These resulted in misplaced position:fixed content, and the first user scroll in the
iframe causing the scroll position to jump back to the top.

The positon:fixed issue was caused by an ordering problem in
ScrollingTreeFrameScrollingNode::commitStateBeforeChildren() which resulted in the layout
viewport being computed incorrectly; we called updateViewportForCurrentScrollPosition()
before setting the min and max scroll position, so we'd always clamp the layout viewport to
a location of 0,0.

The second scroll position reset issue was caused by the ScrollingTreeScrollingNode's
m_currentScrollPosition reverting to a stale after re-attaching the iframe's scrolling
subtree. ScrollingTreeScrollingNode::commitStateBeforeChildren() has code to set
m_currentScrollPosition from the state tree node's scroll position on first commit;
the issue was that ScrollingStateScrollingNode's scrollPosition() was not updated on every
scroll, only when something triggered a scrolling tree commit.

Fix by silently updating ScrollingStateScrollingNode's scrollPosition() when we get
notifications back from the scrolling thread that a scroll happened.

Both fixes are tested by the ScrollingCoordinatorTests.ScrollingTreeAfterDetachReattach API test.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):

  • page/scrolling/ScrollingStateScrollingNode.cpp:

(WebCore::ScrollingStateScrollingNode::syncScrollPosition):
(WebCore::ScrollingStateScrollingNode::hasScrollPositionRequest const):

  • page/scrolling/ScrollingStateScrollingNode.h:
  • page/scrolling/ScrollingStateTree.cpp:

(WebCore::ScrollingStateTree::insertNode):

  • page/scrolling/ScrollingTreeFrameScrollingNode.cpp:

(WebCore::ScrollingTreeFrameScrollingNode::commitStateBeforeChildren): We need to check
state.hasScrollPositionRequest(), otherwise the "cancel animated scroll request" that comes
out of Page::stopKeyboardScrollAnimation() prevents scroll position restoration.

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeScrollingNode::dumpProperties const):

  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::commitTreeStateIfNeeded):

Tools:

API test that scrolls an iframe via wheel events, then detached and re-attaches the view.

The two wheel scrolls are necessary to exercise the "stale ScrollingStateScrollingNode
scroll position" issue.

The scrolling tree dumps validate the layout viewport part of the fix.

Also correct some functions where the sense of 'isWaitingForJavaScript' was flipped.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/mac/ScrollingCoordinatorTests.mm: Added.

(TestWebKitAPI::synthesizeWheelEvents):
(TestWebKitAPI::waitForScrollEventAndReturnScrollY):
(TestWebKitAPI::scrollingTreeElidingLastCommittedScrollPosition):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[WKWebView objectByEvaluatingJavaScript:]):
(-[WKWebView objectByEvaluatingJavaScriptWithUserGesture:]):
(-[WKWebView objectByCallingAsyncFunction:withArguments:error:]):

LayoutTests:

New baselines.

  • tiled-drawing/scrolling/clamp-out-of-bounds-scrolls-expected.txt:
  • tiled-drawing/scrolling/scrolling-tree-after-scroll-expected.txt:
4:46 PM Changeset in webkit [284653] by wilander@apple.com
  • 2 edits in trunk/LayoutTests

PCM: Change expectation to pass so we can investigate http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window.html
https://bugs.webkit.org/show_bug.cgi?id=232115

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:

Removed expectation added in https://trac.webkit.org/changeset/284572/webkit.

4:13 PM Changeset in webkit [284652] by sihui_liu@apple.com
  • 7 edits
    3 adds in trunk

FileSystemSyncAccessHandle should close platform file handle on close()
https://bugs.webkit.org/show_bug.cgi?id=232067
<rdar://problem/84517013>

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker-expected.txt:

Source/WebCore:

This patch also ensures no request is sent after close() is called.

Test: storage/filesystemaccess/sync-access-handle-close-worker.html

  • Modules/filesystemaccess/FileSystemFileHandle.cpp:

(WebCore::FileSystemFileHandle::createSyncAccessHandle):

  • Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp:

(WebCore::FileSystemSyncAccessHandle::FileSystemSyncAccessHandle):
(WebCore::FileSystemSyncAccessHandle::~FileSystemSyncAccessHandle):
(WebCore::FileSystemSyncAccessHandle::isClosingOrClosed const):
(WebCore::FileSystemSyncAccessHandle::truncate):
(WebCore::FileSystemSyncAccessHandle::getSize):
(WebCore::FileSystemSyncAccessHandle::flush):
(WebCore::FileSystemSyncAccessHandle::close):
(WebCore::FileSystemSyncAccessHandle::didClose):
(WebCore::FileSystemSyncAccessHandle::read):
(WebCore::FileSystemSyncAccessHandle::write):

  • Modules/filesystemaccess/FileSystemSyncAccessHandle.h:

LayoutTests:

  • storage/filesystemaccess/resources/sync-access-handle-close.js: Added.

(finishTest):
(async testFunctions):
(async test):

  • storage/filesystemaccess/sync-access-handle-close-worker-expected.txt: Added.
  • storage/filesystemaccess/sync-access-handle-close-worker.html: Added.
3:45 PM Changeset in webkit [284651] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

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

Reviewed by Alex Christensen.

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

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • UIProcess/Cocoa/WKShareSheet.mm:

(+[WKShareSheet createRandomSharingDirectoryForFile:]):
(+[WKShareSheet writeFileToShareableURL:data:temporaryDirectory:]):

3:35 PM Changeset in webkit [284650] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

[WebXR] WebXR on Cocoa doesn't work with multisampled contexts
https://bugs.webkit.org/show_bug.cgi?id=226687
<rdar://problem/78910868>

Reviewed by Tim Horton.

If the WebXR session requested an anti-aliased context, we'd
end up with an incomplete framebuffer because we were never
initialising the multisample buffers. This would assert on
debug builds and produce no output on release builds.

Fix this by initialising the multisample buffers, ensuring
we're targeting them in startFrame, and do the resolution
in endFrame.

  • Modules/webxr/WebXROpaqueFramebuffer.cpp:

(WebCore::WebXROpaqueFramebuffer::startFrame):
(WebCore::WebXROpaqueFramebuffer::endFrame): While here, use NEAREST
sampling on the multisample resolution, the way we do in WebGL.

3:28 PM Changeset in webkit [284649] by wilander@apple.com
  • 2 edits in trunk/Source/WebKit

PCM: Add temporary logging when isRunningTest() assertion is about to fail to be able to investigate
https://bugs.webkit.org/show_bug.cgi?id=232108

Unreviewed. Just adding logging for test-only functionality.

This patch adds logging to when we are about to fail the assert of isRunningTest() in
WebKit::NetworkSession::setPrivateClickMeasurementAppBundleIDForTesting)(). This is
added to help investigate https://bugs.webkit.org/show_bug.cgi?id=232048.

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::setPrivateClickMeasurementAppBundleIDForTesting):

2:49 PM Changeset in webkit [284648] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS ] http/wpt/service-workers/skipFetchEvent.https.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=230374

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
2:43 PM Changeset in webkit [284647] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

REGRESSION: [iOS] ASSERTION FAILED: !m_messageReceiverMapCount under WebKit::RemoteAudioHardwareListener::~RemoteAudioHardwareListener().
https://bugs.webkit.org/show_bug.cgi?id=228038

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations: Removed test expectations.
2:40 PM Changeset in webkit [284646] by ysuzuki@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Make GetTypedArrayLengthAsInt52 and GetTypedArrayByteOffsetAsInt52 NodeResultInt52
https://bugs.webkit.org/show_bug.cgi?id=232100

Reviewed by Robin Morisset.

This patch makes GetTypedArrayLengthAsInt52 and GetTypedArrayByteOffsetAsInt52 have NodeResultInt52 by default.
And DFG validation should skip Int52 validation before fixup phase, as we are doing for double results.

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNodeType.h:
  • dfg/DFGSSALoweringPhase.cpp:

(JSC::DFG::SSALoweringPhase::handleNode):
(JSC::DFG::SSALoweringPhase::lowerBoundsCheck):

  • dfg/DFGValidate.cpp:
2:40 PM Changeset in webkit [284645] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS ] media/modern-media-controls/media-documents/media-document-video-with-initial-audio-layout.html is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=232106

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
2:33 PM Changeset in webkit [284644] by Simon Fraser
  • 2 edits in trunk/Source/WebKit

Rare crash under DisplayLink::displayLinkCallback()
https://bugs.webkit.org/show_bug.cgi?id=232101
<rdar://84153991>

Reviewed by Tim Horton.

The crash was a divide by zero under m_currentUpdate.nextUpdate(), indicating that
m_currentUpdate.updatesPerSecond was zero. Previous assumptions that this was caused
by weird display configs were wrong. The actual issue is a race condition where
the callback can fire while we're still inside CVDisplayLinkStart(), or at least
before we've updated m_currentUpdate.

The fix is to initialize m_currentUpdate before we call CVDisplayLinkStart().

  • UIProcess/mac/DisplayLink.cpp:

(WebKit::DisplayLink::addObserver):

2:22 PM Changeset in webkit [284643] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ macOS wk2 ] imported/w3c/web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-to-same-origin.https.html is a flaky failure/ crashing.
https://bugs.webkit.org/show_bug.cgi?id=232105

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
1:48 PM Changeset in webkit [284642] by commit-queue@webkit.org
  • 15 edits in trunk

[css-contain] Support contain:style for counters
https://bugs.webkit.org/show_bug.cgi?id=226458

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

LayoutTests/imported/w3c:

Update improved test results.

  • web-platform-tests/css/css-contain/content-visibility/content-visibility-026-expected.txt:
  • web-platform-tests/css/css-contain/parsing/contain-computed-expected.txt:
  • web-platform-tests/css/css-contain/parsing/contain-valid-expected.txt:

Source/WebCore:

Parse contain: style and use it (if set) to scope
counter-increment to the element's sub-tree [1].

Tests: imported/w3c/web-platform-tests/css/css-contain/contain-style-counters-001.html

imported/w3c/web-platform-tests/css/css-contain/contain-style-counters-002.html
imported/w3c/web-platform-tests/css/css-contain/contain-style-counters-003.html
imported/w3c/web-platform-tests/css/css-contain/contain-style-counters-004.html

[1] https://drafts.csswg.org/css-contain-2/#containment-style

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeContain):

  • rendering/RenderCounter.cpp:

(WebCore::ancestorStyleContainmentObject):
(WebCore::previousInPreOrder):
(WebCore::previousSiblingOrParentElement):
(WebCore::makeCounterNode):
(WebCore::RenderCounter::rendererSubtreeAttached):

  • rendering/RenderObject.cpp:

(WebCore::shouldApplyStyleContainment):

  • rendering/RenderObject.h:
  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::containsStyle const):

  • rendering/style/RenderStyleConstants.h:
  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyValueContain):

LayoutTests:

Unskip tests that now pass.

1:36 PM Changeset in webkit [284641] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

Launch Services database is not always sent to GPUP
https://bugs.webkit.org/show_bug.cgi?id=232047
<rdar://problem/84480229>

Unreviewed, address post commit review feedback.

Address review feedback. Also rename a data member which had a misleading name.

  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::didFinishLaunching):
(WebKit::GPUProcessProxy::addSession):

  • UIProcess/GPU/GPUProcessProxy.h:
1:34 PM Changeset in webkit [284640] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ iOS15 EWS ] http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority.html crashed.
https://bugs.webkit.org/show_bug.cgi?id=232102.

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
1:27 PM Changeset in webkit [284639] by Ayumi Kojima
  • 3 edits in trunk/LayoutTests

[ iOS macOS Debug ] imported/w3c/web-platform-tests/html/dom/idlharness.worker.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231030

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac/TestExpectations:
1:21 PM Changeset in webkit [284638] by Fujii Hironori
  • 2 edits in trunk/Tools

[Win] TestWTF.FileSystemTest.* are timing out if run-api-tests is run by a normal user
https://bugs.webkit.org/show_bug.cgi?id=232065

Reviewed by Jonathan Bedard.

run-api-tests script didn't pass TEMP and TMP env vars to
TestWTF.exe. Then, generateTemporaryPath in
wtf/win/FileSystemWin.cpp never finished because a normal user
can't create a file in the Windows system directory.

  • Scripts/webkitpy/port/win.py:

(WinPort.environment_for_api_tests): Added TEMP and TMP to the env
var list to inherit.

1:17 PM Changeset in webkit [284637] by Fujii Hironori
  • 2 edits in trunk/Tools

[Win Python] REGRESSION(r284398): run-api-tests: FileNotFoundError raised: [WinError 2] The system cannot find the file specified
https://bugs.webkit.org/show_bug.cgi?id=232037

Reviewed by Jonathan Bedard.

r284398 temporarily copied TestWTF program to ToBeListed to list
test cases. However, on Windows, TestWTF.exe is just a wrapper
program loading TestWTFLib.dll. If I just rename TestWTF.exe to
ToBeListed.exe, ToBeListed.exe tries to load ToBeListedLib.dll.

  • Scripts/webkitpy/api_tests/manager.py:

(Manager._collect_tests): Do not copy the test program to
ToBeListed on Windows.

12:42 PM Changeset in webkit [284636] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ iOS15 EWS ] imported/w3c/web-platform-tests/websockets/Close-1000.any.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=232099.

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
12:29 PM Changeset in webkit [284635] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] Inserted GetTypedArrayLengthAsInt52 for PutByVal should have NodeResultInt52
https://bugs.webkit.org/show_bug.cgi?id=232059

Reviewed by Saam Barati.

JSTests:

  • stress/inserted-gettypedarraylengthasint52-should-have-int52-result-for-put-by-val.js: Added.

(foo.bar):
(foo):

Source/JavaScriptCore:

When inserting GetTypedArrayLengthAsInt52 after fixup phase, we must set NodeResultInt52.

  • dfg/DFGSSALoweringPhase.cpp:

(JSC::DFG::SSALoweringPhase::handleNode):

12:18 PM Changeset in webkit [284634] by Aditya Keerthi
  • 2 edits in trunk/Source/WTF

[Cocoa] Enable accent-color by default
https://bugs.webkit.org/show_bug.cgi?id=232032
rdar://84474404

Reviewed by Wenson Hsieh.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

Enable only on Cocoa platforms, as other platforms do not support
painting accent colors yet.

11:59 AM Changeset in webkit [284633] by Kocsen Chung
  • 1 copy in tags/Safari-613.1.6.1

Tag Safari-613.1.6.1.

11:57 AM Changeset in webkit [284632] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 ] webrtc/multi-video.html is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=232097

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:26 AM Changeset in webkit [284631] by Kate Cheney
  • 9 edits
    1 add in trunk/LayoutTests

http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=231971
<rdar://problem/84270108>

Reviewed by John Wilander.

Update ITP tests to wait for resetCookies() to finish before ending
the test. Flaky timeouts were being caused by resetCookies() being
partially finished which resets the top loading frame checked in
TestRunner::notifyDone().

  • http/tests/cookies/resources/delete-cookie.py: Added.

(delete_cookie):

  • http/tests/resourceLoadStatistics/operating-dates-all-but-cookies-not-removed-with-user-interaction-6-days-ago.html:
  • http/tests/resourceLoadStatistics/operating-dates-all-but-cookies-removed-with-user-interaction-7-days-ago.html:
  • http/tests/resourceLoadStatistics/operating-dates-all-website-data-removed.html:
  • http/tests/resourceLoadStatistics/resources/util.js:

(async resetCookiesITP.setUp):
(async resetCookiesITP):

  • http/tests/resourceLoadStatistics/standalone-web-application-exempt-from-website-data-deletion.html:
  • http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html:
  • http/tests/resourceLoadStatistics/website-data-removal-for-site-with-user-interaction.html:
  • http/tests/resourceLoadStatistics/website-data-removal-for-site-without-user-interaction.html:
11:25 AM Changeset in webkit [284630] by Darin Adler
  • 41 edits
    1 delete in trunk/Source

[Cocoa] Merge and simplify the nsColor family of functions
https://bugs.webkit.org/show_bug.cgi?id=231992

Reviewed by Anders Carlsson.

Source/WebCore:

  • Added a CocoaColor type that is NS/UIColor.
  • Renamed platformColor to cocoaColor to be less vague.
  • Removed nsColor.
  • Added cocoaColorOrNil.
  • Merged colorFromNSColor and colorFromUIColor into a single colorFromCocoaColor function.
  • WebCore.xcodeproj/project.pbxproj: Removed ColorIOS.h.
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(AXAttributeStringSetStyle): Use cocoaColor instead of nsColor.

  • editing/cocoa/FontAttributesCocoa.mm:

(WebCore::FontAttributes::createDictionary const): Use cocoaColor
instead of platformColor.

  • editing/cocoa/FontShadowCocoa.mm:

(WebCore::FontShadow::createShadow const): Ditto.

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::_colorForElement): Use cocoaColor instead of
platformColor.
(WebCore::editingAttributedString): Use cocoaColor instead of
nsColor.

  • platform/cocoa/DragImageCocoa.mm:

(WebCore::createDragImageForLink): Use colorFromCocoaColor
instead of colorFromNSColor.
(WebCore::createDragImageForColor): Use cocoaColor instead of
nsColor.

  • platform/graphics/cocoa/ColorCocoa.h: Added an include of

"Color.h" so this functions as an addition to that header
instead of something independent. Added a WebCore::CocoaColor
type, like the one we already have in WebKit, to cut down on
the need to do #if and #else so much. Renamed the
platformColor function to cocoaColor, added a
cocoaColorOrNil function, and renamed both colorFromNSColor
and colorFromUIColor to colorFromCocoaColor and moved here.

  • platform/graphics/cocoa/ColorCocoa.mm:

(WebCore::cocoaColor): Renamed the iOS platformColor to this.
(WebCore::cocoaColorOrNil): Added.

  • platform/graphics/mac/ColorMac.h: Include of "ColorCocoa.h"

instead of "Color.h" here. Moved colorFromNSColor and nsColor.

  • platform/graphics/mac/ColorMac.mm:

(WebCore::colorFromCocoaColor): Renamed from colorFromNSColor.
(WebCore::cocoaColor): Renamed from nsColor.

  • platform/ios/ColorIOS.h: Removed.
  • platform/ios/ColorIOS.mm:

(WebCore::colorFromCocoaColor): Renamed from colorFromUIColor.

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::setColor): Use cocoaColor instead
of +[UIColor colorWithCGColor:] and cachedCGColor.

  • platform/mac/LocalDefaultSystemAppearance.mm:

(WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance):
Use cocoaColor instead of nsColor.

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::PlatformPasteboard::color): Use colorFromCocoaColor
instead of colorFromNSColor.
(WebCore::PlatformPasteboard::setColor): Use cocoaColor instead
of nsColor.

  • platform/mac/ThemeMac.mm:

(WebCore::drawCellFocusRingWithFrameAtTime): Use colorFromCocoaColor
instead of colorFromNSColor.

  • platform/mac/WebCoreNSFontManagerExtras.mm:

(WebCore::computedFontAttributeChanges): DItto.

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::systemFocusRingColor): Use
colorFromCocoaColor instead of colorFromUIColor.
(WebCore::attachmentActionColor): Use cocoaColor instead of
+[UIColor colorWithCGColor:] and cachedCGColor and return a
RetainPtr to avoid autorelease.
(WebCore::RenderAttachmentInfo::RenderAttachmentInfo): Update for
the user of the RetainPtr.

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::platformActiveSelectionBackgroundColor const):
Use colorFromCocoaColor instead of colorFromNSColor.
(WebCore::RenderThemeMac::platformInactiveSelectionBackgroundColor const): Ditto.
(WebCore::RenderThemeMac::platformActiveSelectionForegroundColor const): Ditto.
(WebCore::RenderThemeMac::platformInactiveSelectionForegroundColor const): Ditto.
(WebCore::RenderThemeMac::platformActiveListBoxSelectionBackgroundColor const): Ditto.
(WebCore::RenderThemeMac::platformInactiveListBoxSelectionBackgroundColor const): Ditto.
(WebCore::RenderThemeMac::platformActiveListBoxSelectionForegroundColor const): Ditto.
(WebCore::RenderThemeMac::platformInactiveListBoxSelectionForegroundColor const): Ditto.
(WebCore::RenderThemeMac::platformFocusRingColor const): Ditto.
(WebCore::RenderThemeMac::platformTextSearchHighlightColor const): Ditto.
(WebCore::RenderThemeMac::platformDefaultButtonTextColor const): Ditto.
(WebCore::titleTextColorForAttachment): Ditto.
(WebCore::AttachmentLayout::layOutTitle): Removed incorrect cast that said it
was casting a CGColorRef to an NSColor *, which are not toll-free bridged. This
code just needs a CGColorRef in a dictionary, so we just need to cast to id,
not to a NSColor *.
(WebCore::AttachmentLayout::layOutSubtitle): Ditto.
(WebCore::paintAttachmentTitleBackground): Use colorFromCocoaColor instead of
colorFromNSColor.

Source/WebKit:

  • Shared/Cocoa/ArgumentCodersCocoa.mm:

(IPC::encodeColorInternal): Merged the NSColor and UIColor
implementations into a single one that uses CocoaColor.
(IPC::decodeColorInternal): Ditto.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView themeColor]): Use cocoaColorOrNil instead
of isValid and platformColor.
(-[WKWebView underPageBackgroundColor]): Use cocoaColor
instead of platformColor.
(-[WKWebView _pageExtendedBackgroundColor]): Use cocoaColorOrNil
instead of isValid and platformColor.
(-[WKWebView _sampledPageTopColor]): Ditto.

  • UIProcess/API/Cocoa/_WKApplicationManifest.mm:

(-[_WKApplicationManifest themeColor]): Use cocoaColor instead
of platformColor.

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _updateScrollViewBackground]): Use cocoaColor instead
of -[UIColor initWithCGColor:] and cachedCGColor.

  • UIProcess/API/ios/WKWebViewTestingIOS.mm:

(-[WKWebView _serializedSelectionCaretBackgroundColorForTesting]):
Use colorFromCocoaColor instead of colorFromUIColor.

  • UIProcess/Cocoa/WebViewImpl.mm:

(-[WKTextTouchBarItemController _wkChangeColor:]): Use cocoaColor
instead of nsColor.
(WebKit::WebViewImpl::updateTextTouchBar): Use colorFromCocoaColor
instead of colorFromNSColor.
(WebKit::WebViewImpl::setUnderlayColor): Use cocoaColorOrNil instead
of isValid and nsColor.
(WebKit::WebViewImpl::underlayColor const): Ditto.
(WebKit::WebViewImpl::pageExtendedBackgroundColor const): Ditto.
(WebKit::WebViewImpl::changeFontColorFromSender): Ditto.
(WebKit::extractUnderlines): Use colorFromCocoaColor instead of
colorFromNSColor.

  • UIProcess/ios/DragDropInteractionState.mm:

(WebKit::DragDropInteractionState::deliverDelayedDropPreview): Use
cocoaColor instead of +[UIColor colorWithCGColor:] and cachedCGColor.
(WebKit::DragDropInteractionState::previewForDragItem const): Ditto.

  • UIProcess/ios/ViewGestureControllerIOS.mm:

(WebKit::ViewGestureController::beginSwipeGesture): Use cocoaColor
instead of -[UIColor initWithCGColor:] and cachedCGColor.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _updateTapHighlight]): Use cocoaColor instead of
-[UIColor initWithCGColor:] and cachedCGColor.
(-[WKContentView _cascadeInteractionTintColor]): Use cocoaColor
instead of +[UIColor colorWithCGColor:] and cachedCGColor.
(compositionHighlights): Use colorFromCocoaColor instead of
colorFromUIColor.
(-[WKContentView _createTargetedContextMenuHintPreviewIfPossible]): Use
cocoaColor instead of +[UIColor colorWithCGColor:] and cachedCGColor.

  • UIProcess/ios/forms/WKFormColorControl.mm:

(-[WKColorPicker focusedElementSuggestedColors]): Use createNSArray
and cocoaColor instead of +[NSMutableArray array], a for loop,
-[NSMutableArray addObject:], +[UIColor colorWithCGColor:], and cachedCGColor
(-[WKColorPicker updateColorPickerState]): Use cocoaColor instead of
+[UIColor colorWithCGColor:] and cachedCGColor.

  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::accentColor): Use cocoaColor instead of nsColor.

  • UIProcess/mac/WebColorPickerMac.mm:

(WebKit::WebColorPickerMac::setSelectedColor): Use cocoaColor instead of nsColor.
(WebKit::WebColorPickerMac::showColorPicker): Ditto.
(-[WKColorPopoverMac setAndShowPicker:withColor:suggestions:]): Ditto.
(-[WKColorPopoverMac didChooseColor:]): Ditto.

  • WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:

(WebKit::PDFPluginChoiceAnnotation::createAnnotationElement): Use
colorFromCocoaColor instead of colorFromNSColor

  • WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:

(WebKit::PDFPluginTextAnnotation::createAnnotationElement): Ditto.

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::setAccentColor): Use cocoaColorOrNil instead of
isValid and nsColor.

Source/WebKitLegacy/mac:

  • DOM/DOMRGBColor.mm:

(-[DOMRGBColor color]): Use cocoaColor instead of nsColor.

  • Misc/WebKitNSStringExtras.mm:

(-[NSString _web_drawAtPoint:font:textColor:]): Use colorFromCocoaColor
instead of colorFromNSColor.

  • WebView/WebFrame.mm:

(-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]): Use
colorFromCocoaColor instead of colorFromNSColor.
(-[WebFrame _bodyBackgroundColor]): Use cocoaColor instead of
nsColor.

  • WebView/WebHTMLView.mm:

(extractUnderlines): Use colorFromCocoaColor instead of
colorFromNSColor.

  • WebView/WebView.mm:

(-[WebUITextIndicatorData initWithImage:textIndicatorData:scale:]):
Use cocoaColor instead of -[UIColor initWithCGColor:] and cachedCGColor.
(-[WebTextTouchBarItemController _webChangeColor:]): Use colorFromCocoaColor
instead of colorFromNSColor.
(-[WebView updateTextTouchBar]): Use cocoaColor instead of nsColor.

11:22 AM Changeset in webkit [284629] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

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

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:17 AM Changeset in webkit [284628] by Devin Rousso
  • 36 edits
    2 adds in trunk

[css-values-4] Support small (sv*), large (lv*) and dynamic (dv*) viewport units
https://bugs.webkit.org/show_bug.cgi?id=219287
<rdar://problem/71857370>

Reviewed by Simon Fraser.

Source/WebCore:

Spec: <https://drafts.csswg.org/css-values-4/#viewport-variants>

Tests: CSSViewportUnits.AllSame

CSSViewportUnits.EmptyUnobscuredSizeOverrides
CSSViewportUnits.SameUnobscuredSizeOverrides
CSSViewportUnits.DifferentUnobscuredSizeOverrides

  • css/CSSUnits.h:
  • css/CSSUnits.cpp:

(WebCore::operator<<):

  • css/CSSPrimitiveValue.h:

(WebCore::CSSPrimitiveValue::isViewportPercentageLength):
(WebCore::CSSPrimitiveValue::isViewportPercentageWidth): Deleted.
(WebCore::CSSPrimitiveValue::isViewportPercentageHeight): Deleted.
(WebCore::CSSPrimitiveValue::isViewportPercentageMax): Deleted.
(WebCore::CSSPrimitiveValue::isViewportPercentageMin): Deleted.

  • css/CSSPrimitiveValue.cpp:

(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::isStringType):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::computeUnzoomedNonCalcLengthDouble):
(WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):
(WebCore::CSSPrimitiveValue::unitTypeString):
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
(WebCore::CSSPrimitiveValue::equals const):

  • css/CSSToLengthConversionData.h:
  • css/CSSToLengthConversionData.cpp:

(WebCore::CSSToLengthConversionData::defaultViewportFactor const): Added.
(WebCore::CSSToLengthConversionData::smallViewportFactor const): Added.
(WebCore::CSSToLengthConversionData::largeViewportFactor const): Added.
(WebCore::CSSToLengthConversionData::dynamicViewportFactor const): Added.
(WebCore::CSSToLengthConversionData::viewportWidthFactor const): Deleted.
(WebCore::CSSToLengthConversionData::viewportHeightFactor const): Deleted.
(WebCore::CSSToLengthConversionData::viewportMinFactor const): Deleted.
(WebCore::CSSToLengthConversionData::viewportMaxFactor const): Deleted.

  • css/parser/CSSParserToken.cpp:

(WebCore::cssPrimitiveValueUnitFromTrie):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeLengthRawWithKnownTokenTypeDimension):

  • css/calc/CSSCalcCategoryMapping.cpp:

(WebCore::calcUnitCategory):
(WebCore::calculationCategoryForCombination):
(WebCore::hasDoubleValue):
Add support for parsing the following and converting them to their underlying value:

  • svw "small viewport width" is the width of the viewport if all UA interfaces are maximized
  • svh "small viewport height" is the height of the viewport if all UA interfaces are maximized
  • svmin "small viewport small dimension" is min(svw, svh)
  • svmax "small viewport large dimension" is max(svw, svh)
  • lvw "large viewport width" is the width of the viewport if all UA interfaces are minimized
  • lvh "large viewport height" is the height of the viewport if all UA interfaces are minimized
  • lvmin "large viewport small dimension" is min(lvw, lvh)
  • lvmax "large viewport large dimension" is max(lvw, lvh)
  • dvw "dynamic viewport width" is the width of the viewport with all UA interfaces being in whatever state they are currently in
  • dvh "dynamic viewport height" is the height of the viewport with all UA interfaces being in whatever state they are currently in
  • dvmin "dynamic viewport small dimension" is min(dvw, dvh)
  • dvmax "dynamic viewport large dimension" is max(dvw, dvh)

The existing vw/vh/vmin/vmax correspond to the "UA-default viewport", which WebKit
considers equivalent to the "large viewport" lvw/lvh/lvmin/lvmax.

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

(WebCore::FrameView::unobscuredContentSizeChanged):
(WebCore::FrameView::performSizeToContentAutoSize):
(WebCore::FrameView::enableAutoSizeMode):
(WebCore::FrameView::clearSizeOverrideForCSSSmallViewportUnits): Added.
(WebCore::FrameView::setSizeForCSSSmallViewportUnits): Added.
(WebCore::FrameView::overrideWidthForCSSSmallViewportUnits): Added.
(WebCore::FrameView::resetOverriddenWidthForCSSSmallViewportUnits): Added.
(WebCore::FrameView::overrideSizeForCSSSmallViewportUnits): Added.
(WebCore::FrameView::sizeForCSSSmallViewportUnits const): Added.
(WebCore::FrameView::clearSizeOverrideForCSSLargeViewportUnits): Renamed from clearViewportSizeOverrideForCSSViewportUnits.
(WebCore::FrameView::setSizeForCSSLargeViewportUnits): Renamed from setViewportSizeForCSSViewportUnits.
(WebCore::FrameView::overrideWidthForCSSLargeViewportUnits): Renamed from overrideViewportWidthForCSSViewportUnits.
(WebCore::FrameView::resetOverriddenWidthForCSSLargeViewportUnits): Renamed from resetOverriddenViewportWidthForCSSViewportUnits.
(WebCore::FrameView::overrideSizeForCSSLargeViewportUnits): Renamed from overrideViewportSizeForCSSViewportUnits.
(WebCore::FrameView::sizeForCSSLargeViewportUnits const): Renamed from viewportSizeForCSSViewportUnits.
(WebCore::FrameView::calculateSizeForCSSViewportUnitsOverride const): Added.
(WebCore::FrameView::sizeForCSSDynamicViewportUnits const): Added.
(WebCore::FrameView::sizeForCSSDefaultViewportUnits const): Added.

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

(WebCore::RenderView::sizeForCSSSmallViewportUnits const): Added.
(WebCore::RenderView::sizeForCSSLargeViewportUnits const): Renamed from viewportSizeForCSSViewportUnits.
(WebCore::RenderView::sizeForCSSDynamicViewportUnits const): Added.
(WebCore::RenderView::sizeForCSSDefaultViewportUnits const): Added.
For "small viewport" svw/svh/svmin/svmax, add support for a new IntSize member
that is propagated from the UIProcess. If not set, fall back to "UA-default viewport" vw/vh/vmin/vmax.
For "large viewport" lvw/lvh/lvmin/lvmax, use the same value as "UA-default viewport" vw/vh/vmin/vmax.
For "dynamic viewport" dvw/dvh/dvmin/dvmax, use the same value as window.inner*.
Drive-by: Rename viewportSizeForCSSViewportUnits to sizeForCSSLargeViewportUnits for clarity.

  • platform/graphics/FloatSize.h:

(WebCore::FloatSize::minDimension const): Added.
(WebCore::FloatSize::maxDimension const): Added.

  • platform/graphics/IntSize.h:

(WebCore::IntSize::minDimension const): Added.
(WebCore::IntSize::maxDimension const): Added.
Add utility/helper methods for returning the minimum/maximum of the width vs height.

  • css/DeprecatedCSSOMPrimitiveValue.cpp:

(WebCore::DeprecatedCSSOMPrimitiveValue::primitiveType const):
Don't ASSERT_NOT_REACHED now that there are new unit types.

Source/WebInspectorUI:

  • UserInterface/Models/CSSCompletions.js:

Source/WebKit:

Spec: <https://drafts.csswg.org/css-values-4/#viewport-variants>

Tests: CSSViewportUnits.AllSame

CSSViewportUnits.EmptyUnobscuredSizeOverrides
CSSViewportUnits.SameUnobscuredSizeOverrides
CSSViewportUnits.DifferentUnobscuredSizeOverrides

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _processWillSwapOrDidExit]):
(-[WKWebView _dispatchSetMinimumUnobscuredSize:]): Added.
(-[WKWebView _frameOrBoundsChanged]):
(activeMinimumUnobscuredSize): Added.
(-[WKWebView _didCompleteAnimatedResize]):
(-[WKWebView _minimumUnobscuredSizeOverride]): Added.
(-[WKWebView _setMinimumUnobscuredSizeOverride:]): Added.
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]):
(-[WKWebView _clearOverrideLayoutParameters]):
When this value is set from -[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]
it should be used as the value for "small viewport" svw/svh/svmin/svmax, but only
from that codepath. Dynamic viewport changes should not update it as they don't necessarily
represent a change in the minimum/maximum viewport size, just the current size.
"large viewport" lvw/lvh/lvmin/lvmax and "dynamic viewport" dvw/dvh/dvmin/dvmax
(as well as the existing "UA-default viewport" vw/vh/vmin/vmax) can be derived from
existing logic.
See the WebCore ChangeLog for more information.

  • Shared/WebPageCreationParameters.h:
  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):

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

(WebKit::WebPageProxy::creationParameters):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
(WebKit::WebPageProxy::setMinimumUnobscuredSize): Added.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage):
(WebKit::WebPage::setViewportSizeForCSSViewportUnits):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::setMinimumUnobscuredSize): Added.
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
Add piping from the UIProcess to the WebProcess for the new minimum unobscured size override.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
Drive-by: Rename setViewportSizeForCSSViewportUnits to setSizeForCSSLargeViewportUnits for clarity.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.mm: Added.

(evaluateForInt):
(getElementHeight):
(TEST.CSSViewportUnits.AllSame):
(TEST.CSSViewportUnits.EmptyUnobscuredSizeOverrides):
(TEST.CSSViewportUnits.SameUnobscuredSizeOverrides):
(TEST.CSSViewportUnits.DifferentUnobscuredSizeOverrides):

  • TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.html: Added.
  • TestWebKitAPI/Tests/WebCore/FloatSizeTests.cpp:

(TEST.FloatSize.MinDimension): Added.
(TEST.FloatSize.MaxDimension): Added.

  • TestWebKitAPI/Tests/WebCore/IntSizeTests.cpp:

(TEST.IntSize.MinDimension): Added.
(TEST.IntSize.MaxDimension): Added.
Add utility/helper methods for returning the minimum/maximum of the width vs height.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
11:16 AM Changeset in webkit [284627] by commit-queue@webkit.org
  • 102 edits in trunk/LayoutTests

[GTK] Update test baselines after r284521
https://bugs.webkit.org/show_bug.cgi?id=232094

Many render tree dumps need to change upper case tag names to lower
case.

Unreviewed test gardening.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-10-21

  • platform/glib/fast/block/float/013-expected.txt:
  • platform/glib/fast/block/float/016-expected.txt:
  • platform/glib/fast/block/float/clamped-right-float-expected.txt:
  • platform/glib/fast/body-propagation/background-color/002-expected.txt:
  • platform/glib/fast/body-propagation/background-color/003-expected.txt:
  • platform/glib/fast/body-propagation/background-color/004-expected.txt:
  • platform/glib/fast/body-propagation/background-color/006-expected.txt:
  • platform/glib/fast/body-propagation/background-color/007-expected.txt:
  • platform/glib/fast/body-propagation/background-color/008-expected.txt:
  • platform/glib/fast/body-propagation/background-image/002-expected.txt:
  • platform/glib/fast/body-propagation/background-image/003-expected.txt:
  • platform/glib/fast/body-propagation/background-image/004-expected.txt:
  • platform/glib/fast/body-propagation/background-image/006-expected.txt:
  • platform/glib/fast/body-propagation/background-image/007-expected.txt:
  • platform/glib/fast/body-propagation/background-image/008-expected.txt:
  • platform/glib/fast/body-propagation/overflow/001-expected.txt:
  • platform/glib/fast/body-propagation/overflow/002-expected.txt:
  • platform/glib/fast/body-propagation/overflow/003-expected.txt:
  • platform/glib/fast/body-propagation/overflow/004-expected.txt:
  • platform/glib/fast/body-propagation/overflow/006-expected.txt:
  • platform/glib/fast/body-propagation/overflow/007-expected.txt:
  • platform/glib/fast/css/line-height-font-order-expected.txt:
  • platform/glib/fast/table/011-expected.txt:
  • platform/glib/svg/custom/svg-fonts-with-no-element-reference-expected.txt:
  • platform/gtk/compositing/color-matching/pdf-image-match-expected.txt:
  • platform/gtk/compositing/repaint/content-into-overflow-expected.txt:
  • platform/gtk/compositing/repaint/overflow-into-content-expected.txt:
  • platform/gtk/editing/selection/selection-display-block-sibling-expected.txt:
  • platform/gtk/editing/selection/selection-display-flex-expected.txt:
  • platform/gtk/fast/block/positioning/inline-block-relposition-expected.txt:
  • platform/gtk/fast/body-propagation/background-color/001-expected.txt:
  • platform/gtk/fast/body-propagation/background-color/005-expected.txt:
  • platform/gtk/fast/body-propagation/background-image/001-expected.txt:
  • platform/gtk/fast/body-propagation/background-image/005-expected.txt:
  • platform/gtk/fast/body-propagation/background-image/009-expected.txt:
  • platform/gtk/fast/body-propagation/background-image/010-expected.txt:
  • platform/gtk/fast/body-propagation/overflow/005-expected.txt:
  • platform/gtk/fast/forms/search-styled-expected.txt:
  • platform/gtk/fast/forms/select-background-none-expected.txt:
  • platform/gtk/fast/repaint/text-selection-rect-in-overflow-2-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background-color-applied-to-rounded-inline-element-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background-color-border-box-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background-repeat-space-padding-box-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background-size-002-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background-size-applies-to-block-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background_color_padding_box-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background_position_three_four_values-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background_properties_greater_than_images-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background_repeat_space_border_box-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background_repeat_space_content_box-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-002-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-003-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-005-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-006-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-007-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-008-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-009-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-010-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-011-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-012-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-013-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-014-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-015-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-016-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-017-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-clip-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-clip-002-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-content-edge-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-initial-value-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-not-inherited-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-shorthand-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-style-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-style-002-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-style-003-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-style-004-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-style-005-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-002-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-with-three-values-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-with-two-values-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-top-left-radius-values-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-top-left-radius-values-002-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-top-left-radius-values-003-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-top-left-radius-values-004-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-top-right-radius-values-004-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/box-shadow-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/box-shadow-002-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/box-shadow-003-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/box-shadow-004-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/color-behind-images-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/none-as-image-layer-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/order-of-images-expected.txt:
  • platform/gtk/ietestcenter/css3/text/textshadow-001-expected.txt:
  • platform/gtk/ietestcenter/css3/text/textshadow-003-expected.txt:
  • platform/gtk/ietestcenter/css3/text/textshadow-004-expected.txt:
  • platform/gtk/ietestcenter/css3/text/textshadow-005-expected.txt:
  • platform/gtk/ietestcenter/css3/text/textshadow-006-expected.txt:
  • platform/gtk/ietestcenter/css3/text/textshadow-007-expected.txt:
  • platform/gtk/ietestcenter/css3/text/textshadow-008-expected.txt:
  • platform/gtk/ietestcenter/css3/text/textshadow-010-expected.txt:
11:05 AM Changeset in webkit [284626] by Aditya Keerthi
  • 4 edits in trunk/Source/WebCore

[macOS] Update appearance of <datalist> indicator
https://bugs.webkit.org/show_bug.cgi?id=232031
rdar://84474135

Reviewed by Wenson Hsieh.

Source/WebCore:

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::paintListButtonForInput):

Use CoreUI to paint the indicator on Big Sur and Monterey.

Source/WebCore/PAL:

  • pal/spi/mac/CoreUISPI.h:
10:58 AM Changeset in webkit [284625] by Devin Rousso
  • 2 edits in trunk/Source/WebKit

[iOS] Zooming out should use the page's background color instead of fading
https://bugs.webkit.org/show_bug.cgi?id=232036
<rdar://problem/81926190>

Reviewed by Tim Horton.

  • UIProcess/API/ios/WKWebViewIOS.mm:

(scrollViewBackgroundColor):

10:55 AM Changeset in webkit [284624] by Devin Rousso
  • 19 edits
    3 copies
    1 add in trunk

REGRESSION(r283864): Apple Pay named images are missing
https://bugs.webkit.org/show_bug.cgi?id=232050
<rdar://problem/84413831>

Reviewed by Andy Estes.

Source/WebCore:

NamedImageGeneratedImage already does a translate before calling into drawNamedImage, so
there's no reason to pass along the location of the named image. Instead, just pass the size.

Tests: fast/css/webkit-named-image/apple-pay-logo-black/offset.html

fast/css/webkit-named-image/apple-pay-logo-white/offset.html

  • platform/Theme.h:
  • platform/Theme.cpp:

(WebCore::Theme::drawNamedImage const):

  • platform/cocoa/ThemeCocoa.h:
  • platform/cocoa/ThemeCocoa.mm:

(WebCore::drawApplePayButton):
(WebCore::ThemeCocoa::drawNamedImage const):

  • platform/graphics/NamedImageGeneratedImage.cpp:

(WebCore::NamedImageGeneratedImage::draw):
(WebCore::NamedImageGeneratedImage::drawPattern):

LayoutTests:

  • fast/css/webkit-named-image/apple-pay-logo-black/offset.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/offset-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/offset.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/offset-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/background-size-centered.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/background-size-centered-expected-mismatch.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/background-size.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/background-size-expected-mismatch.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/basic.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/basic-expected-mismatch.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/container-larger-height.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/container-larger-height-expected-mismatch.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/container-larger-width.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/container-larger-width-expected-mismatch.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/mask.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/mask-expected-mismatch.html:

Drive-by: fix these to also have background-color: black; in the -expected-mismatch.html.

10:54 AM Changeset in webkit [284623] by msaboff@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Add missing overflow check to DFGIntegerRangeOptimizationPhase::filterConstant()
https://bugs.webkit.org/show_bug.cgi?id=232058

Reviewed by Robin Morisset.

Added overflow check.

  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
10:40 AM Changeset in webkit [284622] by Kate Cheney
  • 3 edits in trunk/LayoutTests

crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-leading-zero.html is a constant timeout
https://bugs.webkit.org/show_bug.cgi?id=232038
<rdar://problem/80333758>

Reviewed by Chris Dumez.

The modulus n in the existing test was not the result of two primes
p and q (it ends with 0x66 0x67 0x68). This patch updates the modulus
which I calculated using SubtleCrypto's generateKey() function then
prepended some zeros to test the intended functionality.

  • crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-leading-zero.html:
  • platform/mac/TestExpectations:
10:34 AM Changeset in webkit [284621] by Alan Coon
  • 1 copy in tags/Safari-612.3.2

Tag Safari-612.3.2.

10:32 AM Changeset in webkit [284620] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r284201. rdar://problem/83670287

[AppleWin] Controls are not being rendered
https://bugs.webkit.org/show_bug.cgi?id=231769
<rdar://problem/83670287>

Reviewed by Fujii Hironori.

Controls are not being rendered because the LocalWindowsContext destructor is no longer blitting the bitmap contents to the hdc.
The test in GraphicsContext::getWindowsContext needs to match the test in GraphicsContext::releaseWindowsContext.

  • platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::getWindowsContext):

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

10:30 AM Changeset in webkit [284619] by Alan Coon
  • 8 edits in branches/safari-612-branch/Source

Versioning.

WebKit-7612.3.2

10:14 AM Changeset in webkit [284618] by Aditya Keerthi
  • 2 edits in trunk/Source/WTF

[Cocoa] Enable 'accent-color' by default
https://bugs.webkit.org/show_bug.cgi?id=232032
rdar://84474404

Reviewed by Wenson Hsieh.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
10:12 AM Changeset in webkit [284617] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Followup: Fix crash when calling setUsernameForLocalCredentialWithID
https://bugs.webkit.org/show_bug.cgi?id=232057
<rdar://problem/84507268>

Patch by John Pascoe <J Pascoe> on 2021-10-21
Reviewed by David Kilzer.

Follow up to address David's comment.

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

(getAllLocalAuthenticatorCredentialsImpl):
(+[_WKWebAuthenticationPanel deleteLocalAuthenticatorCredentialWithID:]):
(+[_WKWebAuthenticationPanel setUsernameForLocalCredentialWithID:username:]):

  • Use <wtf/cocoa/TypeCastsCocoa.h>
10:04 AM Changeset in webkit [284616] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

Regression(r284439): [ iPad ] fast/canvas/canvas-createPattern-video-loading.html and imported/w3c/web-platform-tests/html/canvas/element/manual/imagebitmap/canvas-createImageBitmap-video-resize.html are failing.
https://bugs.webkit.org/show_bug.cgi?id=232090

Unreviewed test gardening.

  • platform/ipad/TestExpectations:
10:03 AM Changeset in webkit [284615] by Alan Coon
  • 1 copy in tags/Safari-612.2.9.1.30

Tag Safari-612.2.9.1.30.

9:58 AM Changeset in webkit [284614] by Alan Coon
  • 2 edits in branches/safari-612.2.9.1-branch/Source/WebCore

Cherry-pick r284201. rdar://problem/83670287

[AppleWin] Controls are not being rendered
https://bugs.webkit.org/show_bug.cgi?id=231769
<rdar://problem/83670287>

Reviewed by Fujii Hironori.

Controls are not being rendered because the LocalWindowsContext destructor is no longer blitting the bitmap contents to the hdc.
The test in GraphicsContext::getWindowsContext needs to match the test in GraphicsContext::releaseWindowsContext.

  • platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::getWindowsContext):

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

9:56 AM Changeset in webkit [284613] by Alan Coon
  • 8 edits in branches/safari-612.2.9.1-branch/Source

Versioning.

WebKit-7612.2.9.1.30

9:49 AM Changeset in webkit [284612] by commit-queue@webkit.org
  • 6 edits
    1 copy in trunk

AX: Remove redundant insert of autofill button child in AccessibilityRenderObject::addTextFieldChildren
https://bugs.webkit.org/show_bug.cgi?id=232033

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-10-21
Reviewed by Chris Fleizach.

Source/WebCore:

Autofill buttons are represented in the DOM, so there's no reason
to also insert it in AccessibilityRenderObject::addTextFieldChildren.
This results in duplicate objects for this button in the AX tree.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::addTextFieldChildren):
Remove redundant insertion of autofill button element into the
accessibility tree.

LayoutTests:

  • accessibility/auto-fill-crash-expected.txt:
  • accessibility/auto-fill-crash.html:
  • platform/glib/accessibility/auto-fill-crash-expected.txt:

Expect one less child because we no longer insert a redundant button
into the accessibility tree. Also add an expectation confirming the
autofill button is actually a part of the accessibility tree.

  • platform/win/accessibility/auto-fill-crash-expected.txt: Added.
9:49 AM Changeset in webkit [284611] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, drop test from TestExpectations that no longer exists.

  • platform/ios-wk2/TestExpectations:
9:47 AM Changeset in webkit [284610] by Chris Dumez
  • 34 edits in trunk

WebKit should process-swap for initial navigation of a popup if it has no opener
https://bugs.webkit.org/show_bug.cgi?id=231990
<rdar://84425504>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • web-platform-tests/html/cross-origin-opener-policy/coop-coep-sandbox.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/coop-sandbox.https-expected.txt:

Rebaseline tests due to minor logging differences.

Source/WebKit:

WebKit should process-swap for initial navigation of a popup if it has no opener, even if the navigation is
same-site. Swapping process is not Web-observable here since there is no opener relationship. However, swapping
processes has benefits here since we don't want to end up with too many tabs sharing the same process.

This impacts Google Drive where double-clicking a document will open Google Docs in a new tab and in the same
WebProcess as Google Drive.

No new tests, updated existing API tests and this is not Web-observable.

  • Shared/FrameInfoData.cpp:

(WebKit::FrameInfoData::encode const):
(WebKit::FrameInfoData::decode):

  • Shared/FrameInfoData.h:
  • Shared/LoadParameters.cpp:

(WebKit::LoadParameters::encode const):
(WebKit::LoadParameters::decode):

  • Shared/LoadParameters.h:
  • Shared/NavigationActionData.cpp:

(WebKit::NavigationActionData::encode const):
(WebKit::NavigationActionData::decode):

  • Shared/NavigationActionData.h:
  • UIProcess/API/APINavigation.h:

(API::Navigation::effectiveSandboxFlags const):

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::cancel):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::loadRequestWithNavigationShared):
(WebKit::WebPageProxy::loadSimulatedRequest):
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):

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

(WebKit::WebProcessPool::processForNavigation):
(WebKit::WebProcessPool::processForNavigationInternal):

  • UIProcess/WebProcessPool.h:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::info const):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::loadRequest):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

(-[PSONUIDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
(-[PSONUIDelegate webViewDidClose:]):
Updated existing API tests to reflect behavior change.
Also extend an API test to make sure that a popup opened by JS can still close itself
via JS (by calling window.close()), even in the case where we process swap.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage):
(WTR::InjectedBundle::outputText):

  • WebKitTestRunner/InjectedBundle/InjectedBundle.h:
  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::dump):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::createOtherPage):
(WTR::TestController::didReceivePageMessageFromInjectedBundle):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
We have some tests that open a new popup with 'noopener' and the popup would be the
one to call testRunner.notifyDone(). This used to work fine when the popup would
end up in the same WebProcess because the injected bundle would know which page is
the main test page and use that one. However, now that we process-swap, the popup
page would think it is the main test page and try to dump its own output. However,
the UIProcess wasn't listening for messages from auxiliary pages' injected bundles.
The UIProcess now listens for those messages and asks the main test page to dump
its output when an auxiliary page in another process says the test is done.

LayoutTests:

  • fast/dom/open-and-close-by-DOM.html:

The test is relying on testRunner.windowCount(), which is only able to count windows inside the
current WebProcess. Add rel=opener to the link so that the new window keep opening in the same
process, so that testRunner.windowCount() actually keeps working as expected.
I added an API test to cover to make sure that windows opened by DOM can still close themselves
in the case where we swap processes.

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

Regression(r284439): [ iPad ] fast/canvas/canvas-createPattern-video-loading.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=232090

Unreviewed test gardening.

  • platform/ipad/TestExpectations:
9:32 AM Changeset in webkit [284608] by Kocsen Chung
  • 8 edits in branches/safari-613.1.6-branch/Source

Versioning.

WebKit-7613.1.6.1

9:31 AM Changeset in webkit [284607] by Kocsen Chung
  • 3 edits in branches/safari-613.1.6-branch/Source/WebKit

Build fix reviewed by Wenson Hsieh and David Kilzer

9:27 AM Changeset in webkit [284606] by commit-queue@webkit.org
  • 14 edits in trunk/Source/WebCore

AX: Any addition of children should funnel through AccessibilityObject::addChild
https://bugs.webkit.org/show_bug.cgi?id=231914

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-10-21
Reviewed by Chris Fleizach.

All addition of children now goes through
AccessibilityObject::addChild. This is good for two reasons:

  1. It ensures we aren't inserting ignored elements into the tree.

insertChild (downstream of addChild) checks this. Prior to this
patch, there were cases where we could insert ignored children into the
tree because no check was made.

  1. We can reliably set state on the child based on the state of the

parent at insertion time. For example, children can set a flag if
any of their ancestors have an application or document role, which can
be useful for some AX clients.

  • accessibility/AccessibilityARIAGrid.cpp:

(WebCore::AccessibilityARIAGrid::addTableCellChild):
(WebCore::AccessibilityARIAGrid::addChildren):

  • accessibility/AccessibilityListBox.cpp:

(WebCore::AccessibilityListBox::addChildren):

  • accessibility/AccessibilityMenuList.cpp:

(WebCore::AccessibilityMenuList::addChildren):

  • accessibility/AccessibilityMenuListPopup.cpp:

(WebCore::AccessibilityMenuListPopup::addChildren):

  • accessibility/AccessibilityObject.cpp:

(WebCore::isAutofillButton):
(WebCore::isTableComponent):
(WebCore::AccessibilityObject::insertChild):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::addImageMapChildren):
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
(WebCore::AccessibilityRenderObject::addRemoteSVGChildren):

  • accessibility/AccessibilityScrollView.cpp:

(WebCore::AccessibilityScrollView::addChildScrollbar):

  • accessibility/AccessibilitySlider.cpp:

(WebCore::AccessibilitySlider::addChildren):

  • accessibility/AccessibilitySpinButton.cpp:

(WebCore::AccessibilitySpinButton::addChildren):

  • accessibility/AccessibilityTable.cpp:

(WebCore::AccessibilityTable::addChildren):
(WebCore::AccessibilityTable::addTableCellChild):

  • accessibility/AccessibilityTableColumn.cpp:

(WebCore::AccessibilityTableColumn::addChildren):

  • accessibility/AccessibilityTableHeaderContainer.cpp:

(WebCore::AccessibilityTableHeaderContainer::addChildren):

  • accessibility/AccessibilityTableRow.cpp:

(WebCore::AccessibilityTableRow::addChildren):

9:17 AM Changeset in webkit [284605] by Simon Fraser
  • 2 edits in trunk/Tools

run-webkit-tests --ios-simulator --print-expectations fails
https://bugs.webkit.org/show_bug.cgi?id=232035

Reviewed by Jonathan Bedard.

self._port.supported_device_types(), which _collect_tests() uses (despite its argument)
returns a different set of devices than self._port.DEFAULT_DEVICE_TYPES which caused
using those as hash keys to throw. So have print_expectations() and print_summary()
just use self._port.supported_device_types().

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

(Manager.print_expectations):
(Manager.print_summary):

7:29 AM Changeset in webkit [284604] by Antti Koivisto
  • 5 edits in trunk/Source/WebCore

Move Style::Resolver::State out of header
https://bugs.webkit.org/show_bug.cgi?id=232074

Reviewed by Antoine Quint.

It is an implementation detail.

  • style/PageRuleCollector.cpp:

(WebCore::Style::PageRuleCollector::isLeftPage const):

  • style/PageRuleCollector.h:

(WebCore::Style::PageRuleCollector::PageRuleCollector):

Provide just the root text direction instead of the State.

  • style/StyleResolver.cpp:

(WebCore::Style::Resolver::State::State):
(WebCore::Style::Resolver::State::element const):
(WebCore::Style::Resolver::State::setStyle):
(WebCore::Style::Resolver::State::style const):
(WebCore::Style::Resolver::State::takeStyle):
(WebCore::Style::Resolver::State::setParentStyle):
(WebCore::Style::Resolver::State::parentStyle const):
(WebCore::Style::Resolver::State::rootElementStyle const):
(WebCore::Style::Resolver::State::userAgentAppearanceStyle const):
(WebCore::Style::Resolver::State::setUserAgentAppearanceStyle):
(WebCore::Style::Resolver::styleForPage):

  • style/StyleResolver.h:

(WebCore::Style::Resolver::State::State): Deleted.
(WebCore::Style::Resolver::State::element const): Deleted.
(WebCore::Style::Resolver::State::style const): Deleted.
(WebCore::Style::Resolver::State::takeStyle): Deleted.
(WebCore::Style::Resolver::State::parentStyle const): Deleted.
(WebCore::Style::Resolver::State::rootElementStyle const): Deleted.
(WebCore::Style::Resolver::State::userAgentAppearanceStyle const): Deleted.
(WebCore::Style::Resolver::State::setUserAgentAppearanceStyle): Deleted.

7:09 AM Changeset in webkit [284603] by Chris Lord
  • 8 edits in trunk

[WPE][GTK] Enable smooth scrolling by default
https://bugs.webkit.org/show_bug.cgi?id=220512

Reviewed by Carlos Garcia Campos.

.:

Build smooth scrolling by default on WPE to match other platforms.

  • Source/cmake/OptionsWPE.cmake:

Source/WebKit:

Enable smooth scrolling by default on GTK and WPE platforms.

  • UIProcess/API/glib/WebKitSettings.cpp:

(webkit_settings_class_init):

Source/WTF:

Enable smooth scrolling by default on GTK and WPE platforms.

  • Scripts/Preferences/WebPreferences.yaml:

Tools:

Smooth scrolling is default on on GTK now, so reverse the logic in the
test for the efficacy of the related setting.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:

(testWebKitSettings):

5:40 AM Changeset in webkit [284602] by graouts@webkit.org
  • 3 edits
    2 adds in trunk

CSSPropertyZoom needs wrapper that ensures it's always blended into a positive value.
https://bugs.webkit.org/show_bug.cgi?id=232020
<rdar://problem/84469930>

Reviewed by Antti Koivisto.

Source/WebCore:

Test: webanimations/zoom-animation-crash.html

The "zoom" CSS property is expected to be always larger than 0, so let's ensure we do not allow
values <= 0 while blending. To do so we repurpose NonNegativeFloatPropertyWrapper to now take
an argument specifying if the blended value should be non-negative or positive.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::FloatPropertyWrapper::FloatPropertyWrapper):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
(WebCore::NonNegativeFloatPropertyWrapper::NonNegativeFloatPropertyWrapper): Deleted.

LayoutTests:

Add a test that would crash prior to the source change.

  • webanimations/zoom-animation-crash-expected.txt: Added.
  • webanimations/zoom-animation-crash.html: Added.
5:28 AM Changeset in webkit [284601] by eocanha@igalia.com
  • 4 edits in trunk/LayoutTests

REGRESSION(r282059) [GStreamer] Test media/media-source/media-source-stalled-holds-sleep-assertion.html timeouts
https://bugs.webkit.org/show_bug.cgi?id=229979

Reviewed by Xabier Rodriguez-Calvar.

Detect stall by monitoring currentTime instead of listening to the 'stall' event. This is needed after
removing emission of 'stall' event in GStreamer ports after https://bugs.webkit.org/show_bug.cgi?id=226882

Also remove initial seek, which is irrelevant to the test purpose and causes troubles in GStreamer ports.

  • media/media-source/media-source-stalled-holds-sleep-assertion-expected.txt: Updated expectations.
  • media/media-source/media-source-stalled-holds-sleep-assertion.html: Monitor currentTime instead of stall event, remove initial seek.
  • platform/glib/TestExpectations: Removed timeout expectation.
4:51 AM Changeset in webkit [284600] by graouts@webkit.org
  • 12 edits in trunk/Source/WebCore

Pass CompositeOperation to CSSPropertyAnimation::blendProperties and through more blending functions
https://bugs.webkit.org/show_bug.cgi?id=232069

Reviewed by Antti Koivisto.

In preparation for support of CompositeOperation when blending, we need to pass it down from blendProperties()
to other blending functions. Currently we only ever pass Replace so there is no change in behavior.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyBlendingContext::CSSPropertyBlendingContext):
(WebCore::AnimationPropertyWrapperBase::canInterpolate const):
(WebCore::CSSPropertyAnimation::blendProperties):
(WebCore::CSSPropertyAnimation::canPropertyBeInterpolated):

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

(WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):

  • platform/LengthSize.h:

(WebCore::blend):

  • platform/animation/AnimationUtilities.h:

(WebCore::BlendingContext::BlendingContext):

  • platform/graphics/transforms/AffineTransform.cpp:

(WebCore::AffineTransform::blend):

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

(WebCore::RotateTransformOperation::blend):

  • platform/graphics/transforms/TransformOperation.h:
  • platform/graphics/transforms/TransformationMatrix.cpp:

(WebCore::blendFloat):
(WebCore::TransformationMatrix::blend2):
(WebCore::TransformationMatrix::blend4):
(WebCore::TransformationMatrix::blend):

  • platform/graphics/transforms/TransformationMatrix.h:
3:50 AM Changeset in webkit [284599] by ddkilzer@apple.com
  • 3 edits in trunk/Source/ThirdParty/libwebrtc

[WebRTC] Simplify libwebtc Xcode project
<https://webkit.org/b/232044>
<rdar://problem/82743710>

Reviewed by Youenn Fablet.

  • Configurations/libwebm.xcconfig:

(INSTALL_HEADERS_PATH):
(LIBWEBM_HEADERS_FOLDER_PATH):
(LIBWEBM_HEADERS_FOLDER_PATH_NO):
(LIBWEBM_HEADERS_FOLDER_PATH_YES):

  • Remove variables used by now-removed build phase scripts.

(PUBLIC_HEADERS_FOLDER_PATH): Add.

  • This determines where webm public headers are installed.
  • libwebrtc.xcodeproj/project.pbxproj:

(Recovered References): Remove.

  • The two source files were added back at the correct path elsewhere, so these references can be removed.

(webm target):

  • Remove "Copy webm headers" and "Copy common headers" build phase scripts since headers are installed by Xcode's built-in "Headers" phase.
  • Remove duplicate C++ source files (noticed after reviewing "Recovered References" files).
  • Install webm headers as public headers since their is no subdirectory structure, and this fixes the bug in the radar where webm headers were not installed consistently.
3:21 AM Changeset in webkit [284598] by Adrian Perez de Castro
  • 1 copy in releases/WPE WebKit/webkit-2.34.1

WPE WebKit 2.34.1

3:21 AM Changeset in webkit [284597] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.34

Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.34.1 release

.:

  • Source/cmake/OptionsWPE.cmake: Bump version numbers.

Source/WebKit:

  • wpe/NEWS: Add release notes for 2.34.1.
2:53 AM Changeset in webkit [284596] by Chris Lord
  • 7 edits in trunk/Source/WebCore

[GTK] Slow scrolling (not matching GTK native scroll amount)
https://bugs.webkit.org/show_bug.cgi?id=197100

Reviewed by Simon Fraser.

Fix up behaviour with interrupting smooth scrolling, mainly on
keyboard-initiated scrolling, but also for the mouse-wheel. When
interrupting a smooth scroll, the animation curve is now changed from
ease-in-out to ease-out and the duration is recalculated.

No new tests, covered by existing tests.

  • platform/ScrollAnimation.h:

(WebCore::ScrollAnimation::destinationOffset const):

  • platform/ScrollAnimationSmooth.cpp:

(WebCore::ScrollAnimationSmooth::ScrollAnimationSmooth):
(WebCore::ScrollAnimationSmooth::startAnimatedScrollToDestination):
(WebCore::ScrollAnimationSmooth::retargetActiveAnimation):
(WebCore::ScrollAnimationSmooth::animateScroll):
(WebCore::ScrollAnimationSmooth::startOrRetargetAnimation): Deleted.

  • platform/ScrollAnimationSmooth.h:
  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::scroll):

  • platform/ScrollingEffectsController.cpp:

(WebCore::ScrollingEffectsController::retargetAnimatedScrollBy):
(WebCore::ScrollingEffectsController::handleWheelEvent):

  • platform/ScrollingEffectsController.h:
2:48 AM Changeset in webkit [284595] by Sam Sneddon
  • 4 edits
    2 moves in trunk/Tools

Move layout_test_finder to layout_test_finder_legacy
https://bugs.webkit.org/show_bug.cgi?id=232018

Reviewed by Darin Adler.

This is a simple rename; no further changes.

  • Scripts/open-layout-test:
  • Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy.py: Renamed from Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py.

(_is_reference_html_file):
(_has_supported_extension):
(LayoutTestFinder):
(LayoutTestFinder.init):
(LayoutTestFinder.find_tests):
(LayoutTestFinder.find_tests_by_path):
(LayoutTestFinder._expanded_paths):
(LayoutTestFinder._real_tests):
(LayoutTestFinder._is_test_file):
(LayoutTestFinder._is_w3c_resource_file):
(LayoutTestFinder._strip_test_dir_prefixes):
(LayoutTestFinder._strip_test_dir_prefix):
(LayoutTestFinder._read_test_names_from_file):
(LayoutTestFinder._strip_comments):

  • Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy_unittest.py: Renamed from Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder_unittest.py.

(MockLayoutTestFinder):
(MockLayoutTestFinder._real_tests):
(LayoutTestFinderTests):
(LayoutTestFinderTests.make_finder):
(LayoutTestFinderTests.test_supported_test_extensions):
(LayoutTestFinderTests.test_is_reference_html_file):
(LayoutTestFinderTests.test_find_no_paths_specified):
(LayoutTestFinderTests.test_find_one_test):
(LayoutTestFinderTests.test_find_glob):
(LayoutTestFinderTests.test_find_with_skipped_directories):
(LayoutTestFinderTests.test_find_with_skipped_directories_2):
(LayoutTestFinderTests.test_is_test_file):
(LayoutTestFinderTests.test_is_w3c_resource_file):

  • Scripts/webkitpy/layout_tests/controllers/manager.py:
  • Scripts/webkitpy/tool/commands/queries.py:
1:46 AM Changeset in webkit [284594] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.34.1

WebKitGTK 2.34.1

1:45 AM Changeset in webkit [284593] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.34

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.34.1 release

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.34.1.
12:21 AM Changeset in webkit [284592] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Fix GTK build with old version of ATSPI after r284367.

There's not API to check ATSPI version, so check if ATSPI_SCROLLTYPE_COUNT is defined to know if component
scroll API is available.

  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(beforeAll):

Note: See TracTimeline for information about the timeline view.