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

Timeline



Jul 31, 2021:

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

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

Reviewed by Yusuke Suzuki.

No new tests because no behavior change.

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

Ported from a Chromium change by Adithya Srinivasan

  • html/HTMLInputElement.cpp:

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

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

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

Reviewed by Alexey Shvayka.

Source/JavaScriptCore:

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

  • yarr/YarrJIT.cpp:

Source/WTF:

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

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

Reviewed by Alexey Shvayka.

Modernize Yarr code by using static constexpr.

  • assembler/AbstractMacroAssembler.h:

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

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

(set characters.hex.set string_appeared_here):

  • yarr/YarrErrorCode.cpp:

(JSC::Yarr::errorMessage):

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

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

Reviewed by Eric Carlson.

Source/WebCore:

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

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

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

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

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

Source/WebKit:

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

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:

(WebKit::RemoteSampleBufferDisplayLayer::setLogIdentifier):

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

(WebKit::SampleBufferDisplayLayer::setLogIdentifier):

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

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

Reviewed by Eric Carlson.

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

Manually tested.

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

(WebCore::AVVideoCaptureSource::setSessionSizeAndFrameRate):

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

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

Reviewed by Eric Carlson.

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

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.cpp:

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

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

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

Reviewed by Adrian Perez de Castro.

Source/WebCore:

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

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

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

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

LayoutTests:

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

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

Reviewed by Ross Kirsling.

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

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

  • b3/B3CanonicalizePrePostIncrements.cpp:

(JSC::B3::canonicalizePrePostIncrements):

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

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

Reviewed by Saam Barati.

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

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

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

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

Reverted changeset:

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

Jul 30, 2021:

11:41 PM Changeset in webkit [280510] by sihui_liu@apple.com
  • 4 edits
    3 adds
    2 deletes in trunk/LayoutTests

[ macOS wk2 ARM 64 ] storage/indexeddb/IDBObject-leak.html is a flakey text failure
https://bugs.webkit.org/show_bug.cgi?id=223453
<rdar://problem/75580609>

Reviewed by Youenn Fablet.

As JavaScriptCore uses conservative GC, transaction may be still be alive after one gc call, so we should invoke
gc multiple times.

Also, this patch renames IDBObject-leak.html to database-transaction-cycle.html to better indicate what it is
testing.

  • TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/wk2/TestExpectations:
  • storage/indexeddb/IDBObject-leak-expected.txt: Removed.
  • storage/indexeddb/IDBObject-leak.html: Removed.
  • storage/indexeddb/database-transaction-cycle-expected.txt: Added.
  • storage/indexeddb/database-transaction-cycle.html: Added.
  • storage/indexeddb/resources/database-transaction-cycle-iframe.html: Added.
11:07 PM Changeset in webkit [280509] by commit-queue@webkit.org
  • 20 edits
    2 adds in trunk

[css-overflow] Implement clip value for overflow
https://bugs.webkit.org/show_bug.cgi?id=198230

Patch by Rob Buis <rbuis@igalia.com> on 2021-07-30
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-overflow/overflow-clip-hit-testing-expected.txt: Added.
  • web-platform-tests/css/css-overflow/overflow-clip-scroll-size-expected.txt: Added.
  • web-platform-tests/css/css-overflow/parsing/overflow-computed-expected.txt:
  • web-platform-tests/css/css-overflow/parsing/overflow-valid-expected.txt:

Source/WebCore:

Implement overflow: clip. Parsing is like the other
overflow values but special logic is added to handle
the case where only one of overflow-x/overflow-y uses
'clip' [1]. Also adjusts code that computes layout and
visual overflow to take overflow: clip into account.

This matches Chrome and Firefox.

[1] https://drafts.csswg.org/css-overflow/#propdef-overflow-x

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator Overflow const):

  • css/CSSProperties.json:
  • css/parser/CSSParserContext.cpp:

(WebCore::operator==):
(WebCore::add):

  • css/parser/CSSParserContext.h:
  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

  • page/FrameView.cpp: handle scrollbars

on viewport element same as overflow: hidden.
(WebCore::FrameView::applyOverflowToViewport):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::updateFromStyle):
(WebCore::RenderBox::scrollWidth const): overflow clip
forbids all scrolling.
(WebCore::RenderBox::scrollHeight const): Ditto.
(WebCore::RenderBox::setScrollLeft): Ditto.
(WebCore::RenderBox::setScrollTop): Ditto.
(WebCore::RenderBox::setScrollPosition): Ditto.
(WebCore::RenderBox::requiresLayerWithScrollableArea const): do
not create layer with scrollable area for overflow: clip.
(WebCore::RenderBox::canBeProgramaticallyScrolled const): overflow clip
forbids all scrolling.
(WebCore::RenderBox::scrollPosition const): overflow clip
forbids all scrolling.
(WebCore::RenderBox::overflowClipRect const): only clip the rect horizontally
for overflow-x: clip and only vertically for overflow-y: clip.
(WebCore::RenderBox::createsNewFormattingContext const): do
not create formatting context for overflow: clip.
(WebCore::RenderBox::addOverflowFromChild):
(WebCore::RenderBox::addLayoutOverflow):
(WebCore::RenderBox::layoutOverflowRectForPropagation const):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::enclosingScrollableContainerForSnapping const):

  • rendering/RenderObject.h: Add helper method that excludes overflow-x/y: clip.

(WebCore::RenderObject::hasPotentiallyScrollableOverflow const):

  • rendering/style/RenderStyleConstants.cpp:

(WebCore::operator<<):

  • rendering/style/RenderStyleConstants.h:
  • style/StyleAdjuster.cpp: Add special logic is to handle the case where only

one of overflow-x/overflow-y uses 'clip'.
(WebCore::Style::Adjuster::adjust const):

Source/WTF:

Add preference for overflow: clip support.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

LayoutTests:

