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

Timeline



May 13, 2021:

11:42 PM Changeset in webkit [277484] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Check for null element in paintSearchFieldResultsButton
https://bugs.webkit.org/show_bug.cgi?id=225232

Patch by Rob Buis <rbuis@igalia.com> on 2021-05-13
Reviewed by Ryosuke Niwa.

Source/WebCore:

Check for null element in paintSearchFieldResultsButton.

Test: fast/css/searchfield-results-button-crash.html

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::paintSearchFieldResultsButton):

LayoutTests:

Add test for this.

  • fast/css/searchfield-results-button-crash-expected.txt: Added.
  • fast/css/searchfield-results-button-crash.html: Added.
10:53 PM Changeset in webkit [277483] by commit-queue@webkit.org
  • 5 edits in trunk/Source

Misc GCC warning cleanup
https://bugs.webkit.org/show_bug.cgi?id=225777

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-05-13
Reviewed by Carlos Garcia Campos.

Source/WebCore:

  • bindings/js/JSAudioNodeCustom.cpp:

(WebCore::toJSNewlyCreated): Add missing RELEASE_ASSERT_NOT_REACHED().

  • svg/SVGToOTFFontConversion.cpp:

(WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Remove redundant condition.

Source/WebDriver:

Remove unused variable.

  • glib/WebDriverServiceGLib.cpp:

(WebDriver::parseVersion):

10:52 PM Changeset in webkit [277482] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

[GTK] Wrong smooth animation sometimes with non-async scrolling
https://bugs.webkit.org/show_bug.cgi?id=225764

Reviewed by Adrian Perez de Castro.

This is happening because sometimes when the scrollbars are added to the scroll view, the contents size hasn't
been updated yet, so that values saved by ScrollAnimationSmooth::updateVisibleLengths() are 0x0. After that the
updateVisibleLengths() is not called again when the contents size is updated, so scroll happens with the wrong
visible lengths. This doesn't happen with async scrolling because updateVisibleLengths() is called every time
layers are repositioned. For non-async scrolling it should be enough to update visible lengths when he contents
size changes.

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::contentsResized const):

  • platform/ScrollAnimator.h:

(WebCore::ScrollAnimator::ScrollAnimator::contentsResized const):

9:44 PM Changeset in webkit [277481] by Devin Rousso
  • 3 edits in trunk/Source/WebCore

[Modern Media Controls] REGRESSION(r268308) AirPlay briefly disappears and then reappears when hovering over controls
https://bugs.webkit.org/show_bug.cgi?id=225780
<rdar://problem/77984683>

Reviewed by Eric Carlson.

r268308 adjusted AVRoutePickerViewTargetPicker::isAvailable, which is used to control
whether AVRoutePickerViewTargetPicker (which uses the AVRouteDetectorMultipleRoutesDetectedDidChange
notification and actually stops listening for it in stopMonitoringPlaybackTargets) or
AVOutputDeviceMenuControllerTargetPicker (which uses ObjC KVO and doesn't actually do
anything in stopMonitoringPlaybackTargets when the last JS "webkitplaybacktargetavailabilitychanged"
event listener is removed, meaning that WebKit never senda a new value to the WebProcess) is
used. When using AVRoutePickerViewTargetPicker, WebKit calls -[AVRouteDetector setRouteDetectionEnabled:]
whenever the first JS "webkitplaybacktargetavailabilitychanged" event listener is added
(with the argument YES) and the last JS "webkitplaybacktargetavailabilitychanged" event
listener is removed (with the argument NO). In the latter scenario (which is the case with
builtin media controls), -[AVRouteDetector setRouteDetectionEnabled:] will dispatch a
AVRouteDetectorMultipleRoutesDetectedDidChange notification and mark itself as not having
multiple routes (-[AVRouteDetector multipleRoutesDetected]). This work is done in the
UIProcess and the result is sent to the WebProcess, meaning that even though there are no
more JS event listeners WebKit still updates the cached state of whether multiple routes
exist. This means that the next time a JS event listener is added, WebKit will ask the
UIProcess to update (which will re-enable route detection, which will dispatch a AVRouteDetectorMultipleRoutesDetectedDidChange
notification) but then immediately dispatch a JS "webkitplaybacktargetavailabilitychanged"
event using the cached state. Once the request from the UIProcess comes back, WebKit will
then dispatch *another* JS "webkitplaybacktargetavailabilitychanged" event with the new
non-cached value.

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

(WebCore::AVRoutePickerViewTargetPicker::startingMonitoringPlaybackTargets):
(WebCore::AVRoutePickerViewTargetPicker::stopMonitoringPlaybackTargets):
(WebCore::AVRoutePickerViewTargetPicker::availableDevicesDidChange):
Add a flag that ignores the next AVRouteDetectorMultipleRoutesDetectedDidChange
notification since it's guaranteed to be false after setRouteDetectionEnabled:NO.

9:39 PM Changeset in webkit [277480] by Darin Adler
  • 2 edits in trunk/Source/JavaScriptCore

Follow-up fix for: Remove StringBuilder::appendNumber
https://bugs.webkit.org/show_bug.cgi?id=225732
rdar://78000283

  • heap/HeapSnapshotBuilder.cpp:

(JSC::HeapSnapshotBuilder::json): Removed a stray single quote mark that
meant we produced a JSON file that could not be parsed.

9:06 PM Changeset in webkit [277479] by Wenson Hsieh
  • 13 edits
    2 adds
    2 deletes in trunk/Source

[Cocoa] Plumb data detector results through some platform objects
https://bugs.webkit.org/show_bug.cgi?id=225775
Work towards rdar://75504956

Reviewed by Tim Horton and Devin Rousso.

Source/WebCore:

Introduce a new struct to hold data detection results, and add it to the existing results object when
ENABLE(DATA_DETECTION) is defined.

No change in behavior.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::canBePresentedByDataDetectors):
(WebCore::DataDetection::canPresentDataDetectorsUIForElement):
(WebCore::resultIsURL):
(WebCore::constructURLStringForResult):
(WebCore::buildQuery):
(WebCore::DataDetection::detectContentInRange):

Add a PAL namespace to each of these DataDetectorsCore softlinking call sites, since the soft link header now
exists in PAL.

  • platform/ImageExtractionResult.h:

(WebCore::ImageExtractionDataDetectorInfo::ImageExtractionDataDetectorInfo):
(WebCore::ImageExtractionResult::isEmpty const):
(WebCore::ImageExtractionResult::encode const):
(WebCore::ImageExtractionResult::decode):

  • platform/cocoa/DataDetectorsCoreSoftLink.h: Removed.
  • platform/cocoa/DataDetectorsCoreSoftLink.mm: Removed.

Additionally, move DataDetectorsCoreSoftLink.{h|mm} out of WebCore/platform and into PAL as softlinking
headers, so that they can be imported in WebKit as well as WebCore.

Source/WebCore/PAL:

Move DataDetectorsCoreSoftLink.{h|mm} into PAL, so that it can be used in WebKit as well.

  • PAL.xcodeproj/project.pbxproj:
  • pal/PlatformMac.cmake:

Add the header and source file to the CMake build.

  • pal/cocoa/DataDetectorsCoreSoftLink.h: Added.
  • pal/cocoa/DataDetectorsCoreSoftLink.mm: Added.
  • pal/spi/cocoa/DataDetectorsCoreSPI.h:

Explicitly import Foundation headers here, so that the forward declarations don't cause compilation failures in
non-internal SDKs.

Source/WebKit:

Add IPC encoding and decoding support for the new struct.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<ImageExtractionDataDetectorInfo>::encodePlatformData):
(IPC::ArgumentCoder<ImageExtractionDataDetectorInfo>::decodePlatformData):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<ImageExtractionDataDetectorInfo>::encode):
(IPC::ArgumentCoder<ImageExtractionDataDetectorInfo>::decode):

  • Shared/WebCoreArgumentCoders.h:
8:30 PM Changeset in webkit [277478] by Lauro Moura
  • 2 edits in trunk/LayoutTests

[GTK] Skip WebXR tests after r277468

Unreviewed test gardening.

WebXR is not yet enabled in GTK.

  • platform/gtk/TestExpectations:
7:13 PM Changeset in webkit [277477] by Patrick Angle
  • 2 edits in trunk/Source/JavaScriptCore

[REGRESSION: r271876] Web Inspector: [Cocoa] Remote inspection crashes when using WEB_THREAD
https://bugs.webkit.org/show_bug.cgi?id=225794

Reviewed by Devin Rousso.

For WEB_THREAD, move callback in dispatchAsyncOnTarget to block scope to ensure it is available for the
lifetime of the block.

  • inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm:

(Inspector::RemoteConnectionToTarget::dispatchAsyncOnTarget):

7:06 PM Changeset in webkit [277476] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

report-non-inclusive-language should skip symlinks
https://bugs.webkit.org/show_bug.cgi?id=225789

Reviewed by Darin Adler.

  • Scripts/report-non-inclusive-language: Skip symlinks since most likely the linked file would be checked

directly by the script while iterating the directory structure and would result in it being counted twice.
Also the script fails with an error if there is a symlink pointing to a non-existing file.

7:03 PM Changeset in webkit [277475] by ggaren@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

m_calleeSaveRegisters should not be a pointer to a pointer
https://bugs.webkit.org/show_bug.cgi?id=225787

Reviewed by Keith Miller.

Ben found this through memory stress testing.

RegisterAtOffsetList is effectively just a pointer. unique_ptr<RegisterAtOffsetList>
is a pointer to a pointer. RegisterAtOffsetList is long-lived, so it
creates heap page fragmentation.

Worth 3MB on Ben's test.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::setCalleeSaveRegisters):
(JSC::CodeBlock::calleeSaveRegisters const): Use a fence before setting
m_hasCalleeSaveRegisters to ensure that all writes have completed before
the struct becomes visible.

  • bytecode/CodeBlock.h: Use RegisterAtOffsetList directly instead of

unique_ptr<RegisterAtOffsetList> to avoid a long-lived lonely 8 byte
allocation.

  • ftl/FTLCompile.cpp:

(JSC::FTL::compile): Updated for type change.

6:48 PM Changeset in webkit [277474] by Russell Epstein
  • 1 edit in branches/safari-612.1.15-branch/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h

Unreviewed build fix. rdar://problem/77992162

6:30 PM Changeset in webkit [277473] by Russell Epstein
  • 1 copy in tags/Safari-612.1.14.2

Tag Safari-612.1.14.2.

6:19 PM Changeset in webkit [277472] by Russell Epstein
  • 1 edit in branches/safari-612.1.14-branch/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h

Unreviewed build fix. rdar://problem/77990505

6:14 PM Changeset in webkit [277471] by Russell Epstein
  • 8 edits in branches/safari-612.1.14-branch/Source

Versioning.

WebKit-7612.1.14.2

6:02 PM Changeset in webkit [277470] by Russell Epstein
  • 35 edits in branches/safari-612.1.12-branch/Source

Cherry-pick r277453. rdar://problem/77996171

Add textIndicator bounce for AppHighlights on scroll.
https://bugs.webkit.org/show_bug.cgi?id=225727

Reviewed by Tim Horton.

  • Modules/highlight/AppHighlightStorage.cpp: (WebCore::AppHighlightStorage::attemptToRestoreHighlightAndScroll):
  • loader/EmptyClients.cpp: (WebCore::EmptyChromeClient::setTextIndicator const):
  • loader/EmptyClients.h:
  • page/ChromeClient.h:
  • page/TextIndicator.h:
  • page/cocoa/WebTextIndicatorLayer.h:
  • page/cocoa/WebTextIndicatorLayer.mm: (-[WebTextIndicatorLayer initWithFrame:textIndicator:margin:offset:]): (createBounceAnimation): (-[WebTextIndicatorLayer _animationDuration]):
  • page/mac/TextIndicatorWindow.h:
  • page/mac/TextIndicatorWindow.mm: (WebCore::TextIndicatorWindow::~TextIndicatorWindow): (WebCore::TextIndicatorWindow::clearTextIndicator): (WebCore::TextIndicatorWindow::setTextIndicator):

Use factored out textIndicator code to add a bounce to an appHighlight
when it is scrolled to.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm: (-[WKWindowVisibilityObserver _dictionaryLookupPopoverWillClose:]): (WebKit::WebViewImpl::setTextIndicator): (WebKit::WebViewImpl::clearTextIndicatorWithAnimation): (WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimationFromViewOnly): (WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly):
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setTextIndicator): (WebKit::WebPageProxy::clearTextIndicator):
  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::setTextIndicator): (WebKit::PageClientImpl::clearTextIndicator): (WebKit::PageClientImpl::setTextIndicatorAnimationProgress):
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setUpTextIndicator:]): (-[WKContentView clearTextIndicator:]): (-[WKContentView setTextIndicatorAnimationProgress:]): (-[WKContentView teardownTextIndicatorLayer]): (-[WKContentView startFadeOut]):
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::setTextIndicator): (WebKit::PageClientImpl::clearTextIndicator): (WebKit::PageClientImpl::didPerformDictionaryLookup):
  • UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController _animationControllerForText]):
  • WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::setTextIndicator const):
  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/FindController.cpp: (WebKit::FindController::updateFindIndicator):
  • WebCoreSupport/WebChromeClient.h:

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

6:02 PM Changeset in webkit [277469] by Russell Epstein
  • 6 edits
    2 copies in branches/safari-612.1.12-branch

Cherry-pick r277330. rdar://problem/77996680

Factor out find bounce layer
https://bugs.webkit.org/show_bug.cgi?id=225557

Reviewed by Tim Horton.

Factor out the text indicator bounce layer in preparation of making this
compatable with iOS.

No behavior change.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • page/mac/TextIndicatorWindow.h:
  • page/mac/TextIndicatorWindow.mm: (WebCore::TextIndicatorWindow::setAnimationProgress): (WebCore::TextIndicatorWindow::clearTextIndicator): (WebCore::TextIndicatorWindow::setTextIndicator): (WebCore::TextIndicatorWindow::closeWindow): (WebCore::TextIndicatorWindow::startFadeOut): (indicatorWantsBounce): Deleted. (indicatorWantsContentCrossfade): Deleted. (indicatorWantsFadeIn): Deleted. (indicatorWantsManualAnimation): Deleted. (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]): Deleted. (createBounceAnimation): Deleted. (createContentCrossfadeAnimation): Deleted. (createShadowFadeAnimation): Deleted. (createFadeInAnimation): Deleted. (-[WebTextIndicatorView _animationDuration]): Deleted. (-[WebTextIndicatorView hasCompletedAnimation]): Deleted. (-[WebTextIndicatorView present]): Deleted. (-[WebTextIndicatorView hideWithCompletionHandler:]): Deleted. (-[WebTextIndicatorView setAnimationProgress:]): Deleted. (-[WebTextIndicatorView isFlipped]): Deleted.

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

5:35 PM Changeset in webkit [277468] by dino@apple.com
  • 18 edits
    13 adds
    3 deletes in trunk

[WebXR] Allow WebXR to be tested on PLATFORM(COCOA)
https://bugs.webkit.org/show_bug.cgi?id=225578
<rdar://problem/77707283>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

