Timeline



Jan 24, 2021:

4:47 PM Changeset in webkit [271786] by Simon Fraser
  • 19 edits
    2 adds in trunk

[iOS WK2] theverge.com - rubber band scrolling at the top of the page causes an abrupt jump
https://bugs.webkit.org/show_bug.cgi?id=220886
<rdar://71177566>

Reviewed by Sam Weinig.
Source/WebCore:

theverge.com on iOS is a page that has long main thread stalls with forced layouts on a timer
that alter the page height; this caused the post-layout updateScrollbars() called from
FrameView::adjustViewSize() to call scrollToPosition() after adjusting the scroll position
to the allowed range.

If the page laid out while rubberbanding was happening, the current scroll position would
be negative, then clamped to 0, then sent to the UI process as a requested scroll to 0,
triggering the jump to top in the UI process.

There's existing code to prevent this from happening if we know that rubberbanding is
happening; this patch makes isRubberBandInProgress() work for iOS WK2. It does so
by having updateVisibleContentRects() push information about rubberbanding nodes onto
RemoteScrollingCoordinator.

We remove an unnecessary shouldUpdateScrollLayerPositionSynchronously() check in
FrameView::isRubberBandInProgress() - if it's true, then the scrolling coordinator
won't see any rubberbanding nodes anyway.

Test: fast/scrolling/ios/content-size-change-during-rubberband.html

  • page/FrameView.cpp:

(WebCore::FrameView::isRubberBandInProgress const):

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

(WebCore::ScrollView::updateScrollbars):

Source/WebKit:

theverge.com on iOS is a page that has long main thread stalls with forced layouts on a timer
that alter the page height; this caused the post-layout updateScrollbars() called from
FrameView::adjustViewSize() to call scrollToPosition() after adjusting the scroll position
to the allowed range.

If the page laid out while rubberbanding was happening, the current scroll position would
be negative, then clamped to 0, then sent to the UI process as a requested scroll to 0,
triggering the jump to top in the UI process.

There's existing code to prevent this from happening if we know that rubberbanding is
happening; this patch makes isRubberBandInProgress() work for iOS WK2. It does so
by having updateVisibleContentRects() push information about rubberbanding nodes onto
RemoteScrollingCoordinator.

We remove an unnecessary shouldUpdateScrollLayerPositionSynchronously() check in
FrameView::isRubberBandInProgress() - if it's true, then the scrolling coordinator
won't see any rubberbanding nodes anyway.

  • UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
  • WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm:

(WebKit::RemoteScrollingCoordinator::addNodeWithActiveRubberBanding):
(WebKit::RemoteScrollingCoordinator::removeNodeWithActiveRubberBanding):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::updateVisibleContentRects):

Tools:

Add test infrastructure to allow UIScriptController::scrollToOffset() and
UIScriptController::immediateScrollToOffset() to take an options argument with
a 'unconstrained' property, which allows scrolling to unstable offset to simulate
rubberbanding.

  • DumpRenderTree/ios/UIScriptControllerIOS.h:
  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::contentOffsetBoundedIfNecessary):
(WTR::UIScriptControllerIOS::scrollToOffset):
(WTR::UIScriptControllerIOS::immediateScrollToOffset):
(WTR::contentOffsetBoundedInValidRange): Deleted.

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.h:

(WTR::UIScriptController::scrollToOffset):
(WTR::UIScriptController::immediateScrollToOffset):

  • TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp:

(WTR::toScrollToOptions):

  • WebKitTestRunner/ios/UIScriptControllerIOS.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::contentOffsetBoundedIfNecessary):
(WTR::UIScriptControllerIOS::scrollToOffset):
(WTR::UIScriptControllerIOS::immediateScrollToOffset):
(WTR::contentOffsetBoundedInValidRange): Deleted.

LayoutTests:

Add test infrastructure to allow UIScriptController::scrollToOffset() and
UIScriptController::immediateScrollToOffset() to take an options argument with
a 'unconstrained' property, which allows scrolling to unstable offset to simulate
rubberbanding.

  • fast/scrolling/ios/content-size-change-during-rubberband-expected.txt: Added.
  • fast/scrolling/ios/content-size-change-during-rubberband.html: Added.
  • resources/ui-helper.js:

(window.UIHelper.scrollTo.return.new.Promise.):
(window.UIHelper.scrollTo.return.new.Promise):
(window.UIHelper.scrollTo):
(window.UIHelper.immediateScrollTo):
(window.UIHelper.immediateUnstableScrollTo):

4:28 PM Changeset in webkit [271785] by Simon Fraser
  • 3 edits
    4 adds in trunk

SVG reference filter chain with errors applies only some of the filters, producing incorrect output
https://bugs.webkit.org/show_bug.cgi?id=220893

Reviewed by Sam Weinig.

Source/WebCore:

If the CSS filter property refers to an invalid reference filter, ensure that
the entire reference filter is skipped. Previously, we'd add elements of the reference
filter up to the invalid one.

This behavior matches Gecko and Blink.

Tests: css3/filters/invalid-reference-filter-in-chain.html

css3/filters/invalid-reference-filter.html

  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::buildReferenceFilter):

LayoutTests:

  • css3/filters/invalid-reference-filter-expected.html: Added.
  • css3/filters/invalid-reference-filter-in-chain-expected.html: Added.
  • css3/filters/invalid-reference-filter-in-chain.html: Added.
  • css3/filters/invalid-reference-filter.html: Added.
1:58 PM Changeset in webkit [271784] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Make FontCascade::CodePath an enum class
https://bugs.webkit.org/show_bug.cgi?id=219947

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

Revert part of r270932 change, Complex from X.h
will clash with the enum class too.

  • platform/graphics/FontCascade.h:
11:04 AM Changeset in webkit [271783] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Remove unused function Line::isRunConsideredEmpty
https://bugs.webkit.org/show_bug.cgi?id=220900

Reviewed by Antti Koivisto.

We don't track "is considered empty" line state anymore.

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::isRunConsideredEmpty const): Deleted.

  • layout/inlineformatting/InlineLine.h:
9:59 AM Changeset in webkit [271782] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Ceil inline level box's width and height values when converting from float to LayoutUnit
https://bugs.webkit.org/show_bug.cgi?id=220898

Reviewed by Antti Koivisto.

It ensures that the inline level box always encloses the content.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):

Jan 23, 2021:

2:11 PM Changeset in webkit [271781] by ysuzuki@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

[JSC] DeferredWorkTimer should clear pending task after running
https://bugs.webkit.org/show_bug.cgi?id=220888

Reviewed by Mark Lam.

Wasm code assumes that scheduleWorkSoon clears pending dependencies. But DeferredWorkTimer is not clearing it, and instead, FinalizationRegistry etc. is clearing
it explicitly. This semantics is problematic. We are putting cancelPendingWork in JSPromise::resolve / JSPromise::reject. But they do not work since this is C++
version of them, and JSPromise has JS version of them. And if JS version is called, cancelPendingWork is not called. And we do not want to complicate JSPromise's
reject / resolve path since this is super hot, and we should keep them in JS.
Instead, we should always clear pending task if it is called.

  • jsc.cpp:

(JSC_DEFINE_HOST_FUNCTION):

  • runtime/DeferredWorkTimer.cpp:

(JSC::DeferredWorkTimer::doWork):

  • runtime/DeferredWorkTimer.h:
  • runtime/JSFinalizationRegistry.cpp:

(JSC::JSFinalizationRegistry::finalizeUnconditionally):

  • runtime/JSPromise.cpp:

(JSC::JSPromise::resolve): Remove this work-around, and instead, we must call scheduleWorkSoon if addPendingWork is called.
(JSC::JSPromise::reject): Ditto.

  • wasm/js/JSWebAssembly.cpp:

(JSC::JSWebAssembly::webAssemblyModuleValidateAsync):
(JSC::instantiate): Use instance for Ticket instead of promise to disambiguate the ticket scheduling from compileAndInstantiate's one easily.
(JSC::compileAndInstantiate): There are path that we do not call scheduleWorkSoon while we call addPendingWork, this is wrong, and JSPromise's workaround is added to
alleviate this situation. We should not do that: we must call scheduleWorkSoon at some point if addPendingWork is called.
(JSC::JSWebAssembly::webAssemblyModuleInstantinateAsync):

2:08 PM Changeset in webkit [271780] by pvollan@apple.com
  • 7 edits in trunk

[macOS] Deny mach lookup access to "com.apple.iconservices" in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=220013
<rdar://problem/60649036>

Reviewed by Brent Fulgham.

Source/WebKit:

Deny mach lookup access to "com.apple.iconservices" in the WebContent process on macOS,
since there are no longer any reports of this being used.

Test: fast/sandbox/mac/sandbox-mach-lookup.html

  • WebProcess/com.apple.WebProcess.sb.in:

LayoutTests:

  • fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
  • fast/sandbox/mac/sandbox-mach-lookup.html:
  • platform/mac-catalina/fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
  • platform/mac-mojave/fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
12:31 PM Changeset in webkit [271779] by eric.carlson@apple.com
  • 4 edits
    2 adds in trunk

[iOS] Set background playback restriction for WebAudio
https://bugs.webkit.org/show_bug.cgi?id=220879
<rdar://72949281>

Reviewed by Jer Noble.
Source/WebCore:

WebAudio does not play in the background on iOS both because audio doesn't play
when the category is set to AVAudioSessionCategoryAmbient, and because the
AudioContext is paused when the web process is forwarded the
UIApplicationWillResignActiveNotification notification.

This notification isn't forwarded when the WebView is hosted in SafariViewController
so the AudioContext is not paused, so it resumes playing when the application is
foregrounded even if the view controller is not in the foreground.

Fix this by setting the BackgroundProcessPlaybackRestricted restriction for
WebAudio sessions so the context is always paused in the background.

Test: media/webaudio-background-playback.html

  • platform/audio/ios/MediaSessionManagerIOS.mm:

(WebCore::MediaSessionManageriOS::resetRestrictions):

LayoutTests:

  • media/media-session-restrictions-expected.txt: Update expectations.
  • media/webaudio-background-playback-expected.txt: Added.
  • media/webaudio-background-playback.html: Added.
7:35 AM Changeset in webkit [271778] by pvollan@apple.com
  • 7 edits in trunk

Source/WebKit:
[macOS] Deny mach lookup access to "com.apple.iconservices.store" in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=220014
<rdar://problem/68923110>

Reviewed by Brent Fulgham.

Deny mach lookup access to "com.apple.iconservices.store" in the WebContent process on macOS,
since there are no longer any reports of this being used.

Test: fast/sandbox/mac/sandbox-mach-lookup.html

  • WebProcess/com.apple.WebProcess.sb.in:

LayoutTests:
[macOS] Deny mach-lookup to the service 'com.apple.iconservices.store' in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=220014
<rdar://problem/68923110>

Reviewed by Brent Fulgham.

  • fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
  • fast/sandbox/mac/sandbox-mach-lookup.html:
  • platform/mac-catalina/fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
  • platform/mac-mojave/fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
7:30 AM Changeset in webkit [271777] by pvollan@apple.com
  • 7 edits in trunk

[macOS] Deny mach-lookup to the service 'com.apple.hiservices-xpcservice' in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=220321
<rdar://problem/68878470>

Reviewed by Darin Adler.

Source/WebKit:

Deny mach-lookup to the service 'com.apple.hiservices-xpcservice' in the WebContent process on macOS,
since there are no longer any reports of this service being used.

Test: fast/sandbox/mac/sandbox-mach-lookup.html

  • WebProcess/com.apple.WebProcess.sb.in:

LayoutTests:

  • fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
  • fast/sandbox/mac/sandbox-mach-lookup.html:
  • platform/mac-catalina/fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
  • platform/mac-mojave/fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
6:16 AM Changeset in webkit [271776] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][Integration] Disable inline boxes with layers
https://bugs.webkit.org/show_bug.cgi?id=220891

Reviewed by Antti Koivisto.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForChild):

  • rendering/RenderInline.h:
4:32 AM Changeset in webkit [271775] by commit-queue@webkit.org
  • 37 edits in trunk

[JSC] Allow to build WebAssembly without B3
https://bugs.webkit.org/show_bug.cgi?id=220365

Patch by Xan Lopez <Xan Lopez> on 2021-01-23
Reviewed by Yusuke Suzuki.

.:

Make the WebAssembly feature depend on Baseline JIT, not B3
JIT. Also add a WEBASSEMBLY_B3JIT feature to enable or disable the
B3 tier in WebAssembly.

  • Source/cmake/WebKitFeatures.cmake: disable on 32bit.

Source/JavaScriptCore:

Make all the B3 related code in WebAssembly a compile-time
option. When disabled WebAssembly will only use its LLInt tier.

  • llint/LLIntOfflineAsmConfig.h: define WEBASSEMBLY_B3JIT for the

offline assembler.

  • llint/WebAssembly.asm: guard B3 code inside WEBASSEMBLY_B3JTI ifdefs.
  • wasm/WasmAirIRGenerator.cpp: ditto.
  • wasm/WasmAirIRGenerator.h: ditto.
  • wasm/WasmB3IRGenerator.cpp: ditto.
  • wasm/WasmB3IRGenerator.h: ditto.
  • wasm/WasmBBQPlan.cpp: ditto.
  • wasm/WasmBBQPlan.h: ditto.
  • wasm/WasmCallee.h: ditto.
  • wasm/WasmCodeBlock.cpp:

(JSC::Wasm::CodeBlock::CodeBlock): ditto.

  • wasm/WasmCodeBlock.h:

(JSC::Wasm::CodeBlock::wasmEntrypointCalleeFromFunctionIndexSpace): ditto.

  • wasm/WasmLLIntGenerator.h: ditto.
  • wasm/WasmLLIntPlan.cpp: ditto.
  • wasm/WasmOMGForOSREntryPlan.cpp: ditto.
  • wasm/WasmOMGForOSREntryPlan.h: ditto.
  • wasm/WasmOMGPlan.cpp: ditto.
  • wasm/WasmOMGPlan.h: ditto.
  • wasm/WasmOSREntryData.h: ditto.
  • wasm/WasmOperations.cpp: ditto.
  • wasm/WasmOperations.h: ditto.
  • wasm/WasmPlan.cpp: ditto.
  • wasm/WasmPlan.h: ditto.
  • wasm/WasmSlowPaths.cpp: ditto.
  • wasm/WasmSlowPaths.h: ditto.
  • wasm/WasmThunks.cpp: ditto.
  • wasm/WasmThunks.h: ditto.
  • wasm/WasmTierUpCount.cpp: ditto.
  • wasm/WasmTierUpCount.h: ditto.
  • wasm/generateWasmOpsHeader.py: ditto.

Source/WTF:

  • wtf/PlatformEnable.h: Disable WebAssembly on 32bit platforms,

enable WebAssembly B3JIT on PLATFORM(COCOA).

Tools:

  • Scripts/webkitperl/FeatureList.pm: add WebAssembly B3 JIT option.

Jan 22, 2021:

8:58 PM Changeset in webkit [271774] by ysuzuki@apple.com
  • 25 edits
    27 adds in trunk

Should SharedArrayBuffer/WebAssembly.Memory really throw?
https://bugs.webkit.org/show_bug.cgi?id=220364

Reviewed by Mark Lam.

LayoutTests/imported/w3c:

Update common/sab.js and wasm/.

  • web-platform-tests/common/sab.js:

(const.createBuffer):

  • web-platform-tests/wasm/jsapi/META.yml: Added.
  • web-platform-tests/wasm/jsapi/constructor/instantiate.any-expected.txt:
  • web-platform-tests/wasm/jsapi/constructor/instantiate.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/global/type.tentative.any-expected.txt: Added.
  • web-platform-tests/wasm/jsapi/global/type.tentative.any.html: Added.
  • web-platform-tests/wasm/jsapi/global/type.tentative.any.js: Added.

(assert_type):
(test):
(string_appeared_here.test):

  • web-platform-tests/wasm/jsapi/global/type.tentative.any.worker-expected.txt: Added.
  • web-platform-tests/wasm/jsapi/global/type.tentative.any.worker.html: Added.
  • web-platform-tests/wasm/jsapi/global/w3c-import.log:
  • web-platform-tests/wasm/jsapi/instance/constructor.any-expected.txt:
  • web-platform-tests/wasm/jsapi/instance/constructor.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/instanceTestFactory.js:

(const.imports.string_appeared_here.string_appeared_here):
(return.verify):

  • web-platform-tests/wasm/jsapi/memory/type.tentative.any-expected.txt: Added.
  • web-platform-tests/wasm/jsapi/memory/type.tentative.any.html: Added.
  • web-platform-tests/wasm/jsapi/memory/type.tentative.any.js: Added.

(assert_type):
(test):

  • web-platform-tests/wasm/jsapi/memory/type.tentative.any.worker-expected.txt: Added.
  • web-platform-tests/wasm/jsapi/memory/type.tentative.any.worker.html: Added.
  • web-platform-tests/wasm/jsapi/memory/w3c-import.log:
  • web-platform-tests/wasm/jsapi/module/exports.any-expected.txt:
  • web-platform-tests/wasm/jsapi/module/exports.any.js:

(test):

  • web-platform-tests/wasm/jsapi/module/exports.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/module/imports.any-expected.txt:
  • web-platform-tests/wasm/jsapi/module/imports.any.js:

(test):

  • web-platform-tests/wasm/jsapi/module/imports.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any-expected.txt: Added.
  • web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.html: Added.
  • web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.js: Added.

(test):

  • web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.worker-expected.txt: Added.
  • web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.worker.html: Added.
  • web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any-expected.txt: Added.
  • web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.html: Added.
  • web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.js: Added.

(test):

  • web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.worker-expected.txt: Added.
  • web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.worker.html: Added.
  • web-platform-tests/wasm/jsapi/table/w3c-import.log:
  • web-platform-tests/wasm/jsapi/w3c-import.log:
  • web-platform-tests/wasm/webapi/META.yml: Added.
  • web-platform-tests/wasm/webapi/instantiateStreaming.any-expected.txt:
  • web-platform-tests/wasm/webapi/instantiateStreaming.any.worker-expected.txt:
  • web-platform-tests/wasm/webapi/invalid-code.any-expected.txt:
  • web-platform-tests/wasm/webapi/invalid-code.any.js:

(string_appeared_here.Invalid.code):

  • web-platform-tests/wasm/webapi/invalid-code.any.worker-expected.txt:
  • web-platform-tests/wasm/webapi/modified-contenttype.any-expected.txt: Added.
  • web-platform-tests/wasm/webapi/modified-contenttype.any.html: Added.
  • web-platform-tests/wasm/webapi/modified-contenttype.any.js: Added.

(string_appeared_here.forEach.method.promise_test.async t):
(string_appeared_here.forEach.method.with.Content.Type.set late):

  • web-platform-tests/wasm/webapi/modified-contenttype.any.worker-expected.txt: Added.
  • web-platform-tests/wasm/webapi/modified-contenttype.any.worker.html: Added.
  • web-platform-tests/wasm/webapi/w3c-import.log:

Source/JavaScriptCore:

Not accessing "shared" field if Options::useSharedArrayBuffer() is false.

  • wasm/js/WebAssemblyMemoryConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

7:55 PM Changeset in webkit [271773] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][RenderTreeDump] Expand RenderInline 0 height quirk logic to previous/next siblings
https://bugs.webkit.org/show_bug.cgi?id=220884

Reviewed by Simon Fraser.