9:46 PM Changeset in webkit [280508] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] branchTest8 should not emit tst for Zero/NonZero cases
https://bugs.webkit.org/show_bug.cgi?id=228674

Reviewed by Mark Lam.

Previously, branchTest8(NonZero, BaseIndex) emits tst instruction
unnecessarily. This is because the mask is truncated into 8bit, which
makes branchTest32 (which is internally used in branchTest8) emits tst.
We observed many unnecessary tst in YarrJIT.

This patch removes this unnecessary truncation since Zero/NonZero does
not care high bits of mask in branchTest8. This is ok because the
ResultCondition version of mask8OnCondition() is always used to generate
a mask that is only used against a value that is loaded with
MacroAssemblerHelpers::load8OnCondition(). For Zero/NonZero conditions,
load8OnCondition() will always zero fill the upper bytes. The 0 filled
upper bytes will not affect the result of a branch on zero or branch on
not zero.

Before:

0x10a8068b0: ldrb w16, [x7, x6]
0x10a8068b4: tst w16, #0xff
0x10a8068b8: b.ne 0x10a8068cc

After:

0x1070068b0: ldrb w16, [x7, x6]
0x1070068b4: cbnz w16, 0x1070068c8

  • assembler/MacroAssemblerHelpers.h:

(JSC::MacroAssemblerHelpers::mask8OnCondition):

6:40 PM Changeset in webkit [280507] by rmorisset@apple.com
  • 6 edits
    1 add in trunk

Improve OSR entry into Wasm loops with arguments
https://bugs.webkit.org/show_bug.cgi?id=228595

Reviewed by Yusuke Suzuki.

JSTests:

Just a straightforward test that counts to 1M in a loop, to exercise both OSR entry and a loop with an argument at the same time.
100k iterations was not enough to reliably complete an OSR entry.

  • wasm/stress/osr-entry-with-loop-arguments.js: Added.

(async test):

Source/JavaScriptCore:

This patch has two parts:

  • improve the Wasm OSR code to fully support loop arguments (just some plumbing to make sure that the right values are propagated)
  • improve the B3 validator to fix a hole I noticed while writing the first part: we were not detecting code that introduce Upsilons in the wrong blocks. Naturally, this caused hard to debug issues, as B3 has no well-defined semantics for a Phi that is reached before the corresponding Upsilon(s).
  • b3/B3Validate.cpp:
  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::emitLoopTierUpCheck):
(JSC::Wasm::AirIRGenerator::addLoop):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::emitLoopTierUpCheck):
(JSC::Wasm::B3IRGenerator::addLoop):

  • wasm/WasmLLIntGenerator.cpp:

(JSC::Wasm::LLIntGenerator::addLoop):

6:36 PM Changeset in webkit [280506] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Rename Temporal.now to Temporal.Now
https://bugs.webkit.org/show_bug.cgi?id=228658

Patch by Philip Chimento <pchimento@igalia.com> on 2021-07-30
Reviewed by Yusuke Suzuki.

See https://github.com/tc39/proposal-temporal/pull/1645. In the July
2021 meeting TC39 achieved consensus to rename Temporal.now to
Temporal.Now since it is a namespace.

  • runtime/TemporalNow.cpp: Change Now[@@toStringTag] accordingly.
  • runtime/TemporalObject.cpp: Rename now property to Now.
6:33 PM Changeset in webkit [280505] by Tadeu Zagallo
  • 5 edits in trunk

putInlineFastReplacingStaticPropertyIfNeeded should handle custom values
https://bugs.webkit.org/show_bug.cgi?id=227963

Reviewed by Alexey Shvayka.

JSTests:

  • stress/reflect-set-custom-value.js:

Source/JavaScriptCore:

Follow up after r280463: as it turns out, putInlineFastReplacingStaticPropertyIfNeeded also needs to handle
custom values, similar to how definePropertyOnReceiverSlow was updated. This function will be called when the
target property of the receiver is a custom value and isn't reified. The previous test case was expanded to
test both the reified and non-reified cases.

  • runtime/JSObject.cpp:

(JSC::JSObject::putInlineFastReplacingStaticPropertyIfNeeded):

  • tools/JSDollarVM.cpp:
5:07 PM Changeset in webkit [280504] by Chris Dumez
  • 96 edits
    3 copies
    1 add in trunk

Add initial support for 'Cross-Origin-Opener-Policy' HTTP header
https://bugs.webkit.org/show_bug.cgi?id=192193
<rdar://problem/42013525>

Reviewed by Geoff Garen.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that most tests are passing.

  • web-platform-tests/IndexedDB/serialize-sharedarraybuffer-throws.https-expected.txt:
  • web-platform-tests/html/cross-origin-embedder-policy/cross-origin-isolated-permission.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/blob-popup.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/coep-blob-popup.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/coep-navigate-popup.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/coep-redirect.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/coep.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/coop-coep-sandbox.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/coop-csp-sandbox-navigate.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/coop-csp-sandbox.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/coop-navigated-history-popup.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/coop-navigated-popup.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/coop-sandbox.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/header-parsing.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/historical/coep-navigate-popup-unsafe-inherit.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-origin-unsafe-allow-outgoing-with-cross-origin.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-origin-unsafe-allow-outgoing-with-same-origin.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-origin-unsafe-allow-outgoing-with-same-site.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-unsafe-allow-outgoing-with-cross-origin.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-unsafe-allow-outgoing-with-same-origin.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-unsafe-allow-outgoing-with-same-site.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-with-cross-origin.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-with-same-origin.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-with-same-site.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-allow-popups-to-same-origin-allow-popups.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-allow-popups-to-same-origin.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-to-same-origin.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-to-unsafe-none.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/iframe-popup-unsafe-none-to-same-origin.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/javascript-url.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/navigate-to-aboutblank.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/no-https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/popup-coop-by-sw-from-coop.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/popup-coop-by-sw.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/popup-redirect-cache.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/popup-redirect-same-origin-allow-popups.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-allow-popups-with-cross-origin.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-allow-popups-with-same-origin.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-allow-popups-with-same-site.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-with-cross-origin.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-with-same-origin.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-with-same-site.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/popup-unsafe-none-with-cross-origin.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/popup-unsafe-none-with-same-origin.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/popup-unsafe-none-with-same-site.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/popup-unspecified-with-cross-origin.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/popup-unspecified-with-same-origin.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/popup-unspecified-with-same-site.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/popup-with-structured-header.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/resource-popup.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/resources/resource-popup.html:
  • web-platform-tests/html/dom/idlharness.worker-expected.txt:

Source/WebCore:

Add initial support for 'Cross-Origin-Opener-Policy' HTTP header:

Support is complete enough to pass most WPT tests with the exception of:

  • The ones involving blob. Support for Blob does not seem trivial so I will address separately (https://github.com/whatwg/html/issues/5198).
  • The ones that requires reporting COOP enforcement as this is not supported yet. This is a fairly large task so I'll handle separately.
  • The ones that involve Cross-Origin-Embedder-Policy (COEP) and this is not yet supported.

I tried to stay as close as possible to the HTML specification as possible in terms
of structuring and naming. I also have code comments to link to the relevant HTML
spec sections.

Note that as it stands, we do not currently swap process based on COOP header. We
merely do isolation of the new browsing context at JS level for now. At some point,
we'll want to actually process-swap, once we support COEP and we want to re-enable
some Web APIs such as SharedArrayBuffer.

No new tests, covered by web-plaform-tests/html/cross-origin-opener-policy.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:
  • dom/Document.cpp:

(WebCore::Document::initSecurityContext):
(WebCore::Document::shouldForceNoOpenerBasedOnCOOP const):
(WebCore::Document::crossOriginOpenerPolicy const):
(WebCore::Document::setCrossOriginOpenerPolicy):

  • dom/Document.h:

(WebCore::Document::isSameOriginAsTopDocument const):

  • dom/SecurityContext.cpp:

(WebCore::SecurityContext::enforceSandboxFlags):

  • dom/SecurityContext.h:

(WebCore::SecurityContext::creationSandboxFlags const):

  • inspector/InspectorFrontendClientLocal.cpp:

(WebCore::InspectorFrontendClientLocal::openURLExternally):

  • loader/CrossOriginEmbedderPolicy.cpp: Copied from Source/WebCore/page/AbstractFrame.cpp.

(WebCore::obtainCrossOriginEmbedderPolicy):

  • loader/CrossOriginEmbedderPolicy.h: Copied from Source/WebCore/page/AbstractFrame.cpp.
  • loader/CrossOriginOpenerPolicy.cpp: Added.

(WebCore::obtainCrossOriginOpenerPolicy):

  • loader/CrossOriginOpenerPolicy.h: Copied from Source/WebCore/page/AbstractFrame.h.
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::willSendRequest):
(WebCore::checkIfCOOPValuesRequireBrowsingContextGroupSwitch):
(WebCore::computeResponseOriginAndCOOP):
(WebCore::DocumentLoader::doCrossOriginOpenerHandlingOfResponse):
(WebCore::DocumentLoader::enforceResponseCrossOriginOpenerPolicy):
(WebCore::DocumentLoader::responseReceived):
(WebCore::DocumentLoader::maybeLoadEmpty):

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::crossOriginOpenerPolicy const):

  • loader/DocumentWriter.cpp:

(WebCore::DocumentWriter::begin):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::didBeginDocument):
(WebCore::FrameLoader::setOpener):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::createWindow):
(WebCore::FrameLoader::switchBrowsingContextsGroup):

  • loader/FrameLoader.h:
  • loader/NavigationAction.cpp:
  • loader/NavigationAction.h:

(WebCore::NavigationAction::Requester::securityOrigin const):
(WebCore::NavigationAction::Requester::topOrigin const):
(WebCore::NavigationAction::Requester::crossOriginOpenerPolicy const):

  • page/AbstractFrame.cpp:

(WebCore::AbstractFrame::resetWindowProxy):

  • page/AbstractFrame.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::crossOriginIsolated const):
(WebCore::DOMWindow::createWindow):

  • page/DOMWindow.h:
  • page/Frame.cpp:

(WebCore::Frame::resetScript):

  • page/Frame.h:
  • page/Page.h:

(WebCore::Page::setOpenedByDOMWithOpener):

  • page/WindowOrWorkerGlobalScope.idl:
  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::applyPolicyToScriptExecutionContext):

  • platform/network/HTTPHeaderNames.in:
  • platform/network/HTTPParsers.cpp:

(WebCore::parseStructuredFieldValue):

  • platform/network/HTTPParsers.h:
  • platform/network/ResourceResponseBase.cpp:

(WebCore::isSafeRedirectionResponseHeader):

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::crossOriginIsolated const):

  • workers/WorkerGlobalScope.h:

Source/WTF:

Add experimental feature flag for 'Cross-Origin-Opener-Policy' HTTP header
support.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

LayoutTests:

Update test expectations.

  • TestExpectations:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk2/TestExpectations:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac/TestExpectations:
4:57 PM Changeset in webkit [280503] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS ] http/wpt/service-workers/navigation-redirect-main-frame.https.html is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=228670

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
4:08 PM Changeset in webkit [280502] by Chris Dumez
  • 28 edits in trunk

Unreviewed, reverting r280482.

Will take a more conservative approach

Reverted changeset:

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

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

Add spacebar functionality for macOS smooth scrolling
https://bugs.webkit.org/show_bug.cgi?id=228155

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

Fixed bug that was causing spacebar events to return false from beginKeyboardScrollGesture.

Manually tested on webpage.

  • platform/KeyboardScrollingAnimator.cpp:

(WebCore::KeyboardScrollingAnimator::beginKeyboardScrollGesture):