New expected results.

  • web-platform-tests/webxr/exclusive_requestFrame_nolayer.https-expected.txt: Added.
  • web-platform-tests/webxr/render_state_vertical_fov_inline.https-expected.txt: Added.
  • web-platform-tests/webxr/webxr-supported-by-feature-policy-expected.txt: Added.
  • web-platform-tests/webxr/webxr_availability.http.sub-expected.txt: Added.
  • web-platform-tests/webxr/webxr_feature_policy.https-expected.txt: Added.
  • web-platform-tests/webxr/xrFrame_lifetime.https-expected.txt: Added.
  • web-platform-tests/webxr/xrPose_transform_sameObject.https-expected.txt: Added.
  • web-platform-tests/webxr/xrReferenceSpace_originOffsetBounded.https-expected.txt: Added.
  • web-platform-tests/webxr/xrSession_input_events_end.https-expected.txt: Added.
  • web-platform-tests/webxr/xrSession_visibilityState.https-expected.txt: Added.
  • web-platform-tests/webxr/xrStationaryReferenceSpace_floorlevel_updates.https-expected.txt: Added.
  • web-platform-tests/webxr/xrWebGLLayer_framebuffer_scale.https-expected.txt: Added.
  • web-platform-tests/webxr/xrWebGLLayer_opaque_framebuffer_stencil.https-expected.txt: Added.

Source/WebKit:

Remove checking for a WebXR feature flag.

  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultWebXREnabled):

Source/WTF:

Compile-time enabled on all Cocoa platforms.

  • wtf/PlatformEnableCocoa.h:

LayoutTests:

Remove the skip rule for the WebXR directory, and add more
specific expected results.

4:39 PM Changeset in webkit [277467] by Alan Coon
  • 1 copy in tags/Safari-612.1.12.7

Tag Safari-612.1.12.7.

4:35 PM Changeset in webkit [277466] by Alan Coon
  • 5 edits in branches/safari-612.1.12-branch/Source

Cherry-pick r277464. rdar://problem/77993046

Work around WebCore failing to build due to NDEBUG getting undefined in release
https://bugs.webkit.org/show_bug.cgi?id=225782
<rdar://problem/77982432>

Reviewed by Simon Fraser.

Source/WebCore/PAL:

  • pal/spi/cg/CoreGraphicsSPI.h:
  • pal/spi/ios/GraphicsServicesSPI.h: Apply a temporary workaround to preserve NDEBUG through these includes. There are a few ways to get to CoreGraphicsPrivate.h, so we fix all of them.

Source/WebKit:

  • Platform/spi/ios/UIKitSPI.h: Apply a temporary workaround to preserve NDEBUG through these includes. There are a few ways to get to CoreGraphicsPrivate.h, so we fix all of them.

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

4:31 PM Changeset in webkit [277465] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews] Style fixes in steps.py
https://bugs.webkit.org/show_bug.cgi?id=225784

Reviewed by Dewei Zhu.

  • CISupport/ews-build/steps.py:

(CheckOutSource.init):
(ShowIdentifier.hideStepIf):
(BugzillaMixin.get_bugzilla_api_key):
(RunJavaScriptCoreTests.commandComplete):
(AnalyzeJSCTestsResults.send_email_for_pre_existing_failure):
(AnalyzeLayoutTestsResults._report_flaky_tests):
(DownloadBuiltProduct):
(AnalyzeAPITestsResults.analyzeResults.getAPITestFailures):
(AnalyzeAPITestsResults.send_email_for_pre_existing_failure):

4:27 PM Changeset in webkit [277464] by timothy_horton@apple.com
  • 5 edits in trunk/Source

Work around WebCore failing to build due to NDEBUG getting undefined in release
https://bugs.webkit.org/show_bug.cgi?id=225782
<rdar://problem/77982432>

Reviewed by Simon Fraser.

Source/WebCore/PAL:

  • pal/spi/cg/CoreGraphicsSPI.h:
  • pal/spi/ios/GraphicsServicesSPI.h:

Apply a temporary workaround to preserve NDEBUG through these includes.
There are a few ways to get to CoreGraphicsPrivate.h, so we fix all of them.

Source/WebKit:

  • Platform/spi/ios/UIKitSPI.h:

Apply a temporary workaround to preserve NDEBUG through these includes.
There are a few ways to get to CoreGraphicsPrivate.h, so we fix all of them.

4:20 PM Changeset in webkit [277463] by Devin Rousso
  • 3 edits in trunk/Source/WebCore

[iOS] REGRESSION(r271216) pointerevents/ios/pointer-events-no-mousedown-when-prevent-default-called-on-pointerdown.html is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=225734
<rdar://problem/77070765>

Reviewed by Tim Horton.

r271216 made it so that touchWithIdentifierWasRemoved is eagerly called when dispatching
"pointerup" for a touch event. This is problematic because (compatibility) mouse events
are dispatched after both pointer and touch events, meaning that if the CapturingData for
the touch event is removed, there's no way of knowing if the pointer event preventDefault.

Instead of fully removing the CapturingData entirely, change its state such that it's
marked as CapturingData::State::Finished and check for that instead.

  • page/PointerCaptureController.h:
  • page/PointerCaptureController.cpp:

(WebCore::PointerCaptureController::hasCancelledPointerEventForIdentifier const):
(WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):
(WebCore::PointerCaptureController::pointerEventForMouseEvent):
(WebCore::PointerCaptureController::cancelPointer):

4:19 PM Changeset in webkit [277462] by Cameron McCormack
  • 3 edits
    2 adds in trunk

Ensure scrollable transformed elements that are themselves within scrollable elements don't ignore border-radius
https://bugs.webkit.org/show_bug.cgi?id=216978
<rdar://69660229>

Reviewed by Darin Adler.

Source/WebCore:

We use ShouldRespectOverflowClip to prevent clips from ancestors
from being used when we paint a scrollable layer (when
PaintLayerFlag::PaintingOverflowContents is set). We only look
at the ShouldRespectOverflowClip value when we're painting a layer
we're considering to be a clip rect root layer, and we unconditionally
apply ancestor clips for layers that aren't clip rect roots.

A non-root layer with a transform is handled by applying the transform
and painting the layer as a root layer (since we don't want to handle
computing the effect of ancestor clip rects past the transform). When
the transformed layer also has a border-radius, we incorrectly skip
marking its clip rect as being affected by radius, since we currently
do this at the same time as applying ancestor clip rects.

This patch splits out the setAffectedByRadius call so that it happens
even for transformed non-root layers.

Test: fast/layers/overflow-scroll-transform-border-radius.html

  • rendering/RenderLayer.cpp:

(WebCore::ClipRects::setOverflowClipRectAffectedByRadius):
(WebCore::RenderLayer::calculateClipRects const):

LayoutTests:

  • fast/layers/overflow-scroll-transform-border-radius-expected.html: Added.
  • fast/layers/overflow-scroll-transform-border-radius.html: Added.
4:16 PM Changeset in webkit [277461] by Russell Epstein
  • 4 edits in branches/safari-612.1.15-branch/Source

Apply patch. rdar://problem/77992162

4:16 PM Changeset in webkit [277460] by Chris Dumez
  • 2 edits in trunk/Tools

Tweak ServiceWorkers.SuspendServiceWorkerProcessBasedOnClientProcesses to find out source of timeout
https://bugs.webkit.org/show_bug.cgi?id=225770

Reviewed by Alexey Proskuryakov.

Wait for conditions with our own timeout so that the test fails with useful errors instead
of just a generic timeout. This just help us find out where in the test things go wrong.

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
4:11 PM Changeset in webkit [277459] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

[macOS] experimental "Use theme color for scroll area background" isn't working
https://bugs.webkit.org/show_bug.cgi?id=225726
<rdar://problem/77933000>

Reviewed by Tim Horton.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateLayerForOverhangAreasBackgroundColor):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
Fix last remaining m_layerForOverhangAreas->setBackgroundColor to use the helper function
RenderLayerCompositor::updateLayerForOverhangAreasBackgroundColor instead so that all
paths that update the overscroll area color check the experimental settings too.

4:03 PM Changeset in webkit [277458] by Russell Epstein
  • 1 copy in branches/safari-612.1.15-branch

New branch.

3:50 PM Changeset in webkit [277457] by Alan Coon
  • 1 copy in tags/Safari-612.1.14.1

Tag Safari-612.1.14.1.

3:49 PM Changeset in webkit [277456] by Alan Coon
  • 4 edits in branches/safari-612.1.14-branch/Source

Apply patch. rdar://problem/77990505

3:44 PM Changeset in webkit [277455] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[BigSur] media/video-played-ranges-1.html is flaky failure
https://bugs.webkit.org/show_bug.cgi?id=223645

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:39 PM Changeset in webkit [277454] by Alan Coon
  • 8 edits in branches/safari-612.1.14-branch/Source

Versioning.

WebKit-7612.1.14.1

2:57 PM Changeset in webkit [277453] by timothy_horton@apple.com
  • 35 edits in trunk/Source

Add textIndicator bounce for AppHighlights on scroll.
https://bugs.webkit.org/show_bug.cgi?id=225727

Reviewed by Tim Horton.

  • Modules/highlight/AppHighlightStorage.cpp:

(WebCore::AppHighlightStorage::attemptToRestoreHighlightAndScroll):

  • loader/EmptyClients.cpp:

(WebCore::EmptyChromeClient::setTextIndicator const):

  • loader/EmptyClients.h:
  • page/ChromeClient.h:
  • page/TextIndicator.h:
  • page/cocoa/WebTextIndicatorLayer.h:
  • page/cocoa/WebTextIndicatorLayer.mm:

(-[WebTextIndicatorLayer initWithFrame:textIndicator:margin:offset:]):
(createBounceAnimation):
(-[WebTextIndicatorLayer _animationDuration]):

  • page/mac/TextIndicatorWindow.h:
  • page/mac/TextIndicatorWindow.mm:

(WebCore::TextIndicatorWindow::~TextIndicatorWindow):
(WebCore::TextIndicatorWindow::clearTextIndicator):
(WebCore::TextIndicatorWindow::setTextIndicator):

Use factored out textIndicator code to add a bounce to an appHighlight
when it is scrolled to.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(-[WKWindowVisibilityObserver _dictionaryLookupPopoverWillClose:]):
(WebKit::WebViewImpl::setTextIndicator):
(WebKit::WebViewImpl::clearTextIndicatorWithAnimation):
(WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimationFromViewOnly):
(WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly):

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setTextIndicator):
(WebKit::WebPageProxy::clearTextIndicator):

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::setTextIndicator):
(WebKit::PageClientImpl::clearTextIndicator):
(WebKit::PageClientImpl::setTextIndicatorAnimationProgress):

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

(-[WKContentView setUpTextIndicator:]):
(-[WKContentView clearTextIndicator:]):
(-[WKContentView setTextIndicatorAnimationProgress:]):
(-[WKContentView teardownTextIndicatorLayer]):
(-[WKContentView startFadeOut]):

  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::setTextIndicator):
(WebKit::PageClientImpl::clearTextIndicator):
(WebKit::PageClientImpl::didPerformDictionaryLookup):

  • UIProcess/mac/WKImmediateActionController.mm:

(-[WKImmediateActionController _animationControllerForText]):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::setTextIndicator const):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/FindController.cpp:

(WebKit::FindController::updateFindIndicator):

  • WebCoreSupport/WebChromeClient.h:
2:53 PM Changeset in webkit [277452] by Aditya Keerthi
  • 5 edits
    2 adds in trunk

REGRESSION (r276945): [iOS] Focus rings are too large
https://bugs.webkit.org/show_bug.cgi?id=225778
<rdar://problem/77858341>

Reviewed by Tim Horton.

Source/WebCore:

r276945 updated scaling logic to ensure that the scale of the base CTM
matches the device scale factor. The change itself makes our base CTM
more correct, but exposed a longstanding bug with our focus ring
implementation.

Focus rings are drawn using CoreGraphics, using CGFocusRingStyle. On
macOS, the style is initialized using NSInitializeCGFocusRingStyleForTime.
However, on iOS, we initialize the style ourselves, using UIKit constants.
Currently, the focus ring's style's radius is set to
+[UIFocusRingStyle cornerRadius], a constant of 8. This is the longstanding
issue. CGFocusRingStyle's radius is not a corner radius, but is the
width of the focus ring. In UIKit, this width is represented by
+[UIFocusRingStyle borderThickness], a constant of 3. WebKit has always
intended to match this width, as evidenced by the default outline-width
of 3px in the UA style sheet.

Considering the large disparity between the existing and expected radius
value, it may be surprising that this mistake has gone unnoticed since
2019, when focus rings were first introduced on iOS. This is where r276945
comes into play. Prior to r276945, the scale of the base CTM did not match
the device scale factor. This meant that CG scaled down the constant of 8
to 4 CSS pixels (1 (base CTM) / 2 (device scale factor)). After r276945,
the two scales are equal and the focus ring is drawn as 8 CSS pixels, much
larger than the expected 3px.

Test: fast/forms/ios/focus-ring-size.html

  • platform/graphics/cocoa/GraphicsContextCocoa.mm:

(WebCore::drawFocusRingAtTime):

To fix, use the correct SPI to get the focus ring width,
+[UIFocusRingStyle borderThickness]. This ensures that focus rings have
the right width, following r276945.

The change also fixes focus ring repaint issues that arose from the
fact that the outline-width was 3px, but the painted width was 4px.

Source/WebCore/PAL:

  • pal/spi/ios/UIKitSPI.h:

LayoutTests:

Added a regression test to verify the size of the focus ring on iOS.
The test works by drawing an overlay on top of an input element, that
is just large enough to obscure the focus ring. If the focus ring is
too large, the ring will not obscured, leading to a mismatch failure.

  • fast/forms/ios/focus-ring-size-expected.html: Added.
  • fast/forms/ios/focus-ring-size.html: Added.
2:28 PM Changeset in webkit [277451] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Add unit test using WKHTTPCookieStoreObserver and cookies received from HTTP
https://bugs.webkit.org/show_bug.cgi?id=225773

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

We only had tests that added cookies through the API, not through the network.
I thought it was broken but it isn't. Still worth adding the test.

  • TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:

(deleteAllCookies):
(TEST):

1:54 PM Changeset in webkit [277450] by weinig@apple.com
  • 24 edits
    4 copies in trunk/Source

Split pixel buffer format data out into a new PixelBufferFormat struct
https://bugs.webkit.org/show_bug.cgi?id=225707

Reviewed by Darin Adler.

Source/WebCore:

Splits out PixelBufferFormat into a new struct and adopts it by PixelBufferConversionView,
ConstPixelBufferConversionView and PixelBuffer. This also means that PixelBuffer now
tracks the alpha format of the underlying buffer which will come in handy.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:

Add new files.

  • platform/graphics/AlphaPremultiplication.cpp: Added.

(WebCore::operator<<):
Add AlphaPremultiplication.cpp and move TextStream support
here from GraphicsTypes.cpp.

  • platform/graphics/GraphicsTypes.cpp:

Move AlphaPremultiplication TextStream to the more appropriate
AlphaPremultiplication.cpp.

  • html/ImageData.cpp:

(WebCore::ImageData::create):

  • html/ImageData.h:

(WebCore::ImageData::colorSpace const): Deleted.
(WebCore::ImageData::format const): Deleted.

  • platform/graphics/ImageBufferBackend.cpp:

(WebCore::ImageBufferBackend::toBGRAData const):
(WebCore::ImageBufferBackend::getPixelBuffer const):
(WebCore::ImageBufferBackend::putPixelBuffer):

  • platform/graphics/ImageBufferBackend.h:
  • platform/graphics/PixelBuffer.cpp:

(WebCore::PixelBuffer::computeBufferSize):
(WebCore::PixelBuffer::tryCreateForDecoding):
(WebCore::PixelBuffer::tryCreate):
(WebCore::PixelBuffer::PixelBuffer):
(WebCore::PixelBuffer::deepClone const):
(WebCore::operator<<):

  • platform/graphics/PixelBuffer.h:

(WebCore::PixelBuffer::format const):
(WebCore::PixelBuffer::encode const):
(WebCore::PixelBuffer::decode):
(WebCore::PixelBuffer::colorSpace const): Deleted.

  • platform/graphics/PixelBufferConversion.cpp:

(WebCore::convertImagePixelsAccelerated):
(WebCore::convertImagePixels):

  • platform/graphics/PixelBufferConversion.h:
  • platform/graphics/PixelBufferFormat.cpp: Added.

(WebCore::operator<<):

  • platform/graphics/PixelBufferFormat.h: Added.

(WebCore::PixelBufferFormat::encode const):
(WebCore::PixelBufferFormat::decode):

  • platform/graphics/PixelFormat.cpp: Added.

(WebCore::operator<<):

  • platform/graphics/PixelFormat.h:
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::readPixelsForPaintResults):

  • platform/graphics/cg/GraphicsContextGLCG.cpp:

(WebCore::GraphicsContextGLOpenGL::paintToCanvas):

  • platform/graphics/cg/ImageBufferCGBackend.cpp:

(WebCore::ImageBufferCGBackend::toCFData const):

  • platform/graphics/cg/ImageBufferUtilitiesCG.cpp:

(WebCore::cfData):

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::copyUnmultipliedResult):
(WebCore::FilterEffect::copyPremultipliedResult):
(WebCore::FilterEffect::createUnmultipliedImageResult):
(WebCore::FilterEffect::createPremultipliedImageResult):
Adopt PixelBufferFormat.

Source/WebKit:

  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:

Adopt PixelBufferFormat.

1:47 PM Changeset in webkit [277449] by Chris Dumez
  • 31 edits in trunk

Rename FileSystem::directoryName() to FileSystem::parentPath()
https://bugs.webkit.org/show_bug.cgi?id=225768

Reviewed by Darin Adler.

Rename FileSystem::directoryName() to FileSystem::parentPath() for clarity and
consistency with std::filesystem::parent_path() which is used internally.

Source/JavaScriptCore:

  • API/JSScript.mm:

(validateBytecodeCachePath):

Source/WebCore:

  • Modules/entriesapi/DOMFileSystem.cpp:

(WebCore::DOMFileSystem::DOMFileSystem):

  • loader/appcache/ApplicationCacheStorage.cpp:

(WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory):
(WebCore::ApplicationCacheStorage::checkForDeletedResources):

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

(WebCore::CDMSessionAVContentKeySession::contentKeySession):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::purgeOldDownloadFiles):

  • platform/network/curl/CookieJarDB.cpp:

(WebCore::CookieJarDB::openDatabase):

  • platform/sql/SQLiteFileSystem.cpp:

(WebCore::SQLiteFileSystem::ensureDatabaseFileExists):

  • platform/win/SearchPopupMenuDB.cpp:

(WebCore::SearchPopupMenuDB::openDatabase):

  • workers/service/server/SWScriptStorage.cpp:

(WebCore::SWScriptStorage::store):

Source/WebKit:

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::openITPDatabase):

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::writeFile):

  • Shared/glib/ProcessExecutablePathGLib.cpp:

(WebKit::getExecutablePath):

  • UIProcess/API/glib/IconDatabase.cpp:

(WebKit::IconDatabase::IconDatabase):

  • UIProcess/API/glib/WebKitWebsiteDataManager.cpp:

(webkit_website_data_manager_get_disk_cache_directory):

  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::bubblewrapSpawn):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::platformSetNetworkParameters):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):

Source/WebKitLegacy:

  • Storage/StorageTracker.cpp:

(WebKit::ensureDatabaseFileExists):

Source/WebKitLegacy/win:

  • Plugins/PluginDatabase.cpp:

(WebCore::PluginDatabase::loadPersistentMetadataCache):

Source/WTF:

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::readOrMakeSalt):
(WTF::FileSystemImpl::parentPath):
(WTF::FileSystemImpl::directoryName): Deleted.

  • wtf/FileSystem.h:

Tools:

  • DumpRenderTree/win/DumpRenderTree.cpp:

(findFontFallback):

  • TestWebKitAPI/Tests/WTF/FileSystem.cpp:

(TestWebKitAPI::TEST_F):

  • TestWebKitAPI/win/PlatformUtilitiesWin.cpp:

(TestWebKitAPI::Util::moduleDirectory):

1:08 PM Changeset in webkit [277448] by Chris Dumez
  • 20 edits in trunk

Rename FileSystem::fileIsDirectory(path, followSymlinks) to isDirectory(path) / isDirectoryFollowingSymlinks(path)
https://bugs.webkit.org/show_bug.cgi?id=225772

Reviewed by Darin Adler.

Source/JavaScriptCore:

Update code base due to API naming change.

  • API/JSScript.mm:

(validateBytecodeCachePath):

Source/WebCore:

Update code base due to API naming change.

  • Modules/entriesapi/DOMFileSystem.cpp:

(WebCore::listDirectoryWithMetadata):

  • editing/cocoa/WebContentReaderCocoa.mm:

(WebCore::attachmentForFilePath):

  • fileapi/File.cpp:

(WebCore::File::isDirectory const):

  • html/DirectoryFileListCreator.cpp:

(WebCore::gatherFileInformation):

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

(WebCore::CDMInstanceFairPlayStreamingAVFObjC::setStorageDirectory):

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

(WebCore::ensureAssetCacheExistsForPath):

  • platform/network/FormData.cpp:

(WebCore::FormData::prepareForUpload):

Source/WebKit:

Update code base due to API naming change.

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::getDirectorySize):
(WebKit::CacheStorage::Engine::getDirectories):
(WebKit::CacheStorage::Engine::clearAllCachesFromDisk):

  • NetworkProcess/cache/NetworkCacheFileSystem.cpp:

(WebKit::NetworkCache::traverseDirectory):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::isInternalInstall):

Source/WTF:

I don't think the "file" prefix is useful here so I am renaming the function to
isDirectory(). Also, instead of using an enum parameter to decide whether or
not to follow symlink, I am adding a separate function called
isDirectoryFollowingSymlinks(). This is consistent with the
fileMetadata() / fileMetadataFollowingSymlinks() pattern, which Darin said he
preferred.

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::isDirectory):
(WTF::FileSystemImpl::isDirectoryFollowingSymlinks):
(WTF::FileSystemImpl::fileIsDirectory): Deleted.

  • wtf/FileSystem.h:

Tools:

Update code base due to API naming change.

  • TestWebKitAPI/Tests/WTF/FileSystem.cpp:

(TestWebKitAPI::TEST_F):

12:45 PM Changeset in webkit [277447] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Process suspension may be delayed by up to 5 seconds after there is no longer any database activity
https://bugs.webkit.org/show_bug.cgi?id=225774

Reviewed by Geoffrey Garen.

Use a 1 second HysteresisActivity in WebSQLiteDatabaseTracker instead of a 5 seconds one.
I frequently see our processes' suspension getting delayed by 5 seconds when homing out of
MobileSafari due to database activity. This change should help with that.

  • Shared/WebSQLiteDatabaseTracker.cpp:

(WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):

12:43 PM Changeset in webkit [277446] by Chris Dumez
  • 7 edits in trunk

Introduce FileSystem::hardLinkCount()
https://bugs.webkit.org/show_bug.cgi?id=225767

Reviewed by Darin Adler.

Source/WebKit:

Leverage the FileSystem API instead of having platform-specific code.

  • NetworkProcess/cache/NetworkCacheBlobStorage.cpp:

(WebKit::NetworkCache::BlobStorage::synchronize):
(WebKit::NetworkCache::BlobStorage::shareCount):

Source/WTF:

Introduce FileSystem::hardLinkCount() to replace our platform-specific implementation
in NetworkCacheBlobStorage.

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::hardLinkCount):

  • wtf/FileSystem.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WTF/FileSystem.cpp:

(TestWebKitAPI::TEST_F):

12:38 PM Changeset in webkit [277445] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[MacOS Wk1] media/video-playback-quality.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=223770

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
12:23 PM Changeset in webkit [277444] by Jonathan Bedard
  • 4 edits in trunk/Tools

[run-api-tests] Use Python 3 (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=225427
<rdar://problem/77584713>

Reviewed by Aakash Jain.

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

(RunAPITests): Use Python3 to invoke run-api-tests.

  • CISupport/ews-build/steps.py:

(RunAPITests): Use Python3 to invoke run-api-tests.

  • CISupport/ews-build/steps_unittest.py:
11:48 AM Changeset in webkit [277443] by Robert Jenner
  • 3 edits in trunk/LayoutTests

[ BigSur iOS14 ] http/tests/xmlhttprequest/redirect-cross-origin-tripmine.html (layout-test) is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=225668

Unreviewed test gardening.

Marking as slow to see if timeouts stop occurring.

  • platform/ios-simulator-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
11:23 AM Changeset in webkit [277442] by jer.noble@apple.com
  • 4 edits in trunk

[ macOS Wk2 ] media/media-fragments/TC0051.html is flakey crashing
https://bugs.webkit.org/show_bug.cgi?id=222277
<rdar://problem/74600790>

Reviewed by Eric Carlson.

Source/WebCore:

In r274734, a workaround was added to detect a bug in the Photos.framework that would cause
an exception to be thrown if the URL provided to AVURLAsset had a malformed fragment identifier.
However, in an effort to reduce the runtime cost of this check, it was only done once, the first
time an AVURLAsset is created. This failed to account for the Photos.framework being dynamically
loaded and changing the behavior of AVURLAsset after the check had been performed.

Instead, fall back to a much simpler check: wrap the creation of the AVURLAsset in a @try/@catch
block, and if an exception was thrown, re-attempt to create the AVURLAsset with a manually
conformed URL.

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

(WebCore::conformFragmentIdentifierForURL):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
(WebCore::hasBrokenFragmentSupport): Deleted.

LayoutTests:

  • platform/mac-wk2/TestExpectations:
11:16 AM Changeset in webkit [277441] by Robert Jenner
  • 3 edits in trunk/LayoutTests

[ Catalina+ wk2 ] http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html (layout-test) is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=225667

Unreviewed test gardening.

Accidentally broke a test when I applied it for all of mac instead of just for mac wk2. I have updated the slow expectation for just mac wk2.

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
10:36 AM Changeset in webkit [277440] by Jonathan Bedard
  • 4 edits in trunk/Tools

Few webkitpy unit-tests fails in non-PST timezones
https://bugs.webkit.org/show_bug.cgi?id=225741

Reviewed by Aakash Jain.

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py:
  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/svn.py: Ditto.

(Svn.request): Serve SVN content from California time (like our SVN server)

10:35 AM Changeset in webkit [277439] by weinig@apple.com
  • 2 edits in trunk/Source/WebKit

CGDisplayList debug configuration fails to build
https://bugs.webkit.org/show_bug.cgi?id=225729

Reviewed by Darin Adler.

  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:

(WebKit::nameForBackingStoreType):
Add missing case for RemoteLayerBackingStore::Type::CGDisplayList.

10:03 AM Changeset in webkit [277438] by aboya@igalia.com
  • 6 edits in trunk/Source

[WTF] Add holdLock() overload for WTF::DataMutex
https://bugs.webkit.org/show_bug.cgi?id=225652

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

All instantiations of DataMutex::LockedWrapper have been replaced by
holdLock(), for equivalent but more concise code.

This patch introduces no behavior changes.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webKitWebSrcConstructed):
(webKitWebSrcGetProperty):
(webKitWebSrcSetContext):
(webKitWebSrcCreate):
(webKitWebSrcMakeRequest):
(webKitWebSrcStop):
(webKitWebSrcGetSize):
(webKitWebSrcIsSeekable):
(webKitWebSrcDoSeek):
(webKitWebSrcQuery):
(webKitWebSrcUnLock):
(webKitWebSrcUnLockStop):
(webKitWebSrcSetMediaPlayer):
(webKitSrcPassedCORSAccessCheck):
(CachedResourceStreamingClient::responseReceived):
(CachedResourceStreamingClient::dataReceived):
(CachedResourceStreamingClient::accessControlCheckFailed):
(CachedResourceStreamingClient::loadFailed):
(CachedResourceStreamingClient::loadFinished):
(webKitSrcWouldTaintOrigin):

  • platform/graphics/gstreamer/mse/MediaSourceTrackGStreamer.cpp:

(WebCore::MediaSourceTrackGStreamer::isReadyForMoreSamples):
(WebCore::MediaSourceTrackGStreamer::notifyWhenReadyForMoreSamples):
(WebCore::MediaSourceTrackGStreamer::enqueueObject):
(WebCore::MediaSourceTrackGStreamer::clearQueue):

  • platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:

(webKitMediaSrcActivateMode):
(webKitMediaSrcPadLinked):
(webKitMediaSrcLoop):
(webKitMediaSrcStreamFlush):

Source/WTF:

This patch adds a holdLock() overload for WTF::DataMutex as syntactic
sugar to simplify usage in a similar way to what holdLock() already
does for WTF::Locker.

  • wtf/DataMutex.h:

(WTF::holdLock):

9:18 AM Changeset in webkit [277437] by Darin Adler
  • 58 edits in trunk

Remove StringBuilder::appendNumber
https://bugs.webkit.org/show_bug.cgi?id=225732

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • API/JSContextRef.cpp:

(BacktraceFunctor::operator() const): Use append instead of appendNumber.

  • API/tests/PingPongStackOverflowTest.cpp:

(PingPongStackOverflowObject_hasInstance): Ditto.

  • heap/HeapSnapshotBuilder.cpp:

(JSC::HeapSnapshotBuilder::json): Ditto.

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::Frame::toString const): Use makeString instead of StringBuilder.

  • runtime/ConsoleClient.cpp:

(JSC::appendURLAndPosition): Ditto.
(JSC::ConsoleClient::printConsoleMessageWithArguments): Use append instead of appendNumber.

  • runtime/JSONObject.cpp:

(JSC::Stringifier::appendStringifiedValue): Ditto.

  • runtime/Options.cpp:

(JSC::OptionReader::Option::dump const): Ditto.

  • runtime/StackFrame.cpp:

(JSC::StackFrame::toString const): Use makeString instead of StringBuilder.

Source/WebCore:

  • Modules/indexeddb/server/IndexValueStore.cpp:

(WebCore::IDBServer::IndexValueStore::loggingString const):
Use append instead of appendNumber.

  • Modules/websockets/WebSocketHandshake.cpp:

(WebCore::hostName): Use makeString instead of StringBuilder.

  • contentextensions/CombinedURLFilters.cpp:

(WebCore::ContentExtensions::prefixTreeVertexToString):
Use append instead of appendNumber.

  • contentextensions/Term.h:

(WebCore::ContentExtensions::Term::toString const): Ditto.

  • css/CSSFontFeatureValue.cpp:

(WebCore::CSSFontFeatureValue::customCSSText const): Ditto.

  • css/CSSTimingFunctionValue.cpp:

(WebCore::CSSStepsTimingFunctionValue::customCSSText const): Ditto.

  • dom/Document.cpp:

(WebCore::Document::downgradeReferrerToRegistrableDomain): Use
makeString instead of StringBuilder.

  • editing/MarkupAccumulator.cpp:

(WebCore::MarkupAccumulator::generateUniquePrefix): Ditto.

  • editing/cocoa/DataDetection.mm:

(WebCore::dataDetectorStringForPath): Use append instead of appendNumber.

  • html/HTMLAnchorElement.cpp:

(WebCore::appendServerMapMousePosition): Ditto.

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::createContext2d): Use makeString
instead of StringBuilder.
(WebCore::HTMLCanvasElement::createImageBuffer const): Ditto.

  • loader/ResourceLoadStatistics.cpp:

(WebCore::ResourceLoadStatistics::toString const): Use append instead
of appendNumber.

  • loader/SubresourceIntegrity.cpp:

(WebCore::integrityMismatchDescription): Use makeString instead of
StringBuilder.

  • page/IntersectionObserver.cpp:

(WebCore::IntersectionObserver::rootMargin const): Use append instead
of appendNumber.

  • page/SecurityOriginData.cpp:

(WebCore::SecurityOriginData::databaseIdentifier const): Use makeString
instead of StringBuilder.

  • platform/Decimal.cpp:

(WebCore::Decimal::toString const): Use append instead of appendNumber.

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::animationNameForTransition): Use makeString
instead of StringBuilder.

  • platform/graphics/ca/TileController.cpp:

(WebCore::TileController::createTileLayer): Ditto.

  • platform/graphics/ca/win/PlatformCALayerWin.cpp:

(printTransform): Use single append instead of a run of them.
(printLayer): Ditto, and use append instead of apppendNumber.
(PlatformCALayerWin::layerTreeAsString const): Ditto.

  • platform/mediarecorder/MediaRecorderPrivateMock.cpp:

(WebCore::MediaRecorderPrivateMock::generateMockCounterString):
Use append instead of appendNumber.

  • platform/network/ProxyServer.cpp:

(WebCore::appendProxyServerString): Ditto.

  • rendering/RenderTreeAsText.cpp:

(WebCore::nodePosition): Ditto.

  • svg/SVGPathUtilities.cpp:

(WebCore::buildStringFromPath): Ditto.

  • testing/Internals.cpp:

(WebCore::Internals::parserMetaData): Use makeString instead of
StringBuilder.
(WebCore::appendOffsets): Use append instead of appendNumber.

  • testing/MockPageOverlayClient.cpp:

(WebCore::MockPageOverlayClient::drawRect): Use makeString instead
of StringBuilder.
(WebCore::MockPageOverlayClient::mouseEvent): Ditto.

  • xml/XMLErrors.cpp:

(WebCore::XMLErrors::appendErrorMessage): Use append instead of
appendNumber.

Source/WebDriver:

  • SessionHost.cpp:

(WebDriver::SessionHost::sendCommandToBackend): Use append instead
of appendNumber.

  • socket/HTTPServerSocket.cpp:

(WebDriver::HTTPRequestHandler::packHTTPMessage const): Ditto.

Source/WebKit:

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::buildList): Use append instead of appendNumber.
(WebKit::ResourceLoadStatisticsDatabaseStore::findNotVeryPrevalentResources): Ditto.
(WebKit::ResourceLoadStatisticsDatabaseStore::resourceToString const): Ditto.
(WebKit::ResourceLoadStatisticsDatabaseStore::attributionToString): Ditto.
(WebKit::ResourceLoadStatisticsDatabaseStore::privateClickMeasurementToString): Ditto.

  • Shared/WebMemorySampler.cpp:

(WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile): Ditto.

  • UIProcess/API/glib/WebKitWebView.cpp:

(webkitWebViewRunJavaScriptCallback): Ditto.

  • UIProcess/WebBackForwardList.cpp:

(WebKit::WebBackForwardList::loggingString): Ditto.

  • WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:

(PageResourceLoadClient::didReceiveResponseForResource): Use makeString instead
of StringBuilder.

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::buildHTTPHeaders): Use append instead of appendNumber.

Source/WebKitLegacy/win:

  • WebKitStatistics.cpp:

(WebKitStatistics::comClassNameCounts): Use append instead of
appendNumber.

Source/WTF:

We originally added StringBuilder::appendNumber to resolve the ambiguity
between UChar and uint16_t, but that problem was solved long ago and it
is safe to use StringBuilder::append, including the variadic form, on all
types of numbers and we'll get the same results we did with appendNumber.

  • wtf/JSONValues.cpp:

(WTF::JSONImpl::Value::writeJSON const): Use append instead of appendNumber.

  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::appendNumber): Deleted.

  • wtf/text/StringBuilder.h: Removed appendNumber.
  • wtf/text/TextStream.cpp:

(WTF::TextStream::operator<<): Use append instead of appendNumber.

Tools:

  • TestWebKitAPI/Tests/WTF/StringBuilder.cpp:

Test append with a number instead of appendNumber.

  • TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp:

Use append instead of appendNumber.

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::dumpResponseDescriptionSuitableForTestResult): Use append instead
of appendNumber.
(WTR::dumpFrameScrollPosition): Ditto.
(WTR::InjectedBundlePage::didFinishDocumentLoadForFrame): Use makeString
instead of StringBuilder.
(WTR::InjectedBundlePage::shouldCacheResponse): Ditto.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::attributesOfElement): Use append instead of appendNumber.
(WTR::AccessibilityUIElement::attributedStringForRange): Ditto.
(WTR::stringAtOffset): Ditto.

9:01 AM Changeset in webkit [277436] by Lauro Moura
  • 2 edits in trunk/Tools/buildstream

[Flatpak SDK] Update WPEBackend-fdo to 1.8.4
https://bugs.webkit.org/show_bug.cgi?id=225735

Reviewed by Adrian Perez de Castro.

  • elements/sdk/wpebackend-fdo.bst:
8:00 AM Changeset in webkit [277435] by Alan Bujtas
  • 3 edits
    4 adds in trunk

[css-flexbox] Flex item construction may affect sibling flex item height computation
https://bugs.webkit.org/show_bug.cgi?id=225489

Reviewed by Sergio Villar Senin.

Source/WebCore:

Flex item construction triggers layout both on the flex item and on its descendants (see constructFlexItem).
During this layout a percent height descendant may indirectly set an incorrect value on the flex container's
m_hasDefiniteHeight (this is due to the odd way we choose to resolve percent height values on the ancestor chain,
see setOverridingContainingBlockContentLogicalHeight(WTF::nullopt)).
Now this incorrect m_hasDefiniteHeight value (Indefinite) causes the next sibling's (also) percent height
resolve fail as it tells the flex item that the flex container can't help with resolving the percent height value.
As the result we end up with an incorrect, 0px height value for this sibling.
e.g.
<div style="height: 100px; display: flex; flex-direction: column;">

<div id=flexItemA style="height: 50px;"><div style="height: 100%;"></div></div>
<div id=flexItemB style="height: 50%;"></div>

</div>
By the time we get to the construction of flexItemB, the RenderFlexibleBox's (flex container) m_hasDefiniteHeight
is already (and incorrectly) set to Indefinite as the result of us trying to resolve flexItemA's descendant height percentage.
This Indefinite value makes the flexItemB's height resolution fail as we believe that the flex container has indefinite height
e.g "height: auto", while it is clearly resolvable (50% of 100px).
Now if we flip the order and flexItemB comes first, the test case passes fine.
It is very unfortunate that some descendant height resolving process can trigger a state change on the ancestor RenderFlexibleBox, but
fixing it would certainly require some substantial architectural change.
In this patch, we just reset the m_hasDefiniteHeight flag inside the loop to ensure that each flex item
starts with a fresh height percent resolve state.

Test: fast/flexbox/flex-column-with-percent-height-descendants.html

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::layoutFlexItems):

LayoutTests:

  • fast/flexbox/flex-column-with-percent-height-descendants-expected.html: Added.
  • fast/flexbox/flex-column-with-percent-height-descendants.html: Added.
7:30 AM Changeset in webkit [277434] by Chris Fleizach
  • 5 edits
    2 adds in trunk

AX: Crash at WebCore::Document::updateLayout
https://bugs.webkit.org/show_bug.cgi?id=225677

Reviewed by Alan Bujtas.

Source/WebCore:

Handling notifications while during layout is risky because we can call back into an update method.
We have handled many other cases like this by deferring the notification, as we do here.
Special note: this test can't be made to crash because actual crash requires the accessibility
runtime to be initialized and posting real notifications to the system. But, we can verify that the
notification is still sent correctly under conditions that could lead to a crash.

Test: accessibility/mac/menu-selection-notification-crash.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::deferMenuListValueChange):
(WebCore::AXObjectCache::performDeferredCacheUpdate):

  • accessibility/AXObjectCache.h:
  • accessibility/AccessibilityMenuList.cpp:

(WebCore::AccessibilityMenuList::didUpdateActiveOption):

LayoutTests:

  • accessibility/mac/menu-selection-notification-crash-expected.txt: Added.
  • accessibility/mac/menu-selection-notification-crash.html: Added.
7:12 AM Changeset in webkit [277433] by Peng Liu
  • 5 edits in trunk/Source/WebKit

Subtitles in Safari fail to appear after switching language
https://bugs.webkit.org/show_bug.cgi?id=225738

Reviewed by Jer Noble.

TextTrackPrivateRemote::setMode() calls InbandTextTrackPrivate::setMode(), but
it does not set the value of TextTrackPrivateRemote::mode properly. Therefore,
TextTrackPrivateRemote::mode will always be Disabled. When we switch text track
in the WebContent process side, we will only send the IPC message TextTrackSetMode
to RemoteMediaPlayerProxy in the GPU process to change the mode from Disabled
to Showing, but cannot change its value back to Disabled. When a user keeps
switching text track, all text tracks in the GPU process will become Showing,
and MediaPlayerPrivateAVFoundation cannot deal with that. As a result,
the WebContent process won't get the correct subtitles from the GPU process.
cueFormat() has the similar issue, it does not impact the functionality though.

Actually, TextTrackPrivateRemote can simply use the implementations of its
base class InbandTextTrackPrivate regarding mode and cue format.

In addition, TextTrackPrivateRemote does not need to get the "mode" value from
RemoteTextTrackProxy in the GPU process. So this patch removes the mode attribute
of TextTrackPrivateRemoteConfiguration.

  • GPUProcess/media/RemoteTextTrackProxy.cpp:

(WebKit::RemoteTextTrackProxy::configuration):

  • GPUProcess/media/TextTrackPrivateRemoteConfiguration.h:

(WebKit::TextTrackPrivateRemoteConfiguration::encode const):
(WebKit::TextTrackPrivateRemoteConfiguration::decode):

  • WebProcess/GPU/media/TextTrackPrivateRemote.cpp:

(WebKit::TextTrackPrivateRemote::setMode):
(WebKit::TextTrackPrivateRemote::updateConfiguration):

  • WebProcess/GPU/media/TextTrackPrivateRemote.h:
6:54 AM Changeset in webkit [277432] by eocanha@igalia.com
  • 4 edits in trunk

[GStreamer] media/track/in-band/track-in-band-srt-mkv-kind.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=225697

Source/WebCore:

This is a tentative fix for the flaky crash (I can't reproduce it locally after 10000
repetitions). It makes sure that mediaPlayerPrivate and any parameter passed to
handleTextSample() can either survive or detected to be invalid when the lambda is ran in
the main thread.

Reviewed by Alicia Boya Garcia.

Covered by existing tests.

  • platform/graphics/gstreamer/TextSinkGStreamer.cpp:

(webkitTextSinkHandleSample): Protect mediaPlayerPrivate and streadId and check if the mediaPlayerPrivate WeakRef is still alive.

LayoutTests:

Reviewed by Alicia Boya Garcia.

  • platform/glib/TestExpectations: Unskipped test.
4:57 AM Changeset in webkit [277431] by dbezhetskov
  • 2 edits in trunk/Tools

Add dbezhetskov as a commiter
https://bugs.webkit.org/show_bug.cgi?id=225742

Reviewed by Caio Araujo Neponoceno de Lima.

  • Scripts/webkitpy/common/config/contributors.json:
4:10 AM Changeset in webkit [277430] by Martin Robinson
  • 17 edits
    18 adds in trunk/LayoutTests

Import new and updated css-scroll-snap WPT tests
https://bugs.webkit.org/show_bug.cgi?id=225653

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

  • resources/import-expectations.json:
  • web-platform-tests/css/css-scroll-snap/input/keyboard-expected.txt:
  • web-platform-tests/css/css-scroll-snap/input/keyboard.html:
  • web-platform-tests/css/css-scroll-snap/nested-scrollIntoView-snaps-expected.txt:
  • web-platform-tests/css/css-scroll-snap/nested-scrollIntoView-snaps.html:
  • web-platform-tests/css/css-scroll-snap/scroll-margin-visibility-check-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-margin-visibility-check.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-padding-and-margin-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-padding-and-margin.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-snap-root-001-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-snap-root-001.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-snap-root-002-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-snap-root-002.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-snap-root-003-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-snap-root-003.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/direction-rtl.html:
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/scroll-snap-initial-layout-000-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/scroll-snap-initial-layout-000.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/scroll-snap-writing-mode-000-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/scroll-snap-writing-mode-000.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/w3c-import.log:
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-horizontal-tb.html:
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-vertical-lr.html:
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-vertical-rl.html:
  • web-platform-tests/css/css-scroll-snap/snap-after-relayout/resnap-to-focused-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-relayout/resnap-to-focused.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-relayout/w3c-import.log:
  • web-platform-tests/css/css-scroll-snap/snap-at-user-scroll-end-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/snap-at-user-scroll-end.html: Added.
  • web-platform-tests/css/css-scroll-snap/support/common.js:

(async keyPress):

  • web-platform-tests/css/css-scroll-snap/w3c-import.log:

LayoutTests:

3:39 AM Changeset in webkit [277429] by timothy_horton@apple.com
  • 2 edits in trunk/Tools

ResizeReversePaginatedWebView fails on some OS versions on some hardware
https://bugs.webkit.org/show_bug.cgi?id=224699
<rdar://76782199>

Reviewed by Megan Gardner.

  • TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp:

(TestWebKitAPI::didLayout):
This test does *not* care about the specific number of pages that are
generated; the key to the test is the scroll position check.

Since the page-count check in this test has caused lots of trouble
in the past (see the history) just remove it and replace it with a
check that we ended up paginated at all.

2:53 AM Changeset in webkit [277428] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

REGRESSION(r277262): test imported/w3c/web-platform-tests/css/selectors/focus-visible-002.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=225659

Reviewed by Adrian Perez de Castro.

Do not try to grab focus on WebView widget for synthesized mouse press and release events if the widget has
already the focus or is not the current toplevel focus widget.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseSynthesizeMouseEvent):

2:49 AM Changeset in webkit [277427] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit

Unreviewed, reverting r277258.
https://bugs.webkit.org/show_bug.cgi?id=225740

Caused layout test failures

Reverted changeset:

"[GTK] Use always async scrolling in accelerated compositing
mode"
https://bugs.webkit.org/show_bug.cgi?id=225512
https://trac.webkit.org/changeset/277258

1:00 AM Changeset in webkit [277426] by Carlos Garcia Campos
  • 5 edits in trunk/Source/WebKit

[GTK][WPE] Add ArgumentCoder for GTlsCertificate
https://bugs.webkit.org/show_bug.cgi?id=225509

Reviewed by Adrian Perez de Castro.

Move the GTlsCertificate serialization from CertificateInfo ArgumentCoder to its own.

  • Shared/glib/ArgumentCodersGLib.cpp:

(IPC::ArgumentCoder<GRefPtr<GVariant>>::encode):
(IPC::ArgumentCoder<GRefPtr<GVariant>>::decode):
(IPC::ArgumentCoder<GRefPtr<GTlsCertificate>>::encode):
(IPC::ArgumentCoder<GRefPtr<GTlsCertificate>>::decode):
(IPC::encode): Deleted.
(IPC::decode): Deleted.

  • Shared/glib/ArgumentCodersGLib.h:
  • Shared/glib/UserMessage.cpp:

(WebKit::UserMessage::encode const):
(WebKit::UserMessage::decode):

  • Shared/soup/WebCoreArgumentCodersSoup.cpp:

(IPC::ArgumentCoder<CertificateInfo>::encode):
(IPC::ArgumentCoder<CertificateInfo>::decode):

May 12, 2021:

11:45 PM Changeset in webkit [277425] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

RELEASE_ASSERT(m_selection->isNone()) fails in Document::removedLastRef
https://bugs.webkit.org/show_bug.cgi?id=225434

Patch by Frederic Wang <fwang@igalia.com> on 2021-05-12
Reviewed by Ryosuke Niwa.