Check the previous/next siblings to see whether we should apply the zero-height quirk on the current RenderInline.
Note that this does not change the RenderInlines' reported height values on trunk.
However it greatly helps to reduce the required rebaseline when LFC's inline box support is enabled (see webkit.org/b/220148).

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::shouldCreateLineBoxes const):
(WebCore::RenderInline::updateAlwaysCreateLineBoxes):

  • rendering/RenderInline.h:
  • rendering/RenderTreeAsText.cpp:

(WebCore::isRenderInlineEmpty):
(WebCore::hasNonEmptySibling):
(WebCore::RenderTreeAsText::writeRenderObject):

6:13 PM Changeset in webkit [271772] by Wenson Hsieh
  • 4 edits in trunk/Source/WebKit

The web process should be killed after failing to decode display list items in the GPU process
https://bugs.webkit.org/show_bug.cgi?id=219097
<rdar://problem/71546526>

Reviewed by Chris Dumez.

Handle StopReplayReason::InvalidItem by terminating the web process via MESSAGE_CHECK. See below for more
details.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::didReceiveInvalidMessage):
(WebKit::GPUConnectionToWebProcess::terminateWebProcess):

  • GPUProcess/GPUConnectionToWebProcess.h:

Pull logic for terminating the web process out into a separate helper method on GPUConnectionToWebProcess, and
use this helper in GPUConnectionToWebProcess::didReceiveInvalidMessage, as well as in RemoteRenderingBackend
below.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

Add macro definitions for MESSAGE_CHECK and MESSAGE_CHECK_WITH_RETURN_VALUE. Since the methods on
RemoteRenderingBackend that trigger message checks all run on a background queue, the normal (main-thread) way
of defining these macros (MESSAGE_CHECK_WITH_RETURN_VALUE_BASE and MESSAGE_CHECK_BASE) don't work. We
instead call into the GPU to web process connection object directly to send a TerminateWebProcess message to
the parent (UI) process, and additionally log a given failure message.

(WebKit::RemoteRenderingBackend::nextDestinationImageBufferAfterApplyingDisplayLists):

Replace a number FIXMEs throughout these IPC message handlers with MESSAGE_CHECKs. Additionally, add a new
MESSAGE_CHECK for the case where we stopped replay early due to a corrupted or invalid display list item.

(WebKit::RemoteRenderingBackend::wakeUpAndApplyDisplayList):
(WebKit::RemoteRenderingBackend::setNextItemBufferToRead):

Simply remove the FIXME and early return here; this can only happen in the case where a compromised web content
process attempts to append redundant item buffer change items. However, doing so will either be (1) harmless,
since the pending item buffer information will just be overwritten, or (2) result in hitting a MESSAGE_CHECK
when decoding items if we try to execute the contents of another item buffer that has not been written to.

(WebKit::RemoteRenderingBackend::didCreateSharedDisplayListHandle):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
5:28 PM Changeset in webkit [271771] by Simon Fraser
  • 8 edits in trunk/Source/WebKit

[iOS WK2] Make the "in stable state" bit in visible content rect updates more fine-grained
https://bugs.webkit.org/show_bug.cgi?id=220875

Reviewed by Tim Horton.

VisibleContentRectUpdateInfo contains a single "in stable state" bit, but in a future
patch the web process will need to know if the UI process is rubberbanding. In addition,
we can fold "isChangingObscuredInsetsInteractively" into the same state bits.

So give VisibleContentRectUpdateInfo a OptionSet<ViewStabilityFlag>.

To give the correct state for non-main UIScrollViews, have _scrollViewIsRubberBanding
take the UIScrollView in question, and only include isChangingObscuredInsetsInteractively
if the question is being asked of the main UIScrollView.

  • Shared/VisibleContentRectUpdateInfo.cpp:

(WebKit::VisibleContentRectUpdateInfo::encode const):
(WebKit::VisibleContentRectUpdateInfo::decode):
(WebKit::operator<<):

  • Shared/VisibleContentRectUpdateInfo.h:

(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::inStableState const):
(WebKit::VisibleContentRectUpdateInfo::viewStability const):
(WebKit::VisibleContentRectUpdateInfo::isFirstUpdateForNewViewSize const):
(WebKit::operator==):
(WebKit::VisibleContentRectUpdateInfo::isChangingObscuredInsetsInteractively const): Deleted.

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _didRelaunchProcess]):
(-[WKWebView _scrollViewIsRubberBanding:]):
(-[WKWebView _viewStabilityState:]):
(-[WKWebView _scheduleVisibleContentRectUpdateAfterScrollInView:]):
(-[WKWebView _updateVisibleContentRects]):
(-[WKWebView _scrollViewIsRubberBanding]): Deleted.
(-[WKWebView _scrollViewIsInStableState:]): Deleted.

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

(-[WKContentView didUpdateVisibleRect:unobscuredRect:contentInsets:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:viewStability:enclosedInScrollableAncestorView:sendEvenIfUnchanged:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:contentInsets:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:sendEvenIfUnchanged:]): Deleted.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::updateVisibleContentRects):

5:25 PM Changeset in webkit [271770] by commit-queue@webkit.org
  • 4 edits in trunk

REGRESSION(r266148) Cancelling a navigation in decidePolicyForNavigationAction should not suspend the previous document's font loading timer
https://bugs.webkit.org/show_bug.cgi?id=220882
<rdar://problem/71634501>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-01-22
Reviewed by Brady Eidson.

Source/WebCore:

Things like the load event and didFinishNavigation wait until loading of things like fonts and iframes has completed.

If we navigate to a document that immediately tries to navigate to a different document after starting the loads of fonts,
then we momentarily have two DocumentLoaders with m_frame pointing to the same main frame.

If we cancel that second navigation using WKNavigationActionPolicyCancel, then it calls DocumentLoader::stopLoading on the second DocumentLoader.
This is fine. This is the way things have worked for a very long time.

r266148 introduced a call to the document's font loader's suspendFontLoadingTimer inside of DocumentLoader::stopLoading which is also fine.
What is not fine is the way we get that document. Using m_frame->document() in this case gets us the first document, which may still be loading fonts that we do still want.
Using this->document() only returns non-null if this DocumentLoader is the DocumentLoader that was used to load the Frame's Document,
and in this case the DocumentLoader should only stop the font loading timer if that is true.

I added an API test that reproduces the issue before but not after this fix.
For further verification, you can replace server.request() in my API test with a request to the URL in the radar ending in "Authentication.htm"
and verify it times out before the fix but not after.

This is close to the largest amount of time spent per character changed I've ever written to change "m_frame" to "this".

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::stopLoading):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:

(TEST):

5:24 PM Changeset in webkit [271769] by Jonathan Bedard
  • 4 edits
    3 moves in trunk/LayoutTests

[LayoutTests] Move service-worker python files to resources
https://bugs.webkit.org/show_bug.cgi?id=220881
<rdar://problem/73518780>

Reviewed by Alexey Proskuryakov.

  • http/wpt/service-workers/check-service-worker-header.https.html:
  • http/wpt/service-workers/check-service-worker-header.py: Moved.
  • http/wpt/service-workers/file-upload-check.py: Moved.
  • http/wpt/service-workers/file-upload.html:
  • http/wpt/service-workers/resources/check-service-worker-header.py: Copied from LayoutTests/http/wpt/service-workers/check-service-worker-header.py.
  • http/wpt/service-workers/resources/file-upload-check.py: Copied from LayoutTests/http/wpt/service-workers/file-upload-check.py.
  • http/wpt/service-workers/resources/update-worker.py: Copied from LayoutTests/http/wpt/service-workers/update-worker.py.
  • http/wpt/service-workers/update-service-worker.https.html:
  • http/wpt/service-workers/update-worker.py: Moved.
5:22 PM Changeset in webkit [271768] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitscmpy] Add GitHub credentials (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=220562
<rdar://problem/73063457>

Reviewed by Aakash Jain.

  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Change xmldict version.
4:23 PM Changeset in webkit [271767] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Obj-C API should do correct type checks when using a 32-bit address space
https://bugs.webkit.org/show_bug.cgi?id=220880
<rdar://72370334>

Reviewed by Tadeu Zagallo.

  • API/JSValue.mm:

(-[JSValue isNull]):
(-[JSValue isBoolean]):
(-[JSValue isNumber]):
(-[JSValue isString]):

4:07 PM Changeset in webkit [271766] by ysuzuki@apple.com
  • 12 edits in trunk/Source/JavaScriptCore

REGRESSION (r271731): Unchecked JS exception under GlobalObject::moduleLoaderFetch
https://bugs.webkit.org/show_bug.cgi?id=220868

Reviewed by Mark Lam.

Because TerminatedExecutionError needs to be uncaught, CatchScope's semantics does not work well.
So, we extend ThrowScope to implement CatchScope's feature, and use ThrowScope etc.
We also add JSPromise::rejectWithCaughtException since this pattern is common enough.

  • API/JSAPIGlobalObject.mm:

(JSC::JSAPIGlobalObject::moduleLoaderImportModule):
(JSC::JSAPIGlobalObject::moduleLoaderFetch):

  • jsc.cpp:

(GlobalObject::moduleLoaderImportModule):
(GlobalObject::moduleLoaderFetch):

  • runtime/Completion.cpp:

(JSC::rejectPromise):
(JSC::loadAndEvaluateModule):
(JSC::loadModule):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/JSInternalPromise.cpp:

(JSC::JSInternalPromise::rejectWithCaughtException):

  • runtime/JSInternalPromise.h:
  • runtime/JSModuleLoader.cpp:

(JSC::JSModuleLoader::importModule):
(JSC::JSModuleLoader::resolve):
(JSC::JSModuleLoader::fetch):
(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::reject): Deleted.

  • runtime/JSPromise.cpp:

(JSC::JSPromise::rejectWithCaughtException):

  • runtime/JSPromise.h:
  • runtime/ThrowScope.h:

(JSC::ThrowScope::clearException):

  • wasm/js/JSWebAssembly.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::resolve):
(JSC::JSWebAssembly::webAssemblyModuleValidateAsync):
(JSC::instantiate):
(JSC::compileAndInstantiate):
(JSC::JSWebAssembly::webAssemblyModuleInstantinateAsync):
(JSC::reject): Deleted.
(JSC::webAssemblyModuleValidateAsyncInternal): Deleted.
(JSC::webAssemblyModuleInstantinateAsyncInternal): Deleted.

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

Update run-benchmark to work with Python3
https://bugs.webkit.org/show_bug.cgi?id=220878

Patch by W.D. Xiong <w_xiong@apple.com> on 2021-01-22
Reviewed by Jonathan Bedard.

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

(SimpleHTTPServerDriver._find_http_server_port): Convert byte output to string before parsing regex

3:59 PM Changeset in webkit [271764] by Lauro Moura
  • 2 edits in trunk/Tools

[webkitpy][GTK] Xvfb driver fails to start with python3
https://bugs.webkit.org/show_bug.cgi?id=220870

Reviewed by Jonathan Bedard.

Python2 and Python3 differ in how they handle file descriptor inheritance
and Popen's close_fds default value.

In Python2, os.pipe creates the fds with the inheritable flag set, and
Popen's close_fds defaults to True.

In Python3, os.pipe creates the fds non-inheritable, requiring a call
to os.set_inheritable to enable it. Also, Popen's close_fds defaults
to False, closing all file descriptors except stdin, stdout and stderr.

With this commit, Python3 is able to launch the Xvfb driver for
run-webdriver-tests, but is still failing later with some pytest issue
to be tracked in another bug.

  • Scripts/webkitpy/port/xvfbdriver.py:

(XvfbDriver._xvfb_pipe): Make the write_fd inheritable if in py3.
(XvfbDriver._xvfb_read_display_id): Encode for py3 bytes compatibility.
(XvfbDriver._xvfb_run): Tell popen to keep the file descriptors open.

3:56 PM Changeset in webkit [271763] by Russell Epstein
  • 1 copy in tags/Safari-611.1.10.1.2

Tag Safari-611.1.10.1.2.

3:53 PM Changeset in webkit [271762] by Jonathan Bedard
  • 2 edits
    1 move
    1 add in trunk/LayoutTests

[LayoutTests] Move redirect.py in resources folder
https://bugs.webkit.org/show_bug.cgi?id=220876
<rdar://problem/73516627>

Reviewed by Alexey Proskuryakov.

  • http/wpt/html/dom/elements/images/bypass-cache-redirection-revalidation.html:
  • http/wpt/html/dom/elements/images/redirect.py: Moved to images/resources /redirect.py
  • http/wpt/html/dom/elements/images/resources: Added.
  • http/wpt/html/dom/elements/images/resources/redirect.py: Moved from images/redirect.py.
2:35 PM Changeset in webkit [271761] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Crash under FFTFrame::fftSetupForSize()
https://bugs.webkit.org/show_bug.cgi?id=220866
<rdar://73199504>

Reviewed by Darin Adler.

Follow-up to r271751 to address comment from Darin Adler. Stop using the double-checked
locking pattern as it is likely not safe [1].

[1] http://erdani.org/publications/DDJ_Jul_Aug_2004_revised.pdf

  • platform/audio/mac/FFTFrameMac.cpp:

(WebCore::fftSetups):
(WebCore::FFTFrame::fftSetupForSize):

1:55 PM Changeset in webkit [271760] by Chris Fleizach
  • 11 edits
    2 adds in trunk

AX: AT-synthesized key events for common user actions (increment/decrement) are detectably different in many ways, potentially causing both web app breakage and AT identification
https://bugs.webkit.org/show_bug.cgi?id=220675
<rdar://problem/73263977>

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: accessibility/keyevents-for-actions-mimic-real-key-events.html

When accessibility posts keyboard events in response to ax actions, they should mimic
real key events so as to be indistinguishable.

https://github.com/WICG/aom/blob/gh-pages/explainer.md#deprecated-keyboardevent-object-properties-optional

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::dispatchSimulatedKeyboardUpDownEvent):
(WebCore::InitializeLegacyKeyInitProperties):
(WebCore::AccessibilityNodeObject::performDismissAction):
(WebCore::AccessibilityNodeObject::postKeyboardKeysForValueChange):

  • dom/KeyboardEvent.cpp:

(WebCore::KeyboardEvent::KeyboardEvent):
(WebCore::KeyboardEvent::create):

  • dom/KeyboardEvent.h:
  • dom/UIEvent.cpp:

(WebCore::UIEvent::UIEvent):

  • dom/UIEvent.h:

(WebCore::UIEvent::create):

  • dom/UIEventWithKeyState.h:

(WebCore::UIEventWithKeyState::UIEventWithKeyState):

LayoutTests:

  • accessibility/keyevents-for-actions-mimic-real-key-events-expected.txt: Added.
  • accessibility/keyevents-for-actions-mimic-real-key-events.html: Added.
1:49 PM Changeset in webkit [271759] by Devin Rousso
  • 3 edits in trunk/LayoutTests/imported/w3c

[WPT] [Payment Request] slight adjustment to payment-request/payment-request-constructor-thcrash.https.html
https://bugs.webkit.org/show_bug.cgi?id=220872

Reviewed by Andy Estes.

The first test in payment-request/payment-request-constructor-thcrash.https.html is
incorrect because duplicate items in methodData provided to PaymentRequest should throw
a RangeError according to step 4.3.3 of <https://www.w3.org/TR/payment-request/#constructor>.

The spec does mention in <https://www.w3.org/TR/payment-request/#conformance>

User agents _MAY_ impose implementation-specific limits on otherwise unconstrained inputs,
e.g., to prevent denial of service attacks, to guard against running out of memory, or to
work around platform-specific limitations. When an input exceeds implementation-specific
limit, the user agent _MUST_ throw, or, in the context of a promise, reject with, a
TypeError optionally informing the developer of how a particular input exceeded an
implementation-specific limit.

but does not specify whether this should happen before or after the above.

In WebKit's case, there is no "implementation-specific limit", so a TypeError should not
be thrown in either case.

  • web-platform-tests/payment-request/payment-request-constructor-thcrash.https.html:
  • web-platform-tests/payment-request/payment-request-constructor-thcrash.https-expected.txt:
12:49 PM Changeset in webkit [271758] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Avoid duplicate calculations in RenderBlock::computePreferredLogicalWidths
https://bugs.webkit.org/show_bug.cgi?id=220873

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

Avoid duplicate calculations in RenderBlock::computePreferredLogicalWidths.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::computePreferredLogicalWidths):

12:40 PM Changeset in webkit [271757] by Wenson Hsieh
  • 8 edits in trunk

DisplayList::Replayer should stop replay and inform clients after encountering an invalid item
https://bugs.webkit.org/show_bug.cgi?id=220867

Reviewed by Chris Dumez.

Source/WebCore:

Make the DisplayList item iterator emit Optional<ItemHandle> instead of just ItemHandle; in the case of
client decoding or item validation failures (see #220710), this item handle will be WTF::nullopt. The display
list replayer will then handle this by halting replay with StopReplayReason::InvalidItem.

This refactoring will eventually enable RemoteRenderingBackend (in the GPU process) to terminate the web
content process when we fail to decode a display list item during playback (or encounter an invalid inline
item).

Test: DisplayListTests.InlineItemValidationFailure

DisplayListTests.OutOfLineItemDecodingFailure

  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::asText const):
(WebCore::DisplayList::DisplayList::dump const):
(WebCore::DisplayList::DisplayList::iterator::atEnd const):
(WebCore::DisplayList::DisplayList::iterator::updateCurrentItem):

Add an m_isValid flag. This flag is set to true initially, and is only set to false when we encounter an
item that is either invalid or unable to be decoded. Additionally, remove release assertions and the FIXMEs
regarding handling item decoding failures.

  • platform/graphics/displaylists/DisplayList.h:

(WebCore::DisplayList::DisplayList::iterator::operator* const):

If the m_isValid flag above is set, return WTF::nullopt for the item handle.

  • platform/graphics/displaylists/DisplayListReplayer.cpp:

(WebCore::DisplayList::Replayer::replay):

  • platform/graphics/displaylists/DisplayListReplayer.h:

Rename DecodingFailure to InvalidItem, since it now applies to both items that are invalid (e.g. contain
identifier values of 0 when they shouldn't) as well as items that fail decoding (which, in the case of the GPU
process, corresponds to IPC decoding failures).

Tools:

  • TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:

Adjust a few API tests, since the item handle in the DisplayList iterator is now optional.

  • TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:

Add a couple of new API tests to exercise display list item decoding and validation failures.

12:10 PM Changeset in webkit [271756] by weinig@apple.com
  • 2 edits in trunk/Source/WebKitLegacy

Remove generate-preferences.sh from the WebKitLegacy target so it doesn't get included in the framework
https://bugs.webkit.org/show_bug.cgi?id=220871
<rdar://problem/73503409>

Reviewed by Simon Fraser.

  • WebKitLegacy.xcodeproj/project.pbxproj:

Remove generate-preferences.sh from the WebKitLegacy target so it doesn't get included in the framework.

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

Retried tests are run without --prefer-integrated-gpu
https://bugs.webkit.org/show_bug.cgi?id=220845

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-01-22
Reviewed by Jonathan Bedard.

Run the test helper with --prefer-integrated-gpu also for retried tests, if
user originally passed --prefer-integrated-gpu to run-webkit-tests.

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

(Manager._set_up_run):
(Manager._force_pixel_tests_if_needed):

12:04 PM Changeset in webkit [271754] by jiewen_tan@apple.com
  • 3 edits in trunk/Source/WebKit