3:38 PM Changeset in webkit [280500] by Jean-Yves Avenard
  • 5 edits in trunk

REGRESSION (r274460?): Infinite recursion on fullscreen/full-screen-remove-ancestor.html in WTR::InjectedBundlePage::closeFullScreen
https://bugs.webkit.org/show_bug.cgi?id=224085
rdar://75576840

Reviewed by Eric Carlson.

Source/WebKit:

WebFullScreenManager::close() is used to cleanup a transient error when exiting or
attempting to exit fullscreen; it then calls InjectedBundleXXX::closeFullScreen().
It is possible for the injected bundle's closeFullScreen() to attempt to exit full
screen mode again.
Rather than making the bundle responsible for doing the right thing, we add a
workaround in the fullscreen manager to ensure no recursion is happening.

Covered by existing test.

  • WebProcess/FullScreen/WebFullScreenManager.cpp:

(WebKit::WebFullScreenManager::close):

  • WebProcess/FullScreen/WebFullScreenManager.h: Make close() method private

LayoutTests:

  • platform/mac-wk2/TestExpectations: re-enable test.
3:29 PM Changeset in webkit [280499] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

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

Unreviewed test gardening.

  • platform/ipad/TestExpectations:
3:03 PM Changeset in webkit [280498] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed follow-up to r280491 to address review feedback from Darin Adler.

Use URL::isBlankURL() instead of a case-sensitive match for aboutBlankURL().

  • dom/Document.cpp:

(WebCore::Document::updateBaseURL):

2:35 PM Changeset in webkit [280497] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS Debug ] fast/events/tabindex-focus-blur-all.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=228659

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
2:16 PM Changeset in webkit [280496] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix wrong access width
https://bugs.webkit.org/show_bug.cgi?id=228301
rdar://81341472

  • yarr/YarrJIT.cpp:
1:58 PM Changeset in webkit [280495] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

REGRESSION (r275641): [ iPad Debug ] accessibility/ios-simulator/scroll-in-overflow-div.html is asserting.
https://bugs.webkit.org/show_bug.cgi?id=228622

Unreviewed test gardening.

  • platform/ipad/TestExpectations:
1:46 PM Changeset in webkit [280494] by Ayumi Kojima
  • 1 edit
    1 add in trunk/LayoutTests

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

Unreviewed test gardening.

  • platform/ipad/fast/dom/collection-iterators-expected.txt: Added.
1:44 PM Changeset in webkit [280493] by Yijia Huang
  • 16 edits
    1 copy
    1 add in trunk/Source/JavaScriptCore

Add Pre/Post-Indexed Address Mode to Air for ARM64
https://bugs.webkit.org/show_bug.cgi?id=228047

Reviewed by Phil Pizlo.

Pre-indexed addressing means that the address is the sum of the value in the 64-bit base register
and an offset, and the address is then written back to the base register. And post-indexed
addressing means that the address is the value in the 64-bit base register, and the sum of the
address and the offset is then written back to the base register. They are relatively common for
loops to iterate over an array by increasing/decreasing a pointer into the array at each iteration.
With such an addressing mode, the instruction selector can merge the increment and access the array.

#####################################
## Pre-Index Address Mode For Load ##
#####################################