Document::removedLastRef asserts that the document's selection is not set. However, setting
that selection is possible in FrameSelection::setSelectionWithoutUpdatingAppearance when the
document has not been destroyed yet but is already detached from its frame. This patch
instead clears the selection in that case.

No new tests.

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance): Clears the selection when
newSelection is in a detached document. Given the other conditions, this is actually
checking equivalent to !m_document->frame().

10:37 PM Changeset in webkit [277424] by Peng Liu
  • 6 edits in trunk/Source/WebCore

[iPad] SourceBufferPrivateAVFObjC should not report an error to the web page when the video playback is interrupted
https://bugs.webkit.org/show_bug.cgi?id=225620

Reviewed by Jer Noble.

If SourceBufferPrivateAVFObjC reports an error to a web page when
AVSampleBufferDisplayLayer reports AVErrorOperationInterrupted (the playback
was interrupted), the web page will likely destroy the video player (and teardown
the video element). That behavior will lead to an empty picture-in-picture window
if the video was playing in picture-in-picture.

With this patch, SourceBufferPrivateAVFObjC will not report an error to the
web page in case of playback interruption. Instead, it takes a note that
the playback was interrupted, so that when we try to resume the playback later,
it will flush the AVSampleBufferDisplayLayer to recover the playback state.

In addition, we need to enqueue an IDR frame first before we enqueue more
samples after flushing the AVSampleBufferDisplayLayer. That is guaranteed
by SourceBufferPrivate::reenqueSamples().

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):

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

(WebCore::MediaSourcePrivateAVFObjC::flushActiveSourceBuffersIfNeeded):

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

(WebCore::SourceBufferPrivateAVFObjC::flushIfNeeded):
(WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError):
(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples):

10:36 PM Changeset in webkit [277423] by Russell Epstein
  • 8 edits in branches/safari-612.1.12-branch/Source

Versioning.

WebKit-7612.1.12.7

10:05 PM Changeset in webkit [277422] by Russell Epstein
  • 1 copy in tags/Safari-612.1.12.6

Tag Safari-612.1.12.6.

10:03 PM Changeset in webkit [277421] by Simon Fraser
  • 1 edit in trunk/Tools/ChangeLog

Update the MotionMark 1.1 plan file

Unreviewed.

Update MotionMark 1.1 to use the version from r277406, which removes the
Focus subtest.

  • Scripts/webkitpy/benchmark_runner/data/plans/motionmark1.1.plan:
10:02 PM Changeset in webkit [277420] by Chris Dumez
  • 19 edits
    2 adds
    2 deletes in trunk

Notification.requestPermission() should return a Promise
https://bugs.webkit.org/show_bug.cgi?id=225712

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Drop manual test that should not have been imported from WPT. The test happened to be using Notification.requestPermission()
internally.

  • web-platform-tests/service-workers/service-worker/fetch-event-within-sw-manual.https-expected.txt: Removed.
  • web-platform-tests/service-workers/service-worker/fetch-event-within-sw-manual.https.html: Removed.

Source/WebCore:

Notification.requestPermission() should return a Promise as per the specification:

Both Firefox and Chrome already support this.

Test: http/tests/notifications/request-with-promise.html

  • Modules/notifications/Notification.cpp:

(WebCore::Notification::requestPermission):

  • Modules/notifications/Notification.h:
  • Modules/notifications/Notification.idl:
  • Modules/notifications/NotificationClient.h:

Source/WebKit:

Update code now that WebCore passes a CompletionHandler instead of a
NotificationPermissionCallback.

  • WebProcess/Notifications/NotificationPermissionRequestManager.cpp:

(WebKit::NotificationPermissionRequestManager::~NotificationPermissionRequestManager):
(WebKit::NotificationPermissionRequestManager::startRequest):

  • WebProcess/Notifications/NotificationPermissionRequestManager.h:
  • WebProcess/WebCoreSupport/WebNotificationClient.cpp:

(WebKit::WebNotificationClient::requestPermission):

  • WebProcess/WebCoreSupport/WebNotificationClient.h:

Source/WebKitLegacy/mac:

Update code now that WebCore passes a CompletionHandler instead of a
NotificationPermissionCallback.

  • WebCoreSupport/WebNotificationClient.h:
  • WebCoreSupport/WebNotificationClient.mm:

(WebNotificationClient::requestPermission):
(-[WebNotificationPolicyListener initWithCompletionHandler:]):
(-[WebNotificationPolicyListener allow]):
(-[WebNotificationPolicyListener deny]):

Source/WebKitLegacy/win:

Update code now that WebCore passes a CompletionHandler instead of a
NotificationPermissionCallback.

  • WebCoreSupport/WebDesktopNotificationsDelegate.cpp:

(WebDesktopNotificationsDelegate::requestPermission):

  • WebCoreSupport/WebDesktopNotificationsDelegate.h:

LayoutTests:

  • http/tests/notifications/notification-in-non-secure-context-expected.txt:

Rebaseline test now that we log an error message in the JS console when trying to call
Notification.requestPermission() in a non-secure context.

  • http/tests/notifications/request-with-promise-expected.txt: Added.
  • http/tests/notifications/request-with-promise.html: Added.

Add layout test coverage.

8:46 PM Changeset in webkit [277419] by Diego Pino Garcia
  • 2 edits
    3 adds in trunk/LayoutTests

[GLIB] http/tests/security/contentSecurityPolicy/report-only-from-header.py is a flaky text failure

Unreviewed test gardening.

Sometimes there's an extra console log error message. Dump all JS console output and emit new baseline.

  • platform/glib/TestExpectations:
  • platform/glib/http/tests/security/contentSecurityPolicy/report-only-from-header-expected.txt: Added.
7:59 PM Changeset in webkit [277418] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

Some webgl/2.0.0/conformance/textures/image_bitmap_from_image_data tests are failing after r277369 if !USE(ACCELERATE)
https://bugs.webkit.org/show_bug.cgi?id=225725

Reviewed by Sam Weinig.

  • platform/graphics/PixelBufferConversion.cpp:

(WebCore::convertImagePixels): Fixed the wrong condition of destination.alphaFormat.

7:35 PM Changeset in webkit [277417] by Fujii Hironori
  • 2 edits in trunk/Source/WebKit

[WinCairo] Failed to open WebInspector UI since r277231
https://bugs.webkit.org/show_bug.cgi?id=225715

Reviewed by Don Olmstead.

Windows WebKit2 failed to open WebInspector UI after r277231
changed Filesystem::pathByAppendingComponent.
"inspector-resource:///Main.html" was wrongly mapped to
"C:
Main.html".

requestURL.fileSystemPath() returns "\Main.html". The preceding
"\" should be removed before concatenating it with the bundle path
by using FileSystem::pathByAppendingComponent.

  • UIProcess/Inspector/win/InspectorResourceURLSchemeHandler.cpp:

(WebKit::InspectorResourceURLSchemeHandler::platformStartTask): Removed the preceding "\".

6:13 PM Changeset in webkit [277416] by Brent Fulgham
  • 9 edits in trunk/Source/WebKit

[Cocoa] Permit sysctl-read operations needed by Metal and other system frameworks
https://bugs.webkit.org/show_bug.cgi?id=225720
<rdar://problem/77438105>

Reviewed by Per Arne Vollan.

Further testing of iOS and macOS have revealed a handful of sysctl-read operations we should allow to improve
performance and correctness of OpenGL/Metal and other high-performance math routines.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
5:36 PM Changeset in webkit [277415] by Kyle Piddington
  • 2 edits in trunk/Source/ThirdParty/ANGLE

[Angle METAL] Remove thread qualifiers and pass-by-reference qualifiers for cast functions
https://bugs.webkit.org/show_bug.cgi?id=225702
<rdar://76799461>

Cast functions fail to compile when casting from user uniforms. Update cast functions to remove pass-by-reference
qualifiers.

Reviewed by Dean Jackson.

  • src/compiler/translator/TranslatorMetalDirect/ProgramPrelude.cpp:
5:31 PM Changeset in webkit [277414] by Chris Dumez
  • 19 edits
    2 deletes in trunk/Source/WebKit

Simplify / Modernize Notification permission implementation
https://bugs.webkit.org/show_bug.cgi?id=225711

Reviewed by Alex Christensen.

Simplify / Modernize Notification permission implementation. The main change was
adopting sendWithAsyncReply() for the IPC instead of using 2 separate IPC messages
for the request and the decision. As a result, we don't have to deal with request
identifiers.

No new tests, no behavior change and covered by existing API tests.

  • Sources.txt:
  • UIProcess/API/APIUIClient.h:

(API::UIClient::decidePolicyForNotificationPermissionRequest):

  • UIProcess/API/C/WKNotificationPermissionRequest.cpp:

(WKNotificationPermissionRequestAllow):
(WKNotificationPermissionRequestDeny):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageUIClient):

  • UIProcess/API/glib/WebKitNotificationPermissionRequest.cpp:

(webkitNotificationPermissionRequestAllow):
(webkitNotificationPermissionRequestDeny):

  • UIProcess/API/glib/WebKitUIClient.cpp:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::decidePolicyForNotificationPermissionRequest):

  • UIProcess/Notifications/NotificationPermissionRequest.h:

(WebKit::NotificationPermissionRequest::create):
(WebKit::NotificationPermissionRequest::~NotificationPermissionRequest):
(WebKit::NotificationPermissionRequest::didReceiveDecision):
(WebKit::NotificationPermissionRequest::NotificationPermissionRequest):

  • UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp: Removed.
  • UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h: Removed.
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::requestNotificationPermission):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Notifications/NotificationPermissionRequestManager.cpp:

(WebKit::NotificationPermissionRequestManager::startRequest):

  • WebProcess/Notifications/NotificationPermissionRequestManager.h:
  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
5:21 PM Changeset in webkit [277413] by commit-queue@webkit.org
  • 9 edits in trunk/Source/WebKit

[WebXR] Implement XRDeviceProxy::submitFrame
https://bugs.webkit.org/show_bug.cgi?id=225718

Patch by Ada Chan <ada.chan@apple.com> on 2021-05-12
Reviewed by Sam Weinig.

  • Shared/Cocoa/XRDeviceProxy.h:
  • Shared/Cocoa/XRDeviceProxy.mm:

(WebKit::XRDeviceProxy::submitFrame):

  • UIProcess/Cocoa/PlatformXRCoordinator.h:

(WebKit::PlatformXRCoordinator::submitFrame):

  • UIProcess/Cocoa/PlatformXRSystem.h:
  • UIProcess/Cocoa/PlatformXRSystem.messages.in:
  • UIProcess/Cocoa/PlatformXRSystem.mm:

(WebKit::PlatformXRSystem::submitFrame):

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

(WebKit::PlatformXRSystemProxy::submitFrame):

5:17 PM Changeset in webkit [277412] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[BigSur Wk1 Release] imported/w3c/web-platform-tests/css/css-will-change/will-change-fixpos-cb-transform-1.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=225704

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
5:09 PM Changeset in webkit [277411] by Chris Dumez
  • 5 edits
    3 adds in trunk

ASSERTION FAILED: actualVTablePointer == expectedVTablePointer in toJSNewlyCreated(JSC::JSGlobalObject *, WebCore::JSDOMGlobalObject *, Ref<WebCore::AudioNode> &&)
https://bugs.webkit.org/show_bug.cgi?id=225719
<rdar://77828031>

Reviewed by Geoffrey Garen.

Source/WebCore:

AudioNode has (a lot of) subclasses that are exposed to JS (for which we call toJS() for).
As a result, AudioNode needs a custom toJS() implementation which returns the correct subclass
wrapper, instead of a generic JSAudioNode.

Test: webaudio/event-relatedTarget-audionode.html

  • Modules/webaudio/AudioNode.idl:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSAudioNodeCustom.cpp: Added.

(WebCore::toJSNewlyCreated):
(WebCore::toJS):

LayoutTests:

Add layout test coverage. This test was reliably crashing before the fix.

  • webaudio/event-relatedTarget-audionode-expected.txt: Added.
  • webaudio/event-relatedTarget-audionode.html: Added.
5:03 PM Changeset in webkit [277410] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ BigSur Release wk2 arm64 ] http/tests/appcache/fail-on-update-2.html (layout-test) is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=225665

Unreviewed test gardening.

Updating expectations to (DumpJSConsoleLogInStdErr Slow ) to stop the constant text failures, and improve the flaky timeouts.

  • platform/mac-wk2/TestExpectations:
4:27 PM Changeset in webkit [277409] by mmaxfield@apple.com
  • 2 edits in trunk/Websites/browserbench.org

[MotionMark] Apply r277406 to Websites/browserbench.org/MotionMark1.2
https://bugs.webkit.org/show_bug.cgi?id=225722

Rubber-stamped by Geoffrey Garen.

Just copy over the change, so the website gets updated.

This doesn't bump the version number, which is okay, because we never actually
"released" version 1.2; we just made a folder on a website, and didn't update any
links to point to it.

  • MotionMark1.2/resources/runner/tests.js:
4:24 PM Changeset in webkit [277408] by Chris Gambrell
  • 2 edits
    7 adds
    5 deletes in trunk/LayoutTests

[LayoutTests] http/tests/misc/last-modified-parsing.html handles non-standard dates differently in PHP than Python
https://bugs.webkit.org/show_bug.cgi?id=224933
<rdar://problem/77020039>

Reviewed by Jonathan Bedard.

  • http/tests/misc/last-modified-parsing-expected.txt: Removed.
  • http/tests/misc/last-modified-parsing.html: Removed.
  • http/tests/misc/no-last-modified-expected.txt: Removed.
  • http/tests/misc/no-last-modified.html: Removed.
  • http/tests/resources/last-modified.php: Removed.
  • http/wpt/misc: Added.
  • http/wpt/misc/last-modified-parsing-expected.txt: Added.
  • http/wpt/misc/last-modified-parsing.html: Added.
  • http/wpt/misc/no-last-modified-expected.txt: Added.
  • http/wpt/misc/no-last-modified.html: Added.
  • http/wpt/misc/resources: Added.
  • http/wpt/misc/resources/last-modified-utilities.js: Added.

(async getLastModified):

  • platform/win/TestExpectations:
4:22 PM Changeset in webkit [277407] by mmaxfield@apple.com
  • 2 edits in trunk/Tools

[MotionMark] Update plan file after r277406
https://bugs.webkit.org/show_bug.cgi?id=225721

Rubber-stamped by Geoffrey Garen.

Just update the plan.

  • Scripts/webkitpy/benchmark_runner/data/plans/motionmark1.1.plan:
4:18 PM Changeset in webkit [277406] by mmaxfield@apple.com
  • 2 edits in trunk/PerformanceTests

[MotionMark] Temporarily remove the focus test
https://bugs.webkit.org/show_bug.cgi?id=225714

Reviewed by Geoffrey Garen.

The focus test is causing unacceptably high variance on test results. Initial investigation
indicates that this is related to secondary and tertiary interactions between the browser's
runloop and the compositor's runloop. Not only that, but the variable cost of the focus test
seems to affect the variance on the subtests which run after it.

This patch temporarily removes the focus test, just so we can get a stronger signal of
browsers' true performance, while we do a deeper analysis of the focus test.

Because the focus test's score is lower than the average score of the subtests, removing it
causes scores in all browsers to increase:

| WebKit | Chrome | Firefox

================================================
Score with Focus | 1020 | 550 | 962
Score without Focus | 1623 | 874 | 1101
Stddev with Focus | 9.3% | 2.3% | 2.9%
Stddev without Focus | 0.7% | 0.5% | 7.9%

  • MotionMark/resources/runner/tests.js:
4:16 PM Changeset in webkit [277405] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ Catalina+ wk2 ] http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html (layout-test) is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=225667