[WebAuthn] No error is visible after user enters the incorrect PIN
https://bugs.webkit.org/show_bug.cgi?id=220839
<rdar://problem/73378319>

Reviewed by Brent Fulgham.

To fix that, let's have a boolean to indicate the PIN entry UI has already been presented within this session.
And then rely on the error UI to let users retry the PIN.

Covered by manual tests.

  • UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.h:
  • UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm:

(WebKit::AuthenticatorPresenterCoordinator::requestPin):
(WebKit::AuthenticatorPresenterCoordinator::selectAssertionResponse):
Besides above, this patch also fixes some crashes.

11:53 AM Changeset in webkit [271753] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebKit

[WebAuthn] Should only check default browsers for the Modern WebAuthn
https://bugs.webkit.org/show_bug.cgi?id=220840
<rdar://problem/73375937>

Reviewed by Brent Fulgham.

  • WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:

(WebKit::WebAuthenticatorCoordinator::makeCredential):
(WebKit::WebAuthenticatorCoordinator::getAssertion):
(WebKit::WebAuthenticatorCoordinator::isUserVerifyingPlatformAuthenticatorAvailable):

11:11 AM Changeset in webkit [271752] by Devin Rousso
  • 2 edits in trunk/LayoutTests

Unreviewed, fix crashing test
https://bugs.webkit.org/show_bug.cgi?id=220566

  • http/tests/paymentrequest/updateWith-modifiers.https.html:
10:42 AM Changeset in webkit [271751] by Chris Dumez
  • 3 edits
    2 adds in trunk

Crash under FFTFrame::fftSetupForSize()
https://bugs.webkit.org/show_bug.cgi?id=220866
<rdar://73199504>

Reviewed by Eric Carlson.

Source/WebCore:

The crash was caused by FFTFrame::fftSetupForSize() but being called concurrently
from "HRTF database loader" threads. This patch makes FFTFrame::fftSetupForSize()
thread safe to address the issue.

Test: webaudio/Panner/PannerNode-crash.html

  • platform/audio/mac/FFTFrameMac.cpp:

(WebCore::fftSetups):
(WebCore::FFTFrame::fftSetupForSize):

LayoutTests:

Add layout test coverage.

  • webaudio/Panner/PannerNode-crash-expected.txt: Added.
  • webaudio/Panner/PannerNode-crash.html: Added.
10:33 AM Changeset in webkit [271750] by youenn@apple.com
  • 13 edits in trunk

Add more descriptive messages to setLocalDescription/setRemoteDescription error cases
https://bugs.webkit.org/show_bug.cgi?id=220857

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/RTCPeerConnection-SLD-SRD-timing.https-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-operations.https-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-perfect-negotiation-stress-glare-linear.https-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-perfect-negotiation-stress-glare.https-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-rollback-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-offer-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-rollback-expected.txt:

Source/WebCore:

No change of behavior, covered by rebased tests.

  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::PeerConnectionBackend::setLocalDescription):
(WebCore::PeerConnectionBackend::setRemoteDescription):

LayoutTests:

  • fast/mediastream/RTCPeerConnection-setRemoteDescription-offer-expected.txt:
10:11 AM Changeset in webkit [271749] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

Disable verification timer in case of capture suspension
https://bugs.webkit.org/show_bug.cgi?id=220859

Reviewed by Eric Carlson.

In case of suspension/unsuspension, make it as if the capture was interrupted.
Update updateVerifyCapturingTimer to stop timer it capture is interrupted.

Remove RealtimeMediaSource::m_interrupted which is unused and potentially confusing.
Manually tested.

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

(WebCore::AVVideoCaptureSource::updateVerifyCapturingTimer):
(WebCore::AVVideoCaptureSource::captureDeviceSuspendedDidChange):

9:53 AM Changeset in webkit [271748] by Jonathan Bedard
  • 8 edits in trunk/Tools

[webkitscmpy] Map alternative default branch names
https://bugs.webkit.org/show_bug.cgi?id=220865
<rdar://problem/73502370>

Reviewed by Aakash Jain.

As WebKit transitions from Subversion to Git, our default branch is changing from
trunk to main. This change allow identifiers with 'main' in them to work in Subversion checkouts.

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

(Git.find): Map set of common default branches to this repository's default branch.

  • Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:

(GitHub.find): Map set of common default branches to this repository's default branch.

  • Scripts/libraries/webkitscmpy/webkitscmpy/scm_base.py:

(ScmBase.find): Map set of common default branches to this repository's default branch.

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:

(TestGit.test_alternative_default_branch):
(TestGitHub.test_alternative_default_branch):

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py:

(TestLocalSvn.test_alternative_default_branch):
(TestRemoteSvn.test_alternative_default_branch):

9:36 AM Changeset in webkit [271747] by Chris Dumez
  • 2 edits in trunk/LayoutTests

[ Big Sur ] imported/w3c/web-platform-tests/beacon/beacon-cors.sub.window.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=220554
<rdar://problem/73048771>

Unreviewed, unskip test as it no longer appears to be flaky.

  • platform/mac/TestExpectations:
9:27 AM Changeset in webkit [271746] by mark.lam@apple.com
  • 7 edits in trunk

Disable Options:useAtMethod because of compatibility issue.
https://bugs.webkit.org/show_bug.cgi?id=220788
rdar://72933608

Reviewed by Saam Barati and Yusuke Suzuki.

Source/JavaScriptCore:

See https://github.com/tc39/proposal-relative-indexing-method/issues/41.

  • jsc.cpp:

(CommandLine::parseArguments):

  • enable Options::useAtMethod by default for the jsc shell for testing.
  • runtime/OptionsList.h:

LayoutTests:

Enable Options::useAtMethod for these tests.

  • inspector/model/remote-object-get-properties.html:
  • js/Object-getOwnPropertyNames.html:
  • js/array-unscopables-properties.html:
8:29 AM Changeset in webkit [271745] by commit-queue@webkit.org
  • 7 edits
    4 adds in trunk

[css-grid] Relayout grid items when definiteness changes.
https://bugs.webkit.org/show_bug.cgi?id=220657

LayoutTests/imported/w3c:

Tests percentage-size-subitems-002.html and relative-grandchild.html are
imported from WPT.

Patch by Ziran Sun <Ziran Sun> on 2021-01-22
Reviewed by Manuel Rego Casasnovas.

  • web-platform-tests/css/css-grid/grid-items/percentage-size-subitems-002-expected.html: Added.
  • web-platform-tests/css/css-grid/grid-items/percentage-size-subitems-002.html: Added.
  • LayoutTests/imported/w3c/web-platform-tests/css/css-grid/relative-grandchild.html: Added.
  • LayoutTests/imported/w3c/web-platform-tests/css/css-grid/relative-grandchild-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/w3c-import.log:

Source/WebCore:

Patch by Ziran Sun <Ziran Sun> on 2021-01-22
Reviewed by Manuel Rego Casasnovas.

When setting an override logical-height the definiteness can change causing %-height
children to resolve differently. This change adds this check to determine if a grid-item
needs relayout. It is an import of Chromium changes at
https://chromium-review.googlesource.com/c/chromium/src/+/2474917
Instead of adding maybeHasPercentHeightDescendant() in WebKit, this change calls
hasPercentHeightDescendants(). In Chromium it wasn't possible to use
hasPercentHeightDescendants() because of this quirk:
https://quirks.spec.whatwg.org/#the-percentage-height-calculation-quirk
WebKit doesn't seem to use the quirk for grid according to the image in
https://github.com/w3c/csswg-drafts/issues/5545

This also fixes issues in test:
grid-child-percent-basis-resize-1.html

Tests have been ported in WPT at
https://github.com/web-platform-tests/wpt/pull/26136

Tests: imported/w3c/web-platform-tests/css/css-grid/grid-items/percentage-size-subitems-002.html

imported/w3c/web-platform-tests/css/css-grid/relative-grandchild.html

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):

LayoutTests:

Patch by Ziran Sun <Ziran Sun> on 2021-01-22
Reviewed by Manuel Rego Casasnovas.

7:09 AM Changeset in webkit [271744] by Kate Cheney
  • 2 edits in trunk/Source/WebCore

Denying storage access on playstation.com then clicking sign-in fails to show the prompt again
https://bugs.webkit.org/show_bug.cgi?id=220838
<rdar://problem/73477444>

Reviewed by Alex Christensen.

Temporary cross-page storage access in the Web Process for quirks
should only be granted if the user hits "Allow" on the prompt.
This was causing the prompt to fail to show if a user clicks "Don't
Allow" then tries to sign in, then sign-in would fail without
storage access in the Network Process.

  • page/Quirks.cpp:

(WebCore::Quirks::requestStorageAccessAndHandleClick const):

4:11 AM Changeset in webkit [271743] by Chris Lord
  • 4 edits in trunk/Source/WebCore

Remove individual settings accessors from WorkerGlobalScope and add Settings::Values accessor
https://bugs.webkit.org/show_bug.cgi?id=220854

Reviewed by Youenn Fablet.

Remove individual settings accessors from WorkerGlobalScope and make
Settings::Values accessor public.

No new tests, no behavior change.

  • html/OffscreenCanvas.cpp:

(WebCore::OffscreenCanvas::createContextWebGL):

  • workers/WorkerAnimationController.cpp:

(WebCore::WorkerAnimationController::scheduleAnimation):
(WebCore::WorkerAnimationController::serviceRequestAnimationFrameCallbacks):

  • workers/WorkerGlobalScope.h:
2:59 AM Changeset in webkit [271742] by Chris Lord
  • 11 edits in trunk/Source/WebCore

Move FontGenericFamilies storage from SettingsBase to Settings::Values
https://bugs.webkit.org/show_bug.cgi?id=220801

Reviewed by Myles C. Maxfield.

Move FontGenericFamilies member from SettingsBase to Settings::Values
so that it can potentially be used within Workers. This will aid with
font usage off the main thread.

No new tests, no behavior change.

  • Headers.cmake:
  • Scripts/SettingsTemplates/Settings.cpp.erb:
  • Scripts/SettingsTemplates/Settings.h.erb:
  • css/CSSFontSelector.cpp:

(WebCore::resolveGenericFamily):
(WebCore::CSSFontSelector::fallbackFontAt):

  • page/SettingsBase.cpp:

(WebCore::SettingsBase::SettingsBase):
(WebCore::SettingsBase::standardFontFamily const):
(WebCore::SettingsBase::setStandardFontFamily):
(WebCore::SettingsBase::fixedFontFamily const):
(WebCore::SettingsBase::setFixedFontFamily):
(WebCore::SettingsBase::serifFontFamily const):
(WebCore::SettingsBase::setSerifFontFamily):
(WebCore::SettingsBase::sansSerifFontFamily const):
(WebCore::SettingsBase::setSansSerifFontFamily):
(WebCore::SettingsBase::cursiveFontFamily const):
(WebCore::SettingsBase::setCursiveFontFamily):
(WebCore::SettingsBase::fantasyFontFamily const):
(WebCore::SettingsBase::setFantasyFontFamily):
(WebCore::SettingsBase::pictographFontFamily const):
(WebCore::SettingsBase::setPictographFontFamily):

  • page/SettingsBase.h:
  • platform/graphics/FontGenericFamilies.cpp:

(WebCore::setGenericFontFamilyForScript):
(WebCore::genericFontFamilyForScript):
(WebCore::FontGenericFamilies::FontGenericFamilies):
(WebCore::FontGenericFamilies::isolatedCopy const):
(WebCore::FontGenericFamilies::standardFontFamily const):
(WebCore::FontGenericFamilies::fixedFontFamily const):
(WebCore::FontGenericFamilies::serifFontFamily const):
(WebCore::FontGenericFamilies::sansSerifFontFamily const):
(WebCore::FontGenericFamilies::cursiveFontFamily const):
(WebCore::FontGenericFamilies::fantasyFontFamily const):
(WebCore::FontGenericFamilies::pictographFontFamily const):
(WebCore::FontGenericFamilies::setStandardFontFamily):
(WebCore::FontGenericFamilies::setFixedFontFamily):
(WebCore::FontGenericFamilies::setSerifFontFamily):
(WebCore::FontGenericFamilies::setSansSerifFontFamily):
(WebCore::FontGenericFamilies::setCursiveFontFamily):
(WebCore::FontGenericFamilies::setFantasyFontFamily):
(WebCore::FontGenericFamilies::setPictographFontFamily):

  • platform/graphics/FontGenericFamilies.h:
  • style/StyleResolveForFontRaw.cpp:

(WebCore::Style::resolveForFontRaw):

1:34 AM Changeset in webkit [271741] by youenn@apple.com
  • 5 edits in trunk/Source/WebCore

Validate ItemHandles when decoding them in GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=220710

Reviewed by Wenson Hsieh.

ItemHandle may contain members that need to be validated if they are encoded/decoded through memory copy instead of IPC encode/decode routines.
This is particularly true of identifiers that can be null but cannot be encoded/decoded if the identifier is null.
For these inline ItemHandles, validate them before copying them.
No observable change of behavior, coveredd by existing tests.

  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::iterator::updateCurrentItem):

  • platform/graphics/displaylists/DisplayListItemBuffer.cpp:

(WebCore::DisplayList::ItemHandleInspector::test):
(WebCore::DisplayList::copyInto):
(WebCore::DisplayList::ItemHandle::safeCopyInto const):
(WebCore::DisplayList::ItemHandle::copyTo const): Deleted.

  • platform/graphics/displaylists/DisplayListItemBuffer.h:
  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::ClipToImageBuffer::isValid const):
(WebCore::DisplayList::DrawImageBuffer::isValid const):
(WebCore::DisplayList::DrawNativeImage::isValid const):
(WebCore::DisplayList::DrawPattern::isValid const):
(WebCore::DisplayList::PaintFrameForMedia::isValid const):
(WebCore::DisplayList::FlushContext::FlushContext):
(WebCore::DisplayList::FlushContext::isValid const):
(WebCore::DisplayList::MetaCommandChangeItemBuffer::MetaCommandChangeItemBuffer):
(WebCore::DisplayList::MetaCommandChangeItemBuffer::isValid const):
(WebCore::DisplayList::MetaCommandChangeDestinationImageBuffer::MetaCommandChangeDestinationImageBuffer):
(WebCore::DisplayList::MetaCommandChangeDestinationImageBuffer::isValid const):

1:07 AM Changeset in webkit [271740] by Nikolas Zimmermann
  • 10 edits in trunk/Source/WebCore

Continue removing glue code from RenderLayer that was recently added in r271559
https://bugs.webkit.org/show_bug.cgi?id=220729

Reviewed by Adrian Perez de Castro.

Follow-up on patch adressing the removal of the glue code that
forwards calls from RenderLayer to RenderLayerScrollableArea (see
webkit.org/b/60305).

Covered by existing tests.

  • page/FrameView.cpp:

(WebCore::FrameView::paintContents):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::paint):
(WebCore::RenderBlock::isPointInOverflowControl):
(WebCore::RenderBlock::baselinePosition const):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::intrinsicScrollbarLogicalWidth const):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::containsDirtyOverlayScrollbars const): Deleted.
(WebCore::RenderLayer::hitTestOverflowControls): Deleted.
(WebCore::RenderLayer::paintOverflowControls): Deleted.
(WebCore::RenderLayer::paintResizer): Deleted.
(WebCore::RenderLayer::paintScrollCorner): Deleted.
(WebCore::RenderLayer::paintOverlayScrollbars): Deleted.
(WebCore::RenderLayer::layerForHorizontalScrollbar const): Deleted.
(WebCore::RenderLayer::layerForVerticalScrollbar const): Deleted.
(WebCore::RenderLayer::horizontalScrollbar const): Deleted.
(WebCore::RenderLayer::verticalScrollbar const): Deleted.

  • rendering/RenderLayer.h:

(WebCore::RenderLayer::hasScrollbars const): Deleted.
(WebCore::RenderLayer::hasHorizontalScrollbar const): Deleted.
(WebCore::RenderLayer::hasVerticalScrollbar const): Deleted.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::requiresHorizontalScrollbarLayer const):
(WebCore::RenderLayerBacking::requiresVerticalScrollbarLayer const):
(WebCore::RenderLayerBacking::requiresScrollCornerLayer const):
(WebCore::RenderLayerBacking::positionOverflowControlsLayers):
(WebCore::RenderLayerBacking::paintIntoLayer):
(WebCore::RenderLayerBacking::paintContents):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateScrollingNodeLayers):

  • rendering/RenderTreeAsText.cpp:
  • rendering/RenderWidget.cpp:

(WebCore::RenderWidget::paint):

12:52 AM Changeset in webkit [271739] by Lauro Moura
  • 3 edits
    1 add in trunk

[WebDriver] Add info about importing tests
https://bugs.webkit.org/show_bug.cgi?id=220786

Reviewed by Carlos Garcia Campos.

Tools:

  • Scripts/import-webdriver-tests: Replace optparse with argparse and

refer to the tests README.md
(Importer.import_tests):

WebDriverTests:

  • README.md: Added.

Jan 21, 2021:

10:22 PM Changeset in webkit [271738] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Handle shapeMargin becoming NaN
https://bugs.webkit.org/show_bug.cgi?id=220352

Patch by Rob Buis <rbuis@igalia.com> on 2021-01-21
Reviewed by Zalan Bujtas.

Source/WebCore:

For large zoom factors shapeMargin can become NaN, in that case treat
it as zero.

Test: fast/shapes/shape-outside-floats/shape-outside-large-zoom.html

  • rendering/shapes/ShapeOutsideInfo.cpp:

(WebCore::ShapeOutsideInfo::computedShape const):

LayoutTests:

Add test for this.

  • fast/shapes/shape-outside-floats/shape-outside-large-zoom-expected.txt: Added.
  • fast/shapes/shape-outside-floats/shape-outside-large-zoom.html: Added.
10:11 PM Changeset in webkit [271737] by Peng Liu
  • 4 edits in trunk/Source/WebKit

PiP video subtitles stop updating when Safari is backgrounded
https://bugs.webkit.org/show_bug.cgi?id=220660

Reviewed by Darin Adler.

Subtitles in the picture-in-picture window will stop updating when the browser is
in the background because we freeze the layer tree when a browser is in the background.
This patch fixes this issue by avoiding freezing the layer tree if a video is playing
in picture-in-picture when the browser is in the background.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updateDrawingAreaLayerTreeFreezeState):

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

(WebKit::VideoFullscreenManager::videoInPictureInPicture const):
(WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):
(WebKit::VideoFullscreenManager::exitVideoFullscreenForVideoElement):
(WebKit::VideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation):

10:08 PM Changeset in webkit [271736] by timothy_horton@apple.com
  • 2 edits in trunk/LayoutTests

REGRESSION (r271472): [ Mac WK2 ] intersection-observer/target-deleted.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=220637
<rdar://problem/73220571>

Reviewed by Simon Fraser.

  • intersection-observer/target-deleted.html:

For some reason, on some configurations, this test recently stopped seeing its
intersection observer get garbage collected when it expects. The regression
point is likely irrelevant, though multiple bots agree.

Doing a full rendering update by using rAF instead of just a setInterval
seems to be enough to get the object to actually be collected promptly.

7:50 PM Changeset in webkit [271735] by Devin Rousso
  • 23 edits in trunk

[Apple Pay] use the first item in shippingOptions even when it's not selected
https://bugs.webkit.org/show_bug.cgi?id=220810

Reviewed by Andy Estes.

LayoutTests/imported/w3c:

  • web-platform-tests/payment-request/payment-request-constructor.https.sub-expected.txt:
  • web-platform-tests/payment-request/payment-request-shippingOption-attribute.https-expected.txt:

Source/JavaScriptCore:

  • inspector/protocol/Console.json:
  • runtime/ConsoleTypes.h:
  • inspector/ConsoleMessage.cpp:

(Inspector::messageSourceValue):

  • runtime/ConsoleClient.cpp:

(JSC::appendMessagePrefix):
Add a new PaymentRequest value to the ChannelSource enum.

Source/WebCore:

The Payment Request API defines a selected property of PaymentShippingOption that is
used to control the initially selected shipping option when showing/updating a payment
request. Currently, PKShippingMethod does not have an equivalent concept and instead just
uses the first item in the -[PKPaymentRequest setShippingMethods:] such that there is
always a selected PKShippingMethod. This patch adjusts WebKit to follow those same
conventions, in that the first item in paymentDetailsBase.shippingOptions is used as the
selectedShippingOption so as to avoid situations where PassKit displays the first shipping
option while PaymentRequest.prototype.get shippingOption has a different value, which
could result in the user authorizing a payment with different shipping details than what
they were shown. Ideally in the future PassKit will add API/SPI to allow us to undo this.

Tests: http/tests/paymentrequest/payment-request-change-shipping-option.https.html

http/tests/paymentrequest/updateWith-shippingOptions.https.html
web-platform-tests/payment-request/payment-request-constructor.https.sub.html
web-platform-tests/payment-request/payment-request-shippingOption-attribute.https.html

  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::checkAndCanonicalizeDetails):
(WebCore::PaymentRequest::create):
(WebCore::PaymentRequest::settleDetailsPromise):
Pass the ScriptExecutionContext instead of the JSGlobalObject so that it's possible to
call ScriptExecutionContext::addConsoleMessage. When creating a PaymentRequest, log if
subsequent PaymentShippingOption are marked as selected.

  • inspector/agents/page/PageConsoleAgent.cpp:

(WebCore::PageConsoleAgent::getLoggingChannels):
Add a new PaymentRequest value to the ChannelSource enum.

Source/WebInspectorUI:

  • UserInterface/Models/ConsoleMessage.js:
  • UserInterface/Models/IssueMessage.js:

(WI.IssueMessage):
Add a new PaymentRequest value to the ChannelSource enum.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebChromeClient.mm:

(stringForMessageSource):
Add a new PaymentRequest value to the ChannelSource enum.

LayoutTests:

  • http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https-expected.txt:
  • http/tests/paymentrequest/payment-request-change-shipping-option.https.html:
  • http/tests/paymentrequest/payment-request-change-shipping-option.https-expected.txt:
  • http/tests/paymentrequest/payment-response-retry-method.https-expected.txt:
  • http/tests/paymentrequest/updateWith-shippingOptions.https.html:
  • http/tests/paymentrequest/updateWith-shippingOptions.https-expected.txt:
7:39 PM Changeset in webkit [271734] by Devin Rousso
  • 5 edits in trunk

[Payment Request] constructor should throw if a payment method is provided more than once
https://bugs.webkit.org/show_bug.cgi?id=220824

Reviewed by Andy Estes.

LayoutTests/imported/w3c:

  • web-platform-tests/payment-request/payment-request-constructor-thcrash.https-expected.txt:
  • web-platform-tests/payment-request/payment-request-constructor.https.sub-expected.txt:

Source/WebCore:

Test: web-platform-tests/payment-request/payment-request-constructor.https.sub.html

  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::stringify): Added.
(WebCore::PaymentRequest::create):

7:22 PM Changeset in webkit [271733] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Protect against sampleRate being 0 in IIRFilter::tailTime()
https://bugs.webkit.org/show_bug.cgi?id=220837
<rdar://73395924>

Reviewed by Eric Carlson.

  • platform/audio/IIRFilter.cpp:

(WebCore::IIRFilter::tailTime):
Return early if sampleRate is 0 (invalid). Add a release assertion to make
sure that numberOfBlocks is greater than 0 since this is the size of the
|magnitude| array and we access magnitude[0] later on.

7:09 PM Changeset in webkit [271732] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

REGRESSION (r271559): [BigSur] fast/forms/password-scrolled-after-caps-lock-toggled.html is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=220743

Patch by Nikolas Zimmermann <nzimmermann@igalia.com> on 2021-01-21
Reviewed by Simon Fraser.

Create RenderLayerScrollableArea objects for layers that establish
overflow clipping (overflow: hidden). It is unfortunate that this is
necessary and could be optimized in the future.

Covered by fast/forms/password-scrolled-after-caps-lock-toggled.html.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::requiresLayerWithScrollableArea const): Layers
that establish overflow clipping (overflow: hidden) need to create
RenderLayerScrollableArea.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scroll): Avoid unnecessary creation of
RenderLayerScrollableArea. Calling scroll() should early return here
instead of returning false from RenderLayerScrollableArea::scroll().

6:51 PM Changeset in webkit [271731] by ysuzuki@apple.com
  • 9 edits
    1 add in trunk

[JSC] JSPromise should not propagate TerminatedExecutionError
https://bugs.webkit.org/show_bug.cgi?id=220820
<rdar://problem/72929399>

Reviewed by Mark Lam.

JSTests:

  • stress/terminated-execution-error-in-promise.js: Added.

(let.x.get toString):
(import.x.then):

Source/JavaScriptCore:

TerminatedExecutionError is uncatcheable exception to finish JS execution as soon as possible.
We should not propagate TerminatedExecutionError in JSPromise's rejection.
In this patch, we do not reject promise if exception is TerminatedExecutionError.

  • API/JSAPIGlobalObject.mm:

(JSC::JSAPIGlobalObject::moduleLoaderImportModule):
(JSC::JSAPIGlobalObject::moduleLoaderFetch):

  • API/JSContext.mm:

(-[JSContext evaluateJSScript:]):

  • jsc.cpp:

(GlobalObject::moduleLoaderImportModule):
(GlobalObject::moduleLoaderFetch):
(runWithOptions):

  • runtime/Completion.cpp:

(JSC::rejectPromise):
(JSC::loadAndEvaluateModule):
(JSC::loadModule):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/JSModuleLoader.cpp:

(JSC::reject):
(JSC::JSModuleLoader::importModule):
(JSC::JSModuleLoader::resolve):
(JSC::JSModuleLoader::fetch):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/JSWebAssembly.cpp:

(JSC::reject):

6:48 PM Changeset in webkit [271730] by Simon Fraser
  • 5 edits
    1 delete in trunk

Scroll-chaining not triggering before complete end of overscroll
https://bugs.webkit.org/show_bug.cgi?id=219960
<rdar://problem/72595521>

Reviewed by Tim Horton.

Source/WebCore:

Scroll latching for momentum scrolls was too sticky; it would keep latching to the same
scroller within a 100ms of the last event that was handled, which was exacerbated by the
fact that ScrollController can go into "ignoreMomentumScrolls" mode which results in
no visible scrolling but continued consumption of momentum wheel events.

Fix by releasing the latch as soon as we see the end of a momentum scroll,
so that we always re-evaluate latching at the start of the next gesture.

Tested by fast/scrolling/latching/nested-cross-axis-latch-expiration.html

  • page/scrolling/ScrollingTreeLatchingController.cpp:

(WebCore::ScrollingTreeLatchingController::nodeDidHandleEvent):

LayoutTests:

Adjusted test for new behavior. No longer need WK1 result.

  • fast/scrolling/latching/nested-cross-axis-latch-expiration-expected.txt:
  • fast/scrolling/latching/nested-cross-axis-latch-expiration.html:
  • platform/mac-wk1/fast/scrolling/latching/nested-cross-axis-latch-expiration-expected.txt: Removed.
5:40 PM Changeset in webkit [271729] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Unreviewed attempt to fix WatchOS build after r271673.

This feature is not available in the simulator for any of the
IOS_FAMILY platforms.

  • wtf/PlatformHave.h:
5:37 PM Changeset in webkit [271728] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Unreviewed, reverting r271727.

Fix is wrong

Reverted changeset:

"Unreviewed attempt to fix WatchOS build after r271673."
https://trac.webkit.org/changeset/271727

5:32 PM Changeset in webkit [271727] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Unreviewed attempt to fix WatchOS build after r271673.

  • wtf/PlatformHave.h:
5:24 PM Changeset in webkit [271726] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Fix bidi confusion when evaluation result has RTL text
https://bugs.webkit.org/show_bug.cgi?id=220639

Patch by Ebrahim Byagowi <ebrahim@gnu.org> on 2021-01-21
Reviewed by BJ Burg.

Apply unicode-bidi: isolate to formatted string and regexp so that
when they contain RTL text the bidi algorithm won't mix
saved variable name ($1, $2, ...) with the content.

  • UserInterface/Views/FormattedValue.css:

(.formatted-string, .formatted-regexp):

5:10 PM Changeset in webkit [271725] by Peng Liu
  • 2 edits in trunk/Source/WebCore

Videos on Facebook Stories do not play
https://bugs.webkit.org/show_bug.cgi?id=220834

Reviewed by Jer Noble.

Add a quirk (for the iOS port) to allow videos (with audio) on Facebook stories to play.

  • page/Quirks.cpp:

(WebCore::Quirks::shouldAutoplayForArbitraryUserGesture const):

5:07 PM Changeset in webkit [271724] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews] Use github instead of svn.webkit.org to fetch contributors.json
https://bugs.webkit.org/show_bug.cgi?id=220808

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(ValidateCommiterAndReviewer): Changed url to github.
(ValidateCommiterAndReviewer.load_contributors_from_github): Renamed.
(ValidateCommiterAndReviewer.load_contributors):

4:55 PM Changeset in webkit [271723] by weinig@apple.com
  • 4 edits in trunk/Source/WebCore

Remove support for now unused CMYKA<> color type
https://bugs.webkit.org/show_bug.cgi?id=220828

Reviewed by Wenson Hsieh.

We no longer have any users of the CMYKA<> type, so it, and it's conversion functions
can be removed.

  • platform/graphics/ColorConversion.cpp:

(WebCore::toCMYKA): Deleted.

  • platform/graphics/ColorConversion.h:

(WebCore::toCMYKA): Deleted.

  • platform/graphics/ColorTypes.h:

(WebCore::CMYKA::CMYKA): Deleted.

4:15 PM Changeset in webkit [271722] by Ryan Haddad
  • 2 edits in trunk/Source/WTF

Add experimental support for separated layers
https://bugs.webkit.org/show_bug.cgi?id=220734

Unreviewed build fix.

  • wtf/PlatformHave.h: Remove watchOS and tvOS.
4:12 PM Changeset in webkit [271721] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Add WebXR to features.json
https://bugs.webkit.org/show_bug.cgi?id=220811

Reviewed by Simon Fraser.

We are clearly working on WebXR. See:

No new tests because there is no behavior change.

  • features.json:
3:43 PM Changeset in webkit [271720] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Null dereference in CompositeEditCommand::cloneParagraphUnderNewElement(): needs to check lastNode parent
https://bugs.webkit.org/show_bug.cgi?id=220813

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

Source/WebCore:

When iterating through parent nodes, cloneParagraphUnderNewElement()
has to be careful to check for the top of the DOM tree for *both*
startNode and lastNode.
Since we're explicitly checking for this now, remove the assertion
that lastNode's parent is never nullptr.

Test: editing/inserting/insert-ul-select-all.html

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):

LayoutTests:

Add a test to verify that we don't iterate outside the DOM tree when
inserting an unordered list on top of existing content.

  • editing/inserting/insert-ul-select-all-expected.txt: Added.
  • editing/inserting/insert-ul-select-all.html: Added.
3:36 PM Changeset in webkit [271719] by don.olmstead@sony.com
  • 2 edits in trunk/Source/WebCore

[Curl] Replace CURLOPT_ENCODING with CURLOPT_ACCEPT_ENCODING
https://bugs.webkit.org/show_bug.cgi?id=220825

Reviewed by Fujii Hironori.

Use CURLOPT_ACCEPT_ENCODING which replaced CURLOPT_ENCODING in cURL v7.21.6.

  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::enableAcceptEncoding):

3:35 PM Changeset in webkit [271718] by don.olmstead@sony.com
  • 2 edits in trunk/Source/WebCore

[Curl] Remove redundant certificate error check
https://bugs.webkit.org/show_bug.cgi?id=220816

Reviewed by Fujii Hironori.

Within isSSLCertVerificationError the error code is checked against CURLE_SSL_CACERT and
CURLE_PEER_FAILED_VERIFICATION. Since cURL v7.62.0 CURLE_SSL_CACERT was deprecated and is
currently defined as CURLE_PEER_FAILED_VERIFICATION. Remove the check against
CURLE_SSL_CACERT since its redundant and deprecated.

  • platform/network/curl/ResourceErrorCurl.cpp:

(WebCore::ResourceError::isSSLCertVerificationError const):

3:28 PM Changeset in webkit [271717] by don.olmstead@sony.com
  • 2 edits in trunk/Source/WebCore

[Curl] Remove invalid HTTP version checks
https://bugs.webkit.org/show_bug.cgi?id=220817

Reviewed by Fujii Hironori.

The CurlResponse.httpVersion value comes from a call to CURLINFO_HTTP_VERSION which returns
CURL_HTTP_VERSION_1_0, CURL_HTTP_VERSION_1_1, CURL_HTTP_VERSION_2_0, CURL_HTTP_VERSION_3 or
0 if the version can't be determined. The case statement in ResourceResponse constructor is
checking for CURL_HTTP_VERSION_2TLS and CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE which aren't
valid returns so they can be removed.

  • platform/network/curl/ResourceResponseCurl.cpp:

(WebCore::ResourceResponse::ResourceResponse):

3:26 PM Changeset in webkit [271716] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Update setup-commit-queue.sh for github repo
https://bugs.webkit.org/show_bug.cgi?id=220750

Reviewed by Jonathan Bedard.

  • EWSTools/setup-commit-queue.sh:
2:56 PM Changeset in webkit [271715] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

zero and rename boundingRect pointer in Font::platformBoundsForGlyph() to CTFontGetBoundingRectsForGlyphs()
https://bugs.webkit.org/show_bug.cgi?id=219177

Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2021-01-21
Reviewed by Darin Adler.

Zero and rename a CGRect struct in two places where the count argument
to CTFontGetBoundingRectsForGlyphs() is already 1.
Thanks to Darin Adler for pointing out this issue.

No new tests, no behavior changes.

  • platform/graphics/coretext/FontCoreText.cpp:

(WebCore::Font::platformBoundsForGlyph const):
(WebCore::Font::isProbablyOnlyUsedToRenderIcons const):

2:55 PM Changeset in webkit [271714] by commit-queue@webkit.org
  • 12 edits in trunk/Source

Add experimental feature to use network loader
https://bugs.webkit.org/show_bug.cgi?id=220521
<rdar://problem/69394713>

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

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

Manually verified that the setting is correctly appearing in Safari and being given to CFNetwork.

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):

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

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::experimentalFeatureEnabled):
(WebKit::WebsiteDataStore::http3Enabled):
(WebKit::WebsiteDataStore::useNetworkLoader):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
  • wtf/PlatformHave.h:
2:54 PM Changeset in webkit [271713] by Aditya Keerthi
  • 18 edits
    1 delete in trunk

Unreviewed, reverting r271691.
https://bugs.webkit.org/show_bug.cgi?id=220812

Introduced crash, and failing API tests.

Reverted changeset:

"[macOS] Titlebar separator doesn't show when WKWebView is scrolled"
https://bugs.webkit.org/show_bug.cgi?id=220633
https://trac.webkit.org/changeset/271691

1:45 PM Changeset in webkit [271712] by weinig@apple.com
  • 28 edits
    4 copies in trunk

Remove explicit clamp to SRGB for Lab colors on CG platforms that support wide color
https://bugs.webkit.org/show_bug.cgi?id=220684

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Update existing lab/lch tests to match new more precise values from https://github.com/web-platform-tests/wpt/pull/27202
and add two new tests for colors outside the sRGB gamut that will be upstreamed to WPT after landing.

  • web-platform-tests/css/css-color/lab-001.html:
  • web-platform-tests/css/css-color/lab-002.html:
  • web-platform-tests/css/css-color/lab-003.html:
  • web-platform-tests/css/css-color/lab-004-expected.html:
  • web-platform-tests/css/css-color/lab-004.html:
  • web-platform-tests/css/css-color/lab-005-expected.html:
  • web-platform-tests/css/css-color/lab-005.html:
  • web-platform-tests/css/css-color/lab-006-expected.html:
  • web-platform-tests/css/css-color/lab-006.html:
  • web-platform-tests/css/css-color/lab-007-expected.html:
  • web-platform-tests/css/css-color/lab-007.html:
  • web-platform-tests/css/css-color/lab-008-expected.html: Added.
  • web-platform-tests/css/css-color/lab-008.html: Added.
  • web-platform-tests/css/css-color/lch-001.html:
  • web-platform-tests/css/css-color/lch-002.html:
  • web-platform-tests/css/css-color/lch-003.html:
  • web-platform-tests/css/css-color/lch-004-expected.html:
  • web-platform-tests/css/css-color/lch-004.html:
  • web-platform-tests/css/css-color/lch-005-expected.html:
  • web-platform-tests/css/css-color/lch-005.html:
  • web-platform-tests/css/css-color/lch-006-expected.html:
  • web-platform-tests/css/css-color/lch-006.html:
  • web-platform-tests/css/css-color/lch-007-expected.html:
  • web-platform-tests/css/css-color/lch-007.html:
  • web-platform-tests/css/css-color/lch-008-expected.html: Added.
  • web-platform-tests/css/css-color/lch-008.html: Added.

Source/WebCore:

To avoid clamping device independent colors to sRGB we convert colors without a direct
CoreGraphics representation to ExtendedSRGB to ensure the full gamut is preserved.

While CoreGraphics does support the Lab colorspace on some systems (Big Sur and later),
to ensure all versions of WebKit can support wide color Lab this approach provides the
most coverage.

  • platform/graphics/ColorConversion.cpp:
  • platform/graphics/ColorConversion.h:
  • platform/graphics/ColorTypes.h:

Add support for ExtendedSRGBA and LinearExtendedSRGBA color types.

  • platform/graphics/cg/ColorCG.cpp:

(WebCore::leakCGColor):
Update fallback conversion to convert to an extended color space to avoid premature
clamping.

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

[GPUProcess][iOS] https://foobar404.github.io/Wave.js/#/ does not output any audio
https://bugs.webkit.org/show_bug.cgi?id=220802
<rdar://problem/73455820>

Reviewed by Per Arne Vollan.

Allow in the sandbox a few things that were needed to use AudioSourceProvider in the GPUProcess.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
12:35 PM Changeset in webkit [271710] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[macOS] The development WebContent XPC service crashes under WebKit::AuxiliaryProcess::initializeSandbox
https://bugs.webkit.org/show_bug.cgi?id=220777
<rdar://problem/73382584>

Reviewed by Brent Fulgham.

This happens because the development XPC service does not have the required private entitlement to enable message filtering in the sandbox,
and therefore fails to apply the sandbox. The existing runtime switching to enable message filtering based on the presence of the entitlement
is not working correctly. The 'if' clause checking the sandbox parameter in the sandbox cannot be nested inside an 'allow' clause, it appears.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::initializeSandbox):

  • WebProcess/com.apple.WebProcess.sb.in:
12:25 PM Changeset in webkit [271709] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Ignore Webex Audio Device for capture
https://bugs.webkit.org/show_bug.cgi?id=220763
<rdar://problem/73219877>