LDR Wt, [Xn, #imm]!

In B3 Reduction Strength, since we have this reduction rule:

Turn this: Load(Add(address, offset1), offset = offset2)
Into this: Load(address, offset = offset1 + offset2)

Then, the equivalent pattern is:

address = Add(base, offset)
...
memory = Load(base, offset)

First, we convert it to the canonical form:

address = Add(base, offset)
newMemory = Load(base, offset) move the memory to just after the address
...
memory = Identity(newMemory)

Next, lower to Air:

Move %base, %address
Move (%address, prefix(offset)), %newMemory

######################################
## Post-Index Address Mode For Load ##
######################################

LDR Wt, [Xn], #imm

Then, the equivalent pattern is:

memory = Load(base, 0)
...
address = Add(base, offset)

First, we convert it to the canonical form:

newOffset = Constant
newAddress = Add(base, offset)
memory = Load(base, 0) move the offset and address to just before the memory
...
offset = Identity(newOffset)
address = Identity(newAddress)

Next, lower to Air:

Move %base, %newAddress
Move (%newAddress, postfix(offset)), %memory

#############################
## Pattern Match Algorithm ##
#############################

To detect the pattern for prefix/postfix increment address is tricky due to the structure in B3 IR. The
algorithm used in this patch is to collect the first valid values (add/load), then search for any
paired value (load/add) to match all of them. In worst case, the runtime complexity is O(n2)
when n is the number of all values.

After collecting two sets of candidates, we match the prefix incremental address first since it seems
more beneficial to the compiler (shown in the next section). And then, go for the postfix one.

##############################################
## Test for Pre/Post-Increment Address Mode ##
##############################################

Given Loop with Pre-Increment:
int64_t ldr_pre(int64_t *p) {

int64_t res = 0;
while (res < 10)

res += *++p;

return res;

}

B3 IR:


BB#0: ; frequency = 1.000000

Int64 b@0 = Const64(0)
Int64 b@2 = ArgumentReg(%x0)
Void b@20 = Upsilon($0(b@0), 18, WritesLocalState)
Void b@21 = Upsilon(b@2,
19, WritesLocalState)
Void b@4 = Jump(Terminal)

Successors: #1
BB#1: ; frequency = 1.000000
Predecessors: #0, #2

Int64 b@18 = Phi(ReadsLocalState)
Int64 b@19 = Phi(ReadsLocalState)
Int64 b@7 = Const64(10)
Int32 b@8 = AboveEqual(b@18, $10(b@7))
Void b@9 = Branch(b@8, Terminal)

Successors: Then:#3, Else:#2
BB#2: ; frequency = 1.000000
Predecessors: #1

Int64 b@10 = Const64(8)
Int64 b@11 = Add(b@19, $8(b@10))
Int64 b@13 = Load(b@11, ControlDependent|Reads:Top)
Int64 b@14 = Add(b@18, b@13)
Void b@22 = Upsilon(b@14, 18, WritesLocalState)
Void b@23 = Upsilon(b@11,
19, WritesLocalState)
Void b@16 = Jump(Terminal)

Successors: #1
BB#3: ; frequency = 1.000000
Predecessors: #1

Void b@17 = Return(b@18, Terminal)

Variables:

Int64 var0
Int64 var1


W/O Pre-Increment Address Mode:


...
BB#2: ; frequency = 1.000000
Predecessors: #1

Move $8, %x3, $8(b@12)
Add64 $8, %x0, %x1, b@11
Move (%x0,%x3), %x0, b@13
Add64 %x0, %x2, %x2, b@14
Move %x1, %x0, b@23
Jump b@16

Successors: #1
...


W/ Pre-Increment Address Mode:


...
BB#2: ; frequency = 1.000000
Predecessors: #1

MoveWithIncrement64 (%x0,Pre($8)), %x2, b@13
Add64 %x2, %x1, %x1, b@14
Jump b@16

Successors: #1
...


Given Loop with Post-Increment:
int64_t ldr_pre(int64_t *p) {

int64_t res = 0;
while (res < 10)

res += *p++;

return res;

}

B3 IR:


BB#0: ; frequency = 1.000000

Int64 b@0 = Const64(0)
Int64 b@2 = ArgumentReg(%x0)
Void b@20 = Upsilon($0(b@0), 18, WritesLocalState)
Void b@21 = Upsilon(b@2,
19, WritesLocalState)
Void b@4 = Jump(Terminal)

Successors: #1
BB#1: ; frequency = 1.000000
Predecessors: #0, #2

Int64 b@18 = Phi(ReadsLocalState)
Int64 b@19 = Phi(ReadsLocalState)
Int64 b@7 = Const64(10)
Int32 b@8 = AboveEqual(b@18, $10(b@7))
Void b@9 = Branch(b@8, Terminal)

Successors: Then:#3, Else:#2
BB#2: ; frequency = 1.000000
Predecessors: #1

Int64 b@10 = Load(b@19, ControlDependent|Reads:Top)
Int64 b@11 = Add(b@18, b@10)
Int64 b@12 = Const64(8)
Int64 b@13 = Add(b@19, $8(b@12))
Void b@22 = Upsilon(b@11, 18, WritesLocalState)
Void b@23 = Upsilon(b@13,
19, WritesLocalState)
Void b@16 = Jump(Terminal)

Successors: #1
BB#3: ; frequency = 1.000000
Predecessors: #1

Void b@17 = Return(b@18, Terminal)

Variables:

Int64 var0
Int64 var1


W/O Post-Increment Address Mode:


...
BB#2: ; frequency = 1.000000
Predecessors: #1

Move (%x0), %x2, b@10
Add64 %x2, %x1, %x1, b@11
Add64 $8, %x0, %x0, b@13
Jump b@16

Successors: #1
...


W/ Post-Increment Address Mode:


...
BB#2: ; frequency = 1.000000
Predecessors: #1

MoveWithIncrement64 (%x0,Post($8)), %x2, b@10
Add64 %x2, %x1, %x1, b@11
Jump b@16

Successors: #1
...


  • Sources.txt:
  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::PreIndexAddress::PreIndexAddress):
(JSC::AbstractMacroAssembler::PostIndexAddress::PostIndexAddress):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::load64):
(JSC::MacroAssemblerARM64::load32):
(JSC::MacroAssemblerARM64::store64):
(JSC::MacroAssemblerARM64::store32):

  • assembler/testmasm.cpp:

(JSC::testStorePrePostIndex32):
(JSC::testStorePrePostIndex64):
(JSC::testLoadPrePostIndex32):
(JSC::testLoadPrePostIndex64):

  • b3/B3CanonicalizePrePostIncrements.cpp: Added.

(JSC::B3::canonicalizePrePostIncrements):

  • b3/B3CanonicalizePrePostIncrements.h: Copied from Source/JavaScriptCore/b3/B3ValueKeyInlines.h.
  • b3/B3Generate.cpp:

(JSC::B3::generateToAir):

  • b3/B3LowerToAir.cpp:
  • b3/B3ValueKey.h:
  • b3/B3ValueKeyInlines.h:

(JSC::B3::ValueKey::ValueKey):

  • b3/air/AirArg.cpp:

(JSC::B3::Air::Arg::jsHash const):
(JSC::B3::Air::Arg::dump const):
(WTF::printInternal):

  • b3/air/AirArg.h:

(JSC::B3::Air::Arg::preIndex):
(JSC::B3::Air::Arg::postIndex):
(JSC::B3::Air::Arg::isPreIndex const):
(JSC::B3::Air::Arg::isPostIndex const):
(JSC::B3::Air::Arg::isMemory const):
(JSC::B3::Air::Arg::base const):
(JSC::B3::Air::Arg::offset const):
(JSC::B3::Air::Arg::isGP const):
(JSC::B3::Air::Arg::isFP const):
(JSC::B3::Air::Arg::isValidPreIndexForm):
(JSC::B3::Air::Arg::isValidPostIndexForm):
(JSC::B3::Air::Arg::isValidForm const):
(JSC::B3::Air::Arg::forEachTmpFast):
(JSC::B3::Air::Arg::forEachTmp):
(JSC::B3::Air::Arg::asPreIndexAddress const):
(JSC::B3::Air::Arg::asPostIndexAddress const):

  • b3/air/AirOpcode.opcodes:
  • b3/air/opcode_generator.rb:
  • b3/testb3.h:
  • b3/testb3_3.cpp:

(testLoadPreIndex32):
(testLoadPreIndex64):
(testLoadPostIndex32):
(testLoadPostIndex64):
(addShrTests):

  • jit/ExecutableAllocator.cpp:

(JSC::jitWriteThunkGenerator):

1:26 PM Changeset in webkit [280492] by commit-queue@webkit.org
  • 10 edits
    2 adds in trunk/Source/WebCore

Add key-driven smooth scrolling to macOS
https://bugs.webkit.org/show_bug.cgi?id=228009

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

Cause keyboard scroll event to trigger start of smooth scroll animation, using same physics implementation as iOS smooth scrolling.

No tests yet.

  • WebCore.xcodeproj/project.pbxproj:
  • dom/Node.cpp:

(WebCore::Node::defaultEventHandler):

  • page/EventHandler.cpp:

(WebCore::EventHandler::defaultKeyboardEventHandler):
(WebCore::EventHandler::scrollDistance):
(WebCore::EventHandler::stopKeyboardScrolling):
(WebCore::EventHandler::startKeyboardScrolling):

  • platform/KeyboardScrollingAnimator.cpp: Added.
  • platform/KeyboardScrollingAnimator.h: Added.
  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::startAnimationCallback):

  • platform/ScrollAnimator.h:
  • platform/ScrollController.cpp:

(WebCore::ScrollController::animationCallback):
(WebCore::ScrollController::startOrStopAnimationCallbacks):
(WebCore::ScrollController::beginKeyboardScrolling):
(WebCore::ScrollController::stopKeyboardScrolling):
(WebCore::ScrollController::setIsAnimatingKeyboardScrolling):
(WebCore::ScrollController::updateKeyboardScrollingAnimatingState):

  • platform/ScrollController.h:

(WebCore::ScrollControllerClient::updateKeyboardScrollPosition):

1:25 PM Changeset in webkit [280491] by Chris Dumez
  • 15 edits
    5 moves in trunk

Document's fallback base URL should be deduced from its creator when URL is about:blank
https://bugs.webkit.org/show_bug.cgi?id=228624

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT test now that one more check is passing.

  • web-platform-tests/html/infrastructure/urls/terminology-0/document-base-url-expected.txt:

Source/WebCore:

Document's fallback base URL should be deduced from its creator when URL is about:blank:

Chrome and Firefox match the specification here.

Tests: http/tests/dom/iframe-no-src-local-origin-allow.html

http/tests/dom/iframe-no-src-set-location.html

  • dom/Document.cpp:

(WebCore::Document::updateBaseURL):

LayoutTests:

Update existing tests to reflect behavior change. I have verified that those tests were failing in Firefox & Chrome and
are now passing in those browsers.

  • http/tests/dom/iframe-no-src-local-origin-allow-expected.txt: Renamed from LayoutTests/fast/frames/iframe-no-src-local-origin-allow-expected.txt.
  • http/tests/dom/iframe-no-src-local-origin-allow.html: Renamed from LayoutTests/fast/frames/iframe-no-src-local-origin-allow.html.
  • http/tests/dom/iframe-no-src-set-location-expected.txt: Renamed from LayoutTests/fast/frames/iframe-no-src-set-location-expected.txt.
  • http/tests/dom/iframe-no-src-set-location.html: Renamed from LayoutTests/fast/frames/iframe-no-src-set-location.html.
  • http/tests/dom/resources/iframe-no-src-set-location-pass.html: Renamed from LayoutTests/fast/frames/resources/iframe-no-src-set-location-pass.html.
  • http/tests/security/aboutBlank/security-context-expected.txt:
  • http/tests/security/aboutBlank/security-context-grandchildren-expected.txt:
  • http/tests/security/aboutBlank/security-context-grandchildren-lexical-expected.txt:
  • http/tests/security/aboutBlank/security-context-grandchildren-write-lexical-expected.txt:
  • http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical-expected.txt:
  • http/tests/security/aboutBlank/security-context-window-open-expected.txt:
  • http/tests/security/aboutBlank/security-context-with-base-tag-expected.txt:
  • http/tests/security/aboutBlank/security-context-write-expected.txt:
  • http/tests/security/aboutBlank/security-context-writeln-expected.txt:
12:49 PM Changeset in webkit [280490] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Accessibility code logs to stderr in many layout test runs
https://bugs.webkit.org/show_bug.cgi?id=228653

Reviewed by Wenson Hsieh.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::accessibilityPreferencesDidChange):
r279342 accidentally landed a WTFLogAlways in a common codepath. Remove it.

11:56 AM Changeset in webkit [280489] by Alexey Shvayka
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION (r280460): 42 JSC test failures on Debug arm64 with ASSERTION FAILED: !m_needExceptionCheck
https://bugs.webkit.org/show_bug.cgi?id=228652

Unreviewed unchecked exception fix.

Release scope before calling RegExpGlobalData::getBackref().

  • runtime/RegExpConstructor.cpp:

(JSC::JSC_DEFINE_CUSTOM_GETTER):

11:49 AM Changeset in webkit [280488] by jer.noble@apple.com
  • 7 edits
    1 add in trunk

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

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

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

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

Source/WebCore:

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

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

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

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

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:

(WebCore::MediaPlayerPrivateAVFoundation::updateStates):

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

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

11:25 AM Changeset in webkit [280487] by Russell Epstein
  • 1 copy in tags/Safari-612.1.26

Tag Safari-612.1.26.

11:13 AM Changeset in webkit [280486] by Russell Epstein
  • 2 edits in branches/safari-612.1.26-branch/Source/WebKit

Cherry-pick r280433. rdar://problem/81334141

The bundle path of downlevel Safari is wrong
https://bugs.webkit.org/show_bug.cgi?id=228339

Reviewed by Tim Horton.

Use the same approach as isSystemWebKit to check whether the WebKit bundle
is from the staged framework.

  • Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm: (WebKit::isFeatureFlagEnabled):

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