Unreviewed test gardening.

Updating expectation to Slow to see if test conditions improve.

  • platform/mac/TestExpectations:
4:16 PM Changeset in webkit [277404] by Russell Epstein
  • 1 copy in tags/Safari-611.3.2.1.1

Tag Safari-611.3.2.1.1.

4:01 PM Changeset in webkit [277403] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ BigSur ] webaudio/AudioContext/audiocontext-close-basic.html (layout-test) is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=225670

Unreviewed test gardening.

Updating expectations to slow to see if test will pass.

  • platform/mac/TestExpectations:
4:01 PM Changeset in webkit [277402] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-611.3.2.1-branch

Cherry-pick r277373. rdar://problem/77916543

Source/WebCore:
REGRESSION: Release assert in SlotAssignment::assignedNodesForSlot via ComposedTreeIterator::traverseNextInShadowTree
in Element::insertedIntoAncestor
https://bugs.webkit.org/show_bug.cgi?id=225684

Reviewed by Darin Adler.

The release assertion failure was caused by RenderTreeUpdater::tearDownRenderers end up traversing the parts of the DOM
for which Element::insertedIntoAncestor had not been called yet. Since HTMLSlotElement::insertedIntoAncestor is where
SlotAssignment::Slot is updated for a newly inserted slot, SlotAssignment::Slot may not contain this slot element.

Fixed the bug by returning early in SlotAssignment::assignedNodesForSlot when this condition holds, which is when
the shadow root is connected to a document but HTMLSlotElement isn't since its connected flag has not been updated yet.

Test: fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash.html

  • dom/SlotAssignment.cpp: (WebCore::SlotAssignment::assignedNodesForSlot):

LayoutTests:
REGRESSION: Release assert in SlotAssignment::assignedNodesForSlot via ComposedTreeIterator::traverseNextInShadowTree in Element::insertedIntoAncestor
https://bugs.webkit.org/show_bug.cgi?id=225684

Reviewed by Darin Adler.

Added a regression test.

  • fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash-expected.txt: Added.
  • fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash.html: Added.

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

3:59 PM Changeset in webkit [277401] by Russell Epstein
  • 8 edits in branches/safari-611.3.2.1-branch/Source

Versioning.

WebKit-7611.3.2.1.1

3:59 PM Changeset in webkit [277400] by Brent Fulgham
  • 9 edits in trunk/Source/WebKit

[Cocoa] Silence uninteresting sandbox reports
https://bugs.webkit.org/show_bug.cgi?id=225713
<rdar://problem/77483132>

Reviewed by Per Arne Vollan.

Telemetry from the recently released iOS and macOS updates show a set of uninteresting sandbox violations. Most of
these are harmless, but all of them involve some runtime cost and may prevent code from making the best use of
available hardware and should be permitted.

These changes also bring the various sandboxes into better alignment, as many of these items had previously been
added to one of the other sandboxes.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
3:56 PM Changeset in webkit [277399] by Russell Epstein
  • 1 copy in tags/Safari-611.3.3

Tag Safari-611.3.3.

3:53 PM Changeset in webkit [277398] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ BigSur wk2 arm64 ] editing/selection/move-by-character-brute-force.html (layout-test) is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=225664

Unreviewed test gardening.

Updating test expectations to slow.

  • platform/mac-wk2/TestExpectations:
3:46 PM Changeset in webkit [277397] by Russell Epstein
  • 1 copy in branches/safari-611.3.2.1-branch

New branch.

3:40 PM Changeset in webkit [277396] by Russell Epstein
  • 1 copy in tags/Safari-612.1.14

Tag Safari-612.1.14.

3:07 PM Changeset in webkit [277395] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[build.webkit.org] Bots should automatically recover from svn checkout is already locked issue
https://bugs.webkit.org/show_bug.cgi?id=225717

Reviewed by Jonathan Bedard.

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

(CheckOutSource): Set haltOnFailure to False so that cleanup step can run. Also set the step name while we are at it.
(CheckOutSource.init): Also set logEnviron to False.
(CheckOutSource.getResultSummary): Run SVNCleanup step in case of failure.
(SVNCleanup):
(SVNCleanup.init):
(SVNCleanup.evaluateCommand):

  • CISupport/build-webkit-org/steps_unittest.py: Added unit-tests for the new step.
3:02 PM Changeset in webkit [277394] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ Catalina+ wk2 ] imported/w3c/web-platform-tests/css/css-transitions/transition-base-response-002.html (layout-test) is a flaky text failure
https://bugs.webkit.org/show_bug.cgi?id=225669

Unreviewed test gardening.

Updating expectations to Pass Failure for macOS Release and Debug.

  • platform/mac-wk2/TestExpectations:
2:57 PM Changeset in webkit [277393] by Chris Dumez
  • 2 edits in trunk/Tools

Unreviewed follow-up to r277376.

Enable the API tests only if ENABLE(NOTIFICATIONS). It is important since
notifications are enabled on macOS but not iOS currently.

  • TestWebKitAPI/Tests/WebKitCocoa/NotificationAPI.mm:
2:56 PM Changeset in webkit [277392] by sihui_liu@apple.com
  • 4 edits in trunk/Tools

[ BigSur Release ] TestWebKitAPI.IndexedDB.KillWebProcessWithOpenConnection is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=225372
<rdar://problem/77532291>

Reviewed by Chris Dumez.

Ensure IDB data is cleared before test and make error logging more detailed.

  • TestWebKitAPI/Tests/WebKitCocoa/KillWebProcessWithOpenConnection-1.html:
  • TestWebKitAPI/Tests/WebKitCocoa/KillWebProcessWithOpenConnection-2.html:
  • TestWebKitAPI/Tests/WebKitCocoa/WebProcessKillIDBCleanup.mm: Listen to version change event because it

indicates that server starts handling second open request in KillWebProcessWithOpenConnection-2.html.
(-[IndexedDBWebProcessKillMessageHandler userContentController:didReceiveScriptMessage:]):
(getNextMessage):
(TEST):

2:43 PM Changeset in webkit [277391] by commit-queue@webkit.org
  • 9 edits in trunk

Wrong position for orthogonal positioned element with writing-mode: vertical-rl
https://bugs.webkit.org/show_bug.cgi?id=180633

Patch by Ziran Sun <Ziran Sun> on 2021-05-12
Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

Re-sync the following 3 tests with WPT. grid-self-alignment-non-static-positioned-items-009.html and
grid-self-alignment-non-static-positioned-items-010.html are now passing.
grid-self-alignment-non-static-positioned-items-011.html is now producing the same test results as those
in Chromium.

  • web-platform-tests/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-009.html:
  • web-platform-tests/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-010.html:
  • web-platform-tests/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-011.html:

Source/WebCore:

When calculating offset position for orthogonal positioned element with writing mode vertical-rl,
we also need to take into account of borders and paddings. This change corrects computations
for both topOffset and leftOffset.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computePositionedLogicalWidthUsing const):
(WebCore::RenderBox::computePositionedLogicalHeightUsing const):

2:19 PM Changeset in webkit [277390] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

TapStorage::lock freed while locked in AudioSourceProviderAVFObjC::destroyMixIfNeeded()
https://bugs.webkit.org/show_bug.cgi?id=225706
<rdar://77719381>

Reviewed by Ryosuke Niwa.

In r275933, an update was made to protect access to TapStorage during destruction by
locking its lock inside destroyMixIfNeeded(), but if TapStorage has a refCount==1
during that teardown, the lock itself is destroyed while it is still held. Add an
explicit scoping to the lock holder, and only deref the TapStorage outside that
locking scope.

  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:

(WebCore::AudioSourceProviderAVFObjC::destroyMixIfNeeded):

2:08 PM Changeset in webkit [277389] by Wenson Hsieh
  • 6 edits in trunk/Source/WebKit

Plumb some more metadata to QuickLook when revealing images
https://bugs.webkit.org/show_bug.cgi?id=225709
rdar://77864866

Reviewed by Devin Rousso.

Add plumbing to supply QuickLook with some additional information about the image URL and current page URL when
revealing images.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::handleContextMenuRevealImage):

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

(-[WKActionSheetAssistant handleElementActionWithType:element:needsInteraction:]):

  • UIProcess/mac/WKImageExtractionPreviewController.h:
  • UIProcess/mac/WKImageExtractionPreviewController.mm:

(-[WKImageExtractionPreviewItem initWithFileURL:title:imageURL:pageURL:]):
(-[WKImageExtractionPreviewItem dealloc]):
(-[WKImageExtractionPreviewItem previewItemURL]):
(-[WKImageExtractionPreviewItem previewOptions]):
(-[WKImageExtractionPreviewController initWithPage:fileURL:title:imageURL:]):

Rename the URL argument to fileURL, to avoid confusion with the new imageURL that's passed in. Note that
this is temporary, since we'll adopt new QuickLook SPI on macOS once the fix for rdar://74299451 is available.

(-[WKImageExtractionPreviewItem initWithURL:title:]): Deleted.
(-[WKImageExtractionPreviewController initWithPage:url:title:]): Deleted.

2:06 PM Changeset in webkit [277388] by ggaren@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

ConservativeRoots triggers page demand on Speedometer
https://bugs.webkit.org/show_bug.cgi?id=225676

Reviewed by Filip Pizlo.

Use a 2048 item / 16kB inline buffer. That's about 10% bigger than the
max capacity observed on Speedometer, and small enough to reasonably fit
on the stack.

Removed the separate out of line capacity because it was smaller than
the new inline capacity.

  • heap/ConservativeRoots.cpp:

(JSC::ConservativeRoots::grow):

  • heap/ConservativeRoots.h:
1:40 PM Changeset in webkit [277387] by Jonathan Bedard
  • 2 edits in trunk/Tools

[TestWebKitAPI] Explicitly exit after completing tests
https://bugs.webkit.org/show_bug.cgi?id=225703
<rdar://problem/77673980>

Reviewed by Alexey Proskuryakov.

  • TestWebKitAPI/ios/mainIOS.mm:

(main): Explicitly exit the testing process.

1:40 PM Changeset in webkit [277386] by Aditya Keerthi
  • 2 edits in trunk/Source/WebKit

REGRESSION (r275297): Unexpected autofocus when switching tabs
https://bugs.webkit.org/show_bug.cgi?id=225710
<rdar://problem/77542939>

Reviewed by Wenson Hsieh.

r275297 introduced logic to handle a focus environment change by
advancing to the next or previous focusable element, depending on the
focus context's heading direction. This logic enables a tab or a
shift+tab to change the focus from browser chrome directly to an
element on a web page.

However, the focus environment can change through mechanisms other than
tab / shift+tab. One example of this is when a user switches tabs. In
these cases, the UIFocusHeading supplied by the focus context is
UIFocusHeadingNone. Nevertheless, we unconditionally call
-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]
when the focus context changes. Consequently, an element on the web page
is always focused when the WKContentView gains focus.

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView didUpdateFocusInContext:withAnimationCoordinator:]):

To fix, ensure we only focus an element on the page if the focus heading
is UIFocusHeadingNext or UIFocusHeadingPrevious. UIFocusHeadingNext will
focus the first focusable element, while UIFocusHeadingPrevious will focus
the last focusable element.

Note that a call to -[WKContentView becomeFirstResponder] is not made
if the focus heading is UIFocusHeadingNone. From my testing, I observed
that the view already was the first responder in that case.

1:13 PM Changeset in webkit [277385] by Said Abou-Hallawa
  • 3 edits
    2 adds in trunk

Removing the transform CSS property from the SVG element does not cause invalidation
https://bugs.webkit.org/show_bug.cgi?id=225366

Reviewed by Simon Fraser.

Source/WebCore:

If the new or the old RenderStyle includes a transform, the renderer of
the SVG element needs to be repainted.

Test: svg/css/svg-css-transform-dynamic-remove.html

  • rendering/svg/RenderSVGModelObject.cpp:

(WebCore::RenderSVGModelObject::styleDidChange):

LayoutTests:

  • svg/css/svg-css-transform-dynamic-remove-expected.html: Added.
  • svg/css/svg-css-transform-dynamic-remove.html: Added.
1:11 PM Changeset in webkit [277384] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Remove inline annoatations for static functions in PixelBufferConversion
https://bugs.webkit.org/show_bug.cgi?id=225708

Reviewed by Darin Adler.

Remove inline annoatations for static functions in PixelBufferConversion
as suggested by Darin. The theory here is that outside of a header, the
use of 'inline' serves no purpose as the compiler is perfectly allowed
and capable of inlining these functions.

  • platform/graphics/PixelBufferConversion.cpp:

(WebCore::makeVImageBuffer):
(WebCore::convertImagePixelsAccelerated):
(WebCore::convertSinglePixelPremultipliedToPremultiplied):
(WebCore::convertSinglePixelPremultipliedToUnpremultiplied):
(WebCore::convertSinglePixelUnpremultipliedToPremultiplied):
(WebCore::convertSinglePixelUnpremultipliedToUnpremultiplied):
(WebCore::convertFunctor):

12:11 PM Changeset in webkit [277383] by mark.lam@apple.com
  • 21 edits
    2 adds in trunk/Source

Implement some common Baseline JIT slow paths using JIT thunks.
https://bugs.webkit.org/show_bug.cgi?id=225682

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

This patch implements the following changes:

  1. Implement exception handling thunks:
    1. handleExceptionGenerator, which calls operationLookupExceptionHandler().
    2. handleExceptionWithCallFrameRollbackGenerator, which calls operationLookupExceptionHandlerFromCallerFrame().

All the JIT tiers were emitting their own copy of these routines to call these
operation, one per CodeBlock. We now emit 2 thunks for these and have all the
tiers just jump to them.

PolymorphicAccess also now uses the handleExceptionGenerator thunk.

DFG::JITCompiler::compileExceptionHandlers() has one small behavior difference
before it calls operationLookupExceptionHandlerFromCallerFrame(): it first
re-sets the top of stack for the function where we are about to throw a
StackOverflowError from. This re-setting of top of stack is useless because
we're imminently unwinding out of at least this frame for the StackOverflowError.
Hence, it is ok to use the handleExceptionWithCallFrameRollbackGenerator thunk
here as well. Note that no other tiers does this re-setting of top of stack.

FTLLowerDFGToB3 has one case using operationLookupExceptionHandlerFromCallerFrame()
which cannot be refactored to use these thunks because it does additional
work to throw a StackOverflowError. A different thunk will be needed. I left
it alone for now.

  1. Introduce JITThunks::existingCTIStub(ThunkGenerator, NoLockingNecessaryTag) so that a thunk can get a pointer to another thunk without locking the JITThunks lock. Otherwise, deadlock ensues.
  1. Change SlowPathCall to emit and use thunks instead of emitting a blob of code to call a slow path function for every bytecode in a CodeBlock.
  1. Introduce JITThunks::ctiSlowPathFunctionStub() to manage these SlowPathFunction thunks.
  1. Introduce JITThunks::preinitializeAggressiveCTIThunks() to initialize these thunks at VM initialization time. Pre-initializing them has multiple benefits:
    1. the thunks are not scattered through out JIT memory, thereby reducing fragmentation.
    2. we don't spend time at runtime compiling them when the user is interacting with the VM. Conceptually, these thunks can be VM independent and can be shared by VMs process-wide. However, it will require some additional work. For now, the thunks remain bound to a specific VM instance.

These changes are only enabled when ENABLE(EXTRA_CTI_THUNKS), which is currently
only available for ARM64 and non-Windows x86_64.

This patch has passed JSC tests on AS Mac.

With this patch, --dumpLinkBufferStats shows the following changes in emitted
JIT code size (using a single run of the CLI version of JetStream2 on AS Mac):

Base New Diff

BaselineJIT: 89089964 (84.962811 MB) 84624776 (80.704475 MB) 0.95x (reduction)