Reviewed by Eric Carlson.

Manually tested.

  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:

(WebCore::isValidCaptureDevice):

12:13 PM Changeset in webkit [271708] by Alan Coon
  • 5 edits in branches/safari-611.1.10.1-branch/Source

Cherry-pick r271619. rdar://problem/73461359

REGRESSION(r269865) Mail's context menu when right clicking on a link does not contain correct entries
https://bugs.webkit.org/show_bug.cgi?id=220745

Patch by Alex Christensen <achristensen@webkit.org> on 2021-01-19
Reviewed by Tim Horton.

Source/WebCore:

r269865 broke binary compatibility by changing the values of many WebCore::ContextMenuAction values and many WKContextMenuItemTag values,
and not in the same way. In WebContextMenuProxyMac::getContextMenuItem we call NSMenuItem setTag: with the value from WebCore::ContextMenuAction
and mail compares those values with values from WKContextMenuItemTag in our C API. This isn't ideal, but we need to retain binary compatibility.

  • platform/ContextMenuItem.h:

Source/WebKit:

  • Shared/API/c/WKContextMenuItem.cpp: Add a bunch of static_asserts to verify that our binary values correspond to each other and don't change.
  • Shared/API/c/WKContextMenuItemTypes.h:

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

12:11 PM Changeset in webkit [271707] by Alan Coon
  • 8 edits in branches/safari-611.1.10.1-branch/Source

Versioning.

WebKit-7611.1.10.1.2

11:50 AM Changeset in webkit [271706] by commit-queue@webkit.org
  • 2 edits
    104 adds in trunk/LayoutTests/imported/w3c

Import css-variables WPTs
https://bugs.webkit.org/show_bug.cgi?id=220787

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-01-21
Reviewed by Darin Adler.

Import WPTs for CSS variables via Tools/Scripts/import-w3c-tests and add expectations.

https://wpt.fyi/results/css/css-variables?label=master&label=experimental&aligned

  • resources/import-expectations.json:
  • web-platform-tests/css/css-variables/META.yml: Added.
  • web-platform-tests/css/css-variables/css-vars-custom-property-case-sensitive-001-expected.html: Added.
  • web-platform-tests/css/css-variables/css-vars-custom-property-case-sensitive-001.html: Added.
  • web-platform-tests/css/css-variables/css-vars-custom-property-inheritance-expected.html: Added.
  • web-platform-tests/css/css-variables/css-vars-custom-property-inheritance.html: Added.
  • web-platform-tests/css/css-variables/resources/variable-reference-refresh-iframe.css: Added.

(#testElement):

  • web-platform-tests/css/css-variables/resources/w3c-import.log: Added.
  • web-platform-tests/css/css-variables/test_variable_legal_values-expected.txt: Added.
  • web-platform-tests/css/css-variables/test_variable_legal_values.html: Added.
  • web-platform-tests/css/css-variables/variable-animation-from-to-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-animation-from-to.html: Added.
  • web-platform-tests/css/css-variables/variable-animation-over-transition-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-animation-over-transition.html: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-into-keyframe-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-into-keyframe-shorthand-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-into-keyframe-shorthand.html: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-into-keyframe-transform-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-into-keyframe-transform.html: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-into-keyframe.html: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-within-keyframe-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-within-keyframe-fallback-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-within-keyframe-fallback.html: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-within-keyframe-multiple-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-within-keyframe-multiple.html: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-within-keyframe.html: Added.
  • web-platform-tests/css/css-variables/variable-animation-to-only-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-animation-to-only.html: Added.
  • web-platform-tests/css/css-variables/variable-created-document-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-created-document.html: Added.
  • web-platform-tests/css/css-variables/variable-created-element-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-created-element.html: Added.
  • web-platform-tests/css/css-variables/variable-cssText-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-cssText.html: Added.
  • web-platform-tests/css/css-variables/variable-definition-border-shorthand-serialize-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-definition-border-shorthand-serialize.html: Added.
  • web-platform-tests/css/css-variables/variable-definition-cascading-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-definition-cascading.html: Added.
  • web-platform-tests/css/css-variables/variable-definition-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-definition-keywords-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-definition-keywords.html: Added.
  • web-platform-tests/css/css-variables/variable-definition.html: Added.
  • web-platform-tests/css/css-variables/variable-first-letter-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-first-letter.html: Added.
  • web-platform-tests/css/css-variables/variable-first-line-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-first-line.html: Added.
  • web-platform-tests/css/css-variables/variable-generated-content-dynamic-001-expected.html: Added.
  • web-platform-tests/css/css-variables/variable-generated-content-dynamic-001.html: Added.
  • web-platform-tests/css/css-variables/variable-invalidation-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-invalidation.html: Added.
  • web-platform-tests/css/css-variables/variable-presentation-attribute-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-presentation-attribute.html: Added.
  • web-platform-tests/css/css-variables/variable-pseudo-element-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-pseudo-element.html: Added.
  • web-platform-tests/css/css-variables/variable-reference-cssom-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-reference-cssom.html: Added.
  • web-platform-tests/css/css-variables/variable-reference-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-reference-refresh-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-reference-refresh.html: Added.
  • web-platform-tests/css/css-variables/variable-reference-shorthands-cssom-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-reference-shorthands-cssom.html: Added.
  • web-platform-tests/css/css-variables/variable-reference-shorthands-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-reference-shorthands.html: Added.
  • web-platform-tests/css/css-variables/variable-reference-variable-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-reference-variable.html: Added.
  • web-platform-tests/css/css-variables/variable-reference-without-whitespace-expected.html: Added.
  • web-platform-tests/css/css-variables/variable-reference-without-whitespace.html: Added.
  • web-platform-tests/css/css-variables/variable-reference.html: Added.
  • web-platform-tests/css/css-variables/variable-substitution-background-properties-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-substitution-background-properties.html: Added.
  • web-platform-tests/css/css-variables/variable-substitution-basic-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-substitution-basic.html: Added.
  • web-platform-tests/css/css-variables/variable-substitution-filters-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-substitution-filters.html: Added.
  • web-platform-tests/css/css-variables/variable-substitution-plus-box-shadow-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-substitution-plus-box-shadow.html: Added.
  • web-platform-tests/css/css-variables/variable-substitution-replaced-size-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-substitution-replaced-size.html: Added.
  • web-platform-tests/css/css-variables/variable-substitution-shadow-properties-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-substitution-shadow-properties.html: Added.
  • web-platform-tests/css/css-variables/variable-substitution-shorthands-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-substitution-shorthands.html: Added.
  • web-platform-tests/css/css-variables/variable-substitution-variable-declaration-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-substitution-variable-declaration.html: Added.
  • web-platform-tests/css/css-variables/variable-transitions-from-no-value-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-transitions-from-no-value.html: Added.
  • web-platform-tests/css/css-variables/variable-transitions-to-no-value-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-transitions-to-no-value.html: Added.
  • web-platform-tests/css/css-variables/variable-transitions-transition-property-all-before-value-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-transitions-transition-property-all-before-value.html: Added.
  • web-platform-tests/css/css-variables/variable-transitions-transition-property-variable-before-value-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-transitions-transition-property-variable-before-value.html: Added.
  • web-platform-tests/css/css-variables/variable-transitions-value-before-transition-property-all-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-transitions-value-before-transition-property-all.html: Added.
  • web-platform-tests/css/css-variables/variable-transitions-value-before-transition-property-variable-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-transitions-value-before-transition-property-variable.html: Added.
  • web-platform-tests/css/css-variables/vars-background-shorthand-001-expected.html: Added.
  • web-platform-tests/css/css-variables/vars-background-shorthand-001.html: Added.
  • web-platform-tests/css/css-variables/vars-border-shorthand-serialize-expected.txt: Added.
  • web-platform-tests/css/css-variables/vars-border-shorthand-serialize.html: Added.
  • web-platform-tests/css/css-variables/vars-font-shorthand-001-expected.html: Added.
  • web-platform-tests/css/css-variables/vars-font-shorthand-001.html: Added.
  • web-platform-tests/css/css-variables/w3c-import.log: Added.
11:50 AM Changeset in webkit [271705] by Fujii Hironori
  • 14 edits in trunk

Remove ENABLE_USERSELECT_ALL macro which is enabled for all ports
https://bugs.webkit.org/show_bug.cgi?id=100424

Reviewed by Don Olmstead.

.:

  • Source/cmake/OptionsMac.cmake:
  • Source/cmake/WebKitFeatures.cmake:

Source/WebCore:

  • dom/Node.cpp:

(WebCore::computeEditabilityFromComputedStyle):

  • dom/Position.cpp:

(WebCore::Position::rootUserSelectAllForNode):

  • dom/Position.h:

(WebCore::Position::nodeIsUserSelectAll): Deleted.
(WebCore::Position::rootUserSelectAllForNode): Deleted.

  • editing/FrameSelection.cpp:

(WebCore::adjustPositionForUserSelectAll):
(WebCore::FrameSelection::modifyExtendingRight):
(WebCore::FrameSelection::modifyExtendingForward):
(WebCore::FrameSelection::modifyExtendingLeft):
(WebCore::FrameSelection::modifyExtendingBackward):

  • editing/VisibleUnits.cpp:

(WebCore::findStartOfParagraph):
(WebCore::findEndOfParagraph):

  • page/EventHandler.cpp:

(WebCore::nodeToSelectOnMouseDownForNode):
(WebCore::EventHandler::updateSelectionForMouseDrag):

Source/WTF:

  • wtf/PlatformEnableCocoa.h:

Tools:

  • Scripts/webkitperl/FeatureList.pm:
11:40 AM Changeset in webkit [271704] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

[Payment Request] increment the current version
https://bugs.webkit.org/show_bug.cgi?id=220807
<rdar://problem/68622300>

Reviewed by Andy Estes.

  • Modules/applepay/cocoa/PaymentAPIVersionCocoa.mm:

(WebCore::PaymentAPIVersion::current):

11:37 AM Changeset in webkit [271703] by Devin Rousso
  • 7 edits
    8 adds in trunk

Payment Request API - response.shippingOption is always null
https://bugs.webkit.org/show_bug.cgi?id=220566
<rdar://problem/73204387>

Reviewed by Andy Estes.

Source/WebCore:

The Payment Request API spec indicates that when updating a PaymentRequest's details [1]
we should be checking for the existence of displayItems, shippingOptions (but only if
requestShipping was specified), and modifiers before overriding any corresponding data
on the PaymentRequest itself. This means that calls to updateWith only need to provide
the data that needs to be changed (e.g. the total) rather than data for the whole payment.

[1]: https://www.w3.org/TR/payment-request/#dfn-update-a-paymentrequest-s-details-algorithm

Tests: http/tests/inspector/paymentrequest/payment-request-internal-properties.https.html

http/tests/paymentrequest/updateWith-displayItems.https.html
http/tests/paymentrequest/updateWith-modifiers.https.html
http/tests/paymentrequest/updateWith-shippingOptions.https.html
http/tests/paymentrequest/updateWith-total.https.html

  • Modules/paymentrequest/PaymentDetailsBase.h:

Make every member Optional so we can distinguish between "provided an empty array" and
"did not provide the property at all".

  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::checkAndCanonicalizeDetails):
(WebCore::PaymentRequest::create):
(WebCore::PaymentRequest::settleDetailsPromise):

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:

(WebCore::ApplePayPaymentHandler::show):
(WebCore::ApplePayPaymentHandler::computeShippingMethods):
(WebCore::ApplePayPaymentHandler::computeTotalAndLineItems const):
(WebCore::ApplePayPaymentHandler::computeErrors const):
Add checks before accessing displayItems, shippingOptions, and modifiers.
Match the described behavior of the spec where shippingOptions (but only if
requestShipping was specified) and modifiers are set to an empty array if not provided
when constructing the PaymentRequest.

  • inspector/WebInjectedScriptHost.cpp:

(WebCore::objectForPaymentDetails):
Don't create internal properties for displayItems, shippingOptions, and modifiers
unless they are actually provided for the same reason as above.

LayoutTests:

  • http/tests/inspector/paymentrequest/payment-request-internal-properties.https-expected.txt:
  • http/tests/paymentrequest/updateWith-displayItems.https.html: Added.
  • http/tests/paymentrequest/updateWith-displayItems.https-expected.txt: Added.
  • http/tests/paymentrequest/updateWith-modifiers.https.html: Added.
  • http/tests/paymentrequest/updateWith-modifiers.https-expected.txt: Added.
  • http/tests/paymentrequest/updateWith-shippingOptions.https.html: Added.
  • http/tests/paymentrequest/updateWith-shippingOptions.https-expected.txt: Added.
  • http/tests/paymentrequest/updateWith-total.https.html: Added.
  • http/tests/paymentrequest/updateWith-total.https-expected.txt: Added.
11:15 AM Changeset in webkit [271702] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GPU Process] Add Layout tests timeouts and failures to TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=220803

Patch by Rini Patel <rini_patel@apple.com> on 2021-01-21
Reviewed by Simon Fraser.

  • gpu-process/TestExpectations:
10:46 AM Changeset in webkit [271701] by Simon Fraser
  • 5 edits
    5 adds in trunk

Source/WebCore:
REGRESSION (Async overflow): Scroll stutters/blocked with nested scrolling
https://bugs.webkit.org/show_bug.cgi?id=219923
<rdar://72390196>

Reviewed by Sam Weinig.

When handling wheel events in overflow:scroll areas which are only scrollable on
one axis, particularly when nested, we need to account for the different
scrollability on each axis in a couple of places.

First, address the FIXME in ScrollingTreeScrollingNodeDelegateMac::shouldRubberBandInDirection()
by consulting node scrollability; this prevents attempts to rubberband on a non-scrollable
axis.

Second, ScrollController should only allow stretching on a scrollable axis.

The effects of these changes are that we no longer keep sending events to a node which
ends up not handling them; this resulted in latching "timing out", re-hit-testing
in the middle of a gesture and causing stuttery position changes on a different
scroller.

Tests: fast/scrolling/latching/nested-cross-axis-latch-expiration.html

fast/scrolling/latching/overflow-hidden-on-one-axis.html

  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:

(WebCore::ScrollingTreeScrollingNodeDelegateMac::shouldRubberBandInDirection const):

  • platform/cocoa/ScrollController.mm:

(WebCore::ScrollController::handleWheelEvent):

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::scrollTo): Add the scrollingNodeID to the logging.

LayoutTests:
REGRESSION (?): Scroll stutters/blocked with nested scrolling
https://bugs.webkit.org/show_bug.cgi?id=219923
<rdar://72390196>

Reviewed by Sam Weinig.

  • fast/scrolling/latching/nested-cross-axis-latch-expiration-expected.txt: Added.
  • fast/scrolling/latching/nested-cross-axis-latch-expiration.html: Added.
  • fast/scrolling/latching/overflow-hidden-on-one-axis-expected.txt: Added.
  • fast/scrolling/latching/overflow-hidden-on-one-axis.html: Added.
10:40 AM Changeset in webkit [271700] by achristensen@apple.com
  • 3 edits in trunk/LayoutTests

Add logs to HTTP/0.9 test
https://bugs.webkit.org/show_bug.cgi?id=220776

r271652 fixed default-port-script-blocked.html but caused default-port-plugin-blocked.html to time out.
Add logs to determine what is happening when it times out.

  • http/tests/security/http-0.9/default-port-plugin-blocked-expected.txt:
  • http/tests/security/http-0.9/default-port-plugin-blocked.html:
10:39 AM Changeset in webkit [271699] by weinig@apple.com
  • 18 edits in trunk/Source

Add experimental support for separated layers
https://bugs.webkit.org/show_bug.cgi?id=220734

Reviewed by Simon Fraser.

Source/WebCore:

Plumb a "separated" bit through the graphics layer infrastructure. Currently unused
but will be used for optimization experimentation.

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::GraphicsLayer):

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::separated const):
(WebCore::GraphicsLayer::setSeparated):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setSeparated):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateSeparated):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(WebCore::PlatformCALayerCocoa::separated const):
(WebCore::PlatformCALayerCocoa::setSeparated):

Source/WebCore/PAL:

  • pal/spi/cocoa/QuartzCoreSPI.h:

Add forward declaration for CALayer's separated property.

Source/WebKit:

Plumb a "separated" bit through the graphics layer infrastructure. Currently unused
but will be used for optimization experimentation.

  • Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:

(WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):

  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode const):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
(WebKit::dumpChangedLayers):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::isSeparated const):
(WebKit::PlatformCALayerRemote::setSeparated):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h:

Source/WTF:

  • wtf/PlatformHave.h:

Define HAVE_CORE_ANIMATION_SEPARATED_LAYERS for supported configurations.

10:08 AM Changeset in webkit [271698] by youenn@apple.com
  • 5 edits
    1 copy
    1 add in trunk

Allow MediaStream and non MediaStream backed videos to play together
https://bugs.webkit.org/show_bug.cgi?id=199661
<rdar://problem/68622411>

Reviewed by Eric Carlson.

Source/WebCore:

Changing heuristic to always allow MediaStream backed videos to play concurrently with other videos.
To not break existing websites, we keep the existing behavior for non MediaStream backed videos.

Test: webrtc/concurrentVideoPlayback2.html

  • platform/audio/PlatformMediaSession.cpp:

(WebCore::PlatformMediaSession::canPlayConcurrently const):

LayoutTests:

  • webrtc/concurrentVideoPlayback-expected.txt:
  • webrtc/concurrentVideoPlayback.html:
  • webrtc/concurrentVideoPlayback2-expected.txt: Added.
  • webrtc/concurrentVideoPlayback2.html: Added.
9:54 AM Changeset in webkit [271697] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitscmpy] Handle machines that cannot import keyring
https://bugs.webkit.org/show_bug.cgi?id=220800
<rdar://problem/73454666>

Reviewed by Aakash Jain.

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

(GitHub.credentials): Make keyring optional.

9:46 AM Changeset in webkit [271696] by youenn@apple.com
  • 5 edits in trunk

Check for TURN username/credentials sizes in RTCPeerConnection constructor
https://bugs.webkit.org/show_bug.cgi?id=220789

Reviewed by Eric Carlson.

Source/WebCore:

Covered by updated test.

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::iceServersFromConfiguration):

LayoutTests:

  • webrtc/stun-server-filtering-expected.txt:
  • webrtc/stun-server-filtering.html:
9:40 AM Changeset in webkit [271695] by weinig@apple.com
  • 46 edits in trunk

Source/WebCore:
Rework color clamping logic to be consistent and clear
https://bugs.webkit.org/show_bug.cgi?id=220716

Reviewed by Simon Fraser.

In preparation of adding support for Extended-sRGB to color types,
this adds constexpr metadata and helper functions to create color
types with the correct clamped (or unclamped) values and adopts them
throughout the code base.

  • Removes "component bytes" and "component floats" concepts replacing with functions that take color types as template parameters:

convertToComponentBytes/convertToComponentFloats -> convertTo<ColorType<T>>
clampToComponentBytes/clampToComponentFloats -> makeFromComponentsClamping<ColorType<T>>

  • Adds Model type aliases to each color type which can specify traits for that type of color. These traits currently only include the valid component ranges and whether the color can be inverted. More will be added (like white point and base color space) to help simplify utility and conversion code.
  • Adds assertions to each color type constructor that the values passed are within the valid ranges (as specified by the Model).
  • Removed asFoo(const ColorComponents<T>&) functions, which were a little to similarly named to the toFoo() functions. Instead, the generic makeFromComponents<ColorType<T>> (or it's clamping variants) can be used to convert from ColorComponents to color types.
  • Adds AlphaTraits to model alpha values as these are consistent between color types and only change based on component type.
  • accessibility/atk/WebKitAccessibleInterfaceText.cpp:
  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
  • css/DeprecatedCSSOMRGBColor.h:
  • css/parser/CSSParserFastPaths.cpp:
  • css/parser/CSSPropertyParserHelpers.cpp:
  • editing/cocoa/DataDetection.mm:
  • html/canvas/CanvasRenderingContext2DBase.cpp:
  • html/canvas/CanvasStyle.cpp:
  • inspector/agents/InspectorDOMAgent.cpp:
  • platform/graphics/Color.cpp:
  • platform/graphics/Color.h:
  • platform/graphics/ColorBlending.cpp:
  • platform/graphics/ColorConversion.cpp:
  • platform/graphics/ColorConversion.h:
  • platform/graphics/ColorTypes.h:
  • platform/graphics/ColorUtilities.cpp:
  • platform/graphics/ColorUtilities.h:
  • platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
  • platform/graphics/cairo/ImageBufferCairoBackend.cpp:
  • platform/graphics/cg/ColorCG.cpp:
  • platform/graphics/cg/NativeImageCG.cpp:
  • platform/graphics/filters/FilterOperation.cpp:
  • platform/graphics/filters/FilterOperations.cpp:
  • platform/graphics/gtk/ColorGtk.cpp:
  • platform/graphics/mac/ColorMac.mm:
  • platform/graphics/win/ColorDirect2D.cpp:
  • platform/graphics/win/PlatformContextDirect2D.cpp:
  • platform/ios/ColorIOS.mm:
  • rendering/RenderThemeMac.mm:
  • svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:

Source/WebKit:
Rework color clamping logic to be more consistent and clear
https://bugs.webkit.org/show_bug.cgi?id=220716

Reviewed by Simon Fraser.

  • UIProcess/API/wpe/WebKitColor.cpp:

(webkitColorToWebCoreColor):
Update to use new convertTo<> functions.

Tools:
Rework color clamping logic to be more consistent and clear
https://bugs.webkit.org/show_bug.cgi?id=220716

Reviewed by Simon Fraser.

  • TestWebKitAPI/Tests/WebCore/ColorTests.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/ExtendedColorTests.cpp:

(TestWebKitAPI::TEST):
Update tests to use new convertTo<> functions.

LayoutTests:
Rework color clamping logic to be more consistent and clear
https://bugs.webkit.org/show_bug.cgi?id=220716

Reviewed by Simon Fraser.

  • fast/canvas/canvas-overloads-setFillColor-expected.txt:
  • fast/canvas/canvas-overloads-setFillColor.html:
  • fast/canvas/canvas-overloads-setShadow-expected.txt:
  • fast/canvas/canvas-overloads-setShadow.html:
  • fast/canvas/canvas-overloads-setStrokeColor-expected.txt:
  • fast/canvas/canvas-overloads-setStrokeColor.html:

Extend tests to cover testing various values including NaN, including testing what
color actually gets set as the current style.

9:17 AM Changeset in webkit [271694] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Null check in WebTextIndicatorView::initWithFrame
https://bugs.webkit.org/show_bug.cgi?id=220491

Patch by Rob Buis <rbuis@igalia.com> on 2021-01-21
Reviewed by Youenn Fablet.

Source/WebCore:

Null check contentImage/contentImageScaleFactor in initWithFrame
since these are not guaranteed to be non-null.

Test: ipc/set-text-indicator.html

  • page/mac/TextIndicatorWindow.mm:

(-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):

LayoutTests:

Add test for this.

  • ipc/set-text-indicator-expected.txt: Added.
  • ipc/set-text-indicator.html: Added.
9:12 AM Changeset in webkit [271693] by commit-queue@webkit.org
  • 4 edits in trunk/Tools

autoinstall python-secretstorage
https://bugs.webkit.org/show_bug.cgi?id=220796

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-01-21
Reviewed by Jonathan Bedard.

  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py:
  • gtk/install-dependencies:
  • wpe/install-dependencies:
8:52 AM Changeset in webkit [271692] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[webkitcorepy] Don't import six at the top level
https://bugs.webkit.org/show_bug.cgi?id=220795

Patch by Angelos Oikonomopoulos <Angelos Oikonomopoulos> on 2021-01-21
Reviewed by Aakash Jain.

Instead, do the import after the module has been loaded, when
AutoInstall has been set up properly. Fixes a regression after
1d342a5067e22ac8069ff3ff337b2d58e1d06517, where task_pool.py uses
the six module without it being installed.

  • Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:

(ChildException.call):
(TaskPool.exit):

7:47 AM Changeset in webkit [271691] by Aditya Keerthi
  • 18 edits
    1 add in trunk

[macOS] Titlebar separator doesn't show when WKWebView is scrolled
https://bugs.webkit.org/show_bug.cgi?id=220633
<rdar://problem/71094055>

Reviewed by Tim Horton.

Source/WebKit:

Starting in Big Sur, NSWindows with a titlebar display a separator if
there is a scrolled NSScrollView adjacent to the titlebar. Since
WKWebViews are scrollable views, but not backed by NSScrollView, we
need to adopt SPI to support this functionality.

This patch updates WKWebView to conform to the NSScrollViewSeparatorTrackingAdapter
protocol, ensuring the titlebar separator is displayed when
necessary. Note that since WKWebViews are not actually NSScrollView's we
don't already have the scroll position of the view in the UIProcess. To
determine whether or not the view is scrolled, this patch adds plumbing
so that the WebProcess can tell the UIProcess the new scroll position
when a page is scrolled.

Tests: WKWebViewTitlebarSeparatorTests.BackForwardCache

WKWebViewTitlebarSeparatorTests.ChangeTitlebarAdjacency
WKWebViewTitlebarSeparatorTests.ChangeViewVisibility
WKWebViewTitlebarSeparatorTests.NavigationResetsTitlebarAppearance
WKWebViewTitlebarSeparatorTests.ScrollWithTitlebarAdjacency
WKWebViewTitlebarSeparatorTests.ScrollWithoutTitlebarAdjacency

  • Platform/spi/mac/AppKitSPI.h:
  • UIProcess/API/mac/WKView.mm:

(-[WKView scrollViewFrame]):
(-[WKView hasScrolledContentsUnderTitlebar]):
(-[WKView _web_registerScrollViewSeparatorTrackingAdapter]):
(-[WKView _web_unregisterScrollViewSeparatorTrackingAdapter]):

  • UIProcess/API/mac/WKWebViewMac.mm:

(-[WKWebView scrollViewFrame]):
(-[WKWebView hasScrolledContentsUnderTitlebar]):
(-[WKWebView _web_registerScrollViewSeparatorTrackingAdapter]):
(-[WKWebView _web_unregisterScrollViewSeparatorTrackingAdapter]):

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

(WebKit::WebViewImpl::updateWindowAndViewFrames):

If the WKWebView's frame changes, update the titlebar adjacency
state and notify observers of the change.

(WebKit::WebViewImpl::viewWillMoveToWindowImpl):

Unregister the WKWebView as an NSScrollViewSeparatorTrackingAdapter if
it is removed from the window.

(WebKit::WebViewImpl::viewDidHide):

Hidden views are not adjacent to the titlebar.

(WebKit::WebViewImpl::viewDidUnhide):

An unhidden view may be adjacent to the titlebar.

(WebKit::WebViewImpl::pageDidScroll):

Use the scroll position of the page to determine whether or not the
WKWebView is scrolled.

(WebKit::WebViewImpl::scrollViewFrame):

Needed to conform to NSScrollViewSeparatorTrackingAdapter.

(WebKit::WebViewImpl::hasScrolledContentsUnderTitlebar):

Needed to conform to NSScrollViewSeparatorTrackingAdapter. Returns true
if the view is registered as an NSScrollViewSeparatorTrackingAdapter
and is scrolled.

(WebKit::WebViewImpl::updateTitlebarAdjacencyState):

The WKWebView needs to be registered as an NSScrollViewSeparatorTrackingAdapter
if it's adjacent to the titlebar and unregistered otherwise.

  • UIProcess/PageClient.h:

(WebKit::PageClient::pageDidScroll):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::pageDidScroll):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::didCommitLoadForMainFrame):

Reset the scroll position upon navigation, as pageDidScroll does not get
called when navigating.

(WebKit::PageClientImpl::pageDidScroll):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::pageDidScroll):

Pass the current scroll position when the page is scrolled, so that the
UIProcess knows whether or not the page has a non-zero scroll position.

Source/WTF:

  • wtf/PlatformHave.h: Defined HAVE_NSSCROLLVIEW_SEPARATOR_TRACKING_ADAPTER.

Tools:

Added API tests to verify that the delegate implementation returns the
correct value for hasScrolledContentsUnderTitlebar depending on
the view's scroll position, visibility, and frame.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/TestWebKitAPI/mac/AppKitSPI.h:
  • TestWebKitAPI/Tests/mac/WKWebViewTitlebarSeparatorTests.mm: Added.

(-[TitlebarSeparatorTestWKWebView initWithFrame:configuration:]):
(-[TitlebarSeparatorTestWKWebView separatorTrackingAdapter]):
(BackForwardCache):
(ChangeTitlebarAdjacency):
(ChangeViewVisibility):
(NavigationResetsTitlebarAppearance):
(ScrollWithTitlebarAdjacency):
(ScrollWithoutTitlebarAdjacency):

6:25 AM Changeset in webkit [271690] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

Source/WebCore:
Ensure createStreams gets valid JSGlobalObject
https://bugs.webkit.org/show_bug.cgi?id=220396

Patch by Rob Buis <rbuis@igalia.com> on 2021-01-21
Reviewed by Youenn Fablet.

Ensure RTCRtpSFrameTransform::createStreams gets a
valid JSGlobalObject object, throw exception at
call site if there is no valid JSGlobalObject object.

Test: http/wpt/webrtc/sframe-transform-readable-crash.html

  • Modules/mediastream/RTCRtpSFrameTransform.cpp:

(WebCore::RTCRtpSFrameTransform::createStreams):
(WebCore::RTCRtpSFrameTransform::readable):
(WebCore::RTCRtpSFrameTransform::writable):

  • Modules/mediastream/RTCRtpSFrameTransform.h:

LayoutTests:
Null check in RTCRtpSFrameTransform::createStreams
https://bugs.webkit.org/show_bug.cgi?id=220396

Patch by Rob Buis <rbuis@igalia.com> on 2021-01-21
Reviewed by Youenn Fablet.

Add test for this.

  • http/wpt/webrtc/sframe-transform-readable-crash-expected.txt: Added.
  • http/wpt/webrtc/sframe-transform-readable-crash.html: Added.
4:34 AM Changeset in webkit [271689] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

Missing header gtk/gtk.h in PointerLockManagerX11.cpp
https://bugs.webkit.org/show_bug.cgi?id=220152

Patch by Dave Blanchard <dave@grow.game> on 2021-01-21
Reviewed by Carlos Garcia Campos.

  • UIProcess/gtk/PointerLockManagerX11.cpp:
1:51 AM Changeset in webkit [271688] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Update font when resolving letter-spacing: calc(...) values
https://bugs.webkit.org/show_bug.cgi?id=216659

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

Source/WebCore:

In bug 176215, maybeUpdateFontForLetterSpacing was added to ensure a font is available for
resolution of letter-spacing values that rely on relative font lengths. However, this does
not take into account the case when these lengths are part of a calc expression. In order to
keep things simple, this patch unconditionally updates the font when letter-spacing is a
calc expression.

Test: fast/css/letter-spacing-calc-with-font-relative-lengths-crash.html

  • style/StyleBuilderCustom.h:

(WebCore::Style::maybeUpdateFontForLetterSpacing):

LayoutTests:

  • fast/css/letter-spacing-calc-with-font-relative-lengths-crash-expected.txt: Added.
  • fast/css/letter-spacing-calc-with-font-relative-lengths-crash.html: Added.

Jan 20, 2021:

10:50 PM Changeset in webkit [271687] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitscmpy] Gracefully handle missing keyring backend
https://bugs.webkit.org/show_bug.cgi?id=220784

Reviewed by Yusuke Suzuki.

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

(GitHub.credentials): Handle RuntimeErrors from keyring.

10:32 PM Changeset in webkit [271686] by ysuzuki@apple.com
  • 8 edits in trunk/Source/WebCore

Further propagate ChildChange::Source to optimize HTMLInputElement creation
https://bugs.webkit.org/show_bug.cgi?id=220785

Reviewed by Ryosuke Niwa.

This patch further propagates ChildChange::Source to optimize HTMLInputElement creation.
We add appendChild method taking ChildChange::Source to transparently pick the efficient
one based on the parameter.

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::appendChild):

  • dom/ContainerNode.h:
  • html/BaseDateAndTimeInputType.cpp:

(WebCore::BaseDateAndTimeInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/ColorInputType.cpp:

(WebCore::ColorInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/FileInputType.cpp:

(WebCore::FileInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/RangeInputType.cpp:

(WebCore::RangeInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

7:29 PM Changeset in webkit [271685] by Wenson Hsieh
  • 15 edits in trunk

[macOS] Include an origin identifier when writing promised image data to the drag pasteboard
https://bugs.webkit.org/show_bug.cgi?id=220782

Reviewed by Megan Gardner.

Source/WebKit:

Add plumbing in WebKit to serialize and write the pasteboard origin identifier via custom data when dragging an
image with promised data on macOS. In the case where we're dragging an image into a contenteditable area in a
document with the *same* pasteboard origin, this allows us to avoid sanitizing the web archive data upon
handling the drop.

Test: DragAndDropTests.ProvideImageDataForMultiplePasteboards

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::setPromisedDataForImage):

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

(WebKit::WebViewImpl::setPromisedDataForImage):

If specified, write the origin to the drag pasteboard by creating a new PasteboardCustomData object, setting
its origin, and then serializing the custom data object into an NSData.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::setPromisedDataForImage):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::setPromisedDataForImage):

  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

(WebKit::WebDragClient::declareAndWriteDragImage):

Source/WebKitLegacy/mac:

See WebKit ChangeLog for more details.

  • Misc/WebNSPasteboardExtras.mm:

(-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):

Tools:

Make a slight adjustment to an existing API test, to verify that custom pasteboard data is serialized when
dragging an image element.

  • TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm:
6:53 PM Changeset in webkit [271684] by Alan Coon
  • 1 copy in tags/Safari-611.1.10.0.3

Tag Safari-611.1.10.0.3.

6:51 PM Changeset in webkit [271683] by Jonathan Bedard
  • 3 edits
    2 adds in trunk/Tools

[webkitcorepy] Add TaskPool
https://bugs.webkit.org/show_bug.cgi?id=220547
<rdar://problem/73043887>

Reviewed by Dewei Zhu.

The TaskPool object is a Python 3.8 compatible multiprocessing tool. Notable features are forwarding stdout,
stderr and logging to the parent process, exception propagation between processes, and graceful clean-up when
exceptions in the parent process are encountered

  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Bump version, add tblib.
  • Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py: Added.

(Message): Base class for message passed between processes.
(Task): Message including function and arguments to that function.
(Result): Return value of a task passed to the parent process.
(Log): Pass log message from child process to parent process.
(Print): Pass stdout or stderr line from child process to parent process.
(State): Notify parent process that the child process has changed state.
(ChildException): Pass exception and stack trace from
(BiDirectionalQueue): Pair for multiprocess queues allowing for messages to be passed between processes.
(Process): Scoping class managing child-process logic.
(Process.LogHandler): Logging handler that passes log lines from the child process to it's parent.
(Process.Stream): Writable stream which passes content from the child process to the standard out or error
of that process's parent.
(Process.handler): SIGTERM should prevent future processing but allow currently in-flight tasks to complete.
(Process.main): Entry-point to child process.
(TaskPool): Managing allocation of tasks to child processes and clean up those child processes.
(TaskPool.Exception): Exception owned by TaskPool object.
(TaskPool.init):
(TaskPool.enter):
(TaskPool.do): Pass task to child processes.
(TaskPool.wait): Wait until all processes are completed.
(TaskPool.exit): Teardown all child processes.

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

(setup):
(teardown):
(action):
(log):
(wait):
(exception):
(TaskPoolUnittest):
(TaskPoolUnittest.test_single):
(TaskPoolUnittest.test_multiple):
(TaskPoolUnittest.test_callback):
(TaskPoolUnittest.test_exception):
(TaskPoolUnittest.test_setup):
(TaskPoolUnittest.test_teardown):
(TaskPoolUnittest.test_invalid_shutdown):

6:50 PM Changeset in webkit [271682] by Alan Coon
  • 8 edits in branches/safari-611.1.10.0-branch/Source

Versioning.

WebKit-7611.1.10.0.3

6:45 PM Changeset in webkit [271681] by Alan Coon
  • 1 copy in tags/Safari-611.1.10.0.2

Tag Safari-611.1.10.0.2.

6:35 PM Changeset in webkit [271680] by Alan Coon
  • 1 delete in tags/Safari-611.1.10.0.2

Delete tag.

5:42 PM Changeset in webkit [271679] by commit-queue@webkit.org
  • 26 edits
    6 adds in trunk

Support WEBGL_multi_draw extension
https://bugs.webkit.org/show_bug.cgi?id=219139

Patch by Kenneth Russell <kbr@chromium.org> on 2021-01-20
Reviewed by Dean Jackson.

Source/WebCore:

Support the WEBGL_multi_draw extension in WebKit, delegating to
ANGLE's underlying implementation.

This extension significantly reduces draw-call overhead in certain
scenarios, and is requested by CAD/CAM web apps using WebGL.

Test: webgl/conformance/extensions/webgl-multi-draw.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMConvertWebGL.cpp:

(WebCore::convertToJSValue):

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::getExtension):
(WebCore::WebGL2RenderingContext::getSupportedExtensions):

  • html/canvas/WebGLExtension.h:
  • html/canvas/WebGLMultiDraw.cpp: Added.

(WebCore::makeSpanWithOffset):
(WebCore::WebGLMultiDraw::WebGLMultiDraw):
(WebCore::WebGLMultiDraw::getName const):
(WebCore::WebGLMultiDraw::supported):
(WebCore::WebGLMultiDraw::multiDrawArraysWEBGL):
(WebCore::WebGLMultiDraw::multiDrawArraysInstancedWEBGL):
(WebCore::WebGLMultiDraw::multiDrawElementsWEBGL):
(WebCore::WebGLMultiDraw::multiDrawElementsInstancedWEBGL):
(WebCore::WebGLMultiDraw::validateDrawcount):
(WebCore::WebGLMultiDraw::validateOffset):

  • html/canvas/WebGLMultiDraw.h: Added.
  • html/canvas/WebGLMultiDraw.idl: Added.
  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getSupportedExtensions):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::extensionIsEnabled):

  • html/canvas/WebGLRenderingContextBase.h:
  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::multiDrawArraysANGLE):
(WebCore::GraphicsContextGLOpenGL::multiDrawArraysInstancedANGLE):
(WebCore::GraphicsContextGLOpenGL::multiDrawElementsANGLE):
(WebCore::GraphicsContextGLOpenGL::multiDrawElementsInstancedANGLE):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:

(WebCore::GraphicsContextGLOpenGL::multiDrawArraysANGLE):
(WebCore::GraphicsContextGLOpenGL::multiDrawArraysInstancedANGLE):
(WebCore::GraphicsContextGLOpenGL::multiDrawElementsANGLE):
(WebCore::GraphicsContextGLOpenGL::multiDrawElementsInstancedANGLE):

Source/WebInspectorUI:

Tell the Inspector about the method signatures in the
WEBGL_multi_draw extension.

  • UserInterface/Models/NativeFunctionParameters.js:

Source/WebKit:

Add automatically-generated stubs for supporting the multi-draw
extension in the GPU process.

  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:

(multiDrawArraysANGLE):
(multiDrawArraysInstancedANGLE):
(multiDrawElementsANGLE):
(multiDrawElementsInstancedANGLE):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:

(WebKit::RemoteGraphicsContextGLProxy::multiDrawArraysANGLE):
(WebKit::RemoteGraphicsContextGLProxy::multiDrawArraysInstancedANGLE):
(WebKit::RemoteGraphicsContextGLProxy::multiDrawElementsANGLE):
(WebKit::RemoteGraphicsContextGLProxy::multiDrawElementsInstancedANGLE):

LayoutTests:

Add conformance test for the multi-draw extension, which is
expected to pass. Temporarily suppress the test due to failures on
Intel GPUs on macOS caused by recently-discovered OpenGL driver
bugs, which are currently being investigated.

  • TestExpectations:
  • webgl/conformance/extensions/webgl-multi-draw-expected.txt: Added.
  • webgl/conformance/extensions/webgl-multi-draw.html: Added.
  • webgl/resources/webgl_test_files/conformance/extensions/webgl-multi-draw.html: Added.
5:33 PM Changeset in webkit [271678] by ysuzuki@apple.com
  • 2 edits in trunk

Unreviewed, ANGLE should not be built in JSCOnly port

ANGLE is not a part of JSC. Do not build it.

  • Source/cmake/OptionsJSCOnly.cmake:
4:53 PM Changeset in webkit [271677] by Alan Coon
  • 1 copy in tags/Safari-611.1.10.1.1

Tag Safari-611.1.10.1.1.

4:53 PM Changeset in webkit [271676] by Alan Coon
  • 1 copy in tags/Safari-611.1.10.0.2

Tag Safari-611.1.10.0.2.

3:06 PM Changeset in webkit [271675] by aakash_jain@apple.com
  • 5 edits in trunk/Tools

EWS should display commit identifier in builds
https://bugs.webkit.org/show_bug.cgi?id=220769

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/factories.py:

(Factory.init): Added ShowIdentifier build step.
(StyleFactory.init):
(WatchListFactory.init):
(CommitQueueFactory.init):

  • CISupport/ews-build/steps.py:

(ShowIdentifier): build-step to show commit identifier.
(ShowIdentifier.start):
(ShowIdentifier.evaluateCommand):
(ShowIdentifier.getLastBuildStepByName):
(ShowIdentifier.url_for_identifier):
(ShowIdentifier.getResultSummary): Display custom failure message.
(ShowIdentifier.hideStepIf): Hide this step if successful.

  • CISupport/ews-build/steps_unittest.py: Added unit-tests.
  • CISupport/ews-build/factories_unittest.py:
2:38 PM Changeset in webkit [271674] by mmaxfield@apple.com
  • 3 edits
    4 copies
    6 adds in trunk/LayoutTests

[ Big Sur ] platform/mac/fast/text/international/bidi-fallback-font-weight.html is failing
https://bugs.webkit.org/show_bug.cgi?id=220756
<rdar://problem/73048055>

Unreviewed test gardening.

  • platform/mac-catalina/fast/text/international/bidi-fallback-font-weight-expected.txt: Copied from LayoutTests/platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt.
  • platform/mac-catalina/platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt: Copied from LayoutTests/platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt.
  • platform/mac-mojave/fast/text/international/bidi-fallback-font-weight-expected.txt: Copied from LayoutTests/platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt.
  • platform/mac-mojave/platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt: Copied from LayoutTests/platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt.
  • platform/mac/TestExpectations:
  • platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt:
2:07 PM Changeset in webkit [271673] by Chris Dumez
  • 6 edits in trunk/Source

[GPUProcess] Mark IOSurface backing for RemoteGraphicsContextGL's displayBuffer as owned by the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=220770

Reviewed by Geoffrey Garen.

Mark IOSurface backing for RemoteGraphicsContextGL's displayBuffer as owned by the WebProcess. This is so
that Jetsam knows which process to terminate to reclaim memory.

Source/WebCore:

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

(WebCore::IOSurface::setOwnership):

Source/WebKit:

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::prepareForDisplay):

  • WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.cpp:

(WebKit::ImageBufferShareableMappedIOSurfaceBackend::create):

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

Accelerate HTMLInputElement creation
https://bugs.webkit.org/show_bug.cgi?id=220758

Reviewed by Simon Fraser.

HTMLInputElement creation is too slow.

  1. InputType is excessively using virtual dispatching, which is too slow for hot path.
  2. HTMLInputElement creates internal elements as a shadow DOM and its creation is too generic.
  3. We are setting inner text element's editability in a very generic way. This allocates ElementData for each elements while attributes are almost the same.

In this patch,

  1. We add m_type field in InputType, and for the hot path, we attempt to devirtualize things due to performance problem.
  2. We pass "parsing phase" information to shadow DOM creation to make them fast.
  3. We initialize editibility when creating TextControlInnerTextElement. And we use parserSetAttributes to set shared ElementData. This is faster and less memory.
  4. We also shrink sizeof(Style::Scope) to reduce size of allocation when using shadow DOM.

This change offers 1% progression in Speedometer2/jQuery.

  • html/BaseButtonInputType.h:

(WebCore::BaseButtonInputType::BaseButtonInputType):

  • html/BaseCheckableInputType.h:

(WebCore::BaseCheckableInputType::BaseCheckableInputType):

  • html/BaseClickableWithKeyInputType.h:

(WebCore::BaseClickableWithKeyInputType::BaseClickableWithKeyInputType):

  • html/BaseDateAndTimeInputType.cpp:

(WebCore::BaseDateAndTimeInputType::isSteppableSlow const):
(WebCore::BaseDateAndTimeInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):
(WebCore::BaseDateAndTimeInputType::isSteppable const): Deleted.
(WebCore::BaseDateAndTimeInputType::createShadowSubtree): Deleted.

  • html/BaseDateAndTimeInputType.h:

(WebCore::BaseDateAndTimeInputType::BaseDateAndTimeInputType):

  • html/BaseTextInputType.h:

(WebCore::BaseTextInputType::BaseTextInputType):

  • html/ButtonInputType.h:
  • html/CheckboxInputType.h:
  • html/ColorInputType.cpp:

(WebCore::ColorInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):
(WebCore::ColorInputType::createShadowSubtree): Deleted.

  • html/ColorInputType.h:
  • html/DateInputType.cpp:

(WebCore::DateInputType::DateInputType):

  • html/DateInputType.h:
  • html/DateTimeLocalInputType.h:
  • html/EmailInputType.h:
  • html/FileInputType.cpp:

(WebCore::FileInputType::FileInputType):
(WebCore::FileInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):
(WebCore::FileInputType::createShadowSubtree): Deleted.

  • html/FileInputType.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::didAddUserAgentShadowRoot):
(WebCore::HTMLInputElement::isValid const):
(WebCore::HTMLInputElement::updateType):

  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::didAddUserAgentShadowRoot):

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::updateInnerTextElementEditability):

  • html/HiddenInputType.h:
  • html/ImageInputType.cpp:

(WebCore::ImageInputType::ImageInputType):

  • html/ImageInputType.h:
  • html/InputType.cpp:

(WebCore::InputType::isInvalid const):
(WebCore::InputType::createShadowSubtreeAndUpdateInnerTextElementEditability):
(WebCore::InputType::isSteppable const):
(WebCore::InputType::createShadowSubtree): Deleted.

  • html/InputType.h:

(WebCore::InputType::InputType):
(WebCore::InputType::isSteppableSlow const):
(WebCore::isInvalidInputType):

  • html/MonthInputType.h:
  • html/NumberInputType.cpp:

(WebCore::NumberInputType::isSteppableSlow const):
(WebCore::NumberInputType::isSteppable const): Deleted.

  • html/NumberInputType.h:
  • html/PasswordInputType.h:
  • html/RadioInputType.h:
  • html/RangeInputType.cpp:

(WebCore::RangeInputType::RangeInputType):
(WebCore::RangeInputType::isSteppableSlow const):
(WebCore::RangeInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):
(WebCore::RangeInputType::isSteppable const): Deleted.
(WebCore::RangeInputType::createShadowSubtree): Deleted.

  • html/RangeInputType.h:
  • html/ResetInputType.h:
  • html/SearchInputType.cpp:

(WebCore::SearchInputType::SearchInputType):
(WebCore::SearchInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):
(WebCore::SearchInputType::createShadowSubtree): Deleted.

  • html/SearchInputType.h:
  • html/SubmitInputType.h:
  • html/TelephoneInputType.h:
  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::TextFieldInputType):
(WebCore::TextFieldInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):
(WebCore::TextFieldInputType::createShadowSubtree): Deleted.

  • html/TextFieldInputType.h:
  • html/TextInputType.h:
  • html/TimeInputType.cpp:

(WebCore::TimeInputType::TimeInputType):

  • html/TimeInputType.h:
  • html/URLInputType.h:
  • html/WeekInputType.h:
  • html/shadow/TextControlInnerElements.cpp:

(WebCore::TextControlInnerTextElement::create):
(WebCore::TextControlInnerTextElement::updateInnerTextElementEditabilityImpl):

  • html/shadow/TextControlInnerElements.h:
  • style/StyleScope.h:
1:41 PM Changeset in webkit [271671] by Manuel Rego Casasnovas
  • 4 edits in trunk

[WPE] focus-visible-003.html and focus-visible-004.html are timing out in input tags
https://bugs.webkit.org/show_bug.cgi?id=220578

Reviewed by Javier Fernandez.

Source/WebCore:

Dispatch "focus" event for form controls when they are focused via mouse click.
This was already done in GTK+ but was not yet in WPE.

This works different on Mac ports as it's a particularity of how focus works on Mac platforms
(see https://webkit.org/b/22261 for details).

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::isMouseFocusable const): Add PLATFORM(WPE).

LayoutTests:

  • platform/wpe/TestExpectations: Unskip tests that are not failing anymore.
1:27 PM Changeset in webkit [271670] by youenn@apple.com
  • 6 edits
    1 add in trunk

Two pages in the same process should not be able to play media stream backed video elements at the same time
https://bugs.webkit.org/show_bug.cgi?id=220504

Reviewed by Eric Carlson.

Source/WebCore:

In case of ConcurrentPlaybackNotPermitted restrictions, we now make sure that media elements from different pages do not play concurrently.
We also make sure that a VideoAudio and Audio sessions can also pause each other so we update the check for same media session type accordingly.

Covered by API test.

  • platform/audio/PlatformMediaSession.cpp:

(WebCore::isPlayingAudio):
(WebCore::PlatformMediaSession::canPlayConcurrently const):

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/getUserMedia2.html: Added.
1:09 PM Changeset in webkit [271669] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk

Fix nullptr dereference introduced in r268228
https://bugs.webkit.org/show_bug.cgi?id=220776

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

Source/WebCore:

Instead of taking data from the FileReaderLoader, which it assumes it still has later,
only give the bytes to JavaScript that have been received since last time we called didReceiveData.
This makes blob.stream correct and not crash.

Test: fast/files/blob-stream-crash-2.html

  • fileapi/Blob.cpp:

(WebCore::Blob::stream):

  • fileapi/FileReaderLoader.cpp:

(WebCore::FileReaderLoader::takeRawData): Deleted.

  • fileapi/FileReaderLoader.h:

(WebCore::FileReaderLoader::totalBytes const):

LayoutTests:

  • fast/files/blob-stream-crash-2-expected.txt: Added.
  • fast/files/blob-stream-crash-2.html: Added.
12:55 PM Changeset in webkit [271668] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore
REGRESSION (r271488): ASSERTION FAILED: m_private->type() != RealtimeMediaSource::Type::Audio
!PlatformMediaSessionManager::sharedManager().hasAudioCaptureSource(*this)

https://bugs.webkit.org/show_bug.cgi?id=220752
<rdar://problem/73377854>

Reviewed by Eric Carlson.

Make sure to remove audio capture source in destructor if it was not done so before.
Covered by existing tests.

  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::~MediaStreamTrack):

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::removeAudioCaptureSource):

12:51 PM Changeset in webkit [271667] by youenn@apple.com
  • 4 edits in trunk/Source/WebCore

Extend getUserMedia quirk to warbyparker.com
https://bugs.webkit.org/show_bug.cgi?id=220704
<rdar://problem/72839707>

Reviewed by Eric Carlson.

Update IDL to require SecureContext instead of checking this in quirk.
Buffer the shouldEnableLegacyGetUserMediaQuirk in an optional to compute it once per document.
Use Document origin directly instead of Document URL.
Add warbyparker.com to the allowed list.

Manually tested.

  • Modules/mediastream/Navigator+MediaDevices.idl:
  • page/Quirks.cpp:

(WebCore::Quirks::shouldEnableLegacyGetUserMediaQuirk const):

  • page/Quirks.h:
12:09 PM Changeset in webkit [271666] by Alan Coon
  • 2 edits in branches/safari-611.1.10.0-branch/Source/JavaScriptCore

Cherry-pick r271544. rdar://problem/73412535

[JSC] Clean up DFGPreciseLocalClobberize to avoid duplicate code
https://bugs.webkit.org/show_bug.cgi?id=220670

Reviewed by Filip Pizlo.

This patch cleans up DFGPreciseLocalClobberize by extracting code to lambda to remove duplicate code.

  • dfg/DFGPreciseLocalClobberize.h: (JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):

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

12:02 PM Changeset in webkit [271665] by Alan Coon
  • 8 edits in branches/safari-611.1.10.0-branch/Source

Versioning.

WebKit-7611.1.10.0.2

11:55 AM Changeset in webkit [271664] by Alan Coon
  • 2 edits in branches/safari-611.1.10.1-branch/Source/JavaScriptCore

Cherry-pick r271544. rdar://problem/73412647

[JSC] Clean up DFGPreciseLocalClobberize to avoid duplicate code
https://bugs.webkit.org/show_bug.cgi?id=220670

Reviewed by Filip Pizlo.

This patch cleans up DFGPreciseLocalClobberize by extracting code to lambda to remove duplicate code.

  • dfg/DFGPreciseLocalClobberize.h: (JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):

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

11:53 AM Changeset in webkit [271663] by Alan Coon
  • 8 edits in branches/safari-611.1.10.1-branch/Source

Versioning.

WebKit-7611.1.10.1.1

11:42 AM Changeset in webkit [271662] by Alan Coon
  • 1 copy in branches/safari-611.1.10.0-branch

New branch.

11:29 AM Changeset in webkit [271661] by Alan Coon
  • 1 copy in branches/safari-611.1.10.1-branch

New branch.

11:28 AM Changeset in webkit [271660] by Wenson Hsieh
  • 9 edits
    2 adds in trunk

[iOS] "touchend" events should be dispatched and handled asynchronously
https://bugs.webkit.org/show_bug.cgi?id=220256
<rdar://problem/64912551>

Reviewed by Tim Horton.

Source/WebKit:

Allow active "touchend" event listeners to send asynchronous (non-blocking) IPC messages to the web process by
augmenting the content view's deferring gesture recognizers. See below for more details.

Test: fast/events/touch/ios/click-event-after-touchend.html

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

(WebKit::WebPageProxy::handlePreventableTouchEvent):

Send both "touchstart" and "touchend" events asynchronously.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::isHandlingPreventableTouchEnd const):

In a similar way to how we defer "touchstart", add a counter to keep track of when we're handling an active
(preventable) touchend, such that we can defer all native gestures that can be prevented by touchend until after
the page is done handling the event.

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

(WebKit::PageClientImpl::doneDeferringTouchEnd):

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

(-[WKContentView setUpInteraction]):

Add a new set of deferring gesture recognizers that can be used to defer all tap gestures on the content view,
due to active "touchend" event listeners. This works because currently, the only default gestures in WebKit
that can be prevented by calling preventDefault() on "touchend" events are tap gestures.

(-[WKContentView cleanUpInteraction]):
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView _webTouchEventsRecognized:]):
(-[WKContentView _deferringGestures]):
(-[WKContentView _touchEndDeferringGestures]):
(-[WKContentView _doneDeferringTouchEnd:]):

Add a hook to "lift" the gesture gate upon touchend, which allows all deferred tap gestures to either fail (in
the case where the page prevented default), or recognize (in the case where the page did not prevent default).

(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):

Replace _touchStartDeferringGestures with _deferringGestures in several call sites that need to iterate over
all deferring gestures on the content view.

(-[WKContentView _singleTapDidReset:]):

When resetting the single tap gesture, ensure that the tap highlight view is removed by calling
-_finishInteraction; this is because an active touchend event handler may now defer -_singleTapRecognized:
until after the ending the touch, which causes -_showTapHighlight to be called without a matching call to
remove the highlight. Since we know that the synthetic tap gesture must eventually be reset after recognition,
this is a more suitable catch-all for removing the tap highlight.

(-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):

For the "touchend" deferring gesture recognizers, partition all tap gestures on the content view into three
subgraphs that mirror the extant gesture subgraphs currently used for the "touchstart" deferring gestures. This
ensures that synthetic clicks always remain fast when the blocking double tap gesture is disabled, and that
other tap gestures (such as the text interaction multi-tap gesture) are still immediately reset.

LayoutTests:

Add a layout test to verify that calling preventDefault() in an active touchend event listener prevents a
click event from being dispatched, and that a click event is dispatched when there is an active touchend event
listener which does not prevent default.

  • fast/events/touch/ios/click-event-after-touchend-expected.txt: Added.
  • fast/events/touch/ios/click-event-after-touchend.html: Added.
11:18 AM Changeset in webkit [271659] by Alan Coon
  • 1 copy in tags/Safari-611.1.10.1

Tag Safari-611.1.10.1.

11:12 AM Changeset in webkit [271658] by commit-queue@webkit.org
  • 10 edits in trunk/Source/WebCore

Use ScrollSnapOffsetsInfo in ScrollSnapAnimatorState
https://bugs.webkit.org/show_bug.cgi?id=220765

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

Refactor ScrollSnapAnimatorState to use ScrollSnapOffsetsInfo.

  • page/scrolling/AsyncScrollingCoordinator.cpp: No longer use getters for vertical

and horizontal snap information and use the ScrollSnapOffsetsInfo getter on ScrollableArea.
(WebCore::setStateScrollingNodeSnapOffsetsAsFloat):
(WebCore::AsyncScrollingCoordinator::setScrollingNodeScrollableAreaGeometry):
(WebCore::AsyncScrollingCoordinator::updateScrollSnapPropertiesWithFrameView):

  • page/scrolling/ScrollSnapOffsetsInfo.h:

(WebCore::ScrollSnapOffsetsInfo::isEmpty const): Added this helper method.
(WebCore::ScrollSnapOffsetsInfo::offsetsForAxis const): Ditto.
(WebCore::ScrollSnapOffsetsInfo::offsetRangesForAxis const): Ditto.

  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::snapOffsetInfo const): Added this getter.