11:13 AM Changeset in webkit [280485] by Russell Epstein
  • 2 edits in branches/safari-612.1.26-branch/Source/WebKit

Cherry-pick r280424. rdar://problem/81334136

[macOS Catalina] Some feature preferences have wrong default values
https://bugs.webkit.org/show_bug.cgi?id=228564

Reviewed by Tim Horton.

When HAVE(SYSTEM_FEATURE_FLAGS) is false, we still need to enable
some features by default.

This patch makes sure the following features are enabled by default
on macOS (consistent with the properties in WebKit-macos.plist):

  • async_frame_and_overflow_scrolling
  • gpu_process_canvas_rendering
  • gpu_process_media
  • gpu_process_webrtc
  • incremental_pdf
  • vp9_decoder
  • webm_format_reader
  • webm_parser
  • Shared/WebPreferencesDefaultValues.cpp: (WebKit::defaultUseGPUProcessForCanvasRenderingEnabled): (WebKit::defaultUseGPUProcessForDOMRenderingEnabled): (WebKit::defaultUseGPUProcessForMediaEnabled): (WebKit::defaultCaptureAudioInGPUProcessEnabled): (WebKit::defaultCaptureVideoInGPUProcessEnabled): (WebKit::defaultWebRTCCodecsInGPUProcess): (WebKit::defaultIncrementalPDFEnabled): (WebKit::defaultWebMFormatReaderEnabled):

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

11:08 AM Changeset in webkit [280484] by youenn@apple.com
  • 3 edits in trunk/Source/WebKit

softlink nw_parameters_allow_sharing_port_with_listener
https://bugs.webkit.org/show_bug.cgi?id=228636

Reviewed by Eric Carlson.

  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.mm:

(WebKit::NetworkRTCUDPSocketCocoaConnections::createNWConnection):
This helps compiling/running WebKit on older OSes.
Also make use of nw_endpoint_create_host_with_numeric_port to remove the need for string to int conversion.

  • Platform/spi/Cocoa/NWParametersSPI.h:
10:46 AM Changeset in webkit [280483] by Jonathan Bedard
  • 4 edits in trunk/Tools

[git-webkit] Forward errors from log and blame
https://bugs.webkit.org/show_bug.cgi?id=228621
<rdar://problem/81297642>

Rubber-stamped by Aakash Jain.

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:

(FilteredCommand.main): If the exit code is non-zero, print all errors.

10:46 AM Changeset in webkit [280482] by Chris Dumez
  • 28 edits in trunk

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

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaselined WPT tests that are now passing. Note that those were failing in WebKit but passing in Firefox
and Chrome.

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

Source/WebCore:

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

Our innerText setter had some logic that was specific to form elements and specific render
styles that wasn't part of the specification. It was causing us to not replace the new lines
with <br> in some cases. I dropped this logic to align with Blink and Gecko, as those are
passing the same WPT tests.

No new tests, rebaselined existing tests.

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::setInnerText):

LayoutTests:

Rebaseline a few tests that changed output.

  • editing/pasteboard/smart-paste-paragraph-003-expected.txt:
  • platform/mac/editing/input/reveal-caret-of-multiline-input-expected.txt:
  • platform/mac/fast/forms/basic-textareas-quirks-expected.txt:
  • platform/mac/fast/forms/textarea-scroll-height-expected.txt:
  • platform/mac/fast/forms/textarea-scrollbar-expected.txt:
  • platform/mac/fast/forms/textarea-scrolled-type-expected.txt:
  • platform/mac/fast/forms/textarea-width-expected.txt:
  • platform/mac/fast/parser/open-comment-in-textarea-expected.txt:
  • platform/mac/fast/text/international/unicode-bidi-plaintext-in-textarea-expected.txt:
  • platform/mac/http/tests/navigation/javascriptlink-frames-expected.txt:
10:30 AM Changeset in webkit [280481] by youenn@apple.com
  • 8 edits in trunk/Source/WebKit

Attribute nw connections to the source application
https://bugs.webkit.org/show_bug.cgi?id=228641
<rdar://81039713>

Reviewed by Alex Christensen.

Add source application token for every nw connection/listener, like done for WebSocket or NSURLSession tasks.
This will allow the nw layer to do custom processing based on the application doing the loads.
Introduce an audit_token_t getter on NetworkProcess.

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::sourceApplicationAuditData const):
(WebKit::NetworkProcess::sourceApplicationAuditToken const):

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:

(WebKit::NetworkRTCProvider::NetworkRTCProvider):

  • NetworkProcess/webrtc/NetworkRTCProvider.h:

(WebKit::NetworkRTCProvider::sourceApplicationAuditToken const):

  • NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.mm:

(WebKit::NetworkRTCTCPSocketCocoa::NetworkRTCTCPSocketCocoa):

  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.mm:

(WebKit::NetworkRTCUDPSocketCocoaConnections::NetworkRTCUDPSocketCocoaConnections):
(WebKit::NetworkRTCUDPSocketCocoaConnections::configureParameters):

  • Platform/spi/Cocoa/NWParametersSPI.h:
10:02 AM Changeset in webkit [280480] by sihui_liu@apple.com
  • 2 edits in trunk/LayoutTests

Layout Test imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception.html is a Flaky Failure
https://bugs.webkit.org/show_bug.cgi?id=201481
<rdar://problem/55046055>

Reviewed by Youenn Fablet.

The test always passes now according to recent results, but it is shown as failed as TEXT because of the
expectation.

  • platform/mac/TestExpectations:
9:41 AM Changeset in webkit [280479] by Chris Dumez
  • 13 edits in trunk

Clicking an HTMLLinkElement should not trigger a navigation
https://bugs.webkit.org/show_bug.cgi?id=228618

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline WPT test now that more checks are passing.

  • web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/navigation.sub-expected.txt:

Source/WebCore:

Clicking an HTMLLinkElement should not trigger a navigation because HTMLLinkElement has no activation
behavior as per the HTML specification:

Firefox and Chrome follow the specification here.

No new tests, updated/rebaselined existing tests.

  • html/HTMLLinkElement.cpp:
  • html/HTMLLinkElement.h:

LayoutTests:

Update existing tests to reflect behavior change. I verified that the tests were failing
in both Firefox and Chrome prior to me updating them.

  • fast/dom/html-link-element-activation-behavior-on-element-click-expected.txt:
  • fast/dom/html-link-element-activation-behavior-on-element-click.html:
  • fast/dom/html-link-element-activation-behavior-on-mouse-click-expected.txt:
  • fast/dom/html-link-element-activation-behavior-on-mouse-click.html:
  • fast/dom/resources/html-link-element-activation-behavior-on-element-click-step1.html:
  • fast/dom/resources/html-link-element-activation-behavior-on-mouse-click-step1.html:
  • fast/dom/resources/html-link-element-activation-behavior-target.html:
9:35 AM Changeset in webkit [280478] by Jonathan Bedard
  • 4 edits in trunk/Tools

[git-webkit] Not all platforms support more -F
https://bugs.webkit.org/show_bug.cgi?id=228619
<rdar://problem/81296290>

Reviewed by Aakash Jain.

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:

(FilteredCommand.pager): Only pass -F to more on Darwin.

9:21 AM Changeset in webkit [280477] by dino@apple.com
  • 7 edits in trunk

[Media Controls] Add an option for having no scrubber on the time control and parameterize margin
https://bugs.webkit.org/show_bug.cgi?id=228633
rdar://81314458

Reviewed by Tim Horton.

Source/WebCore:

Add support for a scrubber bar that does not have a knob (or, to be clear, an
invisible knob). While here, move the constant for the margin into a custom
CSS property so it can be easily overridden.

  • Modules/modern-media-controls/controls/media-controls.css:

(*): Add --scrubber-margin custom property.

  • Modules/modern-media-controls/controls/slider.css:

(.slider > .custom-slider > .knob.none): Add style for a "none" knob.

  • Modules/modern-media-controls/controls/slider.js:

(Slider.prototype.commit): Support "none".

  • Modules/modern-media-controls/controls/time-control.js: Get the margin from

the new custom property.
(TimeControl.prototype.get minimumWidth):
(TimeControl.prototype.get idealMinimumWidth):
(TimeControl.prototype.layout):
(TimeControl.prototype._performIdealLayout):

LayoutTests:

Make sure the TimeControls element is in the document so its computed style
can be read.

  • media/modern-media-controls/time-control/time-control.html:
8:47 AM Changeset in webkit [280476] by Chris Dumez
  • 6 edits in trunk

postMessage() should throw if any duplicate transferable is found in transferList
https://bugs.webkit.org/show_bug.cgi?id=228608

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline WPT test now that more checks are passing.

  • web-platform-tests/html/infrastructure/safe-passing-of-structured-data/transfer-errors.window-expected.txt:

Source/WebCore:

postMessage() should throw if any duplicate transferable is found in transferList:

No new tests, rebaselined existing test.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::SerializedScriptValue::create):

8:25 AM Changeset in webkit [280475] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ BigSur Release wk2 arm64] imported/w3c/web-platform-tests/html/cross-origin-opener-policy/iframe-popup-unsafe-none-to-same-origin.https.html.
https://bugs.webkit.org/show_bug.cgi?id=228644.

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
8:02 AM Changeset in webkit [280474] by Eric Hutchison
  • 3 edits in trunk/LayoutTests

Updated test expectations for imported/w3c/web-platform-tests/html/cross-origin-opener-policy/header-parsing.https.html.
https://bugs.webkit.org/show_bug.cgi?id=228197.

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
7:52 AM Changeset in webkit [280473] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

imported/w3c/web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-to-unsafe-none.https.html is a flaky failure .
https://bugs.webkit.org/show_bug.cgi?id=228642.

Unreviewed test gardening.

  • platform/mac/TestExpectations:
7:00 AM Changeset in webkit [280472] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[Mac Debug] imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/credentialless/dedicated-worker.tentative.https.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=228640.

Unreviewed test gardening.

  • platform/mac/TestExpectations:
2:09 AM Changeset in webkit [280471] by commit-queue@webkit.org
  • 4 edits in trunk

[AspectRatio] Fix replaced-element-034.html
https://bugs.webkit.org/show_bug.cgi?id=228223

Patch by Rob Buis <rbuis@igalia.com> on 2021-07-30
Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

Fix replaced-element-034.html by making hasReplacedLogicalHeight
return false for *-content when aspect-ratio is provided and relying
on computeReplacedLogicalHeight to take aspect-ratio into account.

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::hasReplacedLogicalHeight const):

LayoutTests:

1:41 AM Changeset in webkit [280470] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Use UCPURegister argument to remove zero extension in JIT code
https://bugs.webkit.org/show_bug.cgi?id=228625

Reviewed by Robin Morisset.

Yarr JIT code emits zeroExtend32ToWord for some arguments, but this is not necessary if
argument is defined as UCPURegister. In that case, caller guarantees that top 32bits are
cleared.

  • yarr/YarrJIT.cpp:
  • yarr/YarrJIT.h:
1:29 AM Changeset in webkit [280469] by Adrian Perez de Castro
  • 2 edits in trunk

[CMake] Fix fallback methods in the libgcrypt find module
https://bugs.webkit.org/show_bug.cgi?id=228581

Reviewed by Carlos Alberto Lopez Perez.

  • Source/cmake/FindLibGcrypt.cmake: Make sure to use the libgcrypt-config script as

first fallback if libgcrypt.pc is not present, and fix the regexp used as last fallback
that checks the version from the gcrypt.h header as last fallback to only include digits
and periods.

Note: See TracTimeline for information about the timeline view.