DFG: 39117360 (37.305222 MB) 36415264 (34.728302 MB) 0.93x (reduction)

Thunk: 23230968 (22.154778 MB) 23130336 (22.058807 MB) 1.00x

InlineCache: 22027416 (21.006981 MB) 21969728 (20.951965 MB) 1.00x

FTL: 6575772 (6.271145 MB) 6097336 (5.814873 MB) 0.93x (reduction)

Wasm: 2302724 (2.196049 MB) 2301956 (2.195316 MB) 1.00x

YarrJIT: 1538956 (1.467663 MB) 1522488 (1.451958 MB) 0.99x

CSSJIT: 0 0

Uncategorized: 0 0

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/CodeBlock.h:

(JSC::CodeBlock::offsetOfInstructionsRawPointer):

  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessGenerationState::emitExplicitExceptionHandler):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compileExceptionHandlers):
(JSC::DFG::JITCompiler::link):

  • dfg/DFGJITCompiler.h:
  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • jit/JIT.cpp:

(JSC::JIT::link):
(JSC::JIT::privateCompileExceptionHandlers):

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

(JSC::JITThunks::existingCTIStub):
(JSC::JITThunks::ctiSlowPathFunctionStub):
(JSC::JITThunks::preinitializeExtraCTIThunks):

  • jit/JITThunks.h:
  • jit/SlowPathCall.cpp: Added.

(JSC::JITSlowPathCall::call):
(JSC::JITSlowPathCall::generateThunk):

  • jit/SlowPathCall.h:
  • jit/ThunkGenerators.cpp:

(JSC::handleExceptionGenerator):
(JSC::handleExceptionWithCallFrameRollbackGenerator):
(JSC::popThunkStackPreservesAndHandleExceptionGenerator):

  • jit/ThunkGenerators.h:
  • runtime/CommonSlowPaths.h:
  • runtime/SlowPathFunction.h: Added.
  • runtime/VM.cpp:

(JSC::VM::VM):

Source/WTF:

Introduce ENABLE(EXTRA_CTI_THUNKS) flag to guard the use of these new thunks.
Currently, the thunks are 64-bit only, and only supported for ARM64 and non-Windows
X86_64. The reason it is not supported for Windows as well is because Windows
only has 4 argument registers. In this patch, the thunks do not use that many
registers yet, but there will be more thunks coming that will require the use
of up to 6 argument registers.

  • wtf/PlatformEnable.h:
11:40 AM Changeset in webkit [277382] by achristensen@apple.com
  • 42 edits in trunk/Source/WebCore

Use HashSet<RefPtr<Node>> instead of HashSet<Node*>
https://bugs.webkit.org/show_bug.cgi?id=220464

Reviewed by Chris Dumez and Ryosuke Niwa.

This makes us more resistent to lifetime bugs.

liveNodeSet() and ignoreSet() need to be WeakHashSet, and they are only used in debug builds so that's fine.

MutationObserver::observedNodes() is not called on the main thread, but it's called during garbage collection.
I replaced it with MutationObserver::isReachableFromOpaqueRoots which eliminates the HashSet allocation and hashing,
and it can return true early if it finds a contained opaque root, resulting in less work in several ways.
This should only increase our performance slightly while getting the same behavior.

  • accessibility/AXObjectCache.cpp:

(WebCore::conditionallyAddNodeToFilterList):
(WebCore::filterVectorPairForRemoval):
(WebCore::filterMapForRemoval):
(WebCore::filterListForRemoval):
(WebCore::AXObjectCache::prepareForDocumentDestruction):

  • bindings/js/JSMutationObserverCustom.cpp:

(WebCore::JSMutationObserverOwner::isReachableFromOpaqueRoots):

  • dom/MutationObserver.cpp:

(WebCore::MutationObserver::isReachableFromOpaqueRoots const):
(WebCore:: const): Deleted.

  • dom/MutationObserver.h:
  • dom/MutationObserverRegistration.cpp:

(WebCore::MutationObserverRegistration::isReachableFromOpaqueRoots const):
(WebCore::MutationObserverRegistration::addRegistrationNodesToSet const): Deleted.

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

(WebCore::liveNodeSet):
(WebCore::stringForRareDataUseType):
(WebCore::Node::dumpStatistics):
(WebCore::ignoreSet):
(WebCore::Node::trackForDebugging):
(WebCore::Node::~Node):

  • editing/AppendNodeCommand.cpp:

(WebCore::AppendNodeCommand::getNodesInCommand):

  • editing/AppendNodeCommand.h:
  • editing/CompositeEditCommand.cpp:

(WebCore::EditCommandComposition::getNodesInCommand):

  • editing/CompositeEditCommand.h:
  • editing/DeleteFromTextNodeCommand.cpp:

(WebCore::DeleteFromTextNodeCommand::getNodesInCommand):

  • editing/DeleteFromTextNodeCommand.h:
  • editing/EditCommand.cpp:

(WebCore::SimpleEditCommand::addNodeAndDescendants):

  • editing/EditCommand.h:
  • editing/InsertIntoTextNodeCommand.cpp:

(WebCore::InsertIntoTextNodeCommand::getNodesInCommand):

  • editing/InsertIntoTextNodeCommand.h:
  • editing/InsertNodeBeforeCommand.cpp:

(WebCore::InsertNodeBeforeCommand::getNodesInCommand):

  • editing/InsertNodeBeforeCommand.h:
  • editing/MergeIdenticalElementsCommand.cpp:

(WebCore::MergeIdenticalElementsCommand::getNodesInCommand):

  • editing/MergeIdenticalElementsCommand.h:
  • editing/RemoveNodeCommand.cpp:

(WebCore::RemoveNodeCommand::getNodesInCommand):

  • editing/RemoveNodeCommand.h:
  • editing/ReplaceNodeWithSpanCommand.cpp:

(WebCore::ReplaceNodeWithSpanCommand::getNodesInCommand):

  • editing/ReplaceNodeWithSpanCommand.h:
  • editing/SetNodeAttributeCommand.cpp:

(WebCore::SetNodeAttributeCommand::getNodesInCommand):

  • editing/SetNodeAttributeCommand.h:
  • editing/SetSelectionCommand.h:
  • editing/SpellingCorrectionCommand.cpp:
  • editing/SplitElementCommand.cpp:

(WebCore::SplitElementCommand::getNodesInCommand):

  • editing/SplitElementCommand.h:
  • editing/SplitTextNodeCommand.cpp:

(WebCore::SplitTextNodeCommand::getNodesInCommand):

  • editing/SplitTextNodeCommand.h:
  • editing/WrapContentsInDummySpanCommand.cpp:

(WebCore::WrapContentsInDummySpanCommand::getNodesInCommand):

  • editing/WrapContentsInDummySpanCommand.h:
  • editing/cocoa/HTMLConverter.mm:

(HTMLConverterCaches::cacheAncestorsOfStartToBeConverted):

  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::highlightSelector):

  • xml/XPathFunctions.cpp:

(WebCore::XPath::FunId::evaluate const):

  • xml/XPathNodeSet.cpp:

(WebCore::XPath::sortBlock):
(WebCore::XPath::NodeSet::traversalSort const):

  • xml/XPathPath.cpp:

(WebCore::XPath::LocationPath::evaluate const):

  • xml/XPathPredicate.cpp:

(WebCore::XPath::Union::evaluate const):

11:34 AM Changeset in webkit [277381] by commit-queue@webkit.org
  • 5 edits in trunk/Source/JavaScriptCore

Unreviewed, reverting r277346.
https://bugs.webkit.org/show_bug.cgi?id=225705

Introduced a (rare) deadlock

Reverted changeset:

"ConservativeRoots triggers page demand on Speedometer"
https://bugs.webkit.org/show_bug.cgi?id=225676
https://trac.webkit.org/changeset/277346

11:28 AM Changeset in webkit [277380] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed follow-up to r277376.

Fix bad early return in NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision().

  • WebProcess/Notifications/NotificationPermissionRequestManager.cpp:

(WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):

11:00 AM Changeset in webkit [277379] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

HTMLMediaElement::mediaLoadingFailedFatally() does direct dispatch of events; should enqueue
https://bugs.webkit.org/show_bug.cgi?id=225700
<rdar://75576322>

Reviewed by Eric Carlson.

In r274559, an update was made to mediaLoadingFailedFatally to adopt recent spec changes, and as
part of that change, an "error" event was changed from being enqueued to being directly dispatched.
However, directly dispatching events exposes the element to JS and has the potential to cause the
element to be garbage collected, deleting the object and potentially other objects in the backtrace.
Events should always be enqueued, rather than directy dispatched, for this reason.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaLoadingFailedFatally):

10:58 AM Changeset in webkit [277378] by svillar@igalia.com
  • 3 edits
    2 adds in trunk

ASSERTION FAILED: m_clients.contains(&client) in CSSFontFace::removeClient via CSSSegmentedFontFace::~CSSSegmentedFontFace()
https://bugs.webkit.org/show_bug.cgi?id=223790

Reviewed by Ryosuke Niwa.

Source/WebCore:

CSSFontFace does not support adding the same client twice as it uses a HashSet to track them. This means that
it's a mistake to call removeClient() more than once. This could happen when specifying the same font
family more than once in a <font-face> element inside a svg container.

Test: fast/css/svg-font-face-duplicate-crash.html

  • css/CSSFontFaceSet.cpp:

(WebCore::CSSFontFaceSet::fontFace): Skip duplicate CSSFontFace's when before calling appendFontFace().

LayoutTests:

  • fast/css/svg-font-face-duplicate-crash-expected.txt: Added.
  • fast/css/svg-font-face-duplicate-crash.html: Added.
10:54 AM Changeset in webkit [277377] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-611-branch

Cherry-pick r277373. rdar://problem/77916543

Source/WebCore:
REGRESSION: Release assert in SlotAssignment::assignedNodesForSlot via ComposedTreeIterator::traverseNextInShadowTree
in Element::insertedIntoAncestor
https://bugs.webkit.org/show_bug.cgi?id=225684

Reviewed by Darin Adler.

The release assertion failure was caused by RenderTreeUpdater::tearDownRenderers end up traversing the parts of the DOM
for which Element::insertedIntoAncestor had not been called yet. Since HTMLSlotElement::insertedIntoAncestor is where
SlotAssignment::Slot is updated for a newly inserted slot, SlotAssignment::Slot may not contain this slot element.

Fixed the bug by returning early in SlotAssignment::assignedNodesForSlot when this condition holds, which is when
the shadow root is connected to a document but HTMLSlotElement isn't since its connected flag has not been updated yet.

Test: fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash.html

  • dom/SlotAssignment.cpp: (WebCore::SlotAssignment::assignedNodesForSlot):

LayoutTests:
REGRESSION: Release assert in SlotAssignment::assignedNodesForSlot via ComposedTreeIterator::traverseNextInShadowTree in Element::insertedIntoAncestor
https://bugs.webkit.org/show_bug.cgi?id=225684

Reviewed by Darin Adler.

Added a regression test.

  • fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash-expected.txt: Added.
  • fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash.html: Added.

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

10:52 AM Changeset in webkit [277376] by Chris Dumez
  • 17 edits
    1 add in trunk

Queue notification permission requests for the same origin on WebKit side
https://bugs.webkit.org/show_bug.cgi?id=225701
<rdar://76804977>

Reviewed by Geoffrey Garen.

Source/WebCore:

Remove some dead code.

  • Modules/notifications/NotificationClient.h:

Source/WebKit:

If there are parallel notification permission requests for the same origin, we now queue them on WebKit
side and only ask the client once for the origin. Once we've received the permission from the client,
we respond to all JS requests at this point.

This patch also removes some dead code to facilitate refactoring the code to support this.
In a follow-up I am planning to use sendWithAsyncReply() and refactor this code further.

  • WebProcess/Notifications/NotificationPermissionRequestManager.cpp:

(WebKit::NotificationPermissionRequestManager::startRequest):
(WebKit::NotificationPermissionRequestManager::permissionLevel):
(WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):

  • WebProcess/Notifications/NotificationPermissionRequestManager.h:
  • WebProcess/Notifications/WebNotificationManager.cpp:

(WebKit::WebNotificationManager::policyForOrigin const):

  • WebProcess/Notifications/WebNotificationManager.h:
  • WebProcess/WebCoreSupport/WebNotificationClient.cpp:

(WebKit::WebNotificationClient::requestPermission):
(WebKit::WebNotificationClient::checkPermission):

  • WebProcess/WebCoreSupport/WebNotificationClient.h:

Source/WebKitLegacy/mac:

Remove some dead code.

  • WebCoreSupport/WebNotificationClient.h:
  • WebCoreSupport/WebNotificationClient.mm:

Source/WebKitLegacy/win:

Remove some dead code.

  • WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
  • WebCoreSupport/WebDesktopNotificationsDelegate.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/NotificationAPI.mm: Added.

(-[NotificationPermissionMessageHandler userContentController:didReceiveScriptMessage:]):
(-[NotificationPermissionUIDelegate initWithHandler:]):
(-[NotificationPermissionUIDelegate _webView:requestNotificationPermissionForSecurityOrigin:decisionHandler:]):
(TestWebKitAPI::runRequestPermissionTest):
(TestWebKitAPI::TEST):
(TestWebKitAPI::runParallelPermissionRequestsTest):

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

Crash in WebPageProxy::endColorPicker()
https://bugs.webkit.org/show_bug.cgi?id=225679

Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2021-05-12
Reviewed by Ryosuke Niwa.

Make sure that endColorPicker() and didEndColorPicker()
do not both attempt to null-out m_colorPicker.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::endColorPicker):
(WebKit::WebPageProxy::didEndColorPicker):

10:44 AM Changeset in webkit [277374] by Russell Epstein
  • 8 edits in branches/safari-611-branch/Source

Versioning.

WebKit-7611.3.3

10:13 AM Changeset in webkit [277373] by rniwa@webkit.org
  • 3 edits
    2 adds in trunk

Source/WebCore:
REGRESSION: Release assert in SlotAssignment::assignedNodesForSlot via ComposedTreeIterator::traverseNextInShadowTree
in Element::insertedIntoAncestor
https://bugs.webkit.org/show_bug.cgi?id=225684

Reviewed by Darin Adler.

The release assertion failure was caused by RenderTreeUpdater::tearDownRenderers end up traversing the parts of the DOM
for which Element::insertedIntoAncestor had not been called yet. Since HTMLSlotElement::insertedIntoAncestor is where
SlotAssignment::Slot is updated for a newly inserted slot, SlotAssignment::Slot may not contain this slot element.

Fixed the bug by returning early in SlotAssignment::assignedNodesForSlot when this condition holds, which is when
the shadow root is connected to a document but HTMLSlotElement isn't since its connected flag has not been updated yet.

Test: fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash.html

  • dom/SlotAssignment.cpp:

(WebCore::SlotAssignment::assignedNodesForSlot):

LayoutTests:
REGRESSION: Release assert in SlotAssignment::assignedNodesForSlot via ComposedTreeIterator::traverseNextInShadowTree in Element::insertedIntoAncestor
https://bugs.webkit.org/show_bug.cgi?id=225684

Reviewed by Darin Adler.

Added a regression test.

  • fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash-expected.txt: Added.
  • fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash.html: Added.
9:59 AM Changeset in webkit [277372] by Peng Liu
  • 6 edits in trunk/Source

Implement TextTrackPrivateRemote::inBandMetadataTrackDispatchType()
https://bugs.webkit.org/show_bug.cgi?id=225674

Reviewed by Eric Carlson.

Source/WebCore:

Remove an unused function in InbandTextTrackPrivate.

  • platform/graphics/InbandTextTrackPrivate.h:

(WebCore::InbandTextTrackPrivate::textTrackIndex const): Deleted.

Source/WebKit:

This patch ensures that InbandTextTrack::inBandMetadataTrackDispatchType()
behaviors the same no matter "Media in GPU Process" is enabled or not.

  • GPUProcess/media/RemoteTextTrackProxy.cpp:

(WebKit::RemoteTextTrackProxy::configuration):

  • WebProcess/GPU/media/TextTrackPrivateRemote.cpp:

(WebKit::TextTrackPrivateRemote::updateConfiguration):

  • WebProcess/GPU/media/TextTrackPrivateRemote.h:
8:59 AM Changeset in webkit [277371] by svillar@igalia.com
  • 7 edits in trunk

[css-flexbox] Do not use margins when computing aspect ratio cross sizes
https://bugs.webkit.org/show_bug.cgi?id=221210
LayoutTests/imported/w3c:

<rdar://problem/74097534>

Reviewed by Javier Fernandez.

  • web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-013-expected.txt: Replaced FAIL by PASS expectations + new expectations.
  • web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-013.html: Imported

latest changes from upstream WPT.

Source/WebCore:

Reviewed by Javier Fernandez.

In r270578 we implemented section 9.8.1 of the flexbox specs which allowed us to compute child's
indefinite cross sizes as definite when the flexbox container had a definite cross size and a couple
of other conditions. However we did not take into account that the child might have some margins in
in the cross direction. Aspect ratio computations must use the content box and thus, we need to
substract the margin extent before trying to compute a cross size based on an aspect ratio.

Note that when computeMainSizeFromAspectRatioUsing() is called the child might not have been ever
laid out. This means that the margins wouldn't have been computed and thus marginXXX() would always
return 0. That's why crossAxisMarginExtentForChild() was also modified so that it actually computes
the margins in case the child needs to be laid out.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::crossAxisMarginExtentForChild const):
(WebCore::RenderFlexibleBox::computeMainSizeFromAspectRatioUsing const):

LayoutTests:

Reviewed by Javier Fernandez.

  • TestExpectations: Unskipped flex-aspect-ratio-img-row-013.html which is now passing.
8:48 AM Changeset in webkit [277370] by mark.lam@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

Remove dead code around ENABLE(OPCODE_SAMPLING) and ENABLE(CODEBLOCK_SAMPLING).
https://bugs.webkit.org/show_bug.cgi?id=225699

Reviewed by Tadeu Zagallo.

This code revolves around an Interpreter::sampler() method which returns a
SamplingTool*. Neither the Interpreter method nor the SamplingTool class exists
anymore.

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):
(JSC::JIT::compileWithoutLinking):

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

(JSC::JIT::compileCallEval):
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileCallEval):
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):

  • jit/JITInlines.h:

(JSC::JIT::sampleInstruction): Deleted.
(JSC::JIT::sampleCodeBlock): Deleted.

  • jit/JITOperations.cpp:
  • jit/SlowPathCall.h:

(JSC::JITSlowPathCall::call):

  • runtime/ScriptExecutable.h:

(JSC::ScriptExecutable::finishCreation): Deleted.

7:51 AM Changeset in webkit [277369] by weinig@apple.com
  • 8 edits
    2 adds in trunk/Source/WebCore

Factor copyImagePixels pixel conversion code into its own file
https://bugs.webkit.org/show_bug.cgi?id=225673

Reviewed by Darin Adler.

Removes virtual ImageBufferBackend::copyImagePixels() function and
moves functionality to new PixelBufferConversion.h/cpp.

Merge USE(ACCELERATE) code from ImageBufferCGBackend into the same
file and do some light cleanup.

  • Function renamed to covert convertImagePixels to convey that it is doing more than copying.
  • Add PixelBufferConversionView/ConstPixelBufferConversionView structs to hold parameters for the conversions, including a ColorSpace member that is not yet used but will be shortly.
  • Uses constexpr conditionals in unaccelerated cases to hoist branch checking for pixel format conversion requirements outside the main loop.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:

Add new files.

  • platform/graphics/PixelBufferConversion.cpp: Added.

(WebCore::makeVImageBuffer):
(WebCore::convertImagePixelsAccelerated):
(WebCore::convertSinglePixelPremultipliedToPremultiplied):
(WebCore::convertSinglePixelPremultipliedToUnpremultiplied):
(WebCore::convertSinglePixelUnpremultipliedToPremultiplied):
(WebCore::convertSinglePixelUnpremultipliedToUnpremultiplied):
(WebCore::convertFunctor):
(WebCore::convertImagePixels):

  • platform/graphics/PixelBufferConversion.h: Added.

Move existing copyImagePixels implementations here.

  • platform/graphics/ImageBufferBackend.cpp:

(WebCore::ImageBufferBackend::toBGRAData const):
(WebCore::ImageBufferBackend::getPixelBuffer const):
(WebCore::ImageBufferBackend::putPixelBuffer):
(WebCore::copyPremultipliedToPremultiplied): Deleted.
(WebCore::copyPremultipliedToUnpremultiplied): Deleted.
(WebCore::copyUnpremultipliedToPremultiplied): Deleted.
(WebCore::copyUnpremultipliedToUnpremultiplied): Deleted.
(WebCore::copyFunctor): Deleted.
(WebCore::ImageBufferBackend::copyImagePixels const): Deleted.

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

(WebCore::makeVImageBuffer): Deleted.
(WebCore::copyImagePixelsAccelerated): Deleted.
(WebCore::ImageBufferCGBackend::copyImagePixels const): Deleted.

  • platform/graphics/cg/ImageBufferCGBackend.h:

Remove existing copyImagePixels() implementation and call new
convertImagePixels() instead.

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::copyUnmultipliedResult):
(WebCore::FilterEffect::copyPremultipliedResult):
(WebCore::FilterEffect::createUnmultipliedImageResult):
(WebCore::FilterEffect::createPremultipliedImageResult):
Fix pixel format for the PixelBuffers to match existing behaviors.
These are not being used at the moment but will in the future
and new assert in putPixelBuffer caught these being incorrect.

7:33 AM Changeset in webkit [277368] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. media/track/in-band/track-in-band-srt-mkv-kind.html is a flaky crash.

  • platform/glib/TestExpectations:
7:17 AM Changeset in webkit [277367] by commit-queue@webkit.org
  • 6 edits
    2 deletes in trunk

Unreviewed, reverting r277320 and r277329.
https://bugs.webkit.org/show_bug.cgi?id=225698

Added broken test fast/css/visited-link-mix-blend-mode.html

Reverted changesets:

"Don't allow :visited link style in subtrees that use mix-
blend-mode"
https://bugs.webkit.org/show_bug.cgi?id=225446
https://trac.webkit.org/changeset/277320

"Don't allow :visited link style in subtrees that use mix-
blend-mode"
https://bugs.webkit.org/show_bug.cgi?id=225446
https://trac.webkit.org/changeset/277329

6:37 AM Changeset in webkit [277366] by Diego Pino Garcia
  • 1 edit
    2 adds
    1 delete in trunk/LayoutTests

[GTK] Unreviewed test gardening. Update baselines for GTK.

Remove stale GTK baseline after r277321.
Emit new GTK baseline after WPT update in r277160.

  • platform/gtk/imported/w3c/web-platform-tests/css/css-flexbox/flex-item-contains-strict-expected.txt: Removed.
  • platform/gtk/imported/w3c/web-platform-tests/css/mediaqueries/test_media_queries-expected.txt: Added.
5:47 AM Changeset in webkit [277365] by Jean-Yves Avenard
  • 4 edits in trunk/Source/WebCore

Adopt CoreMedia SPI to identify audio-only playback for MSE clients
https://bugs.webkit.org/show_bug.cgi?id=225647
rdar://76138365

Reviewed by Youenn Fablet.

Source/WebCore:

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: tells whether the AVSBAR is attached to an <audio> or <video> element.

Source/WebCore/PAL:

  • pal/spi/cocoa/AVFoundationSPI.h: Add forward declaration for new methods while this isn't in SDK yet.
1:57 AM Changeset in webkit [277364] by youenn@apple.com
  • 10 edits
    1 copy
    4 moves
    2 adds in trunk/Source

Introduce an internal unit to render audio MediaStreamTrack(s)
https://bugs.webkit.org/show_bug.cgi?id=225601

Reviewed by Eric Carlson.

Source/WebCore:

Move files from platform/mediastream/mac to platform/mediastream/cocoa since they are used in both iOS and macOS.
Move Audio Unit functionality out of AudioMediaStreamTrackRendererUnit.
AudioMediaStreamTrackRendererUnit is responsible to manage sources and do the mixing.
To actually render audio, it will use an InternalUnit, which is currently done in process.

A future work will add support for a remote InternalUnit, that would run on GPUProcess.
To prepare for that, a callback allows customizing the Internal Unit creation.
We also change renderer start to be asynchronous, since it requires fetching the audio description from GPUProcess.

No change of behavior, covered by existing tests.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/cocoa/AudioSampleBufferList.h:
  • platform/mediastream/AudioMediaStreamTrackRenderer.h:
  • platform/mediastream/AudioTrackPrivateMediaStream.cpp:

(WebCore::AudioTrackPrivateMediaStream::startRenderer):

  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererCocoa.cpp: Renamed from Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp.

(WebCore::AudioMediaStreamTrackRendererCocoa::start):

  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererCocoa.h: Copied from Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.h.
  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererInternalUnit.cpp: Renamed from Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.cpp.

(WebCore::AudioMediaStreamTrackRendererInternalUnit::createLocalInternalUnit):
(WebCore::LocalAudioMediaStreamTrackRendererInternalUnit::LocalAudioMediaStreamTrackRendererInternalUnit):
(WebCore::LocalAudioMediaStreamTrackRendererInternalUnit::retrieveFormatDescription):
(WebCore::LocalAudioMediaStreamTrackRendererInternalUnit::setAudioOutputDevice):
(WebCore::LocalAudioMediaStreamTrackRendererInternalUnit::start):
(WebCore::LocalAudioMediaStreamTrackRendererInternalUnit::stop):
(WebCore::LocalAudioMediaStreamTrackRendererInternalUnit::createAudioUnitIfNeeded):
(WebCore::LocalAudioMediaStreamTrackRendererInternalUnit::renderingCallback):

  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererInternalUnit.h: Renamed from Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.h.
  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.cpp: Added.

(WebCore::getCreateInternalUnitFunction):
(WebCore::AudioMediaStreamTrackRendererUnit::setCreateInternalUnitFunction):
(WebCore::createInternalUnit):
(WebCore::AudioMediaStreamTrackRendererUnit::singleton):
(WebCore::AudioMediaStreamTrackRendererUnit::AudioMediaStreamTrackRendererUnit):
(WebCore::AudioMediaStreamTrackRendererUnit::~AudioMediaStreamTrackRendererUnit):
(WebCore::AudioMediaStreamTrackRendererUnit::setAudioOutputDevice):
(WebCore::AudioMediaStreamTrackRendererUnit::addSource):
(WebCore::AudioMediaStreamTrackRendererUnit::removeSource):
(WebCore::AudioMediaStreamTrackRendererUnit::start):
(WebCore::AudioMediaStreamTrackRendererUnit::stop):
(WebCore::AudioMediaStreamTrackRendererUnit::retrieveFormatDescription):
(WebCore::AudioMediaStreamTrackRendererUnit::render):

  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.h: Renamed from Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.h.

Source/WebKit:

Update according new WebCore API.

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.cpp:

(WebKit::RemoteAudioMediaStreamTrackRenderer::start):

  • WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.cpp:

(WebKit::AudioMediaStreamTrackRenderer::start):

  • WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.h:
1:48 AM Changeset in webkit [277363] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Unreviewed test gardening. Gardened several test failures from GTK post-commit bot.

  • platform/gtk/TestExpectations:
1:09 AM Changeset in webkit [277362] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

REGRESSION(r277083): Proximity scroll snap is broken on iOS
https://bugs.webkit.org/show_bug.cgi?id=225649

Patch by Martin Robinson <mrobinson@igalia.com> on 2021-05-12
Reviewed by Simon Fraser.

No new tests. iOS does not have great support for the event sending test
infrastructure used to test scroll snap.

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:

(ArgumentCoder<FloatScrollSnapOffsetsInfo>::encode): Include the snap type when encoding ScrollSnapOffsetsInfo.
(ArgumentCoder<FloatScrollSnapOffsetsInfo>::decode): Include the snap type when decoding ScrollSnapOffsetsInfo.

  • Shared/WebCoreArgumentCoders.h: Added EnumTraits for ScrollSnapStrictness.
1:05 AM Changeset in webkit [277361] by youenn@apple.com
  • 11 edits in trunk/Source/WebCore

Enumerate AVCaptureDevice list in a background thread
https://bugs.webkit.org/show_bug.cgi?id=225643
<rdar://problem/77820002>

Reviewed by Eric Carlson.

Enumerate AVCaptureDevice in a background queue asynchronously.
Delay getUserMedia and enumerateDevices until this is completed.

Update RealtimeMediaSourceCenter accordingly and introduce RealtimeMediaSourceCenter::enumerateDevices for that purpose.
Replace getCaptureDevices by computeCaptureDevices to do the async computation.
Continue using captureDevices() getters.

Manually tested.

  • platform/mediastream/CaptureDevice.h:

(WebCore::CaptureDevice::CaptureDevice):
(WebCore::CaptureDevice::isolatedCopy):

  • platform/mediastream/CaptureDeviceManager.h:
  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::RealtimeMediaSourceCenter::getMediaStreamDevices):
(WebCore::RealtimeMediaSourceCenter::enumerateDevices):
(WebCore::RealtimeMediaSourceCenter::validateRequestConstraints):
(WebCore::RealtimeMediaSourceCenter::validateRequestConstraintsAfterEnumeration):

  • platform/mediastream/RealtimeMediaSourceCenter.h:
  • platform/mediastream/RealtimeMediaSourceFactory.h:

(WebCore::AudioCaptureFactory::computeSpeakerDevices const):

  • platform/mediastream/ios/AVAudioSessionCaptureDevice.mm:

(WebCore::AVAudioSessionCaptureDevice::AVAudioSessionCaptureDevice):

  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.h:
  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:

(WebCore::AVAudioSessionCaptureDeviceManager::scheduleUpdateCaptureDevices):
(WebCore::AVAudioSessionCaptureDeviceManager::computeCaptureDevices):

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

(WebCore::AVCaptureDeviceManager::computeCaptureDevices):
(WebCore::AVCaptureDeviceManager::captureDevices):
(WebCore::AVCaptureDeviceManager::updateCachedAVCaptureDevices):
(WebCore::AVCaptureDeviceManager::retrieveCaptureDevices):
(WebCore::AVCaptureDeviceManager::refreshCaptureDevices):
(WebCore::AVCaptureDeviceManager::AVCaptureDeviceManager):

12:56 AM Changeset in webkit [277360] by youenn@apple.com
  • 2 edits in trunk/LayoutTests

[ macOS wk2 ] http/wpt/mediarecorder/set-srcObject-MediaStream-Blob.html (layout-test) is a flaky text failure
https://bugs.webkit.org/show_bug.cgi?id=225500
<rdar://problem/77636573>

Reviewed by Eric Carlson.

  • http/wpt/mediarecorder/set-srcObject-MediaStream-Blob.html:

Make sure video1 is playing to get its duration.

12:54 AM Changeset in webkit [277359] by youenn@apple.com
  • 2 edits in trunk/LayoutTests

fast/mediastream/getUserMedia-webaudio.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=225655
<rdar://74158395>

Reviewed by Eric Carlson.

  • fast/mediastream/getUserMedia-webaudio.html:

Retry several time instead of just once when detecting no noise to improve robustness.

Note: See TracTimeline for information about the timeline view.