(WebCore::ScrollableArea::nearestActiveSnapPoint): No longer use deleted getters.
(WebCore::ScrollableArea::horizontalSnapOffsets const): Deleted.
(WebCore::ScrollableArea::horizontalSnapOffsetRanges const): Deleted.
(WebCore::ScrollableArea::verticalSnapOffsetRanges const): Deleted.
(WebCore::ScrollableArea::verticalSnapOffsets const): Deleted.

  • platform/ScrollableArea.h:
  • platform/cocoa/ScrollController.mm:

(WebCore::ScrollController::updateScrollSnapState): Modified this method to update
all scroll snap information at once.

  • platform/cocoa/ScrollSnapAnimatorState.h:

(WebCore::ScrollSnapAnimatorState::snapOffsetsForAxis const): Modified to use new ScrollSnapOffsetsInfo member.
(WebCore::ScrollSnapAnimatorState::snapOffsetRangesForAxis const): Ditto.
(WebCore::ScrollSnapAnimatorState::setSnapOffsetInfo): Ditto.
(WebCore::ScrollSnapAnimatorState::setSnapOffsetsAndPositionRangesForAxis): Ditto.

  • platform/cocoa/ScrollSnapAnimatorState.mm:

(WebCore::ScrollSnapAnimatorState::setupAnimationForState): Ditto.

  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::gestureShouldBeginSnap): Use new ScrollSnapOffsetsInfo getter.
(WebCore::ScrollAnimatorMac::allowsVerticalStretching const): Ditto.
(WebCore::ScrollAnimatorMac::allowsHorizontalStretching const): Ditto.

  • testing/Internals.cpp:

(WebCore::Internals::scrollSnapOffsets): Ditto.

11:03 AM Changeset in webkit [271657] by Alan Coon
  • 8 edits in branches/safari-611.1.10-branch/Source

Versioning.

WebKit-7611.1.10.1

11:01 AM Changeset in webkit [271656] by jer.noble@apple.com
  • 3 edits
    1 add in trunk

[Mac] Netflix controls do not fade out after entering fullscreen
https://bugs.webkit.org/show_bug.cgi?id=220472
<rdar://70602577>

Reviewed by Eric Carlson.

Test: TestWebKitAPI/Tests/mac/FullscreenPointerLeave.mm

Netflix uses a "pointerleave" event over their playback controls to trigger setting their "fade out controls"
timer, but a "pointerleave" event isn't fired when the element moves out from under the pointer (either due to
style changes, or the window screen location moving due to entering fullscreen).

Work around this behavior by sending a synthetic mouse event after entering fullscreen, which causes the
"pointerleave" event to be fired if, indeed, the pointer is no longer over the element in question.

  • UIProcess/mac/WKFullScreenWindowController.mm:

(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):

10:42 AM Changeset in webkit [271655] by Alan Coon
  • 1 delete in branches/safari-610.1.10-branch/Safari-611.1.10

Undo copy.

10:38 AM Changeset in webkit [271654] by Alan Coon
  • 1 copy in branches/safari-611.1.10-branch

New branch.

10:37 AM Changeset in webkit [271653] by Alan Coon
  • 1 copy in branches/safari-610.1.10-branch/Safari-611.1.10

New branch.

10:36 AM Changeset in webkit [271652] by commit-queue@webkit.org
  • 3 edits
    1 add in trunk/LayoutTests

REGRESSION (Big Sur): Some tests in http/tests/security/http-0.9 flakily fail
https://bugs.webkit.org/show_bug.cgi?id=220188
<rdar://problem/72709565>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-01-20
Reviewed by Alexey Proskuryakov.

A change to CFNetwork was made in rdar://problem/69534004 that made these two tests flaky when operating near the limit of TCP connection count.
In an attempt to make them more reliable in our test environment, close existing TCP connections before making HTTP 0.9 connections.
I have been unable to reproduce the test failure, but I have verified that the test expectations of these tests is unaffected in normal conditions.

  • http/tests/security/http-0.9/default-port-plugin-blocked.html:
  • http/tests/security/http-0.9/default-port-script-blocked.html:
  • http/tests/security/http-0.9/resources/close-connection.php: Added.
10:34 AM Changeset in webkit [271651] by Simon Fraser
  • 3 edits
    9 adds in trunk

REGRESSION (Big Sur): position:absolute elements inside nested overflow:scroll don't track scrolling
https://bugs.webkit.org/show_bug.cgi?id=220761
<rdar://problem/69075263>

Reviewed by Antti Koivisto.
Source/WebCore:

When a position:absolute element is inside nested overflow scroll, and its containing block is the outer
scroller, then we failed to make a positioning scrolling tree node for it, so it would fail
to track during async scrolling.

The bug was that RenderLayerCompositor::layerScrollBehahaviorRelativeToCompositedAncestor() failed
to deal with nested scrollers. The correct question to ask when determining if we need a "Moves" node
is "is there an overflow scroll layer between this layer and its composited ancestor". Previously,
we would just find the enclosing scroller (with the same scrolling scope) and assume we didn't need
a node.

We can also simplify the "Stationary" code path to just ask about scrolling scopes.

Tests: scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-intermediate-stacking-2.html

scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-intermediate-stacking.html
scrollingcoordinator/ios/absolute-in-nested-overflow-scroll.html
scrollingcoordinator/scrolling-tree/absolute-in-nested-overflow-scroll.html

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::layerScrollBehahaviorRelativeToCompositedAncestor):
(WebCore::isScrolledByOverflowScrollLayer): Deleted.
(WebCore::enclosingCompositedScrollingLayer): Deleted.

LayoutTests:

Add a scrolling tree dump test, and three iOS interactive tests, since testing scrolling-tree-only
behaviors is easier on iOS than macOS. absolute-in-nested-overflow-scroll.html is the basic test.
The two "stacking" variants have an opacity layer below and above the inner scroller to test some
more layer configurations.

  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/absolute-in-nested-overflow-scroll-expected.txt: Added.
  • scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-expected.html: Added.
  • scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-intermediate-stacking-2-expected.html: Added.
  • scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-intermediate-stacking-2.html: Added.
  • scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-intermediate-stacking-expected.html: Added.
  • scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-intermediate-stacking.html: Added.
  • scrollingcoordinator/ios/absolute-in-nested-overflow-scroll.html: Added.
  • scrollingcoordinator/scrolling-tree/absolute-in-nested-overflow-scroll-expected.txt: Added.
  • scrollingcoordinator/scrolling-tree/absolute-in-nested-overflow-scroll.html: Added.
9:44 AM Changeset in webkit [271650] by Kate Cheney
  • 12 edits in trunk

Safari says "Blocked Plug-in" instead showing a PDF
https://bugs.webkit.org/show_bug.cgi?id=220665
<rdar://problem/64372944>

Reviewed by Darin Adler.

Source/WebCore:

WebKit's PDFPlugin is a browser implementation detail and should
bypass the ContentSecurityPolicy::allowObjectFromSource() check
in order to not be blocked along with other plugins.

  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::shouldBypassCSPForPDFPlugin const):
The check for whether to use PDFPlugin happens in
WebPage::createPlugin(). Some information there like isUnsupported,
isBlockedPlugin and pluginProcessToken are sent from the UIProcess
after the CSP check so they are unavailable here, but we know that PDFPlugin
will always be used when plugins are disabled and can use that information
to know whether to bypass CSP here in many cases. This will not relax
CSP or change behavior in other cases.

It would be ideal to check for an alternative PDF plugin in the case
where plugins are not disabled, but this information currently lives
in the UIProcess and is not sent to the WebProcess until after this
check. This patch will definitely fix Safari, where plugins are always disabled.

(WebCore::HTMLPlugInImageElement::canLoadPlugInContent const):

  • html/HTMLPlugInImageElement.h:
  • loader/FrameLoaderClient.h:

Source/WebKit:

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::shouldUsePDFPlugin const):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::createPlugin):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::shouldUsePDFPlugin const):

Tools:

API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm:

(TEST):

8:02 AM Changeset in webkit [271649] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitcorepy] Support alternative default pypi url on macOS (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=220744
<rdar://problem/73369338>

Unreviewed follow-up fix.

  • Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:

(_default_pypi_index): Ensure that "simple" is excluded from the pypi url.

8:02 AM Changeset in webkit [271648] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Support transferred min/max block size for aspect-ratio
https://bugs.webkit.org/show_bug.cgi?id=220224

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

Use std::clamp for clarity. Also use structured bindings where possible.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::constrainLogicalWidthInFragmentByMinMax const):

7:59 AM Changeset in webkit [271647] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[WPE][GTK] Ensure URI scheme handler is not registered multiple times
https://bugs.webkit.org/show_bug.cgi?id=220363

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-01-20
Reviewed by Carlos Garcia Campos.

  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkit_web_context_register_uri_scheme):

6:42 AM WebKitGTK/2.30.x edited by zandobersek@gmail.com
(diff)
5:55 AM Changeset in webkit [271646] by weinig@apple.com
  • 7 edits in trunk

Source/WebCore:
"Remove remaining non-standard CMYKA support from Canvas"
https://bugs.webkit.org/show_bug.cgi?id=220760

Reviewed by Darin Adler and Wenson Hsieh.

In r267645, most of the non-standard CMYKA taking functions on CanvasRenderingContext2D
were removed, leaving only the setShadow overload left. This finishes that removal and
cleans up some dead declarations that were left behind. As with the overloads removed in
r267645, we are quite confident no one is using these.

  • html/canvas/CanvasRenderingContext2D.idl:
  • html/canvas/CanvasRenderingContext2DBase.cpp:
  • html/canvas/CanvasRenderingContext2DBase.h:
  • html/canvas/CanvasStyle.h:

LayoutTests:
Remove remaining non-standard CMYKA support from canvas
https://bugs.webkit.org/show_bug.cgi?id=220760

Reviewed by Darin Adler and Wenson Hsieh.

  • inspector/canvas/recording-2d-full-expected.txt:

Update test results for removal.

5:10 AM Changeset in webkit [271645] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[WPE] Unreviewed gardening. Add removed WebXR tests in r270745.

These tests need actually to be marked as Pass in order to run, since
the general TestExpectations is skipping WPT WebXR tests.

  • platform/wpe/TestExpectations:
2:59 AM Changeset in webkit [271644] by svillar@igalia.com
  • 4 edits
    2 adds in trunk

[css-multicol] OOM with 1px height columns
https://bugs.webkit.org/show_bug.cgi?id=220490

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: fast/multicol/newmulticol/zero-height-columns-oom-crash.html

Multicol sometimes computes <= 0 heights for the columns. For all those cases the code was adjusting them to 1px
values apparently to avoid creating an "infinite" amount of columns. However that adjustment was precisely causing
OOM situations in those cases where there was a relatively large amount of free space. In those cases the code was
creating dozens of thousands of 1px height columns (with all their associated structures) until we run out of memory.

Using zero heights in those cases seem sane because it's already being properly handled in the current code.

  • rendering/RenderMultiColumnSet.cpp:

(WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset const): cap negative heights to 0.

LayoutTests:

  • fast/multicol/newmulticol/zero-height-columns-oom-crash-expected.txt: Added.
  • fast/multicol/newmulticol/zero-height-columns-oom-crash.html: Added.
  • imported/blink/fast/pagination/first-letter-inherit-all-crash-expected.txt: Updated expectations.
2:43 AM Changeset in webkit [271643] by youenn@apple.com
  • 14 edits
    1 add in trunk/Source/WebCore

Introduce a MediaSessionGroupIdentifier
https://bugs.webkit.org/show_bug.cgi?id=220706

Reviewed by Eric Carlson.

Instead of going from page to document to media session, introduce a MediaSessionGroupIdentifier which groups sessions by page.
We can then directly go from page to media session to suspend/resume play back.
Update PlatformMediaSessionClient to implement mediaSessionGroupIdentifier instead of hostingDocumentIdentifier.

We remove pausing playback from Document::~Document, as related audio producers (AudioContext, HTMLMediaElement)
should be paused in their ActiveDOMObject stop method.

Covered by existing tests, this is a refactoring.

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::mediaSessionGroupIdentifier const):
(WebCore::AudioContext::hostingDocumentIdentifier const): Deleted.

  • Modules/webaudio/AudioContext.h:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.cpp:

(WebCore::Document::~Document):
(WebCore::Document::mediaPlaybackExists): Deleted.
(WebCore::Document::mediaPlaybackIsPaused): Deleted.
(WebCore::Document::pauseAllMediaPlayback): Deleted.
(WebCore::Document::suspendAllMediaPlayback): Deleted.
(WebCore::Document::resumeAllMediaPlayback): Deleted.
(WebCore::Document::suspendAllMediaBuffering): Deleted.
(WebCore::Document::resumeAllMediaBuffering): Deleted.

  • dom/Document.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaSessionGroupIdentifier const):

  • html/HTMLMediaElement.h:
  • page/Page.cpp:

(WebCore::Page::mediaPlaybackExists):
(WebCore::Page::mediaPlaybackIsPaused):
(WebCore::Page::pauseAllMediaPlayback):
(WebCore::Page::suspendAllMediaPlayback):
(WebCore::Page::mediaSessionGroupIdentifier const):
(WebCore::Page::resumeAllMediaPlayback):
(WebCore::Page::suspendAllMediaBuffering):
(WebCore::Page::resumeAllMediaBuffering):

  • page/Page.h:
  • platform/MediaSessionGroupIdentifier.h: Added.
  • platform/audio/PlatformMediaSession.h:
  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::pauseAllMediaPlaybackForGroup):
(WebCore::PlatformMediaSessionManager::mediaPlaybackIsPaused):
(WebCore::PlatformMediaSessionManager::suspendAllMediaPlaybackForGroup):
(WebCore::PlatformMediaSessionManager::resumeAllMediaPlaybackForGroup):
(WebCore::PlatformMediaSessionManager::suspendAllMediaBufferingForGroup):
(WebCore::PlatformMediaSessionManager::resumeAllMediaBufferingForGroup):
(WebCore::PlatformMediaSessionManager::forEachSessionInGroup):
(WebCore::PlatformMediaSessionManager::pauseAllMediaPlaybackForDocument): Deleted.
(WebCore::PlatformMediaSessionManager::suspendAllMediaPlaybackForDocument): Deleted.
(WebCore::PlatformMediaSessionManager::resumeAllMediaPlaybackForDocument): Deleted.
(WebCore::PlatformMediaSessionManager::suspendAllMediaBufferingForDocument): Deleted.
(WebCore::PlatformMediaSessionManager::resumeAllMediaBufferingForDocument): Deleted.
(WebCore::PlatformMediaSessionManager::forEachDocumentSession): Deleted.

  • platform/audio/PlatformMediaSessionManager.h:
2:41 AM Changeset in webkit [271642] by youenn@apple.com
  • 7 edits in trunk

A DOMWindow should not be reused if its JSDOMWindow has been created
https://bugs.webkit.org/show_bug.cgi?id=220658
<rdar://problem/70335075>

Reviewed by Geoffrey Garen.

Source/WebCore:

When a JSDOMWindow is created from a DOMWindow, its document is used to decide whether to expose some properties,
based on SecureContext or quirks.
It is important to ensure that the document has the correct information at that time.

Add a boolean to DOMWindow to identify whether it was wrapped without its document being properly initialized.
Use that boolean in DocumentWriter to forbidd reusing the DOMWindow if it was created this way.

Covered by API test.

  • bindings/js/JSWindowProxy.cpp:

(WebCore::JSWindowProxy::setWindow):

  • dom/SecurityContext.h:

(WebCore::SecurityContext::haveInitializedSecurityOrigin const):
(WebCore::SecurityContext::didFailToInitializeSecurityOrigin):

  • loader/DocumentWriter.cpp:

(WebCore::DocumentWriter::begin):

  • page/DOMWindow.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm:
1:01 AM Changeset in webkit [271641] by youenn@apple.com
  • 2 edits in trunk/Source/WTF

Enable WebRTC VP9 profile 0 by default
https://bugs.webkit.org/show_bug.cgi?id=219390

Reviewed by Geoffrey Garen.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
12:57 AM Changeset in webkit [271640] by youenn@apple.com
  • 5 edits in trunk

On page close, make sure to notify of capture state immediately
https://bugs.webkit.org/show_bug.cgi?id=220588

Reviewed by Geoffrey Garen.

Source/WebKit:

If page is getting closed or reset (for instance in case of process swap), we immediately notify the client of the capture state,
instead of waiting for 3 seconds if capture just started.

Covered by API test.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::isPlayingMediaDidChange):
(WebKit::WebPageProxy::updatePlayingMediaDidChange):
(WebKit::WebPageProxy::updateReportedMediaCaptureState):

  • UIProcess/WebPageProxy.h:

Tools:

  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:

(TestWebKitAPI::TEST):

12:31 AM Changeset in webkit [271639] by Dewei Zhu
  • 6 edits in trunk/Websites/perf.webkit.org

BuildbotTriggerable should not update build requests from another triggerable.
https://bugs.webkit.org/show_bug.cgi?id=220762

Reviewed by Ryosuke Niwa.

BuildbotTriggerable._pullBuildbotOnAllSyncers assumes 'BuildRequest.all()' returns all build requests under current triggerable.
However, this assumption got broken when root reuse change was introduced because build requests under same analysis task are
fetched. Thus, 'BuildRequest.all()' may contain build requests those are not under current triggerable. And those build requests
will be updated to 'failedIfNotCompleted'.
Update 'api/build-requests' so that 'url' and 'status_description' fields are not cleared if update does not specify them.

  • public/api/build-requests.php: Added logic to avoid updating 'url' and 'status_description' if they are not specified.
  • server-tests/api-build-requests-tests.js: Added an unit test.
  • server-tests/resources/mock-data.js:

(MockData.async set addMockBuildRequestsForTwoTriggerablesUnderOneAnalysisTask):

  • server-tests/tools-buildbot-triggerable-tests.js: Added an unit test.
  • tools/js/buildbot-triggerable.js:

(BuildbotTriggerable.prototype.async syncOnce): Fixed a typo.
(BuildbotTriggerable._pullBuildbotOnAllSyncers): Instead of iterating over 'BuildRequest.all()', only set 'failedIfNotCompleted'
for build requests those are under current triggerable and satisfy the condition.

12:07 AM Changeset in webkit [271638] by Antti Koivisto
  • 12 edits in trunk/Source/WebCore

Implement efficient way to collect images that are likely visible in the viewport
https://bugs.webkit.org/show_bug.cgi?id=220727

Reviewed by Geoffrey Garen.

To implement visibility based resource load scheduling we need to know what is visible.

This patch expands the exisiting visibility test mechanism to support collecting all visible, loading resources in a document.
The code is not used yet.

  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::imageVisibleInViewport const):

  • loader/ImageLoader.h:
  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::isVisibleInViewport const):

  • loader/cache/CachedImage.h:
  • loader/cache/CachedImageClient.h:

(WebCore::CachedImageClient::imageVisibleInViewport const):

Add a virtual interface. It is implemented by ImageLoader (for regular images) and RenderElement (for CSS images like backgrounds).

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::CachedResourceLoader):

  • loader/cache/CachedResourceLoader.h:
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::isVisibleIgnoringGeometry const):

Factor geometry-independent test to a function.

(WebCore::RenderElement::isVisibleInDocumentRect const):
(WebCore::RenderElement::imageVisibleInViewport const):

  • rendering/RenderElement.h:
  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::isContentLikelyVisibleInViewport):

This also allows intrisically sized images that currently have zero size.

  • rendering/RenderReplaced.h:
Note: See TracTimeline for information about the timeline view.