Timeline
Jan 24, 2021:
- 4:47 PM Changeset in webkit [271786] by
-
- 19 edits2 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
-
- 3 edits4 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 4 edits2 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 toAVAudioSessionCategoryAmbient, and because the
AudioContext is paused when the web process is forwarded the
UIApplicationWillResignActiveNotificationnotification.
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
BackgroundProcessPlaybackRestrictedrestriction 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
-
- 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
-
- 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
-
- 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
-
- 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.