Timeline



Oct 9, 2021:

9:41 PM Changeset in webkit [283872] by Alan Bujtas
  • 4 edits in trunk

Ideographic space behaves as breaking space
https://bugs.webkit.org/show_bug.cgi?id=231480

Reviewed by Antti Koivisto.

Source/WebCore:

We should be able to break at U+3000.
See https://drafts.csswg.org/css-text-3/#word-break-property and https://www.unicode.org/reports/tr14/tr14-47.html

  • layout/formattingContexts/inline/InlineTextItem.cpp:

(WebCore::Layout::moveToNextNonWhitespacePosition):

  • rendering/BreakLines.h:

(WebCore::isBreakableSpace):

LayoutTests:

3:01 PM Changeset in webkit [283871] by Simon Fraser
  • 10 edits in trunk

Run smooth scroll animations on the scrolling thread
https://bugs.webkit.org/show_bug.cgi?id=231481

Reviewed by Tim Horton.

Source/WebCore:

Implement AsyncScrollingCoordinator::requestAnimatedScrollToPosition() and stopAnimatedScroll()
so that smooth scroll animations are dispatched to the scrolling thread.

RequestedScrollData gains a requestType field so that we can indicate the need
to cancel a running animation on the scrolling thread.

Tested by tests in imported/w3c/web-platform-tests/css/cssom-view.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::requestAnimatedScrollToPosition):
(WebCore::AsyncScrollingCoordinator::stopAnimatedScroll):

  • page/scrolling/ScrollingCoordinatorTypes.h:

(WebCore::RequestedScrollData::operator== const):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::handleScrollPositionRequest): We already cancel
the animation each time. If this is a ScrollRequestType::CancelAnimatedScroll, there is no
more to do.

Source/WebKit:

Implement AsyncScrollingCoordinator::requestAnimatedScrollToPosition() and stopAnimatedScroll()
so that smooth scroll animations are dispatched to the scrolling thread.

RequestedScrollData gains a requestType field so that we can indicate the need
to cancel a running animation on the scrolling thread.

Tested by tests in imported/w3c/web-platform-tests/css/cssom-view.

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:

(ArgumentCoder<RequestedScrollData>::encode):
(ArgumentCoder<RequestedScrollData>::decode):
(WebKit::dump):

LayoutTests:

imported/w3c/web-platform-tests/css/cssom-view/idlharness.html seems to pass just fine.
imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-smooth.html has some problems
indicated by the github issue.

Three tests pass now on iOS (but they are not yet scrolling in the UI process).

2:35 PM Changeset in webkit [283870] by Beth Dakin
  • 5 edits
    2 adds in trunk/Tools

Pull modifier key extraction into TestRunnerShared
https://bugs.webkit.org/show_bug.cgi?id=231267

Reviewed by Tim Horton.

This patch pulls the code to extract modifier key information is pulled into a little class
called ModifierKeys in TestRunnerShared. That code is now shared between DRT and WKTR
for the existing implementations of keyDown.

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
  • DumpRenderTree/mac/EventSendingController.mm:

(-[EventSendingController keyDown:withModifiers:withLocation:]):

  • TestRunnerShared/cocoa/ModifierKeys.h: Added.
  • TestRunnerShared/cocoa/ModifierKeys.mm: Added.

(-[ModifierKeys init]):
(-[ModifierKeys dealloc]):
(+[ModifierKeys modifierKeysWithKey:modifiers:keyLocation:]):

  • WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
  • WebKitTestRunner/mac/EventSenderProxy.mm:

(WTR::EventSenderProxy::keyDown):

2:19 PM Changeset in webkit [283869] by berto@igalia.com
  • 2 edits in trunk

Add GitHub account to contributors.json

Unreviewed.

  • metadata/contributors.json:
1:38 PM Changeset in webkit [283868] by commit-queue@webkit.org
  • 6 edits
    2 adds in trunk

Remove scrollbars explicitly when destroying render tree
https://bugs.webkit.org/show_bug.cgi?id=229274

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

Source/WebCore:

Scrollbars in FrameViews that are hosted by RenderWidget need the RenderView
to exist because of RenderScrollbarPart. So when we are destroying the render tree
the RenderView will be destroyed too, so before that happens remove the scrollbars
and its RenderScrollbarParts.

Test: editing/inserting/insert-html-crash-02.html

  • page/FrameView.cpp:

(WebCore::FrameView::willBeDestroyed):

  • page/FrameView.h:
  • platform/Widget.h:

(WebCore::Widget::willBeDestroyed):

  • rendering/RenderWidget.cpp:

(WebCore::RenderWidget::willBeDestroyed):

LayoutTests:

  • editing/inserting/insert-html-crash-02-expected.txt: Added.
  • editing/inserting/insert-html-crash-02.html: Added.
6:13 AM Changeset in webkit [283867] by Jean-Yves Avenard
  • 2 edits in trunk

2021-10-09 Jean-Yves Avenard <Jean-Yves Avenard>

Unreviewed, add my GitHub username

  • metadata/contributors.json:
4:47 AM Changeset in webkit [283866] by Manuel Rego Casasnovas
  • 2 edits in trunk

Add GitHub account to contributors.json and update expertise field
https://bugs.webkit.org/show_bug.cgi?id=231476

Unreviewed.

  • metadata/contributors.json:

Oct 8, 2021:

11:48 PM Changeset in webkit [283865] by jh718.park@samsung.com
  • 2 edits in trunk

Unreviewed. Add github username for Joonghun Park.

  • metadata/contributors.json:
11:24 PM Changeset in webkit [283864] by Devin Rousso
  • 6 edits
    27 adds in trunk

[GPU Process] support rendering Apple Pay logos
https://bugs.webkit.org/show_bug.cgi?id=230664
<rdar://problem/83187282>

Reviewed by Tim Horton.

Source/WebCore:

  • platform/cocoa/ThemeCocoa.mm:

(WebCore::drawApplePayButton):
Instead of drawing directly into the GraphicsContext::platformContext (which will not be
valid in the WebProcess when DOM rendering happens in the GPUProcess), first draw into a
temporary ImageBuffer and then consume it to draw into the actual/used GraphicsContext.
While it is possible to create a dedicated display list item for this, we don't want to do
that because we need to load PDFs from PassKit, which are not as secure as we'd like for use
in the GPUProcess.

LayoutTests:

  • fast/css/webkit-named-image/apple-pay-logo-black/background-size-centered.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/background-size-centered-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/background-size.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/background-size-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/basic.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/basic-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/container-larger-height.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/container-larger-height-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/container-larger-width.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/container-larger-width-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/mask.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/mask-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/background-size-centered.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/background-size-centered-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/background-size.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/background-size-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/basic.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/basic-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/container-larger-height.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/container-larger-height-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/container-larger-width.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/container-larger-width-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/mask.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/mask-expected-mismatch.html: Added.
  • TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:

Skip the above tests everywhere except iOS and macOS.

11:18 PM Changeset in webkit [283863] by Devin Rousso
  • 13 edits in trunk/Source/WebCore

[iOS][GPU Process] support <attachment>
https://bugs.webkit.org/show_bug.cgi?id=230781
<rdar://problem/70884096>

Reviewed by Myles Maxfield.

Source/WebCore:

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderAttachmentInfo::addLine):
(WebCore::RenderAttachmentInfo::buildWrappedLines):
(WebCore::RenderAttachmentInfo::buildSingleLine):
(WebCore::paintAttachmentText):
Instead of drawing directly into the GraphicsContext::platformContext (which will not be
valid in the WebProcess when DOM rendering happens in the GPUProcess), use DrawGlyphsRecorder
to "translate" native CTLineDraw into a sequence of actions from which a GraphicsContext
method can be derived, thereby hooking into and benefiting from existing GPUProcess support.

  • platform/graphics/DrawGlyphsRecorder.h:

(WebCore::DrawGlyphsRecorder::deconstructDrawGlyphs const): Renamed from drawGlyphsDeconstruction.

  • platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:

(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):
(WebCore::DrawGlyphsRecorder::recordDrawGlyphs):
(WebCore::DrawGlyphsRecorder::drawGlyphs):
(WebCore::DrawGlyphsRecorder::drawNativeText):

  • platform/graphics/harfbuzz/DrawGlyphsRecorderHarfBuzz.cpp:

(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):

  • platform/graphics/win/DrawGlyphsRecorderWin.cpp:

(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):
Add a new parameter to DrawGlyphsRenderer that controls whether fonts other than the one
initially provided to drawGlyphs/drawNativeText can be used to draw glyphs. This is only
used by the above as we know that the initial font is a system font, and therefore that the
fallback list will also only contain system fonts, meaning that sending the font to the
GPUProcess is cheap (a file path instead of actual data).

  • platform/graphics/displaylists/DisplayListRecorder.h:
  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::Recorder):

  • platform/graphics/displaylists/DisplayListRecorderImpl.h:
  • platform/graphics/displaylists/DisplayListRecorderImpl.cpp:

(WebCore::DisplayList::Recorder::RecorderImpl):

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::displayListForTextRun const):
Drive-by: Rename DrawGlyphsDeconstruction to DeconstructDrawGlyphs as it reads better.

Source/WebCore/PAL:

  • pal/spi/cg/CoreGraphicsSPI.h:
8:29 PM Changeset in webkit [283862] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Run backwards propagation before we prune the graph after ForceOSRExit nodes in BytecodeParser
https://bugs.webkit.org/show_bug.cgi?id=230823
<rdar://problem/83565088>

Reviewed by Yusuke Suzuki.

When I ported the phase to run right after bytecode parsing, I wanted
to maintain the same behavior as the prior pass that ran after CPS
rethreading. I noticed a slight bug in some of my logic that changed
some of heuristics and how they'd effect double voting.

The old patch was mimicking the "is loaded from" bit by using the NodeFlags.
Howver, this has some issues with how this interacts with our other uses
of NodeFlags. So, to make things simple, I just add a new "VariableIsUsed"
bit.

  • dfg/DFGBackwardsPropagationPhase.cpp:

(JSC::DFG::BackwardsPropagationPhase::propagate):

7:53 PM Changeset in webkit [283861] by Simon Fraser
  • 3 edits in trunk/LayoutTests

Unreviewed. Fix up some TestExpectations errors.

  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
7:15 PM Changeset in webkit [283860] by Russell Epstein
  • 8 edits in branches/safari-612.2.9.1-branch/Source

Versioning.

WebKit-7612.2.9.1.7

6:40 PM Changeset in webkit [283859] by BJ Burg
  • 9 edits in trunk/Source/WebInspectorUI

Web Inspector: add TabBar context menu support for WI.WebInspectorExtensionTabContentView
https://bugs.webkit.org/show_bug.cgi?id=231181
<rdar://74698241>

Reviewed by Devin Rousso.

The existing TabBar/TabBrowser system relies on the fact that each tab class can
be instantiated once. This is no longer true with extension tabs, as all of them
are instances of the same WI.WebInspectorExtensionTabContentView class.

The new approach builds on bug 230758 by introducing a 'visible' property on ContentView.
This is necessary to mark extension tabs as "attached by not showing" due to the
override of shouldNotRemoveFromDOMWhenHidden().

  • UserInterface/Base/Main.js:

(WI._createTabContentViewForType):
(WI.isNewTabWithTypeAllowed):
List WebInspectorExtensionTabContentView as a known tab class. But do not allow
this tab class to be instantiated directly. Extension tabs are intended to be
created using WebInspectorExtensionController.createTabForExtension().

  • UserInterface/Controllers/WebInspectorExtensionController.js:

(WI.WebInspectorExtensionController.prototype.unregisterExtension):
(WI.WebInspectorExtensionController.prototype.createTabForExtension):
Drive-by, suppress animations when extension tabs are created and destroyed. Otherwise
there is a lot of unnecessary and glitchy animation when multiple extension tabs are
created upon loading Web Inspector the first time.

(WI.WebInspectorExtensionController.prototype.showExtensionTab):
(WI.WebInspectorExtensionController.prototype.hideExtensionTab): Added.
These methods are counterparts. They toggle tabContentView.visible to make the tab
visible and not visible. Note that 'hiding' does not actually close/destroy the
extension tab. Extension tabs are hidden by setting .not-visible ('display:none') and
removing the tab's TabBarItem from the TabBar.

(WI.WebInspectorExtensionController.prototype.addContextMenuItemsForClosedExtensionTabs):
(WI.WebInspectorExtensionController.prototype.addContextMenuItemsForAllExtensionTabs):
Added. TabBar delegates the creation of extension tab context menu items to this class.
The first method only shows hidden extension tabs (for the Reopen Closed Tabs + item).
The second method shows visible and not visible extension tabs and feeds the main context menu.

  • UserInterface/Views/ContentView.css:

(.content-view.not-visible):

  • UserInterface/Views/ContentViewContainer.css:

(.content-view-container > .content-view):
(.content-view-container > .content-view.not-visible): Deleted.
This style class is now managed by ContentView.js. So, move the style declaration.

  • UserInterface/Views/ContentView.js:

(WI.ContentView):
(WI.ContentView.prototype.get visible):
(WI.ContentView.prototype.set visible):
Add a flag so that clients can determine when the content view is not visible and not closed.
This can be true if a subclass overrides shouldNotRemoveFromDOMWhenHidden() to return true.

  • UserInterface/Views/ContentViewContainer.js:

(WI.ContentViewContainer.prototype._disassociateFromContentView):
Fix this code to not detach extension tabs that are hidden.

(WI.ContentViewContainer.prototype._showEntry):
(WI.ContentViewContainer.prototype._hideEntry):
Adopt new setter for ContentView.prototype.hidden.

  • UserInterface/Views/TabBar.js:

(WI.TabBar.prototype._handleAddClosedTabsTabBarItemMouseDown):
Don't add generic context menu items for WebInspectorExtensionTabContentView. Call out
to WebInspectorExtensionController to create the appropriate extension tab context menu items.
(WI.TabBar.prototype._handleTabContainerContextMenu):
(WI.TabBar):

  • UserInterface/Views/WebInspectorExtensionTabContentView.js:

(WI.WebInspectorExtensionTabContentView.isTabAllowed): Drive-by, gate creation of this class
on Web Extensions being enabled (InspectorFrontendHost.supportsWebExtensions).

6:39 PM Changeset in webkit [283858] by Aditya Keerthi
  • 14 edits in trunk

Add support for '-webkit-appearance: auto'
https://bugs.webkit.org/show_bug.cgi?id=231203
rdar://83696133

Reviewed by Wenson Hsieh.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:

Mark progression.

Source/WebCore:

The 'appearance' property allows authors to use the 'auto' keyword
to opt widgets (any element that can have a native appearance) into
a native appearance [1]. Elements other than widgets are rendered
as if none had been specified.

Since '-webkit-appearance' is a parse time alias of 'appearance',
support '-webkit-appearance: auto' prior to unprefixing.

The used-value for appearance (effectiveAppearance) is determined by
the element tag and type. In the case of elements in the UA shadow
tree, the pseudo id is used to determine the effective appearance. The
used-values when specifying 'auto' match the default specified values
in the UA style sheet.

Note that additional test coverage exists in the form of web platform
web platform tests, and is dependent on unprefixing.

[1] https://www.w3.org/TR/css-ui-4/#valdef-appearance-auto

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ControlPart const):

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

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

  • platform/ThemeTypes.cpp:

(WebCore::operator<<):

  • platform/ThemeTypes.h:
  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::autoAppearanceForElement const):

  • rendering/RenderTheme.h:

LayoutTests:

  • platform/gtk/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
6:38 PM Changeset in webkit [283857] by BJ Burg
  • 24 edits
    1 copy
    1 add in trunk

[Cocoa] Web Inspector: provide a way for _WKInspectorExtension clients to be notified when the inspected page navigates
https://bugs.webkit.org/show_bug.cgi?id=231338
<rdar://71200338>

Reviewed by Devin Rousso.

Source/WebCore:

New API test: WKInspectorExtensionDelegate.InspectedPageNavigatedCallbacks

Add plumbing for new event.

  • inspector/InspectorFrontendClient.h:

(WebCore::InspectorFrontendClient::inspectedPageDidNavigate):

  • inspector/InspectorFrontendHost.h:
  • inspector/InspectorFrontendHost.idl:
  • inspector/InspectorFrontendHost.cpp:

(WebCore::InspectorFrontendHost::inspectedPageDidNavigate):

Source/WebInspectorUI:

Pass along an onNavigated event to InspectorFrontendHost when the WI.Frame.MainResourceDidChange
event fires at a main frame target.

  • UserInterface/Controllers/WebInspectorExtensionController.js:

(WI.WebInspectorExtensionController):
(WI.WebInspectorExtensionController.prototype.registerExtension):
(WI.WebInspectorExtensionController.prototype.unregisterExtension):
Do not add this global listener unless at least one WI.WebInspectorExtension
is currently registered.

(WI.WebInspectorExtensionController.prototype._handleMainResourceDidChange):

Source/WebKit:

Add plumbing for a new event to pass from WebInspectorUI out to _WKInspectorExtensionDelegate.

  • UIProcess/API/APIInspectorExtensionClient.h:

(API::InspectorExtensionClient::inspectedPageDidNavigate):

  • UIProcess/API/Cocoa/_WKInspectorExtensionDelegate.h:
  • UIProcess/Inspector/Cocoa/InspectorExtensionDelegate.h:
  • UIProcess/Inspector/Cocoa/InspectorExtensionDelegate.mm:

(WebKit::InspectorExtensionDelegate::InspectorExtensionDelegate):
(WebKit::InspectorExtensionDelegate::InspectorExtensionClient::inspectedPageDidNavigate):

  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h:
  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.messages.in:
  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp:

(WebKit::WebInspectorUIExtensionControllerProxy::inspectedPageDidNavigate):
Call the delegate method for all _WKInspectorExtensions associated with this
id<_WKInspectorExtensionHost>. Clients can map from extension to inspector if needed.

  • WebProcess/Inspector/RemoteWebInspectorUI.h:
  • WebProcess/Inspector/RemoteWebInspectorUI.cpp:

(WebKit::RemoteWebInspectorUI::inspectedPageDidNavigate):

  • WebProcess/Inspector/WebInspectorUI.h:
  • WebProcess/Inspector/WebInspectorUI.cpp:

(WebKit::WebInspectorUI::inspectedPageDidNavigate):

  • WebProcess/Inspector/WebInspectorUIExtensionController.h:
  • WebProcess/Inspector/WebInspectorUIExtensionController.cpp:

(WebKit::WebInspectorUIExtensionController::inspectedPageDidNavigate):

Tools:

Add a new test to verify that triggering a navigation on the inspected WKWebView
causes the -extension:inspectedPageDidNavigate: method of _WKInspectorExtensionDelegate
to fire.

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm:

(resetGlobalState):
(-[InspectorExtensionDelegateForTesting inspectorExtension:inspectedPageDidNavigate:]):
(TEST):

5:41 PM Changeset in webkit [283856] by Jonathan Bedard
  • 2 edits in trunk

Add github username for Michael Catanzaro

Unreviewed.

  • metadata/contributors.json:
5:41 PM Changeset in webkit [283855] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Vectorize EqualPowerPanner::pan()
https://bugs.webkit.org/show_bug.cgi?id=231458

Reviewed by Eric Carlson.

Vectorize EqualPowerPanner::pan() for performance. This is used by PannerNode.

  • platform/audio/EqualPowerPanner.cpp:

(WebCore::EqualPowerPanner::pan):

5:14 PM Changeset in webkit [283854] by Russell Epstein
  • 8 edits in branches/safari-612.2.9.0-branch/Source

Versioning.

WebKit-7612.2.9.0.7

5:01 PM Changeset in webkit [283853] by commit-queue@webkit.org
  • 2 edits in trunk

Add github username for kbr
https://bugs.webkit.org/show_bug.cgi?id=231462

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

  • metadata/contributors.json:
4:32 PM Changeset in webkit [283852] by Tadeu Zagallo
  • 83 edits
    8 copies
    40 adds in trunk

Implement the WebAssembly exception handling proposal
https://bugs.webkit.org/show_bug.cgi?id=229681
<rdar://81603387>

JSTests:

Reviewed by Keith Miller.

Add new tests for the exception handling and import a set of tests used by V8 into wasm/v8.

  • wasm.yaml:
  • wasm/Builder.js:

(const._importExceptionContinuation.type.Import.field):
(export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
(const._exportFunctionContinuation.type.Export.field): Deleted.
(const._exportFunctionContinuation): Deleted.

  • wasm/Builder_WebAssemblyBinary.js:

(const.emitters.Import):
(const.emitters.Export):
(const.emitters.Exception):

  • wasm/assert.js:
  • wasm/self-test/test_BuilderJSON.js:

(ImportBeforeTypeSections): Deleted.

  • wasm/stress/catch-with-delegate.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.callback):
(assert.throws):

  • wasm/stress/create-tag-from.js: Added.
  • wasm/stress/exception-cross-instance-2.js: Added.

(test):
(assert.eq):

  • wasm/stress/exception-cross-instance-3.js: Added.

(test):
(assert.eq):

  • wasm/stress/exception-cross-instance.js: Added.

(test):
(assert.throws):
(instB.new.WebAssembly.Instance):

  • wasm/stress/exception-liveness-tier-up.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.catch):
(assert.eq.):
(assert.eq):

  • wasm/stress/exception-multiple-instances.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.const.module.new.WebAssembly.Module):
(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.inst.exports.throw):

  • wasm/stress/exception-simple-delegate.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.testSimpleThrowDelegate):
(testThrowDelegateSkip):
(testDelegateCaller):
(testSimpleDelegateMerge):

  • wasm/stress/exception-simple-throw-catch.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.testSimpleTryCatch):
(testSimpleTryCatchAll):
(testCallTryCatch):
(testCallTryCatchAll):
(testSimpleTryCatchValue):
(testCallTryCatchValue):
(testStackTryCatch):
(testLiveAfterTryCatch):
(testLiveAfterTryCatchAll):
(testUnifyTryCatchCatch):
(testUnifyTryCatchCatchAll):
(testUnifyTryNoThrow):
(testUnifyTryNoCatch):
(testNestedCatch):

  • wasm/stress/exception-thrown-from-js-to-wasm-catchall-rethrow.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.callback):

  • wasm/stress/exception-thrown-from-js-to-wasm-catchall.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.callback):

  • wasm/stress/exception-thrown-from-js-to-wasm.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.callback):

  • wasm/stress/exception-thrown-out-of-wasm.js: Added.
  • wasm/stress/exception-thrown-over-wasm.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.callback):

  • wasm/stress/exception-trap.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.testCannotCatchUnreachable):
(testCannotCatchOOB):
(testWasmAPIThrow):
(testJSCatchAndRethrow):

  • wasm/stress/rethrow-from-catch-to-catch.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.callback):

  • wasm/stress/rethrow-to-catch.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.callback):
(assert.throws.callback):
(assert.throws):

  • wasm/stress/rethrow-to-delegate-to-catch.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here):
(assert.eq.exn.getArg):
(assert.throws):
(assert.throws.callback):
(assert.eq):

  • wasm/stress/simple-export-exception.js: Added.
  • wasm/v8/LICENSE: Added.
  • wasm/v8/exceptions-api.js: Added.

(TestImport):
(TestImportExport):
(TestExceptionConstructor):
(TestExceptionConstructorWithPayload):
(TestCatchJSException.js_func):
(js_func):
(TestCatchJS):
(TestCatchJSExceptionWithPayload):
(TestGetArg):

  • wasm/v8/exceptions-export.js: Added.

(TestExportMultiple):
(TestExportOutOfBounds):

  • wasm/v8/exceptions-externref.js: Added.

(TestThrowRefNull):
(TestThrowRefParam):

  • wasm/v8/exceptions-import.js: Added.

(NewExportedTag):
(TestImportSimple):
(TestImportMissing):

  • wasm/v8/exceptions-rethrow.js: Added.

(TestRethrowInCatch):
(TestRethrowInCatchAll):
(TestRethrowNested):
(TestRethrowRecatch):

  • wasm/v8/exceptions-shared.js: Added.

(NewExportedException):
(TestSingleInstance.let.instance.builder.instantiate.):
(TestSingleInstance):
(TestMultiInstanceNonShared.let.instance2.builder.instantiate.):
(TestMultiInstanceShared.let.instance2.builder.instantiate.):
(TestMultiModuleShared.let.instance2.builder2.instantiate.):

  • wasm/v8/exceptions-type-reflection.js: Added.

(TestExport):
(TestImportExport):

  • wasm/v8/exceptions-utils.js: Added.

(assertWasmThrows):

  • wasm/v8/exceptions.js: Added.

(TestThrowSimple):
(TestCatchSimple):
(TestTrapNotCaught):
(TestTrapViaJSNotCaught.js_import):
(TestManuallyThrownRuntimeErrorCaught.throw_exc):
(TestManuallyThrownRuntimeErrorCaught):
(TestExnWithWasmProtoNotCaught.js_import):
(TestExnWithWasmProtoNotCaught):
(TestStackOverflowNotCaught.stack_overflow):
(TestStackOverflowNotCaught):
(TestThrowParamI):
(TestThrowParamF):
(TestThrowParamL):
(TestThrowParamD):
(TestCatchCrossFunctions.throw_value):
(TestCatchCrossFunctions.throw_string):
(TestCatchCrossFunctions.throw_undefined):
(TestCatchCrossFunctions.throw_fp):
(TestCatchCrossFunctions.throw_large):
(TestDelegateNoThrow):
(TestDelegateThrow):
(TestDelegateThrowNoCatch):
(TestDelegateMerge):
(TestDelegate1):
(TestDelegateUnreachable):
(TestDelegateToCaller):
(TestUnreachableInCatchAll):
(TestThrowWithLocal):
(TestCatchlessTry):

  • wasm/v8/mjsunit.js: Added.

(MjsUnitAssertionError):
(MjsUnitAssertionError.prototype.toString):
(catch):
(classOf):
(ValueOf):
(prettyPrinted):
(prettyPrintedArrayElement):
(failWithMessage):
(formatFailureText):
(fail):
(deepObjectEquals):
(deepEquals):
(assertSame):
(assertNotSame):
(assertEquals):
(assertNotEquals):
(assertEqualsDelta):
(assertArrayEquals):
(assertPropertiesEqual):
(assertToStringEquals):
(assertTrue):
(assertFalse):
(assertNull):
(assertNotNull):
(executeCode):
(checkException):
(assertThrows):
(assertThrowsEquals):
(assertThrowsAsync):
(assertInstanceof):
(assertDoesNotThrow):
(assertUnreachable):
(assertContains):
(assertMatches):
(concatenateErrors):
(assertPromiseResult):
(OptimizationStatus):
(assertUnoptimized):
(assertOptimized):
(isNeverOptimizeLiteMode):
(isNeverOptimize):
(isAlwaysOptimize):
(isInterpreted):
(isBaseline):
(isUnoptimized):
(isOptimized):
(isTurboFanned):
(MjsUnitAssertionError.prepareStackTrace):

  • wasm/v8/wasm-module-builder.js: Added.

(bytes):
(wasmOptRefType):
(wasmRefType):
(wasmRtt):
(wasmRttNoDepth):
(makeSig):
(makeSig_v_x):
(makeSig_x_v):
(makeSig_v_xx):
(makeSig_r_v):
(makeSig_r_x):
(makeSig_r_xx):
(defineWasmOpcode):
(assertTraps):
(Binary):
(Binary.prototype.ensure_space):
(Binary.prototype.trunc_buffer):
(Binary.prototype.reset):
(Binary.prototype.emit_u8):
(Binary.prototype.emit_u16):
(Binary.prototype.emit_u32):
(Binary.prototype.emit_leb_u):
(Binary.prototype.emit_u32v):
(Binary.prototype.emit_u64v):
(Binary.prototype.emit_bytes):
(Binary.prototype.emit_string):
(Binary.prototype.emit_heap_type):
(Binary.prototype.emit_type):
(Binary.prototype.emit_init_expr_recursive):
(Binary.prototype.emit_init_expr):
(Binary.prototype.emit_header):
(Binary.prototype.emit_section):
(WasmFunctionBuilder):
(WasmFunctionBuilder.prototype.numLocalNames):
(WasmFunctionBuilder.prototype.exportAs):
(WasmFunctionBuilder.prototype.exportFunc):
(WasmFunctionBuilder.prototype.setCompilationHint):
(WasmFunctionBuilder.prototype.addBody):
(WasmFunctionBuilder.prototype.addBodyWithEnd):
(WasmFunctionBuilder.prototype.getNumLocals):
(WasmFunctionBuilder.prototype.addLocals):
(WasmFunctionBuilder.prototype.end):
(WasmInitExpr.I32Const):
(WasmInitExpr.I64Const):
(WasmInitExpr.F32Const):
(WasmInitExpr.F64Const):
(WasmInitExpr.S128Const):
(WasmInitExpr.GlobalGet):
(WasmInitExpr.RefFunc):
(WasmInitExpr.RefNull):
(WasmInitExpr.StructNewWithRtt):
(WasmInitExpr.StructNew):
(WasmInitExpr.StructNewDefaultWithRtt):
(WasmInitExpr.StructNewDefault):
(WasmInitExpr.ArrayInit):
(WasmInitExpr.ArrayInitStatic):
(WasmInitExpr.RttCanon):
(WasmInitExpr.RttSub):
(WasmInitExpr.RttFreshSub):
(WasmInitExpr.defaultFor):
(WasmInitExpr):
(WasmGlobalBuilder):
(WasmGlobalBuilder.prototype.exportAs):
(WasmTableBuilder):
(WasmTableBuilder.prototype.exportAs):
(makeField):
(WasmStruct):
(WasmStructSubtype):
(WasmArray):
(WasmArraySubtype):
(WasmElemSegment):
(WasmElemSegment.prototype.is_active):
(WasmElemSegment.prototype.is_passive):
(WasmElemSegment.prototype.is_declarative):
(WasmElemSegment.prototype.expressions_as_elements):
(WasmModuleBuilder):
(WasmModuleBuilder.prototype.addStart):
(WasmModuleBuilder.prototype.addMemory):
(WasmModuleBuilder.prototype.addMemory64):
(WasmModuleBuilder.prototype.addExplicitSection):
(WasmModuleBuilder.prototype.stringToBytes):
(WasmModuleBuilder.prototype.createCustomSection):
(WasmModuleBuilder.prototype.addCustomSection):
(WasmModuleBuilder.prototype.addType):
(WasmModuleBuilder.prototype.addStruct):
(WasmModuleBuilder.prototype.addStructSubtype):
(WasmModuleBuilder.prototype.addArray):
(WasmModuleBuilder.prototype.addArraySubtype):
(WasmModuleBuilder.prototype.addGlobal):
(WasmModuleBuilder.prototype.addTable):
(WasmModuleBuilder.prototype.addTag):
(WasmModuleBuilder.prototype.addFunction):
(WasmModuleBuilder.prototype.addImport):
(WasmModuleBuilder.prototype.addImportedGlobal):
(WasmModuleBuilder.prototype.addImportedMemory):
(WasmModuleBuilder.prototype.addImportedTable):
(WasmModuleBuilder.prototype.addImportedTag):
(WasmModuleBuilder.prototype.addExport):
(WasmModuleBuilder.prototype.addExportOfKind):
(WasmModuleBuilder.prototype.setCompilationHint):
(WasmModuleBuilder.prototype.addDataSegment):
(WasmModuleBuilder.prototype.addPassiveDataSegment):
(WasmModuleBuilder.prototype.exportMemoryAs):
(WasmModuleBuilder.prototype.addActiveElementSegment):
(WasmModuleBuilder.prototype.addPassiveElementSegment):
(WasmModuleBuilder.prototype.addDeclarativeElementSegment):
(WasmModuleBuilder.prototype.appendToTable):
(WasmModuleBuilder.prototype.setTableBounds):
(WasmModuleBuilder.prototype.setName):
(WasmModuleBuilder.prototype.toBuffer):
(WasmModuleBuilder.prototype.toArray):
(WasmModuleBuilder.prototype.instantiate):
(WasmModuleBuilder.prototype.asyncInstantiate):
(WasmModuleBuilder.prototype.toModule):
(wasmSignedLeb):
(wasmUnsignedLeb):
(wasmI32Const):
(wasmI64Const):
(wasmF32Const):
(wasmF64Const):
(wasmS128Const):
(getOpcodeName):

  • wasm/wasm.json:

Source/JavaScriptCore:

Reviewed by Keith Miller.

Add support for the WebAssembly exception handling proposal, as per
the WIP spec: https://github.com/WebAssembly/exception-handling

The proposal includes 6 new instructions: try, catch, catch_all,
delegate, throw and rethrow. All the instructions are supported by
the LLInt and B3 generators, but not yet supported in Air. Any
functions use exceptions will use B3 in BBQ.

A few important notes about the implementation:

  • In B3, since we can now have multiple entrypoints (one for the

function entry + 1 for each catch/catch_all), we can no longer just
replace every value in the stack with a Phi when we find a new
entrypoint. This worked so far because of the assumption that any
block couldn't access its enclosing stack, and since the enclosing stack
would only be accessible when we exited the current block, we added Phis
at the end of each block when we had a new entrypoint. Now, since we have to capture all
live values at any point that might throw (calls, throw and rethrow),
we break that assumption. To simplify all the possible ways we might
have to merge the state from multiple entrypoints we now use B3
Variables to represent stack slots.

  • Some extra information is required to be able to properly restore

the state when catching an exception:

  • We added a field VM::calleeForWasmCatch. This field is necessary because whenever we throw, we might end up in JavaScript, which assumes the callee is a cell and uses it to get the VM and restore callee saves. The issue is when catching exceptions in wasm we still need the original callee, and if throwing and catching from the same frame, that call frame slot has now been overwritten, so we store its original value in the VM field.
  • We also need to store the current Wasm Instance into the call frame's slot for the this argument. The instance is used both by the unwinder, to check if the exception being thrown matches the exceptions handled by catch candidates, and by the catch implementation, which is necessary when throwing from a cross instance call where both the callee save or TLS will have the callee's instance.
  • We store the current opcode for the llint, or the call site index for B3, in the call frame slot for the argument count tag. The call site index is used by the unwinder to check if a given catch can handle the exception being thrown.
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/BytecodeList.rb:
  • bytecode/HandlerInfo.h:
  • bytecode/Instruction.h:

(JSC::BaseInstruction::name const):

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::bytecodeIndex const):

  • interpreter/CallFrame.h:

(JSC::CallSiteIndex::CallSiteIndex):
(JSC::CallSiteIndex::hash const):
(JSC::CallSiteIndex::deletedValue):
(JSC::CallSiteIndex::isHashTableDeletedValue const):
(JSC::CallSiteIndexHash::hash):
(JSC::CallSiteIndexHash::equal):

  • interpreter/Interpreter.cpp:

(JSC::CatchInfo::CatchInfo):
(JSC::UnwindFunctor::UnwindFunctor):
(JSC::UnwindFunctor::operator() const):
(JSC::Interpreter::unwind):

  • interpreter/Interpreter.h:

(JSC::CatchInfo::CatchInfo):

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::readNonInlinedFrame):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::restoreCalleeSavesFromEntryFrameCalleeSavesBuffer):
(JSC::AssemblyHelpers::restoreCalleeSavesFromVMEntryFrameCalleeSavesBuffer):
(JSC::AssemblyHelpers::restoreCalleeSavesFromVMEntryFrameCalleeSavesBufferImpl):

  • jit/AssemblyHelpers.h:
  • jit/JITExceptions.cpp:

(JSC::genericUnwind):

  • jit/JSInterfaceJIT.h:

(JSC::JSInterfaceJIT::convertCalleeToVM):

  • llint/LLIntData.h:

(JSC::LLInt::getCodeRef):
(JSC::LLInt::getWide16CodeRef):
(JSC::LLInt::getWide32CodeRef):

  • llint/LLIntExceptions.cpp:

(JSC::LLInt::wasmReturnToThrow):
(JSC::LLInt::handleWasmCatch):
(JSC::LLInt::handleWasmCatchAll):

  • llint/LLIntExceptions.h:
  • llint/LLIntOffsetsExtractor.cpp:
  • llint/WebAssembly.asm:
  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::ErrorInstance):

  • runtime/ErrorInstance.h:

(JSC::ErrorInstance::setCatchableFromWasm):
(JSC::ErrorInstance::isCatchableFromWasm const):

  • runtime/JSGlobalObject.cpp:
  • runtime/JSGlobalObject.h:
  • runtime/OptionsList.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:

(JSC::VM::calleeForWasmCatchOffset):

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::ControlData::isTry):
(JSC::Wasm::AirIRGenerator::ControlData::isCatch):
(JSC::Wasm::AirIRGenerator::ControlData::isAnyCatch):
(JSC::Wasm::AirIRGenerator::ControlData::isLoop):
(JSC::Wasm::AirIRGenerator::ControlData::isBlock):
(JSC::Wasm::AirIRGenerator::ControlData::dump const):
(JSC::Wasm::AirIRGenerator::addTry):
(JSC::Wasm::AirIRGenerator::addCatch):
(JSC::Wasm::AirIRGenerator::addCatchToUnreachable):
(JSC::Wasm::AirIRGenerator::addCatchAll):
(JSC::Wasm::AirIRGenerator::addCatchAllToUnreachable):
(JSC::Wasm::AirIRGenerator::addDelegate):
(JSC::Wasm::AirIRGenerator::addDelegateToUnreachable):
(JSC::Wasm::AirIRGenerator::addThrow):
(JSC::Wasm::AirIRGenerator::addRethrow):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::ControlData::ControlData):
(JSC::Wasm::B3IRGenerator::ControlData::isTry):
(JSC::Wasm::B3IRGenerator::ControlData::isAnyCatch):
(JSC::Wasm::B3IRGenerator::ControlData::isLoop):
(JSC::Wasm::B3IRGenerator::ControlData::isBlock):
(JSC::Wasm::B3IRGenerator::ControlData::isCatch):
(JSC::Wasm::B3IRGenerator::ControlData::dump const):
(JSC::Wasm::B3IRGenerator::ControlData::convertTryToCatch):
(JSC::Wasm::B3IRGenerator::ControlData::convertTryToCatchAll):
(JSC::Wasm::B3IRGenerator::ControlData::tryStart const):
(JSC::Wasm::B3IRGenerator::ControlData::tryEnd const):
(JSC::Wasm::B3IRGenerator::ControlData::tryDepth const):
(JSC::Wasm::B3IRGenerator::ControlData::catchKind const):
(JSC::Wasm::B3IRGenerator::ControlData::exception const):
(JSC::Wasm::B3IRGenerator::ControlData::stackSize const):
(JSC::Wasm::B3IRGenerator::didPopValueFromStack):
(JSC::Wasm::B3IRGenerator::addStackMap):
(JSC::Wasm::B3IRGenerator::takeStackmaps):
(JSC::Wasm::B3IRGenerator::takeExceptionHandlers):
(JSC::Wasm::B3IRGenerator::push):
(JSC::Wasm::B3IRGenerator::get):
(JSC::Wasm::B3IRGenerator::set):
(JSC::Wasm::PatchpointExceptionHandle::generate const):
(JSC::Wasm::B3IRGenerator::fixupPointerPlusOffset):
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::restoreWebAssemblyGlobalState):
(JSC::Wasm::B3IRGenerator::insertEntrySwitch):
(JSC::Wasm::B3IRGenerator::insertConstants):
(JSC::Wasm::B3IRGenerator::addRefIsNull):
(JSC::Wasm::B3IRGenerator::addTableGet):
(JSC::Wasm::B3IRGenerator::addTableSet):
(JSC::Wasm::B3IRGenerator::addRefFunc):
(JSC::Wasm::B3IRGenerator::addTableInit):
(JSC::Wasm::B3IRGenerator::addTableSize):
(JSC::Wasm::B3IRGenerator::addTableGrow):
(JSC::Wasm::B3IRGenerator::addTableFill):
(JSC::Wasm::B3IRGenerator::addTableCopy):
(JSC::Wasm::B3IRGenerator::getLocal):
(JSC::Wasm::B3IRGenerator::emitIndirectCall):
(JSC::Wasm::B3IRGenerator::addGrowMemory):
(JSC::Wasm::B3IRGenerator::addCurrentMemory):
(JSC::Wasm::B3IRGenerator::addMemoryFill):
(JSC::Wasm::B3IRGenerator::addMemoryInit):
(JSC::Wasm::B3IRGenerator::addMemoryCopy):
(JSC::Wasm::B3IRGenerator::setLocal):
(JSC::Wasm::B3IRGenerator::getGlobal):
(JSC::Wasm::B3IRGenerator::setGlobal):
(JSC::Wasm::B3IRGenerator::emitCheckAndPreparePointer):
(JSC::Wasm::B3IRGenerator::emitLoadOp):
(JSC::Wasm::B3IRGenerator::load):
(JSC::Wasm::B3IRGenerator::emitStoreOp):
(JSC::Wasm::B3IRGenerator::store):
(JSC::Wasm::B3IRGenerator::sanitizeAtomicResult):
(JSC::Wasm::B3IRGenerator::fixupPointerPlusOffsetForAtomicOps):
(JSC::Wasm::B3IRGenerator::emitAtomicLoadOp):
(JSC::Wasm::B3IRGenerator::atomicLoad):
(JSC::Wasm::B3IRGenerator::emitAtomicStoreOp):
(JSC::Wasm::B3IRGenerator::atomicStore):
(JSC::Wasm::B3IRGenerator::emitAtomicBinaryRMWOp):
(JSC::Wasm::B3IRGenerator::atomicBinaryRMW):
(JSC::Wasm::B3IRGenerator::emitAtomicCompareExchange):
(JSC::Wasm::B3IRGenerator::atomicCompareExchange):
(JSC::Wasm::B3IRGenerator::atomicWait):
(JSC::Wasm::B3IRGenerator::atomicNotify):
(JSC::Wasm::B3IRGenerator::truncSaturated):
(JSC::Wasm::B3IRGenerator::addSelect):
(JSC::Wasm::B3IRGenerator::addConstant):
(JSC::Wasm::B3IRGenerator::emitLoopTierUpCheck):
(JSC::Wasm::B3IRGenerator::loadFromScratchBuffer):
(JSC::Wasm::B3IRGenerator::connectControlEntry):
(JSC::Wasm::B3IRGenerator::addLoop):
(JSC::Wasm::B3IRGenerator::addTopLevel):
(JSC::Wasm::B3IRGenerator::addBlock):
(JSC::Wasm::B3IRGenerator::addIf):
(JSC::Wasm::B3IRGenerator::addElse):
(JSC::Wasm::B3IRGenerator::addElseToUnreachable):
(JSC::Wasm::B3IRGenerator::addTry):
(JSC::Wasm::B3IRGenerator::addCatch):
(JSC::Wasm::B3IRGenerator::preparePatchpointForExceptions):
(JSC::Wasm::B3IRGenerator::addCatchToUnreachable):
(JSC::Wasm::B3IRGenerator::addCatchAll):
(JSC::Wasm::B3IRGenerator::addCatchAllToUnreachable):
(JSC::Wasm::B3IRGenerator::emitCatchImpl):
(JSC::Wasm::B3IRGenerator::addDelegate):
(JSC::Wasm::B3IRGenerator::addDelegateToUnreachable):
(JSC::Wasm::B3IRGenerator::addThrow):
(JSC::Wasm::B3IRGenerator::addRethrow):
(JSC::Wasm::B3IRGenerator::addReturn):
(JSC::Wasm::B3IRGenerator::addBranch):
(JSC::Wasm::B3IRGenerator::addSwitch):
(JSC::Wasm::B3IRGenerator::endBlock):
(JSC::Wasm::B3IRGenerator::addEndToUnreachable):
(JSC::Wasm::B3IRGenerator::createCallPatchpoint):
(JSC::Wasm::B3IRGenerator::addCall):
(JSC::Wasm::B3IRGenerator::addCallIndirect):
(JSC::Wasm::B3IRGenerator::addCallRef):
(JSC::Wasm::B3IRGenerator::unify):
(JSC::Wasm::B3IRGenerator::unifyValuesWithBlock):
(JSC::Wasm::parseAndCompile):
(JSC::Wasm::computeExceptionHandlerLocations):
(JSC::Wasm::B3IRGenerator::emitChecksForModOrDiv):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32DivS>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32RemS>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32DivU>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32RemU>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64DivS>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64RemS>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64DivU>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64RemU>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32Ctz>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64Ctz>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32Popcnt>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64Popcnt>):
(JSC::Wasm::B3IRGenerator::addOp<F64ConvertUI64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F32ConvertUI64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F64Nearest>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F32Nearest>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F64Trunc>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F32Trunc>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncSF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncSF32>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncUF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncUF32>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncSF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncUF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncSF32>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncUF32>):

  • wasm/WasmB3IRGenerator.h:
  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::prepareImpl):
(JSC::Wasm::BBQPlan::work):
(JSC::Wasm::BBQPlan::compileFunction):
(JSC::Wasm::BBQPlan::didCompleteCompilation):
(JSC::Wasm::BBQPlan::initializeCallees):

  • wasm/WasmBBQPlan.h:
  • wasm/WasmCallee.cpp:

(JSC::Wasm::Callee::handlerForIndex):
(JSC::Wasm::LLIntCallee::LLIntCallee):
(JSC::Wasm::LLIntCallee::linkExceptionHandlers):
(JSC::Wasm::OptimizingJITCallee::linkExceptionHandlers):
(JSC::Wasm::OptimizingJITCallee::stackmap const):

  • wasm/WasmCallee.h:

(JSC::Wasm::Callee::hasExceptionHandlers const):
(JSC::Wasm::Callee::functionCodeBlock const):
(JSC::Wasm::OptimizingJITCallee::OptimizingJITCallee):

  • wasm/WasmCallingConvention.h:

(JSC::Wasm::WasmCallingConvention::callInformationFor const):

  • wasm/WasmFormat.h:

(JSC::Wasm::typeToString):
(JSC::Wasm::isValidExternalKind):
(JSC::Wasm::makeString):

  • wasm/WasmFunctionCodeBlock.h:

(JSC::Wasm::FunctionCodeBlock::numberOfExceptionHandlers const):
(JSC::Wasm::FunctionCodeBlock::exceptionHandler):
(JSC::Wasm::FunctionCodeBlock::addExceptionHandler):

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::isTryOrCatch):
(JSC::Wasm::FunctionParser<Context>::parseExceptionIndex):
(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):

  • wasm/WasmHandlerInfo.cpp: Added.

(JSC::Wasm::HandlerInfo::initialize):
(JSC::Wasm::HandlerInfo::handlerForIndex):

  • wasm/WasmHandlerInfo.h: Added.

(JSC::Wasm::UnlinkedHandlerInfo::UnlinkedHandlerInfo):
(JSC::Wasm::HandlerInfo::tag const):
(JSC::Wasm::HandlerInfo::delegateTarget const):

  • wasm/WasmInstance.cpp:

(JSC::Wasm::Instance::~Instance):

  • wasm/WasmInstance.h:

(JSC::Wasm::Instance::addTag):
(JSC::Wasm::Instance::tag const):

  • wasm/WasmLLIntGenerator.cpp:

(JSC::Wasm::LLIntGenerator::ControlType::try_):
(JSC::Wasm::LLIntGenerator::ControlType::catch_):
(JSC::Wasm::LLIntGenerator::ControlType::isLoop):
(JSC::Wasm::LLIntGenerator::ControlType::isBlock):
(JSC::Wasm::LLIntGenerator::ControlType::isIf):
(JSC::Wasm::LLIntGenerator::ControlType::isTry):
(JSC::Wasm::LLIntGenerator::ControlType::isAnyCatch):
(JSC::Wasm::LLIntGenerator::ControlType::isCatch):
(JSC::Wasm::LLIntGenerator::unifyValuesWithBlock):
(JSC::Wasm::LLIntGenerator::walkExpressionStack):
(JSC::Wasm::LLIntGenerator::materializeConstantsAndLocals):
(JSC::Wasm::parseAndCompileBytecode):
(JSC::Wasm::LLIntGenerator::LLIntGenerator):
(JSC::Wasm::LLIntGenerator::repatch):
(JSC::Wasm::LLIntGenerator::finalize):
(JSC::Wasm::LLIntGenerator::callInformationForCaller):
(JSC::Wasm::LLIntGenerator::callInformationForCallee):
(JSC::Wasm::LLIntGenerator::addArguments):
(JSC::Wasm::LLIntGenerator::addLoop):
(JSC::Wasm::LLIntGenerator::addTry):
(JSC::Wasm::LLIntGenerator::finalizePreviousBlockForCatch):
(JSC::Wasm::LLIntGenerator::addCatch):
(JSC::Wasm::LLIntGenerator::addCatchToUnreachable):
(JSC::Wasm::LLIntGenerator::addCatchAll):
(JSC::Wasm::LLIntGenerator::addCatchAllToUnreachable):
(JSC::Wasm::LLIntGenerator::addDelegate):
(JSC::Wasm::LLIntGenerator::addDelegateToUnreachable):
(JSC::Wasm::LLIntGenerator::addThrow):
(JSC::Wasm::LLIntGenerator::addRethrow):
(JSC::Wasm::LLIntGenerator::endBlock):
(JSC::Wasm::LLIntGenerator::addEndToUnreachable):

  • wasm/WasmLLIntGenerator.h:
  • wasm/WasmLimits.h:
  • wasm/WasmModuleInformation.cpp:
  • wasm/WasmModuleInformation.h:

(JSC::Wasm::ModuleInformation::exceptionIndexSpaceSize const):
(JSC::Wasm::ModuleInformation::isImportedExceptionFromExceptionIndexSpace const):
(JSC::Wasm::ModuleInformation::signatureIndexFromExceptionIndexSpace const):
(JSC::Wasm::ModuleInformation::importExceptionCount const):
(JSC::Wasm::ModuleInformation::isDeclaredException const):
(JSC::Wasm::ModuleInformation::addDeclaredException):

  • wasm/WasmOMGForOSREntryPlan.cpp:

(JSC::Wasm::OMGForOSREntryPlan::work):

  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

  • wasm/WasmOSREntryData.h:

(JSC::Wasm::OSREntryData::values):

  • wasm/WasmOperations.cpp:

(JSC::Wasm::loadValuesIntoBuffer):
(JSC::Wasm::doOSREntry):
(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):

  • wasm/WasmOperations.h:
  • wasm/WasmSectionParser.cpp:

(JSC::Wasm::SectionParser::parseImport):
(JSC::Wasm::SectionParser::parseExport):
(JSC::Wasm::SectionParser::parseException):

  • wasm/WasmSections.h:

(JSC::Wasm::validateOrder):

  • wasm/WasmSignature.cpp:

(JSC::Wasm::SignatureInformation::SignatureInformation):
(JSC::Wasm::SignatureInformation::signatureFor):

  • wasm/WasmSlowPaths.cpp:

(JSC::LLInt::WASM_SLOW_PATH_DECL):

  • wasm/WasmSlowPaths.h:
  • wasm/WasmStreamingParser.cpp:

(JSC::Wasm::StreamingParser::parseCodeSectionSize):

  • wasm/WasmTag.cpp: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyRuntimeError.h.
  • wasm/WasmTag.h: Copied from Source/JavaScriptCore/wasm/WasmLLIntGenerator.h.

(JSC::Wasm::Tag::create):
(JSC::Wasm::Tag::parameterCount const):
(JSC::Wasm::Tag::parameter const):
(JSC::Wasm::Tag::operator== const):
(JSC::Wasm::Tag::operator!= const):
(JSC::Wasm::Tag::signature const):
(JSC::Wasm::Tag::Tag):

  • wasm/WasmThunks.cpp:
  • wasm/WasmThunks.h:
  • wasm/generateWasmB3IRGeneratorInlinesHeader.py:

(CodeGenerator.generateOpcode):
(CodeGenerator.makeResult):
(CodeGenerator.generate):

  • wasm/generateWasmOpsHeader.py:

(typeMacroizer):

  • wasm/js/JSWebAssembly.cpp:
  • wasm/js/JSWebAssemblyException.cpp: Added.

(JSC::JSWebAssemblyException::JSWebAssemblyException):
(JSC::JSWebAssemblyException::finishCreation):
(JSC::JSWebAssemblyException::visitChildrenImpl):
(JSC::JSWebAssemblyException::destroy):
(JSC::JSWebAssemblyException::getArg const):

  • wasm/js/JSWebAssemblyException.h: Added.

(JSC::JSWebAssemblyException::subspaceFor):
(JSC::JSWebAssemblyException::createStructure):
(JSC::JSWebAssemblyException::create):
(JSC::JSWebAssemblyException::tag const):
(JSC::JSWebAssemblyException::payload const):

  • wasm/js/JSWebAssemblyHelpers.h:

(JSC::toJSValue):
(JSC::fromJSValue):

  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::tryCreate):

  • wasm/js/JSWebAssemblyInstance.h:
  • wasm/js/JSWebAssemblyRuntimeError.cpp:

(JSC::createJSWebAssemblyRuntimeError):

  • wasm/js/JSWebAssemblyRuntimeError.h:
  • wasm/js/JSWebAssemblyTag.cpp: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyRuntimeError.cpp.

(JSC::JSWebAssemblyTag::create):
(JSC::JSWebAssemblyTag::createStructure):
(JSC::JSWebAssemblyTag::JSWebAssemblyTag):

  • wasm/js/JSWebAssemblyTag.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyRuntimeError.h.
  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::wasmToJS):

  • wasm/js/WebAssemblyExceptionConstructor.cpp: Added.

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::WebAssemblyExceptionConstructor::create):
(JSC::WebAssemblyExceptionConstructor::createStructure):
(JSC::WebAssemblyExceptionConstructor::finishCreation):
(JSC::WebAssemblyExceptionConstructor::WebAssemblyExceptionConstructor):

  • wasm/js/WebAssemblyExceptionConstructor.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyRuntimeError.h.
  • wasm/js/WebAssemblyExceptionPrototype.cpp: Added.

(JSC::WebAssemblyExceptionPrototype::create):
(JSC::WebAssemblyExceptionPrototype::createStructure):
(JSC::WebAssemblyExceptionPrototype::finishCreation):
(JSC::WebAssemblyExceptionPrototype::WebAssemblyExceptionPrototype):
(JSC::getException):
(JSC::getTag):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyExceptionPrototype.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyRuntimeError.h.
  • wasm/js/WebAssemblyFunction.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::linkImpl):

  • wasm/js/WebAssemblyTagConstructor.cpp: Added.

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::WebAssemblyTagConstructor::createTag):
(JSC::WebAssemblyTagConstructor::create):
(JSC::WebAssemblyTagConstructor::createStructure):
(JSC::WebAssemblyTagConstructor::finishCreation):
(JSC::WebAssemblyTagConstructor::WebAssemblyTagConstructor):

  • wasm/js/WebAssemblyTagConstructor.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyRuntimeError.h.
  • wasm/js/WebAssemblyTagPrototype.cpp: Added.

(JSC::WebAssemblyTagPrototype::create):
(JSC::WebAssemblyTagPrototype::createStructure):
(JSC::WebAssemblyTagPrototype::finishCreation):
(JSC::WebAssemblyTagPrototype::WebAssemblyTagPrototype):
(JSC::getTag):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyTagPrototype.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyRuntimeError.h.
  • wasm/wasm.json:

Tools:

Reviewed by Keith Miller.

  • Scripts/run-jsc-stress-tests:
4:31 PM Changeset in webkit [283851] by jer.noble@apple.com
  • 355 edits
    20 copies
    1 add in trunk

[Build-time perf] Forward-declare more things in Element.h
https://bugs.webkit.org/show_bug.cgi?id=231283

Reviewed by Myles C. Maxfield.

Source/JavaScriptCore:

Add two new forwarding headers: one for Strong, and as a dependency, one for Handle.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • heap/Handle.h:
  • heap/HandleForward.h: Copied from Source/JavaScriptCore/runtime/Forward.h.
  • heap/Strong.h:
  • heap/StrongForward.h: Copied from Source/JavaScriptCore/runtime/Forward.h.
  • runtime/Forward.h:

Source/WebCore:

Replace as many #includes as possible with forward type declarations. To do so, split out the inline function
definitions into their own ElementInlines.h header.

Move MediaKeyMessageEventInit into its own .idl to allow the bindings generator code to include
the two files separately, and to allow MediaKeyMessageEventInit to be forward-declared in MediaKeyMessageEvent.h.

Move Event's enums into their own EventOptions.h header that allows those enums to be forward declared.

Move ScrollExtents into its own ScrollExtents.h header, so that ScrollTypes.h can be freely #included without
pulling in geometry and math headers.

Modify some of the parameters to methods in HTMLMediaElement.h to be passed by reference or r-value reference,
allowing those types to be forward-declared.

Because the SVG and RenderSVG classes rely on ElementInlines.h, their inline methods must be inlined
as well, to ensure ElementInlines.h doesn't leak out into header includes generally.

With these changes in place, the net cost of Element.h during a typical build has gone from ~750s to ~57s.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Headers.cmake:
  • Modules/encryptedmedia/MediaKeyMessageEvent.cpp:

(WebCore::MediaKeyMessageEvent::message const):

  • Modules/encryptedmedia/MediaKeyMessageEvent.h:
  • Modules/encryptedmedia/MediaKeyMessageEvent.idl:
  • Modules/encryptedmedia/MediaKeyMessageEventInit.idl: Added.
  • Modules/encryptedmedia/MediaKeyMessageType.idl: Added.
  • Modules/encryptedmedia/MediaKeySession.cpp:
  • Modules/entriesapi/HTMLInputElementEntriesAPI.cpp:
  • Modules/highlight/AppHighlightStorage.cpp:
  • Modules/model-element/HTMLModelElement.cpp:
  • Modules/remoteplayback/RemotePlayback.cpp:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • accessibility/AccessibilityListBoxOption.cpp:
  • accessibility/AccessibilityRenderObject.cpp:
  • accessibility/AccessibilitySVGElement.cpp:
  • accessibility/AccessibilitySVGRoot.cpp:
  • accessibility/atk/WebKitAccessible.cpp:
  • bindings/js/JSNodeCustom.h:
  • bindings/scripts/CodeGenerator.pm:

(GetterExpression):

  • bindings/scripts/test/JS/JSTestCEReactions.cpp:
  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • css/CSSCursorImageValue.cpp:
  • css/CSSFontFaceSource.cpp:
  • css/CSSStyleSheet.cpp:
  • css/SelectorChecker.cpp:
  • dom/ContainerNode.cpp:
  • dom/DataTransferMac.mm:
  • dom/DatasetDOMStringMap.cpp:
  • dom/Document.cpp:
  • dom/DocumentInlines.h: Added.

(WebCore::Document::textEncoding const):
(WebCore::Document::templateDocument const):
(WebCore::Document::existingAXObjectCache const):
(WebCore::Document::create):
(WebCore::Document::invalidateAccessKeyCache):
(WebCore::Node::scriptExecutionContext const):

  • dom/Element.cpp:
  • dom/Element.h:

(WebCore::Element::attributesIterator const): Deleted.
(WebCore::Element::findAttributeIndexByName const): Deleted.
(WebCore::Node::hasAttributes const): Deleted.
(WebCore::Node::attributes const): Deleted.
(WebCore::Node::parentElement const): Deleted.
(WebCore::Element::rootElement const): Deleted.
(WebCore::Element::hasAttributeWithoutSynchronization const): Deleted.
(WebCore::Element::attributeWithoutSynchronization const): Deleted.
(WebCore::Element::hasAttributesWithoutUpdate const): Deleted.
(WebCore::Element::idForStyleResolution const): Deleted.
(WebCore::Element::getIdAttribute const): Deleted.
(WebCore::Element::getNameAttribute const): Deleted.
(WebCore::Element::setIdAttribute): Deleted.
(WebCore::Element::classNames const): Deleted.
(WebCore::Element::attributeCount const): Deleted.
(WebCore::Element::attributeAt const): Deleted.
(WebCore::Element::findAttributeByName const): Deleted.
(WebCore::Element::hasID const): Deleted.
(WebCore::Element::hasClass const): Deleted.
(WebCore::Element::hasName const): Deleted.
(WebCore::Element::ensureUniqueElementData): Deleted.
(WebCore::shouldIgnoreAttributeCase): Deleted.
(WebCore::Element::getAttribute const): Deleted.
(WebCore::isInTopLayerOrBackdrop): Deleted.

  • dom/ElementInlines.h: Added.

(WebCore::Element::attributesIterator const):
(WebCore::Element::findAttributeIndexByName const):
(WebCore::Node::hasAttributes const):
(WebCore::Node::attributes const):
(WebCore::Node::parentElement const):
(WebCore::Element::rootElement const):
(WebCore::Element::hasAttributeWithoutSynchronization const):
(WebCore::Element::attributeWithoutSynchronization const):
(WebCore::Element::hasAttributesWithoutUpdate const):
(WebCore::Element::idForStyleResolution const):
(WebCore::Element::getIdAttribute const):
(WebCore::Element::getNameAttribute const):
(WebCore::Element::setIdAttribute):
(WebCore::Element::classNames const):
(WebCore::Element::attributeCount const):
(WebCore::Element::attributeAt const):
(WebCore::Element::findAttributeByName const):
(WebCore::Element::hasID const):
(WebCore::Element::hasClass const):
(WebCore::Element::hasName const):
(WebCore::Element::ensureUniqueElementData):
(WebCore::shouldIgnoreAttributeCase):
(WebCore::Element::getAttribute const):
(WebCore::isInTopLayerOrBackdrop):

  • dom/ElementIterator.h:
  • dom/ElementIteratorAssertions.h:
  • dom/Event.h:
  • dom/EventOptions.h: Added.
  • dom/FullscreenManager.cpp:
  • dom/InlineClassicScript.cpp:
  • dom/InlineStyleSheetOwner.cpp:
  • dom/NamedNodeMap.cpp:
  • dom/Node.h:
  • dom/Position.cpp:
  • dom/Range.cpp:
  • dom/ScriptElement.cpp:
  • dom/ShadowRoot.cpp:
  • dom/SlotAssignment.cpp:
  • dom/StyledElement.cpp:
  • dom/StyledElement.h:
  • dom/Text.cpp:
  • dom/VisitedLinkState.cpp:
  • editing/Editing.cpp:
  • editing/EditingStyle.cpp:
  • editing/EditorCommand.cpp:
  • editing/FrameSelection.h:
  • editing/MarkupAccumulator.cpp:
  • editing/ModifySelectionListLevel.cpp:
  • editing/TextIterator.cpp:
  • editing/cocoa/HTMLConverter.mm:
  • editing/cocoa/WebContentReaderCocoa.mm:
  • editing/gtk/EditorGtk.cpp:
  • html/Autofill.cpp:
  • html/BaseTextInputType.cpp:
  • html/DateInputType.cpp:
  • html/DateTimeLocalInputType.cpp:
  • html/FeaturePolicy.cpp:
  • html/FormAssociatedElement.cpp:
  • html/HTMLAnchorElement.h:

(WebCore::HTMLAnchorElement::visitedLinkHash const): Deleted.

  • html/HTMLAnchorElementInlines.h: Added.

(WebCore::HTMLAnchorElement::visitedLinkHash const):

  • html/HTMLAreaElement.cpp:
  • html/HTMLAttachmentElement.cpp:
  • html/HTMLBaseElement.cpp:
  • html/HTMLBodyElement.cpp:
  • html/HTMLButtonElement.cpp:
  • html/HTMLCanvasElement.cpp:
  • html/HTMLCanvasElement.h:
  • html/HTMLElement.h:
  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::resultForDialogSubmit const):

  • html/HTMLFormControlElement.h:

(WebCore::HTMLFormControlElement::resultForDialogSubmit const): Deleted.

  • html/HTMLFrameElementBase.cpp:
  • html/HTMLFrameOwnerElement.cpp:
  • html/HTMLHtmlElement.cpp:
  • html/HTMLIFrameElement.cpp:
  • html/HTMLImageElement.h:
  • html/HTMLLinkElement.cpp:
  • html/HTMLMarqueeElement.cpp:
  • html/HTMLMediaElement.h:
  • html/HTMLMetaElement.cpp:
  • html/HTMLParamElement.cpp:
  • html/HTMLPlugInImageElement.cpp:
  • html/HTMLScriptElement.cpp:
  • html/HTMLSlotElement.cpp:
  • html/HTMLSourceElement.cpp:
  • html/HTMLTableCellElement.cpp:
  • html/HTMLTableColElement.cpp:
  • html/HTMLTrackElement.cpp:
  • html/HTMLVideoElement.cpp:
  • html/ImageInputType.cpp:
  • html/InputType.cpp:
  • html/MediaElementSession.cpp:
  • html/MonthInputType.cpp:
  • html/NumberInputType.cpp:
  • html/TextFieldInputType.cpp:
  • html/TimeInputType.cpp:
  • html/ValidationMessage.cpp:
  • html/WeekInputType.cpp:
  • html/parser/HTMLConstructionSite.cpp:
  • html/parser/HTMLConstructionSite.h:
  • html/parser/HTMLTreeBuilder.cpp:
  • html/track/DataCue.cpp:
  • html/track/InbandGenericTextTrack.cpp:
  • html/track/InbandTextTrack.cpp:
  • html/track/LoadableTextTrack.cpp:
  • html/track/TextTrackCue.cpp:
  • html/track/TextTrackCue.h:
  • html/track/VTTRegion.h:
  • html/track/WebVTTElement.cpp:
  • html/track/WebVTTParser.cpp:
  • inspector/InspectorOverlay.cpp:
  • inspector/InspectorStyleSheet.cpp:
  • inspector/agents/InspectorPageAgent.cpp:
  • loader/FormSubmission.cpp:
  • loader/FrameLoader.cpp:
  • loader/ImageLoader.cpp:
  • loader/cache/CachedImage.cpp:
  • loader/cache/CachedResourceLoader.cpp:
  • loader/cache/CachedResourceLoader.h:
  • loader/cache/CachedResourceRequest.h:
  • mathml/MathMLAnnotationElement.cpp:
  • mathml/MathMLElement.cpp:
  • mathml/MathMLFractionElement.cpp:
  • mathml/MathMLMencloseElement.cpp:
  • mathml/MathMLOperatorElement.cpp:
  • mathml/MathMLPresentationElement.cpp:
  • mathml/MathMLSelectElement.cpp:
  • page/CaptionUserPreferences.h:
  • page/DragController.cpp:
  • page/EventHandler.cpp:
  • page/Frame.cpp:
  • page/FrameView.cpp:
  • page/IntersectionObserver.h:
  • page/KeyboardScroll.h:
  • page/PageSerializer.cpp:
  • page/Quirks.cpp:
  • page/mac/ImageOverlayControllerMac.mm:
  • page/mac/PageMac.mm:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
  • page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp:
  • platform/ScrollAnimation.h:
  • platform/ScrollAnimationKinetic.cpp:
  • platform/ScrollAnimationSmooth.cpp:
  • platform/ScrollAnimator.cpp:
  • platform/ScrollAnimator.h:
  • platform/ScrollExtents.h: Added.

(WebCore::ScrollExtents::minimumScrollOffset const):
(WebCore::ScrollExtents::maximumScrollOffset const):

  • platform/ScrollSnapAnimatorState.cpp:
  • platform/ScrollSnapAnimatorState.h:
  • platform/ScrollTypes.h:

(WebCore::logicalToPhysical):
(WebCore::ScrollExtents::minimumScrollOffset const): Deleted.
(WebCore::ScrollExtents::maximumScrollOffset const): Deleted.

  • platform/ScrollingEffectsController.cpp:
  • platform/ScrollingEffectsController.h:
  • platform/ScrollingMomentumCalculator.h:
  • platform/SharedBuffer.cpp:
  • platform/SharedBuffer.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.mm:
  • platform/encryptedmedia/CDMLogging.cpp:
  • platform/mac/ScrollingEffectsController.mm:
  • platform/win/PasteboardWin.cpp:
  • rendering/CSSFilter.cpp:
  • rendering/HitTestResult.cpp:
  • rendering/LegacyLineLayout.cpp:
  • rendering/ReferencedSVGResources.cpp:
  • rendering/RenderBlockFlow.cpp:
  • rendering/RenderBox.cpp:
  • rendering/RenderDetailsMarker.cpp:
  • rendering/RenderElement.cpp:
  • rendering/RenderImage.cpp:
  • rendering/RenderLayer.cpp:
  • rendering/RenderLineBreak.cpp:
  • rendering/RenderListItem.cpp:
  • rendering/RenderMenuList.cpp:
  • rendering/RenderObject.h:
  • rendering/RenderSearchField.cpp:
  • rendering/RenderTableCell.cpp:
  • rendering/RenderText.cpp:
  • rendering/RenderThemeMac.mm:
  • rendering/RenderTreeAsText.cpp:
  • rendering/mathml/RenderMathMLFenced.cpp:
  • rendering/svg/RenderSVGBlock.cpp:
  • rendering/svg/RenderSVGBlock.h:

(WebCore::RenderSVGBlock::graphicsElement const): Deleted.

  • rendering/svg/RenderSVGBlockInlines.h: Added.

(WebCore::RenderSVGBlock::graphicsElement const):

  • rendering/svg/RenderSVGEllipse.cpp:
  • rendering/svg/RenderSVGForeignObject.cpp:
  • rendering/svg/RenderSVGGradientStop.cpp:
  • rendering/svg/RenderSVGGradientStop.h:
  • rendering/svg/RenderSVGGradientStopInlines.h: Added.

(WebCore::RenderSVGGradientStop::element const):

  • rendering/svg/RenderSVGImage.cpp:
  • rendering/svg/RenderSVGInline.h:

(WebCore::RenderSVGInline::graphicsElement const): Deleted.

  • rendering/svg/RenderSVGInlineInlines.h: Added.

(WebCore::RenderSVGInline::graphicsElement const):

  • rendering/svg/RenderSVGInlineText.cpp:
  • rendering/svg/RenderSVGRect.cpp:
  • rendering/svg/RenderSVGResourceClipper.cpp:
  • rendering/svg/RenderSVGResourceClipper.h:
  • rendering/svg/RenderSVGResourceClipperInlines.h: Added.

(WebCore::RenderSVGResourceClipper::clipPathElement const):
(WebCore::RenderSVGResourceClipper::clipPathUnits const):

  • rendering/svg/RenderSVGResourceContainer.cpp:
  • rendering/svg/RenderSVGResourceFilter.cpp:
  • rendering/svg/RenderSVGResourceFilter.h:
  • rendering/svg/RenderSVGResourceFilterInlines.h: Added.

(WebCore::RenderSVGResourceFilter::filterElement const):
(WebCore::RenderSVGResourceFilter::filterUnits const):
(WebCore::RenderSVGResourceFilter::primitiveUnits const):

  • rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
  • rendering/svg/RenderSVGResourceLinearGradient.cpp:
  • rendering/svg/RenderSVGResourceLinearGradient.h:
  • rendering/svg/RenderSVGResourceLinearGradientInlines.h: Added.

(WebCore::RenderSVGResourceLinearGradient::linearGradientElement const):

  • rendering/svg/RenderSVGResourceMarker.cpp:
  • rendering/svg/RenderSVGResourceMarker.h:
  • rendering/svg/RenderSVGResourceMarkerInlines.h: Added.

(WebCore::RenderSVGResourceMarker::markerElement const):
(WebCore::RenderSVGResourceMarker::markerUnits const):

  • rendering/svg/RenderSVGResourceMasker.cpp:
  • rendering/svg/RenderSVGResourceMasker.h:
  • rendering/svg/RenderSVGResourceMaskerInlines.h: Added.

(WebCore::RenderSVGResourceMasker::maskElement const):
(WebCore::RenderSVGResourceMasker::maskUnits const):
(WebCore::RenderSVGResourceMasker::maskContentUnits const):

  • rendering/svg/RenderSVGResourcePattern.cpp:
  • rendering/svg/RenderSVGResourceRadialGradient.cpp:
  • rendering/svg/RenderSVGResourceRadialGradient.h:
  • rendering/svg/RenderSVGResourceRadialGradientInlines.h: Added.

(WebCore::RenderSVGResourceRadialGradient::radialGradientElement const):

  • rendering/svg/RenderSVGRoot.cpp:
  • rendering/svg/RenderSVGShape.cpp:
  • rendering/svg/RenderSVGShape.h:

(WebCore::RenderSVGShape::graphicsElement const): Deleted.

  • rendering/svg/RenderSVGShapeInlines.h: Added.

(WebCore::RenderSVGShape::graphicsElement const):

  • rendering/svg/RenderSVGTSpan.h:
  • rendering/svg/RenderSVGText.cpp:
  • rendering/svg/RenderSVGTextPath.cpp:
  • rendering/svg/RenderSVGTextPath.h:
  • rendering/svg/RenderSVGTransformableContainer.cpp:

(WebCore::RenderSVGTransformableContainer::graphicsElement):

  • rendering/svg/RenderSVGTransformableContainer.h:
  • rendering/svg/RenderSVGViewportContainer.cpp:
  • rendering/svg/SVGInlineFlowBox.cpp:
  • rendering/svg/SVGInlineTextBox.cpp:
  • rendering/svg/SVGInlineTextBox.h:
  • rendering/svg/SVGInlineTextBoxInlines.h: Added.

(WebCore::SVGInlineTextBox::renderer const):
(WebCore::SVGInlineTextBox::nextTextBox const):

  • rendering/svg/SVGPathData.cpp:
  • rendering/svg/SVGRenderSupport.cpp:
  • rendering/svg/SVGRenderTreeAsText.cpp:
  • rendering/svg/SVGRenderingContext.cpp:
  • rendering/svg/SVGResources.cpp:
  • rendering/svg/SVGRootInlineBox.cpp:
  • rendering/svg/SVGTextLayoutEngine.cpp:
  • rendering/svg/SVGTextQuery.cpp:
  • style/StyleAdjuster.cpp:
  • style/StyleBuilderState.cpp:
  • style/StyleChange.h:
  • style/StyleResolver.h:
  • style/StyleScope.cpp:
  • style/StyleSharingResolver.cpp:
  • svg/DocumentSVG.cpp:
  • svg/SVGAElement.cpp:
  • svg/SVGAltGlyphDefElement.cpp:
  • svg/SVGAltGlyphElement.cpp:
  • svg/SVGAnimateMotionElement.cpp:
  • svg/SVGAnimationElement.cpp:
  • svg/SVGCircleElement.cpp:
  • svg/SVGElement.cpp:
  • svg/SVGElement.h:

(WebCore::SVGElement::invalidateSVGAttributes): Deleted.
(WebCore::SVGElement::invalidateSVGPresentationalHintStyle): Deleted.
(WebCore::SVGAttributeHashTranslator::hash): Deleted.
(WebCore::SVGAttributeHashTranslator::equal): Deleted.
(WebCore::Node::hasTagName const): Deleted.

  • svg/SVGElementInlines.h: Added.

(WebCore::SVGElement::invalidateSVGAttributes):
(WebCore::SVGElement::invalidateSVGPresentationalHintStyle):
(WebCore::SVGAttributeHashTranslator::hash):
(WebCore::SVGAttributeHashTranslator::equal):
(WebCore::Element::hasTagName const):
(WebCore::Node::hasTagName const):

  • svg/SVGEllipseElement.cpp:
  • svg/SVGFEComponentTransferElement.cpp:
  • svg/SVGFELightElement.cpp:
  • svg/SVGFilterElement.cpp:
  • svg/SVGFontFaceElement.cpp:
  • svg/SVGFontFaceFormatElement.cpp:
  • svg/SVGFontFaceNameElement.cpp:
  • svg/SVGFontFaceSrcElement.cpp:
  • svg/SVGFontFaceUriElement.cpp:
  • svg/SVGForeignObjectElement.cpp:
  • svg/SVGGlyphRefElement.cpp:
  • svg/SVGHKernElement.cpp:
  • svg/SVGImageElement.cpp:
  • svg/SVGImageLoader.cpp:
  • svg/SVGLengthContext.cpp:
  • svg/SVGLinearGradientElement.cpp:
  • svg/SVGLocatable.cpp:
  • svg/SVGMPathElement.cpp:
  • svg/SVGMaskElement.cpp:
  • svg/SVGPathElement.cpp:
  • svg/SVGPatternElement.cpp:
  • svg/SVGRadialGradientElement.cpp:
  • svg/SVGRectElement.cpp:
  • svg/SVGSVGElement.cpp:
  • svg/SVGStyleElement.cpp:
  • svg/SVGStyleElement.h:
  • svg/SVGTextContentElement.cpp:
  • svg/SVGTextPositioningElement.cpp:
  • svg/SVGUseElement.cpp:
  • svg/SVGVKernElement.cpp:
  • svg/animation/SVGSMILElement.cpp:
  • svg/graphics/SVGImage.cpp:
  • svg/properties/SVGAttributeAnimator.cpp:
  • xml/XPathFunctions.cpp:
  • xml/XPathNodeSet.cpp:
  • xml/XPathStep.cpp:
  • xml/parser/XMLDocumentParser.cpp:

Source/WebKit:

Include ElementInlines.h in various necessary places.

  • Shared/TouchBarMenuData.cpp:
  • Shared/TouchBarMenuItemData.cpp:
  • Shared/glib/InputMethodState.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementGtk.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:
  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
  • WebProcess/cocoa/PlaybackSessionManager.mm:

Source/WebKitLegacy/mac:

Include ElementInlines.h in various necessary places.

  • WebView/WebHTMLRepresentation.mm:

Tools:

Include ArrayBuffer.h in various necessary places.

  • TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:
4:25 PM Changeset in webkit [283850] by Truitt Savell
  • 3 edits in trunk/Tools

Reverting r283824 becasue it broke baseline search paths
https://bugs.webkit.org/show_bug.cgi?id=230540

Unreviewed revert.

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

(VersionTestCase.test_int_constructor):

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

(Version.from_iterable):
(Version.init):
(Version.setitem):
(Version.contains):
(Version.hash):
(Version.cmp):

4:10 PM Changeset in webkit [283849] by Simon Fraser
  • 16 edits in trunk/Source

Ensure that animated scrolls will run on the scrolling thread
https://bugs.webkit.org/show_bug.cgi?id=231441

Reviewed by Tim Horton.

On macOS, scrolling tree commits run on the main thread (holding a lock), so we can't start
scroll animations directly inside the commit because then they will run on the main thread.

Fix by adding ScrollingTree::didCommitTree(), and having ThreadedScrollingTree override it
to bounce to the scrolling tree to start animations. We also have to intercept requested scroll
position updates via ScrollingTree::scrollingTreeNodeRequestsScroll(); ThreadedScrollingTree
uses this to put pending animations into m_nodesWithPendingScrollAnimations.

Now that ScrollingTreeScrollingNode::commitStateAfterChildren() responds to
RequestedScrollPosition changes by calling handleScrollPositionRequest(), we can remove code
in derived classes that did the same thing.

Not yet tested because animated scrolls don't yet get to the scrolling tree.

Source/WebCore:

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::commitTreeState):

  • page/scrolling/ScrollingTree.h:

(WebCore::ScrollingTree::scrollingTreeNodeRequestsScroll):
(WebCore::ScrollingTree::didCommitTree):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::commitStateAfterChildren):
(WebCore::ScrollingTreeScrollingNode::handleScrollPositionRequest):

  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::didCommitTree):
(WebCore::ThreadedScrollingTree::didCommitTreeOnScrollingThread):
(WebCore::ThreadedScrollingTree::scrollingTreeNodeRequestsScroll):

  • page/scrolling/ThreadedScrollingTree.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):

  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:

(WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateAfterChildren): Deleted.

Source/WebKit:

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:

(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeRequestsScroll):

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
  • UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:

(WebKit::RemoteScrollingTree::scrollingTreeNodeRequestsScroll):

  • UIProcess/RemoteLayerTree/RemoteScrollingTree.h:
  • UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:

(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateAfterChildren):

4:09 PM Changeset in webkit [283848] by Wenson Hsieh
  • 16 edits
    2 adds in trunk

Split DisplayList::Recorder into an abstract base class and a concrete implementation
https://bugs.webkit.org/show_bug.cgi?id=231404

Reviewed by Myles Maxfield.

Source/WebCore:

This patch splits the current code in the DisplayList::Recorder class into two classes: an abstract base class
with the existing name (DisplayList::Recorder), and a new concrete implementation of this virtual class,
DisplayList::RecorderImpl. See below for more details.

This refactoring will allow us to introduce a WebKit2-specific subclass of DisplayList::Recorder in a subsequent
patch, which is similar to the existing DisplayList::Recorder object, but will record its display list items by
sending them to the GPU Process through the IPC stream connection, rather than append them to an instance of
DisplayList.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::displayListForTextRun const):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

Change various uses of DisplayList::Recorder to DisplayList::RecorderImpl.

(WebCore::GraphicsLayerCA::recursiveCommitChanges):

  • platform/graphics/displaylists/DisplayList.h:
  • platform/graphics/displaylists/DisplayListDrawingContext.cpp:

(WebCore::DisplayList::DrawingContext::DrawingContext):

  • platform/graphics/displaylists/DisplayListDrawingContext.h:

(WebCore::DisplayList::DrawingContext::DrawingContext):
(WebCore::DisplayList::DrawingContext::recorder):

  • platform/graphics/displaylists/DisplayListImageBuffer.h:

(WebCore::DisplayList::ImageBuffer::ImageBuffer):

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

The abstract Recorder now contains logic for mapping GraphicsContext method calls into calls to record
individual display list items. Note that while many GraphicsContext methods correspond directly to display list
items, some methods map to one or more display list items, such as setting state consisting only of inline POD
data or drawing simple paths. The base class also manages updating and maintaining the state stack (a list of
Recorder::ContextState) when modifying graphics context state.

Importantly, this means that the abstract Recorder class does not contain either a Recorder Delegate, nor does
it contain a DisplayList. Instead, the concrete subclass (DisplayList::RecorderImpl) now holds on to the local
DisplayList.

This also ensures that subclasses of DisplayList::Recorder only need to worry about "recording" display list
items given their constituent arguments, instead of directly implementing the individual GraphicsContext drawing
methods.

(WebCore::DisplayList::Recorder::Recorder):
(WebCore::DisplayList::Recorder::~Recorder):
(WebCore::DisplayList::Recorder::appendStateChangeItem):
(WebCore::DisplayList::Recorder::appendStateChangeItemIfNecessary):
(WebCore::DisplayList::Recorder::setLineCap):
(WebCore::DisplayList::Recorder::setLineDash):
(WebCore::DisplayList::Recorder::setLineJoin):
(WebCore::DisplayList::Recorder::setMiterLimit):
(WebCore::DisplayList::Recorder::drawGlyphsAndCacheFont):
(WebCore::DisplayList::Recorder::drawImageBuffer):
(WebCore::DisplayList::Recorder::drawNativeImage):
(WebCore::DisplayList::Recorder::drawPattern):
(WebCore::DisplayList::Recorder::save):
(WebCore::DisplayList::Recorder::restore):
(WebCore::DisplayList::Recorder::translate):
(WebCore::DisplayList::Recorder::rotate):
(WebCore::DisplayList::Recorder::scale):
(WebCore::DisplayList::Recorder::concatCTM):
(WebCore::DisplayList::Recorder::setCTM):
(WebCore::DisplayList::Recorder::beginTransparencyLayer):
(WebCore::DisplayList::Recorder::endTransparencyLayer):
(WebCore::DisplayList::Recorder::drawRect):
(WebCore::DisplayList::Recorder::drawLine):
(WebCore::DisplayList::Recorder::drawLinesForText):
(WebCore::DisplayList::Recorder::drawDotsForDocumentMarker):
(WebCore::DisplayList::Recorder::drawEllipse):
(WebCore::DisplayList::Recorder::drawPath):
(WebCore::DisplayList::Recorder::drawFocusRing):
(WebCore::DisplayList::Recorder::fillRect):
(WebCore::DisplayList::Recorder::fillRoundedRect):
(WebCore::DisplayList::Recorder::fillRectWithRoundedHole):
(WebCore::DisplayList::Recorder::fillPath):
(WebCore::DisplayList::Recorder::fillEllipse):
(WebCore::DisplayList::Recorder::strokeRect):
(WebCore::DisplayList::Recorder::strokePath):
(WebCore::DisplayList::Recorder::strokeEllipse):
(WebCore::DisplayList::Recorder::clearRect):
(WebCore::DisplayList::Recorder::applyStrokePattern):
(WebCore::DisplayList::Recorder::applyFillPattern):
(WebCore::DisplayList::Recorder::clip):
(WebCore::DisplayList::Recorder::clipOut):
(WebCore::DisplayList::Recorder::clipPath):
(WebCore::DisplayList::Recorder::clipToImageBuffer):
(WebCore::DisplayList::Recorder::clipToDrawingCommands):
(WebCore::DisplayList::Recorder::paintFrameForMedia):
(WebCore::DisplayList::Recorder::applyDeviceScaleFactor):
(WebCore::DisplayList::Recorder::getPixelBuffer): Deleted.
(WebCore::DisplayList::Recorder::putPixelBuffer): Deleted.
(WebCore::DisplayList::Recorder::recordNativeImageUse): Deleted.
(WebCore::DisplayList::Recorder::canAppendItemOfType const): Deleted.
(WebCore::DisplayList::Recorder::canDrawImageBuffer const): Deleted.
(WebCore::DisplayList::Recorder::renderingMode const): Deleted.
(WebCore::DisplayList::Recorder::extentFromLocalBounds const): Deleted.

  • platform/graphics/displaylists/DisplayListRecorder.h:

(WebCore::DisplayList::Recorder::recordDrawPattern):
(WebCore::DisplayList::Recorder::ContextState::ContextState):
(WebCore::DisplayList::Recorder::ContextState::cloneForSave const):
(WebCore::DisplayList::Recorder::ContextState::cloneForTransparencyLayer const):
(WebCore::DisplayList::Recorder::stateStack const):
(WebCore::DisplayList::Recorder::isEmpty const): Deleted.
(WebCore::DisplayList::Recorder::Delegate::~Delegate): Deleted.
(WebCore::DisplayList::Recorder::Delegate::canAppendItemOfType): Deleted.
(WebCore::DisplayList::Recorder::Delegate::recordNativeImageUse): Deleted.
(WebCore::DisplayList::Recorder::Delegate::isCachedImageBuffer const): Deleted.
(WebCore::DisplayList::Recorder::Delegate::recordFontUse): Deleted.
(WebCore::DisplayList::Recorder::Delegate::recordImageBufferUse): Deleted.
(WebCore::DisplayList::Recorder::Delegate::renderingMode const): Deleted.
(WebCore::DisplayList::Recorder::flushContext): Deleted.
(WebCore::DisplayList::Recorder::append): Deleted.
(WebCore::DisplayList::Recorder::itemNeedsState): Deleted.

  • platform/graphics/displaylists/DisplayListRecorderImpl.cpp: Added.

(WebCore::DisplayList::RecorderImpl::RecorderImpl):
(WebCore::DisplayList::RecorderImpl::~RecorderImpl):
(WebCore::DisplayList::RecorderImpl::getPixelBuffer):
(WebCore::DisplayList::RecorderImpl::putPixelBuffer):
(WebCore::DisplayList::RecorderImpl::canAppendItemOfType const):
(WebCore::DisplayList::RecorderImpl::canDrawImageBuffer const):
(WebCore::DisplayList::RecorderImpl::renderingMode const):
(WebCore::DisplayList::RecorderImpl::createNestedContext):

Refactor the nested Recorder logic used for Recorder::clipToDrawingCommands, such that it's now a separate
override point. This allows subclasses to instantiate nested contexts of the same type, while keeping the main
logic in clipToDrawingCommands in the shared base class.

(WebCore::DisplayList::RecorderImpl::recordSave):
(WebCore::DisplayList::RecorderImpl::recordRestore):
(WebCore::DisplayList::RecorderImpl::recordTranslate):
(WebCore::DisplayList::RecorderImpl::recordRotate):
(WebCore::DisplayList::RecorderImpl::recordScale):
(WebCore::DisplayList::RecorderImpl::recordSetCTM):
(WebCore::DisplayList::RecorderImpl::recordConcatenateCTM):
(WebCore::DisplayList::RecorderImpl::recordSetInlineFillColor):
(WebCore::DisplayList::RecorderImpl::recordSetInlineStrokeColor):
(WebCore::DisplayList::RecorderImpl::recordSetStrokeThickness):
(WebCore::DisplayList::RecorderImpl::recordSetState):
(WebCore::DisplayList::RecorderImpl::recordSetLineCap):
(WebCore::DisplayList::RecorderImpl::recordSetLineDash):
(WebCore::DisplayList::RecorderImpl::recordSetLineJoin):
(WebCore::DisplayList::RecorderImpl::recordSetMiterLimit):
(WebCore::DisplayList::RecorderImpl::recordClearShadow):
(WebCore::DisplayList::RecorderImpl::recordClip):
(WebCore::DisplayList::RecorderImpl::recordClipOut):
(WebCore::DisplayList::RecorderImpl::recordClipToImageBuffer):
(WebCore::DisplayList::RecorderImpl::recordClipOutToPath):
(WebCore::DisplayList::RecorderImpl::recordClipPath):
(WebCore::DisplayList::RecorderImpl::recordBeginClipToDrawingCommands):
(WebCore::DisplayList::RecorderImpl::recordEndClipToDrawingCommands):
(WebCore::DisplayList::RecorderImpl::recordDrawGlyphs):
(WebCore::DisplayList::RecorderImpl::recordDrawImageBuffer):
(WebCore::DisplayList::RecorderImpl::recordDrawNativeImage):
(WebCore::DisplayList::RecorderImpl::recordDrawPattern):
(WebCore::DisplayList::RecorderImpl::recordBeginTransparencyLayer):
(WebCore::DisplayList::RecorderImpl::recordEndTransparencyLayer):
(WebCore::DisplayList::RecorderImpl::recordDrawRect):
(WebCore::DisplayList::RecorderImpl::recordDrawLine):
(WebCore::DisplayList::RecorderImpl::recordDrawLinesForText):
(WebCore::DisplayList::RecorderImpl::recordDrawDotsForDocumentMarker):
(WebCore::DisplayList::RecorderImpl::recordDrawEllipse):
(WebCore::DisplayList::RecorderImpl::recordDrawPath):
(WebCore::DisplayList::RecorderImpl::recordDrawFocusRingPath):
(WebCore::DisplayList::RecorderImpl::recordDrawFocusRingRects):
(WebCore::DisplayList::RecorderImpl::recordFillRect):
(WebCore::DisplayList::RecorderImpl::recordFillRectWithColor):
(WebCore::DisplayList::RecorderImpl::recordFillRectWithGradient):
(WebCore::DisplayList::RecorderImpl::recordFillCompositedRect):
(WebCore::DisplayList::RecorderImpl::recordFillRoundedRect):
(WebCore::DisplayList::RecorderImpl::recordFillRectWithRoundedHole):
(WebCore::DisplayList::RecorderImpl::recordFillLine):
(WebCore::DisplayList::RecorderImpl::recordFillArc):
(WebCore::DisplayList::RecorderImpl::recordFillQuadCurve):
(WebCore::DisplayList::RecorderImpl::recordFillBezierCurve):
(WebCore::DisplayList::RecorderImpl::recordFillPath):
(WebCore::DisplayList::RecorderImpl::recordFillEllipse):
(WebCore::DisplayList::RecorderImpl::recordGetPixelBuffer):
(WebCore::DisplayList::RecorderImpl::recordPutPixelBuffer):
(WebCore::DisplayList::RecorderImpl::recordPaintFrameForMedia):
(WebCore::DisplayList::RecorderImpl::recordStrokeRect):
(WebCore::DisplayList::RecorderImpl::recordStrokeLine):
(WebCore::DisplayList::RecorderImpl::recordStrokeArc):
(WebCore::DisplayList::RecorderImpl::recordStrokeQuadCurve):
(WebCore::DisplayList::RecorderImpl::recordStrokeBezierCurve):
(WebCore::DisplayList::RecorderImpl::recordStrokePath):
(WebCore::DisplayList::RecorderImpl::recordStrokeEllipse):
(WebCore::DisplayList::RecorderImpl::recordClearRect):
(WebCore::DisplayList::RecorderImpl::recordApplyStrokePattern):
(WebCore::DisplayList::RecorderImpl::recordApplyFillPattern):
(WebCore::DisplayList::RecorderImpl::recordApplyDeviceScaleFactor):
(WebCore::DisplayList::RecorderImpl::recordResourceUse):
(WebCore::DisplayList::RecorderImpl::extentFromLocalBounds const):

  • platform/graphics/displaylists/DisplayListRecorderImpl.h: Added.

(WebCore::DisplayList::RecorderImpl::isEmpty const):
(WebCore::DisplayList::RecorderImpl::Delegate::~Delegate):
(WebCore::DisplayList::RecorderImpl::Delegate::canAppendItemOfType):
(WebCore::DisplayList::RecorderImpl::Delegate::recordNativeImageUse):
(WebCore::DisplayList::RecorderImpl::Delegate::isCachedImageBuffer const):
(WebCore::DisplayList::RecorderImpl::Delegate::recordFontUse):
(WebCore::DisplayList::RecorderImpl::Delegate::recordImageBufferUse):
(WebCore::DisplayList::RecorderImpl::Delegate::renderingMode const):
(WebCore::DisplayList::RecorderImpl::recordDrawPattern):
(WebCore::DisplayList::RecorderImpl::append):

Source/WebKit:

See WebCore/ChangeLog for more details.

  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:

Tools:

See WebCore/ChangeLog for more details.

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

(TestWebKitAPI::TEST):

4:02 PM Changeset in webkit [283847] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitscmpy] Allow caller to differentiate remote branches
https://bugs.webkit.org/show_bug.cgi?id=231450
<rdar://problem/84042400>

Reviewed by Dewei Zhu.

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

(Git.branches): Change _branches_for to branches_for.
(Git.branches_for): Allow call to differentiate remote branches
to be returned, or return dictionary of all remotes.
(Git.commit): Change _branches_for to branches_for.
(Git._branches_for): Renamed branches_for.

3:57 PM Changeset in webkit [283846] by Ben Nham
  • 2 edits in trunk/Source/WebKit

Fix crash in NetworkProcess preconnect due to dereferencing deallocated session
https://bugs.webkit.org/show_bug.cgi?id=231456
<rdar://problem/83752148>

Reviewed by Chris Dumez.

We capture a raw NetworkSession reference in the preconnect completion handler. This
reference could point to a deallocated object if the NetworkSession dies before the
preconnect finishes.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::preconnectTo):

3:43 PM Changeset in webkit [283845] by Russell Epstein
  • 21 edits
    1 delete in branches/safari-612-branch

Revert r283238. rdar://problem/83955650

3:35 PM Changeset in webkit [283844] by stephan.szabo@sony.com
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Add private C API for JSGlobalObject::setEvalEnabled
https://bugs.webkit.org/show_bug.cgi?id=231448

Reviewed by Yusuke Suzuki.

WebCore can prohibit eval (and Function constructor) usage in JS execution based on content security policy;
this patch gives embedders the ability to do similarly.

  • API/JSContextRef.cpp:

(JSGlobalContextSetEvalEnabled): Added.

  • API/JSContextRefPrivate.h:
  • API/tests/testapi.c:
3:21 PM Changeset in webkit [283843] by commit-queue@webkit.org
  • 4 edits in trunk/Tools

Ensure webkitpy secret storage works successfully on Linux using only autoinstalled libraries
https://bugs.webkit.org/show_bug.cgi?id=231381

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-10-08
Reviewed by Jonathan Bedard.

Update to the latest python-keyring and python-secretstorage when using python 3.6 or newer.
Otherwise, use the latest version that still supports python2. This version is broken on
Linux, but that's OK because we do not care about python2 or python 3.5 anymore. I'm just
trying to avoid gratuitous breakage.

Autoinstall python-jeepey, a D-Bus library required by python-secretstorage.

Update to a newer version of importlib_metadata when using python 3.6 or newer. For older
versions of python, stick to the older version. There are some API breaks in this library
that I hope only affect python-keyring. We have other software that depends on this library,
but I think it's OK with either version. test-webkitpy will be the arbiter of that.

  • Scripts/libraries/webkitcorepy/setup.py:
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py:
  • Scripts/webkitpy/init.py:
3:19 PM Changeset in webkit [283842] by Ross Kirsling
  • 2 edits in trunk

Unreviewed, add GitHub usernames for Sony contributors.

  • metadata/contributors.json:
3:02 PM Changeset in webkit [283841] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] UnlinkedCodeBlock::m_instructions can be nullptr
https://bugs.webkit.org/show_bug.cgi?id=231445
rdar://83975933

Reviewed by Mark Lam.

JSTests:

  • stress/unlinked-code-block-destructor.js: Added.

(useAllMemory.get Object):
(useAllMemory.foo):
(useAllMemory):
(try.bar):

Source/JavaScriptCore:

UnlinkedCodeBlock is first created with m_instructions = nullptr.
If BytecodeGenerator failed (due to OOM error etc.), then we keep it nullptr.
So, when destroying UnlinkedCodeBlock, we should have nullptr check.

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::~UnlinkedCodeBlock):

2:51 PM Changeset in webkit [283840] by ysuzuki@apple.com
  • 2 edits in trunk

Unreviewed, add my GitHub username

  • metadata/contributors.json:
2:43 PM Changeset in webkit [283839] by ntim@apple.com
  • 2 edits in trunk

[contributors.json] Add more Github usernames
https://bugs.webkit.org/show_bug.cgi?id=231453

Reviewed by Jonathan Bedard.

  • metadata/contributors.json:
2:12 PM Changeset in webkit [283838] by Fujii Hironori
  • 3 edits
    3 adds in trunk/Tools

[Win][MiniBrowser][WK2] Implement Show Layer Tree to dump the GraphicsLayer tree
https://bugs.webkit.org/show_bug.cgi?id=231409

Reviewed by Don Olmstead.

MiniBrower has Show Layer Tree to dump the GraphicsLayer tree.
It's useful, but worked only in WebKit1. It should work for
WebKit2.

The layer tree are dumped to the debug console of WebProcess by
using OutputDebugString. You need to attach a debugger to it to
see the message. I'd like to recommend to install Child Process
Debugging Power Tool to your Visual Studio.

  • MiniBrowser/win/CMakeLists.txt:
  • MiniBrowser/win/Common2.cpp: Added.

(createString):

  • MiniBrowser/win/Common2.h: Added.
  • MiniBrowser/win/InjectedBundle.cpp: Added.

(didReceiveMessageToPage):
(WKBundleInitialize):

  • MiniBrowser/win/WebKitBrowserWindow.cpp:

(injectedBundlePath):
(WebKitBrowserWindow::create):
(WebKitBrowserWindow::showLayerTree):

2:03 PM Changeset in webkit [283837] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Update getAllLocalAuthenticatorCredentials query according to internal needs
https://bugs.webkit.org/show_bug.cgi?id=231439
rdar://84032359

Patch by John Pascoe <John Pascoe> on 2021-10-08
Reviewed by Tim Horton.

Covered by manual tests.

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

(updateQueryIfNecessary):
(getAllLocalAuthenticatorCredentialsImpl):

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

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

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
1:56 PM Changeset in webkit [283835] by Alan Bujtas
  • 3 edits
    2 adds in trunk

ASSERTION FAILED: m_collapsibleLogicalWidth <= m_logicalWidth in WebCore::Layout::InlineContentBreaker::ContinuousContent::append
https://bugs.webkit.org/show_bug.cgi?id=231274

Reviewed by Antti Koivisto.

Source/WebCore:

Remove incorrect assertions. They stopped working when negative horizontal margin was enabled for IFC.

Test: fast/inline/negative-margin-with-collapsible-content-assert.html

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::ContinuousContent::append):

LayoutTests:

  • fast/inline/negative-margin-with-collapsible-content-assert-expected.txt: Added.
  • fast/inline/negative-margin-with-collapsible-content-assert.html: Added.
1:01 PM Changeset in webkit [283834] by basuke.suzuki@sony.com
  • 2 edits in trunk/Source/WebKit

Fix build break after r283796 when ENABLE_SERVICE_WORKER is off
https://bugs.webkit.org/show_bug.cgi?id=231440

Unreviewed build fix.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::hasServiceWorkerBackgroundActivityForTesting const):

12:53 PM Changeset in webkit [283833] by Jonathan Bedard
  • 8 edits in trunk

[contributors.json] Support GitHub usernames
https://bugs.webkit.org/show_bug.cgi?id=231400
<rdar://problem/84005266>

Reviewed by Dewei Zhu.

.:

  • metadata/contributors.json: Add some GitHub usernames.

Tools:

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

(Contributor.Encoder.default): Add GitHub and BitBucket username.
(Contributor.Mapping.load): Ditto.
(Contributor.Mapping.add): Ditto.
(Contributor.init): Ditto.

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

(TestContributor):
(TestContributor.test_github):
(TestContributor.test_bitbucket):

  • Scripts/webkitpy/common/config/committers.py:

(Contributor.init): Add GitHub username.
(Contributor.as_dict): Ditto.
(Committer.init): Ditto.
(Reviewer.init): Ditto.
(Bot.init): Ditto.
(CommitterList.load_json): Ditto.

12:44 PM Changeset in webkit [283832] by Alan Coon
  • 19 edits
    2 moves
    4 adds in branches/safari-612-branch

Cherry-pick r283531. rdar://problem/83956741

Choose an appropriate color space when converting an SVG image into a NativeImage for canvas drawImage
https://bugs.webkit.org/show_bug.cgi?id=231062
<rdar://problem/83752451>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Add a test for drawImage() with an SVG image that has sRGB and Display
P3 colors.

Not adding tests for patterns pointing to SVG images for now, since
WebKit currently always taints the canvas in that case, or for
ImageBitmaps wrapping SVG images, since we always flatten them to sRGB
(and we don't track what content is inside the SVG to make a better
decision about what color space ImageBuffer to use).

  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage.https-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-expected.txt.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage.https.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage.html.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3.js:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-0.7333-0-0.svg: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-1-0-0.svg: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.svg: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0000.svg: Added.

Source/WebCore:

When GPUP canvas is enabled, drawImage() with an SVG image is handled
by drawing into a NativeImage and then sending that to the GPUP. We
need to choose a color space for the NativeImage's ImageBuffer that
matches the canvas.

Once full SVG rendering is supported by the GPU process, we can undo
this code, as we'll no longer be using a NativeImage.

Test: imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage.https.html

  • html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::drawImage): (WebCore::drawImageToContext): (WebCore::CanvasRenderingContext2DBase::fullCanvasCompositedDrawImage):
  • platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawImageForCanvas):
  • platform/graphics/GraphicsContext.h:
  • platform/graphics/Image.cpp: (WebCore::Image::drawForCanvas):
  • platform/graphics/Image.h:
  • platform/graphics/MediaPlayer.h:
  • svg/graphics/SVGImage.cpp: (WebCore::SVGImage::drawForCanvasForContainer): (WebCore::SVGImage::drawForContainer): (WebCore::SVGImage::drawForContainerInternal): (WebCore::SVGImage::nativeImage): (WebCore::SVGImage::drawForCanvas): (WebCore::SVGImage::draw): (WebCore::SVGImage::drawInternal): (WebCore::SVGImage::drawAsNativeImage):
  • svg/graphics/SVGImage.h:
  • svg/graphics/SVGImageForContainer.cpp: (WebCore::SVGImageForContainer::drawForCanvas):
  • svg/graphics/SVGImageForContainer.h:

LayoutTests:

  • TestExpectations:
  • platform/ios-14/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:

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

12:44 PM Changeset in webkit [283831] by Alan Coon
  • 7 edits in branches/safari-612-branch

Cherry-pick r283193. rdar://problem/83954782

Preserve color space when structured cloning ImageBitmaps
https://bugs.webkit.org/show_bug.cgi?id=230429
<rdar://problem/83293533>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

The test added in https://bugs.webkit.org/show_bug.cgi?id=230429 was
buggy, in that by the time the "message" event handler ran, the
values for the various test configuration variables had changed. The
key bugfix here is checking for the right testID value in the message
event handler, but the test is rewritten more substantially to be a bit
clearer and less indented.

  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned-expected.txt:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html:

Source/WebCore:

The logic for serializing the CGColorSpace is copied and adapted from
the ArgumentCoder<CGColorSpaceRef> specialization, which we cannot
easily re-use.

  • bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpImageBitmap): (WebCore::CloneSerializer::write): (WebCore::CloneDeserializer::read): (WebCore::CloneDeserializer::readImageBitmap):

LayoutTests:

  • fast/storage/serialized-script-value.html: Bump the current version number.

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

12:44 PM Changeset in webkit [283830] by Alan Coon
  • 21 edits
    12 adds in branches/safari-612-branch

Cherry-pick r282696. rdar://problem/83954782

Preserve color space when creating ImageBuffers for ImageBitmaps
https://bugs.webkit.org/show_bug.cgi?id=229022
<rdar://problem/81828459>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-Blob-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-Blob.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageBitmap-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageBitmap.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageData-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageData.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-canvas-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-canvas.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-image-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-image.html: Added.

Source/WebCore:

ImageBitmaps can be created with various sources of image data.
Currently, they always create an sRGB ImageBuffer to copy the
image data into. This patch tries to preserve the color space
of the source image data. Because ImageBuffer only works with 8 bit
RGBA data, other color space models (such as CMYK) get converted
to Display P3 if available, or sRGB otherwise. The rationale for
this is that ImageBitmaps are designed to be drawn into canvases,
and we currently only support sRGB and Display P3 for canvas backing
stores.

It's not ideal that we do the color space conversion, since it would
be better to delay the conversion until it's needed when drawing onto
the canvas. It's also not ideal that we can't preserve the pixel
format of the image data, which might be 16 bit color or floats. We
could support these only if ImageBuffer were extended to support them.
A different design for ImageBitmap where it can hold on to the image
data source directly (and support for structured cloning and worker
thread transferrance added) could also work. For now, we don't worry,
and accept the loss of color fidelity when downsampling or converting
from non-RGB color space models.

Support for structured cloning of ImageBitmaps with non-sRGB data
isn't added, but a test for this is. (This will need a way to
serialize the DestinationColorSpace.)

Tests: imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-Blob.html

imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageBitmap.html
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageData.html
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-canvas.html
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-image.html

  • bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpImageBitmap): (WebCore::CloneDeserializer::readImageBitmap):
  • html/ImageBitmap.cpp: (WebCore::ImageBitmap::create): (WebCore::ImageBitmap::createImageBuffer): (WebCore::ImageBitmap::resolveWithBlankImageBuffer): (WebCore::ImageBitmap::createPromise): (WebCore::ImageBitmap::createFromBuffer):
  • html/ImageBitmap.h:
  • html/OffscreenCanvas.cpp: (WebCore::OffscreenCanvas::transferToImageBitmap): (WebCore::OffscreenCanvas::createImageBuffer const):
  • platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::colorSpace):
  • platform/graphics/BitmapImage.h:
  • platform/graphics/DestinationColorSpace.cpp: (WebCore::DestinationColorSpace::asRGB const): New function that abstracts out the behavior "tell me whether the color space is appropriate for use with an 8 bit RGB buffer", which is common to ImageBitmap and ShareableBitmapCG.
  • platform/graphics/DestinationColorSpace.h:
  • platform/graphics/Image.cpp: (WebCore::Image::colorSpace):
  • platform/graphics/Image.h:

Source/WebKit:

  • Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::validateConfiguration): Factor out some loging into DestinationColorSpace::asRGB.

Source/WTF:

  • wtf/PlatformHave.h:

LayoutTests:

  • TestExpectations:
  • platform/ios-14/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:

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

12:44 PM Changeset in webkit [283829] by Alan Coon
  • 9 edits
    4 adds in branches/safari-612-branch

Cherry-pick r282630. rdar://problem/83956741

Support patterns with a wide gamut source painting into a display-p3 canvas
https://bugs.webkit.org/show_bug.cgi?id=229023
<rdar://problem/81828466>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Add tests for wide gamut <img> and <canvas> sources for patterns.

  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage.html:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-canvas-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-canvas.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-image-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-image.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3.js:

Source/WebKit:

Patterns are sent to the GPU process using ShareableBitmaps created
from ImageBuffers. Ensure we pass along the pattern source color space
to ShareableBitmap::create.

Tests: imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-canvas.html

imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-image.html

  • GPUProcess/graphics/RemoteRenderingBackend.cpp: (WebKit::RemoteRenderingBackend::getShareableBitmapForImageBuffer):

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

12:44 PM Changeset in webkit [283828] by Alan Coon
  • 9 edits
    119 deletes in branches/safari-612-branch/LayoutTests

Cherry-pick r283099. rdar://problem/83957623

Remove old test files from canvas WPTs that were moved
https://bugs.webkit.org/show_bug.cgi?id=230811
<rdar://problem/83554404>

Reviewed by Tim Horton.

LayoutTests/imported/w3c:

A bunch of canvas test moved directories in
https://github.com/web-platform-tests/wpt/pull/23996. When we re-
imported canvas WPTs in bug 229750, these old files were left behind.
We can remove them since they all now live under
html/canvas/element/manual/.

  • web-platform-tests/html/canvas/element/building-paths/canvas_complexshapes_arcto_001.htm: Removed.
  • web-platform-tests/html/canvas/element/building-paths/canvas_complexshapes_beziercurveto_001.htm: Removed.
  • web-platform-tests/html/canvas/element/context-attributes/getContextAttributes-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/context-attributes/getContextAttributes.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-orientation-none.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-orientation-none.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height-orientation-none.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height-orientation-none.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-orientation-none.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-orientation-none.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height-orientation-none.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height-orientation-none.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-with-src-rect.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-with-src-rect.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/canvas_complexshapes_ispointInpath_001.htm: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_001-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_001.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_002-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_002.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_003-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_003.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_004-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_004.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_005-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_005.html: Removed.
  • web-platform-tests/html/canvas/element/image-smoothing/imagesmoothing-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/image-smoothing/imagesmoothing.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/canvas-createImageBitmap-resize-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/canvas-createImageBitmap-resize.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/canvas-createImageBitmap-video-resize-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/canvas-createImageBitmap-video-resize.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/common.sub.js: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-blob-invalidtype-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-blob-invalidtype.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-bounds-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-bounds.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-drawImage-closed-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-drawImage-closed.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-drawImage-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-drawImage.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-flipY-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-flipY.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-in-worker-transfer-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-in-worker-transfer.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-invalid-args-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-invalid-args.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-origin.sub-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-origin.sub.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-serializable-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-serializable.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-sizeOverflow-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-sizeOverflow.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-transfer-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-transfer.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-worker.js: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/transfer-worker.js: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-semitransparent-p3d65.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-semitransparent-rec2020.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-semitransparent-srgb.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb-fullcolor.ogv: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb-transparent.bmp: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb-transparent.ico: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb-transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb-transparent.webp: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.bmp: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.gif: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.ico: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.jpg: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.svg: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.webp: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_AdobeRGB_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_AdobeRGB_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_DisplayP3_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_DisplayP3_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_ProPhoto_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_ProPhoto_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_Rec2020_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_Rec2020_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_AdobeRGB_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_AdobeRGB_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_DisplayP3_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_DisplayP3_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_ProPhoto_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_ProPhoto_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_Rec2020_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_Rec2020_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_sRGB_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_sRGB_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_sRGB_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_sRGB_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_AdobeRGB_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_AdobeRGB_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_DisplayP3_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_DisplayP3_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_ProPhoto_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_ProPhoto_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_Rec2020_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_Rec2020_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_sRGB_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_sRGB_transparent.png: Removed.

LayoutTests:

  • TestExpectations:
  • platform/glib/TestExpectations:
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/image-smoothing/imagesmoothing-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/canvas-createImageBitmap-resize-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-drawImage-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-flipY-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-invalid-args-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-serializable-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-transfer-expected.txt: Removed.
  • platform/ios-14/TestExpectations:
  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-flipY-expected.txt: Removed.
  • platform/mac/TestExpectations:

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

12:44 PM Changeset in webkit [283827] by Alan Coon
  • 11 edits
    1 copy
    1 add in branches/safari-612-branch

Cherry-pick r282634. rdar://problem/83957287

Preserve canvas color space when producing JPEGs from toDataURL/toBlob
https://bugs.webkit.org/show_bug.cgi?id=230209
<rdar://82948457>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.jpeg.p3.canvas-expected.txt: Added.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.jpeg.p3.canvas.html: Copied from LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.p3.canvas.html.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.p3.canvas-expected.txt:
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.p3.canvas.html:
  • web-platform-tests/html/canvas/tools/yaml/element/color_space.yaml:

Source/WebCore:

Test: imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.jpeg.p3.canvas.html

  • platform/graphics/cg/ImageBufferCGBackend.cpp: (WebCore::colorSpaceForBitmap): Return an appropriate color space for performing any graphics operations on ImageBuffers (such as scaling or cropping, or compositing on top of solid colors) becore encoding. (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBufferCGBackend::copyCGImageForEncoding const):

LayoutTests:

  • TestExpectations:
  • platform/ios-14/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:

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

12:44 PM Changeset in webkit [283826] by Alan Coon
  • 18 edits
    35 adds in branches/safari-612-branch

Cherry-pick r282626. rdar://problem/83956767

Support drawImage with a wide gamut image painting into a display-p3 canvas
https://bugs.webkit.org/show_bug.cgi?id=229021
<rdar://problem/81828450>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Adding a new WPT for drawImage() using images with various embedded
color profiles.

  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-settings-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-settings.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3.js: Added. (pixelsApproximatelyEqual):
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BB0000CC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BB0000FF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BBBC00000000CCCC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BBBC00000000FFFF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FF0000CC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FF0000FF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FFFF00000000CCCC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FFFF00000000FFFF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BB0000CC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BB0000FF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BBBC00000000CCCC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BBBC00000000FFFF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FF0000CC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FF0000FF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FFFF00000000CCCC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FFFF00000000FFFF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Generic-CMYK-BE000000.jpg: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Generic-CMYK-FF000000.jpg: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000CC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000FF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BBBC00000000CCCC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BBBC00000000FFFF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0000CC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0000FF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FFFF00000000CCCC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FFFF00000000FFFF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-draw-high-bit-depth-images-expected.txt: Results changing for an existing test. It's designed to test canvas with a float16 backing store, which is (at the moment) non-standard, and unsupported by us. The sub-tests changing from PASS to FAIL are notable; they are drawing semi-transparent 16 bit wide gamut images and comparing the results to drawing 8 bit equivalent images. Might be accuracy issues due to pre-multiplied alpha?

Source/WebCore:

Expose the color space of a NativeImage.

Tests: imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage.html

imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-settings.html

  • platform/graphics/NativeImage.h:
  • platform/graphics/cairo/NativeImageCairo.cpp: (WebCore::NativeImage::colorSpace const):
  • platform/graphics/cg/NativeImageCG.cpp: (WebCore::NativeImage::colorSpace const):
  • platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::NativeImage::colorSpace const):

Source/WebKit:

ShareableBitmap is used to share image data used by drawImage() calls,
from the Web process to the GPU process. This change makes
ShareableBitmap create a CGBitmap with a color space matching the
source NativeImage, if that is an RGB-based color space, or extended
sRGB otherwise. This allows us to pass Adobe RGB, Display P3, etc.
images to the GPU process without needing to convert color space,
while still allowing for example CMYK JPEGs to be drawn correctly.

  • Shared/ShareableBitmap.cpp: (WebKit::ShareableBitmap::create): (WebKit::ShareableBitmap::createShareable):
  • Shared/ShareableBitmap.h:
  • Shared/cairo/ShareableBitmapCairo.cpp: (WebKit::ShareableBitmap::validateConfiguration):
  • Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::validateConfiguration): Map the requested color space into one appropriate for the CGBitmap. (WebKit::colorSpace):
  • Shared/win/ShareableBitmapDirect2D.cpp: (WebKit::ShareableBitmap::validateConfiguration):
  • WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp: (WebKit::createShareableBitmapFromNativeImage): Pass in the color space of the NativeImage.

LayoutTests:

  • TestExpectations:
  • platform/ios-14/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:

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

12:29 PM Changeset in webkit [283825] by Chris Dumez
  • 11 edits in trunk

Merge optimizations to AudioParamTimeline::hasValues() from Blink
https://bugs.webkit.org/show_bug.cgi?id=231428

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Merge https://github.com/web-platform-tests/wpt/pull/31165. Thanks to the new optimizations, we are now
using K-Rate processing in more cases. For some of the StereoPannerNode tests, we went from A-Rate processing
to K-Rate. Because our K-Rate processing implementation is vectorized (and doing all operations as float), it
does not have the same precision as the A-Rate one which does operations of double variables and only casts
to float at the end.

  • web-platform-tests/webaudio/resources/stereopanner-testing.js:

(Test):

  • web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/no-dezippering-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/no-dezippering.html:
  • web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/stereopannernode-panning-expected.txt:

Source/WebCore:

Merge optimizations to AudioParamTimeline::hasValues() from Blink:

It is important for AudioParamTimeline::hasValues() to return false whenever
possible because it allows our implementation to use K-Rate processing (instead
of A-Rate), which is much faster.

No new tests, no expected Web-facing behavior change.

  • Modules/webaudio/AudioParamTimeline.cpp:

(WebCore::AudioParamTimeline::hasValues const):
Merge optimizations to AudioParamTimeline::hasValues() from Blink:

When there is a single event on the timeline (which is fairly common), do our best to
find out if the event is relevant for the current rendering quantum, based on the event
type and attributes.

  • Modules/webaudio/PannerNode.cpp:

(WebCore::PannerNode::process):
I recently introduced a cache of PannerNode's azimuth/elevavation/coneGain. The cache
works fine as long as PannerNode processing stays in K-Rate or in A-Rate the whole
time. However, if switching from A-Rate to K-rate, it could make bad calculations
because we failed to invalidate the cached attributes while in A-Rate. For this
reason, we have to invalidate the cached attributes if dirty no matter what rate we
are using (not just while in K-Rate).

  • platform/audio/EqualPowerPanner.cpp:

(WebCore::EqualPowerPanner::EqualPowerPanner):
(WebCore::EqualPowerPanner::pan):

  • platform/audio/EqualPowerPanner.h:
  • platform/audio/Panner.cpp:

(WebCore::Panner::create):
Now that more Panner tests are using K-Rate processing, it found a bug in our
implementation where we were still doing dezippering. Dezippering is no longer
part of the specification and Blink no longer does this either. We've already
dropped dezippering in other places but we missed it here.
I have also noticed that the implementation is not vectorized but easily could
be so I have added a FIXME comment and will follow-up to fix it.

12:19 PM Changeset in webkit [283824] by Jonathan Bedard
  • 5 edits in trunk/Tools

[webkitcorepy] Not possible to autoinstall a package with micro version 0
https://bugs.webkit.org/show_bug.cgi?id=230540
<rdar://problem/83613371>

Reviewed by Michael Catanzaro.

  • Scripts/libraries/webkitcorepy/setup.py: Bump version.
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Ditto.
  • Scripts/libraries/webkitcorepy/webkitcorepy/tests/version_unittest.py:

(VersionTestCase.test_int_constructor): Default values are 'None.'

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

(Version.from_iterable):
(Version.init): Use 'None' as the default value instead of 0.
(Version.setitem): Support 'None' as a version value.
(Version.contains): Ditto.
(Version.hash): Ditto.
(Version.cmp): Ditto.

12:16 PM Changeset in webkit [283823] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ iOS15 ] imported/blink/fast/dom/shadow/shadowdom-for-keygen-only-shadow.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=231444.

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
12:15 PM Changeset in webkit [283822] by Russell Epstein
  • 1 copy in tags/Safari-613.1.4

Tag Safari-613.1.4.

12:15 PM Changeset in webkit [283821] by Russell Epstein
  • 1 delete in tags/Safari-613.1.4

Delete tag.

12:11 PM Changeset in webkit [283820] by Russell Epstein
  • 9 edits in branches/safari-613.1.4-branch/Source/WebKit

Revert "Revert r283187. rdar://problem/83985586"

This reverts commit r283733.

12:10 PM Changeset in webkit [283819] by Russell Epstein
  • 2 edits in branches/safari-613.1.4-branch/Source/WTF

Cherry-pick r283811.

Disable SYSTEM_PREVIEW when UIKit internals is enabled
https://bugs.webkit.org/show_bug.cgi?id=231438
rdar://84019482

Reviewed by Tim Horton.

We're going to replace SystemPreview with the <model>
element, so disable it when UIKit internals are enabled.

  • wtf/PlatformUse.h:

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

12:01 PM Changeset in webkit [283818] by sbarati@apple.com
  • 3 edits
    1 add in trunk

RegExpExec can't statically prove which of the two structures it will get in AI by just looking at the RegExp*
https://bugs.webkit.org/show_bug.cgi?id=231382
<rdar://83722151>

Reviewed by Mark Lam.

JSTests:

  • stress/reg-exp-exec-cant-prove-which-structure-it-produces-in-ai.js: Added.

(foo):

Source/JavaScriptCore:

Because of the RegExp.prototype.compile API, we don't know if the RegExp
produced by RegExpExec will have indices or not, because that bit of
information can be reset by the RegExp.prototype.compile API. So, we
conservatively say that it can produce either structure.

  • dfg/DFGAbstractInterpreterInlines.h:

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

11:50 AM Changeset in webkit [283817] by Alan Coon
  • 2 edits in branches/safari-612-branch/LayoutTests

Cherry-pick r281611. rdar://problem/83955924

REGRESSION (r281516): [AppleSilicon WK2] fast/loader/reload-zero-byte-plugin.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=229532
<rdar://problem/82370692>

Unreviewed, temporarily skip the test on macOS WK2 while I investigate, so that the bots don't
complain.

  • platform/mac-wk2/TestExpectations:

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

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

[ iOS Release & macOS wk2 ] http/wpt/mediarecorder/set-srcObject-MediaStream-Blob.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231442

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:40 AM Changeset in webkit [283815] by Andres Gonzalez
  • 21 edits in trunk

AX: AXMathRootRadicand should return an array of elements, not just the first
https://bugs.webkit.org/show_bug.cgi?id=230986
<rdar://83688829>

Reviewed by Chris Fleizach.

Source/WebCore:

Tests: accessibility/mac/mathml-elements.html

accessibility/mac/mathml-root.html

Square root element radicand can be more than one element. For that
reason the return value of AXCoreObject::mathRadicand should be an
optional array of AX objects instead of a single object.

  • accessibility/AccessibilityMathMLElement.cpp:

(WebCore::AccessibilityMathMLElement::mathRadicand):
(WebCore::AccessibilityMathMLElement::mathRadicandObject): Renamed mathRadicand.

  • accessibility/AccessibilityMathMLElement.h:
  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityMathRadicand]):
(-[WebAccessibilityObjectWrapper accessibilityMathRadicandObject]): Renamed accessibilityMathRadicand.

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::mathRadicand):

  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/isolatedtree/AXIsolatedTree.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

Tools:

Added AccessibilityUIElement::mathRootRadicand as a readonly property to
be used in LayoutTests.

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::mathRootRadicand const):

LayoutTests:

Instead of getting the root radicand as the first child of the root
element, use the readonly property mathRootRadicand.
Added a check for the length of the mathRootRadicand array.

  • accessibility/mac/mathml-elements-expected.txt:
  • accessibility/mac/mathml-elements.html:
  • accessibility/mac/mathml-root-expected.txt:
  • accessibility/mac/mathml-root.html:

Added the test case where the square root element has a radicand
consisting of more than one AX object.

  • platform/mac-wk1/TestExpectations:
11:32 AM Changeset in webkit [283814] by mmaxfield@apple.com
  • 4 edits in trunk/Source/WebKit

[GPU Process] Unique RenderingResourceIdentifiers Part 4: Migrate PendingWakeupInformation to QualifiedRenderingResourceIdentifier
https://bugs.webkit.org/show_bug.cgi?id=231406
<rdar://problem/84009999>

Reviewed by Wenson Hsieh.

This starts pushing QualifiedRenderingResourceIdentifier into a few more places. It's being pushed into
PendingWakeupInformation and RemoteImageBuffer. (I can't split this patch up any further because the
pieces intermingle.)

The next step is to push QualifiedRenderingResourceIdentifier down into RemoteResourceCache.

No new tests because there is no behavior change.

  • GPUProcess/graphics/RemoteImageBuffer.h:

(WebKit::RemoteImageBuffer::create):
(WebKit::RemoteImageBuffer::RemoteImageBuffer):

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::didCreateImageBufferBackend):
(WebKit::RemoteRenderingBackend::didFlush):
(WebKit::RemoteRenderingBackend::createImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::nextDestinationImageBufferAfterApplyingDisplayLists):
(WebKit::RemoteRenderingBackend::wakeUpAndApplyDisplayListWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::setNextItemBufferToRead):
(WebKit::RemoteRenderingBackend::cacheNativeImageWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::cacheFontWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::finalizeRenderingUpdate):
(WebKit::RemoteRenderingBackend::resumeFromPendingWakeupInformation):

  • GPUProcess/graphics/RemoteRenderingBackend.h:

(WebKit::RemoteRenderingBackend::PendingWakeupInformation::shouldPerformWakeup const):

11:08 AM Changeset in webkit [283813] by timothy_horton@apple.com
  • 4 edits in trunk/Source

defaultAlternateFormControlDesignEnabled() can't read UIUserInterfaceIdiom in the Web Content process
https://bugs.webkit.org/show_bug.cgi?id=231416
<rdar://problem/84009054>

Reviewed by Anders Carlsson.

Source/WebKit:

It turns out WebPreferences default getters are run in the Web Content process,
which is a problem for defaultAlternateFormControlDesignEnabled because
it needs to consult with application state.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setupPageConfiguration:]):
Explicitly initialize this preference in the UI process.

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml:

Remove the autogenerated default.

11:05 AM Changeset in webkit [283812] by Russell Epstein
  • 1 copy in tags/Safari-613.1.4

Tag Safari-613.1.4.

10:40 AM Changeset in webkit [283811] by dino@apple.com
  • 2 edits in trunk/Source/WTF

Disable SYSTEM_PREVIEW when UIKit internals is enabled
https://bugs.webkit.org/show_bug.cgi?id=231438
rdar://84019482

Reviewed by Tim Horton.

We're going to replace SystemPreview with the <model>
element, so disable it when UIKit internals are enabled.

  • wtf/PlatformUse.h:
9:49 AM Changeset in webkit [283810] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 ] Rebaselining platform/ios/ios/fast/text/opticalFontWithWeight.html.
https://bugs.webkit.org/show_bug.cgi?id=231380

Unreviewed test gardening.

  • platform/ios/platform/ios/ios/fast/text/opticalFontWithWeight-expected.txt:
9:38 AM Changeset in webkit [283809] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

REGRESSION(r283802): broke Apple ports
https://bugs.webkit.org/show_bug.cgi?id=231434

Unreviewed, revert changes to TextChecker.h that broke the iOS build.

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-10-08

  • UIProcess/TextChecker.h:
9:37 AM Changeset in webkit [283808] by Antti Koivisto
  • 8 edits in trunk

Make WTF::IteratorRange reversible
https://bugs.webkit.org/show_bug.cgi?id=231415

Reviewed by Darin Adler.

Source/WebCore:

Replace a custom range type with the new reversible IteratorRange.

  • layout/integration/LayoutIntegrationInlineContent.cpp:

(WebCore::LayoutIntegration:: const):
(WebCore::LayoutIntegration::InlineContent::boxesForRect const): Deleted.

  • layout/integration/LayoutIntegrationInlineContent.h:

(WebCore::LayoutIntegration::InlineContent::BoxRange::begin const): Deleted.
(WebCore::LayoutIntegration::InlineContent::BoxRange::end const): Deleted.
(WebCore::LayoutIntegration::InlineContent::BoxRange::rbegin const): Deleted.
(WebCore::LayoutIntegration::InlineContent::BoxRange::rend const): Deleted.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::hitTest):

Source/WTF:

Also export some names out of the WTF namespace.

  • wtf/IteratorRange.h:

(WTF::IteratorRange::rbegin const):
(WTF::IteratorRange::rend const):

Tools:

  • TestWebKitAPI/Tests/WTF/IteratorRange.cpp:

(TestWebKitAPI::TEST):

9:32 AM Changeset in webkit [283807] by mmaxfield@apple.com
  • 3 edits in trunk/Source/WebKit

[GPU Process] Unique RenderingResourceIdentifiers Part 3: Uniquify in wakeUpAndApplyDisplayList
https://bugs.webkit.org/show_bug.cgi?id=231405
<rdar://problem/84008003>

Reviewed by Chris Dumez.

This simply applies the same treatment in https://commits.webkit.org/242676@main to
RemoteRenderingBackend::wakeUpAndApplyDisplayList(). This is being done in a follow-up
patch because it relies on https://bugs.webkit.org/show_bug.cgi?id=231403.

No new tests because there is no behavior change.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::wakeUpAndApplyDisplayList):
(WebKit::RemoteRenderingBackend::wakeUpAndApplyDisplayListWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::resumeFromPendingWakeupInformation):

  • GPUProcess/graphics/RemoteRenderingBackend.h:

(WebKit::RemoteRenderingBackend::PendingWakeupInformation::arguments const): Deleted.

9:16 AM Changeset in webkit [283806] by youenn@apple.com
  • 4 edits in trunk/Source/WebCore

https://webrtc.github.io/samples/src/content/getusermedia/getdisplaymedia/ is broken on Webkit ToT
https://bugs.webkit.org/show_bug.cgi?id=231426

Reviewed by Eric Carlson.

CGDisplayStreamScreenCaptureSource may start capturing with frameRate, width and height set to 0.
In that case, capture would fail, as examplified in https://webrtc.github.io/samples/src/content/getusermedia/getdisplaymedia/.
To ensure we have a frameRate value, we make sure to commit the configuration anytime we start producing data.
In case width and height are not set, thus are zero, we use the screen size.
Covered by existing tests through debug ASSERT in mock code.

  • platform/mediastream/mac/CGDisplayStreamScreenCaptureSource.mm:

(WebCore::CGDisplayStreamScreenCaptureSource::createDisplayStream):

  • platform/mediastream/mac/DisplayCaptureSourceMac.cpp:

(WebCore::DisplayCaptureSourceMac::startProducingData):

  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockDisplayCapturer::start):
(WebCore::MockDisplayCapturer::commitConfiguration):

9:05 AM Changeset in webkit [283805] by youenn@apple.com
  • 7 edits
    2 adds in trunk

Move deviceChange handling from CoreAudioSharedUnit to BaseAudioSharedUnit
https://bugs.webkit.org/show_bug.cgi?id=231284

Reviewed by Eric Carlson.

Source/WebCore:

Previously setting capture devices was done in CoreAudioSharedUnit and MockAudioSharedUnit.
Detection of missing devices was done in CoreAudioSharedUnit.
Move this code to BaseAudioSharedUnit and add a test based on mock to cover this code.

Test: fast/mediastream/microphone-change-while-capturing.html

  • platform/mediastream/mac/BaseAudioSharedUnit.cpp:

(WebCore::BaseAudioSharedUnit::prepareForNewCapture):
(WebCore::BaseAudioSharedUnit::setCaptureDevice):
(WebCore::BaseAudioSharedUnit::devicesChanged):
(WebCore::BaseAudioSharedUnit::captureFailed):

  • platform/mediastream/mac/BaseAudioSharedUnit.h:

(WebCore::BaseAudioSharedUnit::persistentID const):
(WebCore::BaseAudioSharedUnit::captureDeviceID const):

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioSharedUnit::captureDeviceChanged):
(WebCore::CoreAudioSharedUnit::setupAudioUnit):
(WebCore::CoreAudioSharedUnit::setCaptureDevice): Deleted.
(WebCore::CoreAudioSharedUnit::devicesChanged): Deleted.

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

(WebCore::MockAudioSharedUnit::resetSampleRate):
(WebCore::MockAudioSharedUnit::captureDeviceChanged):
(WebCore::MockAudioSharedUnit::setCaptureDevice): Deleted.

LayoutTests:

  • fast/mediastream/microphone-change-while-capturing-expected.txt: Added.
  • fast/mediastream/microphone-change-while-capturing.html: Added.
8:51 AM Changeset in webkit [283804] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS14 EWS ] http/tests/privateClickMeasurement/attribution-conversion-through-fetch-keepalive.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=231431

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
8:44 AM Changeset in webkit [283803] by Antti Koivisto
  • 7 edits
    5 adds in trunk

REGRESSION (r277818): XHR with requestType document broken for larger HTML files
https://bugs.webkit.org/show_bug.cgi?id=231138
<rdar://problem/83823282>

Reviewed by Darin Adler.

Source/WebCore:

The parser may end up yielding during XHR or DOMParser parsing even though those should be
synchronous. This appears to be a long standing bug that was made more visible by r277818
because it makes the parser yield more eagerly. This only affects cases where the document
being parsed contains <script> tags as those are considered potential yield points.

Tests: http/tests/xmlhttprequest/xhr-and-parse-large-document.html

http/tests/xmlhttprequest/xhr-large-document.html

  • dom/Document.cpp:

(WebCore::Document::setContent):

Explicitly parse synchronously. The comment was wrong, nothing forces parser flushing on close().

  • dom/DocumentParser.h:

(WebCore::DocumentParser::appendSynchronously):

  • html/parser/HTMLDocumentParser.cpp:

(WebCore::HTMLDocumentParser::append):
(WebCore::HTMLDocumentParser::appendSynchronously):

  • html/parser/HTMLDocumentParser.h:
  • html/parser/HTMLParserScheduler.cpp:

(WebCore::HTMLParserScheduler::shouldYieldBeforeExecutingScript):

Also avoid script yielding if script execution is not allowed.

LayoutTests:

  • http/tests/xmlhttprequest/resources/large-html-with-script-tags.py: Added.
  • http/tests/xmlhttprequest/xhr-and-parse-large-document-expected.txt: Added.
  • http/tests/xmlhttprequest/xhr-and-parse-large-document.html: Added.
  • http/tests/xmlhttprequest/xhr-large-document-expected.txt: Added.
  • http/tests/xmlhttprequest/xhr-large-document.html: Added.
8:33 AM Changeset in webkit [283802] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit

[WPE][Qt] API export fixes
https://bugs.webkit.org/show_bug.cgi?id=231430

Patch by Philippe Normand <pnormand@igalia.com> on 2021-10-08
Reviewed by Michael Catanzaro.

Remove internal WebKit API (GRefPtr) from the public QtWPE API, and export classes exposing
the public QtWPE API.

  • UIProcess/API/wpe/qt/WPEQtView.cpp:

(WPEQtView::~WPEQtView):
(WPEQtView::createWebView):
(WPEQtView::url const):
(WPEQtView::setUrl):
(WPEQtView::loadProgress const):
(WPEQtView::title const):
(WPEQtView::canGoBack const):
(WPEQtView::isLoading const):
(WPEQtView::canGoForward const):
(WPEQtView::goBack):
(WPEQtView::goForward):
(WPEQtView::reload):
(WPEQtView::stop):
(WPEQtView::loadHtml):
(WPEQtView::runJavaScript):

  • UIProcess/API/wpe/qt/WPEQtView.h:

(): Deleted.
(WPEQtView::triggerUpdate): Deleted.
(WPEQtView::errorOccured const): Deleted.
(WPEQtView::setErrorOccured): Deleted.

  • UIProcess/API/wpe/qt/WPEQtViewLoadRequest.h:
  • UIProcess/TextChecker.h:
8:08 AM Changeset in webkit [283801] by Claudio Saavedra
  • 3 edits in trunk/Source/WebCore

[LibWPE] Do not destroy EGL backend if not created
https://bugs.webkit.org/show_bug.cgi?id=224309

Reviewed by Carlos Garcia Campos.

about:gpu will create a PlatformDisplay to fill in GPU
information, but this doesn't call
LibWPEPlatformDisplay::initialize() as it doesn't need to, so the
backend member is not initialized. Make sure that the backend is
not a nullptr before attempting to destroy it when the display is
destroyed.

  • platform/graphics/libwpe/PlatformDisplayLibWPE.cpp:

(WebCore::PlatformDisplayLibWPE::~PlatformDisplayLibWPE):

  • platform/graphics/libwpe/PlatformDisplayLibWPE.h:
7:44 AM Changeset in webkit [283800] by svillar@igalia.com
  • 1 edit
    1 add in trunk/LayoutTests

[GTK] web-platform-tests/css/css-flexbox/text-as-flexitem-size-001.html is failing
https://bugs.webkit.org/show_bug.cgi?id=231429

Unreviewed gardening. Adding GTK expectations for a test that has been failing since it was imported.

  • platform/gtk/imported/w3c/web-platform-tests/css/css-flexbox/text-as-flexitem-size-001-expected.txt: Added.
7:34 AM Changeset in webkit [283799] by commit-queue@webkit.org
  • 7 edits
    3 adds in trunk

AX: Expose the URL attribute of <video> elements
https://bugs.webkit.org/show_bug.cgi?id=231384

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

Source/WebCore:

Expose URL attribute for <video> accessibility elements.

Test: accessibility/video-element-url-attribute.html

  • accessibility/AccessibilityObjectInterface.h:

(WebCore::AXCoreObject::isVideo const): Added.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::url const):
Return the currentSrc of video elements.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

Mark the URL attribute as supported for video elements.

LayoutTests:

Add test ensuring <video> accessibility elements return
a URL attribute when appropriate.

  • accessibility/resources/test.mp4: Added.
  • accessibility/video-element-url-attribute-expected.txt: Added.
  • accessibility/video-element-url-attribute.html: Added.
  • platform/ios/TestExpectations: Enable new test.
  • platform/win/TestExpectations: Skip new test due to lack of mp4

support.

7:21 AM Changeset in webkit [283798] by commit-queue@webkit.org
  • 237 edits
    5 copies
    47 adds
    3 deletes in trunk

[WebDriver] Update w3c and selenium tests
https://bugs.webkit.org/show_bug.cgi?id=230551
<rdar://problem/83620518>

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-10-08
Reviewed by Jonathan Bedard.

Tools:

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

(RunWebDriverTests): Run run-webdriver-tests with python3.

  • Scripts/run-webdriver-tests: Run with python3.
  • Scripts/webkitpy/init.py: Use a newer version of pytest and its dependencies to match what tests expect.
  • Scripts/webkitpy/webdriver_tests/pytest_runner.py:

(collect): Use contextlib to redirect stdout to /dev/null while collecting tests.
(run): Use ExitCode new enum added to pytest.

  • Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py:

(WebDriverSeleniumExecutor.init): Do not encode paths.

  • Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py:

(WebDriverTestRunnerSelenium.collect_tests): Use items() instead of iteritems() that doesn't exist in python3.

  • Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:

(WebKitDriverServer.init):
(WebDriverW3CExecutor.init):
(WebDriverW3CExecutor.setup):
(WebDriverW3CExecutor._runner):

WebDriverTests:

  • imported/selenium/common/src/web/javascriptPage.html:
  • imported/selenium/importer.json:
  • imported/selenium/py/:
  • imported/w3c/importer.json:
  • imported/w3c/tools/:
  • imported/w3c/webdriver/:
5:30 AM Changeset in webkit [283797] by youenn@apple.com
  • 4 edits in trunk/Source/WebKit

Bind the number of WebRTC sockets opened per process
https://bugs.webkit.org/show_bug.cgi?id=231171

Reviewed by Alex Christensen.

Migrate from HashMap to StdMap so that we can keep the order based on socket identifiers.
Take benefit of the ordering so that, above a certain size, we get the oldest socket, close it and remove it from the map.
We set the maximum size to 256 sockets per process.
Fix a potential bug in NetworkRTCTCPSocketCocoa to ensure we remove the socket from the map even if the nw connection is not live.
Manually tested.

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:
  • NetworkProcess/webrtc/NetworkRTCProvider.h:
  • NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.mm:
3:02 AM Changeset in webkit [283796] by youenn@apple.com
  • 16 edits in trunk

Add support for processing push events without service worker clients
https://bugs.webkit.org/show_bug.cgi?id=231285

Reviewed by Chris Dumez.

Source/WebCore:

Covered by API test.

  • workers/service/server/SWServer.cpp:

Add a timer to terminate service worker if a push message is not processed with a given number of seconds.
The timer value is the default termination delay or 1 second for testing.

Source/WebKit:

When firing a push event, ask UIProcess to take a background assertion for the process running the service worker.
We use a counter based approach to take/dispose of the backgorund assertion.

  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:
  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/WebProcessProxy.cpp:
  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:
  • UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm:
1:25 AM Changeset in webkit [283795] by ntim@apple.com
  • 6 edits
    4 adds
    5 deletes in trunk/LayoutTests

Re-sync the-dialog-element and inert WPT from upstream
https://bugs.webkit.org/show_bug.cgi?id=231392

Reviewed by Youenn Fablet.

Upstream commit: https://github.com/web-platform-tests/wpt/commit/a44515b7c7774abf1256f488bf0e9dc02459fced

LayoutTests/imported/w3c:

  • resources/resource-files.json:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-inert.tentative-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-inert.tentative.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/w3c-import.log:
  • web-platform-tests/inert/frame/button.html: Removed.
  • web-platform-tests/inert/frame/w3c-import.log: Removed.
  • web-platform-tests/inert/inert-computed-style-expected.txt: Added.
  • web-platform-tests/inert/inert-computed-style.html: Added.
  • web-platform-tests/inert/inert-retargeting-iframe.tentative.html: Removed.
  • web-platform-tests/inert/inert-retargeting.tentative.html: Removed.
  • web-platform-tests/inert/w3c-import.log:

LayoutTests:

  • TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative-expected.txt: Removed.
12:57 AM Changeset in webkit [283794] by mmaxfield@apple.com
  • 3 edits
    4 adds in trunk

font-families inside @font-palette-values need to be case insensitive
https://bugs.webkit.org/show_bug.cgi?id=231215
<rdar://problem/83871643>

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-fonts/font-palette-33-expected.html: Added.
  • web-platform-tests/css/css-fonts/font-palette-33.html: Added.
  • web-platform-tests/css/css-fonts/font-palette-34-expected.html: Added.
  • web-platform-tests/css/css-fonts/font-palette-34.html: Added.

Source/WebCore:

https://drafts.csswg.org/css-fonts-4/#font-family-2-desc says:

The value of this descriptor matches the definition of the <family-name> for the font-family property.

Tests: imported/w3c/web-platform-tests/css/css-fonts/font-palette-33.html

imported/w3c/web-platform-tests/css/css-fonts/font-palette-34.html

  • css/CSSFontSelector.h:

Oct 7, 2021:

11:45 PM Changeset in webkit [283793] by Simon Fraser
  • 20 edits in trunk/Source

Plumb "animated scroll did end" back from the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=231412

Reviewed by Tim Horton.

Before we can enable async animated scrolls, we have to get the "did end" notification back
from the scrolling thread/UI process in order to clear the ScrollAnimationStatus on
ScrollableArea.

The scroll animations are run by the ScrollingEffectsController owned by
ScrollingTreeScrollingNodeDelegateMac/ScrollingTreeScrollingNodeDelegateNicosia. Their
didStopAnimatedScroll() implementations call through the ScrollingTreeScrollingNde to the
ScrollingTree, which enqueues ScrollUpdate just as we do for scroll position changes.

ScrollUpdate is enhanced to contain an 'updateType' with a AnimatedScrollDidEnd value. When
this is received by AsyncScrollingCoordinator it clears the ScrollAnimationStatus on the
relevant FrameView/RenderLayerScrollableArea.

With UI-side compositing, AnimatedScrollDidEndForNode is an IPC message back to
RemoteScrollingCoordinator.

Not yet tested because async animated scrolls are not enabled.

Source/WebCore:

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::applyScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::animatedScrollDidEndForNode):

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

(WebCore::ScrollUpdate::canMerge const):

  • page/scrolling/ScrollingTree.h:

(WebCore::ScrollingTree::scrollingTreeNodeDidStopAnimatedScroll):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::didStopAnimatedScroll):

  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidStopAnimatedScroll):

  • page/scrolling/ThreadedScrollingTree.h:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:

(WebCore::ScrollingTreeScrollingNodeDelegateMac::didStopAnimatedScroll):

  • page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp:

(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::didStopAnimatedScroll):

  • page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.h:

Source/WebKit:

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:

(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidStopAnimatedScroll):

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
  • UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:

(WebKit::RemoteScrollingTree::scrollingTreeNodeDidStopAnimatedScroll):

  • UIProcess/RemoteLayerTree/RemoteScrollingTree.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.messages.in:
  • WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm:

(WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):
(WebKit::RemoteScrollingCoordinator::animatedScrollDidEndForNode):

9:30 PM Changeset in webkit [283792] by Simon Fraser
  • 36 edits in trunk/Source

Add some plumbing for running smooth scroll animations in the scrolling thread/UI process
https://bugs.webkit.org/show_bug.cgi?id=231402

Reviewed by Tim Horton.

Source/WebCore:

These change prepare the scrolling tree to handle the starting and cancelation of
programmatic smooth scroll animations.

ScrollableArea subclasses implement requestAnimatedScrollToPosition() and
stopAsyncAnimatedScroll(), akin to the existing requestScrollPositionUpdate(). FrameView and
RenderLayerScrollableArea call through to AsyncScrollingCoordinator, which will soon respond
to these requests by setting state on scrolling state nodes. Currently,
AsyncScrollingCoordinator does return false to avoid a behavior change.

ScrollingTreeScrollingNode gains startAnimatedScrollToPosition() and stopAnimatedScroll(),
and concrete subclasses use their ScrollingTreeScrollingNodeDelegate (and its
ScrollingEffectsController) to actually trigger the scroll animation, or stop an existing
one.

RequestedScrollData will be used a bit more widely, so move it to
ScrollingCoordinatorTypes.h, and give it a ScrollIsAnimated field.

  • dom/Element.cpp:

(WebCore::Element::scrollTo):

  • page/FrameView.cpp:

(WebCore::FrameView::setScrollPosition):
(WebCore::FrameView::requestAnimatedScrollToPosition):
(WebCore::FrameView::stopAsyncAnimatedScroll):

  • page/FrameView.h:
  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::requestAnimatedScrollToPosition):
(WebCore::AsyncScrollingCoordinator::stopAnimatedScroll):

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

(WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::ScrollingCoordinator::requestAnimatedScrollToPosition):
(WebCore::ScrollingCoordinator::stopAnimatedScroll):

  • page/scrolling/ScrollingCoordinatorTypes.h:

(WebCore::RequestedScrollData::operator== const):

  • page/scrolling/ScrollingStateScrollingNode.cpp:

(WebCore::ScrollingStateScrollingNode::dumpProperties const):

  • page/scrolling/ScrollingStateScrollingNode.h:

(WebCore::RequestedScrollData::operator== const): Deleted.

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::didStopAnimatedScroll):
(WebCore::ScrollingTreeScrollingNode::handleScrollPositionRequest):

  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/ScrollingTreeScrollingNodeDelegate.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):
(WebCore::ScrollingTreeFrameScrollingNodeMac::startAnimatedScrollToPosition):
(WebCore::ScrollingTreeFrameScrollingNodeMac::stopAnimatedScroll):

  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:

(WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateAfterChildren):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::startAnimatedScrollToPosition):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::stopAnimatedScroll):

  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:

(WebCore::ScrollingTreeScrollingNodeDelegateMac::startAnimatedScrollToPosition):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::stopAnimatedScroll):

  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:

(WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateAfterChildren):
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::startAnimatedScrollToPosition):
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::stopAnimatedScroll):
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::stopScrollAnimations): Deleted.

  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h:
  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:

(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::commitStateAfterChildren):
(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::startAnimatedScrollToPosition):
(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::stopAnimatedScroll):
(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::stopScrollAnimations): Deleted.

  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h:
  • page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp:

(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::startAnimatedScrollToPosition):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::stopAnimatedScroll):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::stopScrollAnimations): Deleted.

  • page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.h:
  • platform/ScrollTypes.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::setScrollPosition):

  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::scrollToPositionWithAnimation):

  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::requestAnimatedScrollToPosition):
(WebCore::ScrollableArea::stopAsyncAnimatedScroll):

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::requestAnimatedScrollToPosition):
(WebCore::RenderLayerScrollableArea::stopAsyncAnimatedScroll):

  • rendering/RenderLayerScrollableArea.h:

Source/WebKit:

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:

(ArgumentCoder<RequestedScrollData>::encode):
(ArgumentCoder<RequestedScrollData>::decode):

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:

(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateAfterChildren):

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
  • UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:

(WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren):
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::startAnimatedScrollToPosition):
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::stopAnimatedScroll):

7:03 PM Changeset in webkit [283791] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WTF

Cherry-pick r283541. rdar://problem/83956057

Enable 2D canvas color space support on Apple platforms
https://bugs.webkit.org/show_bug.cgi?id=231145
<rdar://82948394>

Reviewed by Simon Fraser.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

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

7:02 PM Changeset in webkit [283790] by Russell Epstein
  • 3 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r283322. rdar://problem/83954555

Web Audio panner node quality deteriorates over time
https://bugs.webkit.org/show_bug.cgi?id=230950
<rdar://problem/83675934>

Reviewed by Eric Carlson.

When profiling the test case, I noticed what we were spending most of the CPU time
under AudioParamTimeline::valuesForFrameRangeImpl() / isEventCurrent() called from
PannerNode::process(). The reason for that is that the number of events in the
AudioParamTimeline would keep growing unboundedly and it would make the
valuesForFrameRangeImpl() implementation more and more expensive over time, since
it has to iterate over all events.

To address the issue, valuesForFrameRangeImpl() now keeps track of the events
that it had to skip because they were in the past. Then, at the end of the loop,
it removes the outdated events so it won't have to iterate over them the next
time around. This behavior is similar to what Blink does.

  • Modules/webaudio/AudioParamTimeline.cpp: (WebCore::AudioParamTimeline::removeOldEvents): (WebCore::AudioParamTimeline::valuesForFrameRangeImpl):
  • Modules/webaudio/AudioParamTimeline.h:

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

7:02 PM Changeset in webkit [283789] by Russell Epstein
  • 3 edits in branches/safari-612-branch/Tools

Cherry-pick r283272. rdar://problem/83955254

Migrate _WKDownload tests from TCPServer to HTTPServer
https://bugs.webkit.org/show_bug.cgi?id=230980
<rdar://82100878>

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

The former is very picky when it comes to numbers of TCP connections, and causes tests to time out when
the number of connections changes. The latter is more forgiving and runs code on the main thread.

  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm: (TestWebKitAPI::respondSlowly): (TestWebKitAPI::downloadAtRate): (TEST):
  • TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::Connection::send const):

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

7:02 PM Changeset in webkit [283788] by Russell Epstein
  • 21 edits
    2 adds in branches/safari-612-branch

Cherry-pick r283238. rdar://problem/83955650

MediaStream canvas.captureStream() fails for WebGL
https://bugs.webkit.org/show_bug.cgi?id=230613
<rdar://82307293>

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

.:

Add a manual test to interact with media stream
captureStream() behavior until the implementation is
testable.

  • ManualTests/mediastream/mediastream-canvas-to-video.html: Added.

Source/WebCore:

Remove previous incorrect behavior of turning on "preservesDrawingBuffer"
and sampling the drawing buffer. The drawing buffer is not what should
ever be touched, rather it's the display buffer that should be available.

Implement sampling of WebGL display buffer for
media stream capture. The upon sampling, obtain a shared
reference to the
display buffer, passes it to media sample consuming process and mark
the WebGL context display buffer non-eligible for recycling as
new drawing buffer.

Currently the implementation is displayed correctly for
WebGL contents that is premultiplied. Unpremultiplied
content is fixed in the associated bugs.

Note: there are bugs preventing robust use of the API,
listed in the associated bugs. As such, testing is not expanded
in this bug.

Tested by
ManualTests/mediastream/mediastream-canvas-to-video.html (added)

https://webrtc.github.io/samples/src/content/capture/canvas-video/
(Refresh the page or hide the window until MediaPlayer initialization
flakyness lets rendering happen)

The test LayoutTests/fast/mediastream/captureStream/canvas3d.html
cannot yet be used to test the implementation as the rest of the
captureStream() and playback implementation is so flaky.

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp: (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasChanged):
  • html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::toMediaSample):
  • html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::paintCompositedResultsToMediaSample):
  • html/canvas/WebGLRenderingContextBase.h: (WebCore::WebGLRenderingContextBase::isPreservingDrawingBuffer const):
  • platform/graphics/GraphicsContextGL.cpp:
  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/RemoteGraphicsContextGLProxyBase.cpp: (WebCore::RemoteGraphicsContextGLProxyBase::paintCompositedResultsToMediaSample):
  • platform/graphics/RemoteGraphicsContextGLProxyBase.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm: (WebCore::MediaSampleAVFObjC::createImageSample):
  • platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp: (WebCore::GraphicsContextGLIOSurfaceSwapChain::present):
  • platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.h:
  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: (WebCore::GraphicsContextGLOpenGL::paintCompositedResultsToMediaSample):
  • platform/graphics/cocoa/RemoteGraphicsContextGLProxyBaseCocoa.mm: (WebCore::RemoteGraphicsContextGLProxyBase::paintCompositedResultsToMediaSample):
  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp: (WebCore::GraphicsContextGLOpenGL::paintCompositedResultsToMediaSample):
  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:

LayoutTests:

Add new expectations, a warning was removed.
CONSOLE MESSAGE: Turning drawing buffer preservation for the WebGL canvas being captured

  • fast/mediacapturefromelement/CanvasCaptureMediaStream-webgl-events-expected.txt:
  • fast/mediastream/captureStream/canvas3d-expected.txt:

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

7:02 PM Changeset in webkit [283787] by Russell Epstein
  • 14 edits
    1 add in branches/safari-612-branch/Source

Cherry-pick r283116. rdar://problem/83954304

iPadOS 15 / iOS 15 unable to decode VP9 stream
https://bugs.webkit.org/show_bug.cgi?id=230604
<rdar://problem/83391595>

Reviewed by Eric Carlson.

Source/WebCore:

Export a utility function to know whether HW VP9 is supported by VTB.
No change of behavior.

  • platform/graphics/cocoa/VP9UtilitiesCocoa.h:
  • platform/graphics/cocoa/VP9UtilitiesCocoa.mm: (WebCore::vp9HardwareDecoderAvailable):

Source/WebKit:

Update code to retrieve some parameters when synchronously creating the GPU process connection.
The sole parameter is currently to know the HW VP9 decoder availability.
If HW VP9 decoder is not supported by GPUProcess code, we fallback to SW libvpx.

Manually tested.

  • GPUProcess/GPUProcess.cpp: (WebKit::GPUProcess::createGPUConnectionToWebProcess):
  • GPUProcess/GPUProcess.h:
  • GPUProcess/GPUProcess.messages.in:
  • Shared/GPUProcessConnectionInitializationParameters.h: Added.
  • UIProcess/GPU/GPUProcessProxy.cpp: (WebKit::GPUProcessProxy::getGPUProcessConnection):
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/GPUProcessConnection.cpp: (WebKit::GPUProcessConnection::GPUProcessConnection):
  • WebProcess/GPU/GPUProcessConnection.h: (WebKit::GPUProcessConnection::create): (WebKit::GPUProcessConnection::hasVP9HardwareDecoder const):
  • WebProcess/GPU/GPUProcessConnectionInfo.h: (WebKit::GPUProcessConnectionInfo::encode const): (WebKit::GPUProcessConnectionInfo::decode):
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: (WebKit::LibWebRTCCodecs::setCallbacks):
  • WebProcess/WebProcess.cpp: (WebKit::WebProcess::ensureGPUProcessConnection):

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

7:02 PM Changeset in webkit [283786] by Russell Epstein
  • 20 edits
    4 adds in branches/safari-612-branch

Cherry-pick r283114. rdar://problem/83954017

Make sure to reset presenting application pid in case of mediaserverd crash
https://bugs.webkit.org/show_bug.cgi?id=230822
<rdar://83474184>

Reviewed by Eric Carlson.

Source/WebCore:

Before the patch, we were asking MediaSessionHelper client to set the pid in case of mediaserverd crash.
Given GPUProcess is the only one receiving the notification now, only the GPUProcess client could do it,
which was not the case as MediaSessionManager in WebProcess was responsible to do so.

Instead of relying on MediaSessionHelper client to do the setup, we now let MediaSessionHelper do it on its own.
Everything will happen in GPUProcess which should also be faster.

We also make sure to reset the affine transform of m_sampleBufferDisplayLayer so that rotation is applied correctly
after mediaserverd crash.

Manually tested by crashing mediaserverd.
Test: fast/mediastream/video-rotation-gpu-process-crash.html (covers affine transform change).

  • platform/audio/ios/MediaSessionHelperIOS.h:
  • platform/audio/ios/MediaSessionHelperIOS.mm: (MediaSessionHelperiOS::providePresentingApplicationPID): (MediaSessionHelperiOS::mediaServerConnectionDied):
  • platform/audio/ios/MediaSessionManagerIOS.h:
  • platform/audio/ios/MediaSessionManagerIOS.mm:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample):

Source/WebKit:

Add API to crash GPUProcess from WebKitTestRunner.

Make sure to forward to MediaPlayer the fact that the layer failed.
This was handled for GPUProcess crash but not for other cases like mediaserverd crashes.

  • UIProcess/API/C/WKContext.cpp: (WKContextTerminateGPUProcess):
  • UIProcess/API/C/WKContextPrivate.h:
  • UIProcess/GPU/GPUProcessProxy.cpp: (WebKit::GPUProcessProxy::terminateForTesting):
  • UIProcess/GPU/GPUProcessProxy.h:
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp: (WebKit::SampleBufferDisplayLayer::setDidFail):

Tools:

Add test runner API to crash GPUProcess.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::terminateGPUProcess):
  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp: (WTR::TestController::terminateGPUProcess):
  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • fast/mediastream/video-rotation-gpu-process-crash-expected.txt: Added.
  • fast/mediastream/video-rotation-gpu-process-crash.html: Added.
  • platform/ios-simulator/fast/mediastream/video-rotation-gpu-process-crash-expected.png: Added.
  • platform/mac/fast/mediastream/video-rotation-gpu-process-crash-expected.png: Added.

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

7:02 PM Changeset in webkit [283785] by Russell Epstein
  • 1 edit
    5 deletes in branches/safari-612-branch/LayoutTests/imported/w3c

Cherry-pick r283093. rdar://problem/83955562

Remove canvas HitRegions tests
https://bugs.webkit.org/show_bug.cgi?id=230809
<rdar://problem/83553485>

Reviewed by Alan Bujtas.

These were removed upstream in
https://github.com/web-platform-tests/wpt/pull/30850.

  • web-platform-tests/html/canvas/element/hit-regions/addHitRegions-NotSupportedError-01-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/hit-regions/addHitRegions-NotSupportedError-01.html: Removed.
  • web-platform-tests/html/canvas/element/hit-regions/hitregions-members-exist-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/hit-regions/hitregions-members-exist.html: Removed.
  • web-platform-tests/html/canvas/element/hit-regions/w3c-import.log: Removed.
  • web-platform-tests/html/canvas/element/manual/hit-regions/addHitRegions-NotSupportedError-01-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/manual/hit-regions/addHitRegions-NotSupportedError-01.html: Removed.
  • web-platform-tests/html/canvas/element/manual/hit-regions/hitregions-members-exist-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/manual/hit-regions/hitregions-members-exist.html: Removed.
  • web-platform-tests/html/canvas/element/manual/hit-regions/w3c-import.log: Removed.

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

7:02 PM Changeset in webkit [283784] by Russell Epstein
  • 3 edits in branches/safari-612-branch/Source/ThirdParty/ANGLE

Cherry-pick r283014. rdar://problem/83954982

[WebGL2, Safari 15 - iOS15] Problems with drawElements in some conditions
https://bugs.webkit.org/show_bug.cgi?id=230107

Index buffer rewrite was dispatching too many threads.
Reviewed by Dean Jackson.

  • src/libANGLE/renderer/metal/ProvokingVertexHelper.mm: (rx::ProvokingVertexHelper::preconditionIndexBuffer):

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

7:02 PM Changeset in webkit [283783] by Russell Epstein
  • 3 edits
    8 adds in branches/safari-612-branch

Cherry-pick r282800. rdar://problem/83955324

ANGLE Metal: single-component swizzles do not compile
https://bugs.webkit.org/show_bug.cgi?id=230472
<rdar://problem/83310780>

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

Source/ThirdParty/ANGLE:

Fix metal compiler compile errors when using
single value swizles (glslvariable.r) in position where lvalues would
be needed. Use the variable instead of single element array
(copy-paste typo).

  • src/compiler/translator/TranslatorMetalDirect/ProgramPrelude.cpp:

LayoutTests:

Add a test for testing the swizzles as lvalues.

  • webgl/pending/conformance/glsl/misc/swizzle-as-lvalue-expected.txt: Added.
  • webgl/pending/conformance/glsl/misc/swizzle-as-lvalue.html: Added.
  • webgl/pending/resources/webgl_test_files/conformance/glsl/misc/swizzle-as-lvalue.html: Added.
  • webgl/pending/resources/webgl_test_files/resources/glsl-feature-tests.css: Added.

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

7:02 PM Changeset in webkit [283782] by Russell Epstein
  • 4 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r282754. rdar://problem/83953303

Fix race in RemoteRenderingBackend::allowsExitUnderMemoryPressure()
https://bugs.webkit.org/show_bug.cgi?id=229870
<rdar://82459484>

Reviewed by Simon Fraser.

RemoteRenderingBackend::allowsExitUnderMemoryPressure() gets called on the main thread while
RemoteResourceCache is always modified on a work queue. Introduce a std::atomic<bool> on
the RemoteResourceCache that RemoteRenderingBackend::allowsExitUnderMemoryPressure() can
safely query from the main thread.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp: (WebKit::RemoteRenderingBackend::updateRenderingResourceRequest): (WebKit::RemoteRenderingBackend::allowsExitUnderMemoryPressure const):
  • GPUProcess/graphics/RemoteResourceCache.cpp: (WebKit::RemoteResourceCache::RemoteResourceCache): (WebKit::RemoteResourceCache::cacheImageBuffer): (WebKit::RemoteResourceCache::cacheNativeImage): (WebKit::RemoteResourceCache::maybeRemoveResource): (WebKit::RemoteResourceCache::updateHasActiveDrawables):
  • GPUProcess/graphics/RemoteResourceCache.h: (WebKit::RemoteResourceCache::hasActiveDrawables const):

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

7:02 PM Changeset in webkit [283781] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebInspectorUI

Cherry-pick r282616. rdar://problem/83955758

Web Inspector: Regression(r279613) Audit result scope toggles are missing
https://bugs.webkit.org/show_bug.cgi?id=230322

Reviewed by Devin Rousso.

The sizing calculations modified in r279613 were erroneously applied to both the minimum space calculation as
well as the navigation item hiding calculations, despite hiding navigation items never being done for non-sidebar
navigation bars. The logic in WI.NavigationBar.prototype._calculateMinimumWidth remains unchanged, as we still
need sidebars to provide a minimum width that can accommodate all items in a flex layout in order to avoid
flowing navigation items on to another row. The navigation bar in a sidebar is unique in this respect, as other
navigation bars will gracefully hide components if they truly don't have enough space, but a sidebar relies on
getting a minimum size that can actually accommodate all items in a single row.

  • UserInterface/Views/NavigationBar.js: (WI.NavigationBar.prototype.layout.calculateVisibleItemWidth): (WI.NavigationBar.prototype.layout):

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

7:02 PM Changeset in webkit [283780] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WTF

Cherry-pick r282245. rdar://problem/83956084

Unreviewed, follow-up after r282007

Somehow, the wrong settings got enabled by the patch landed.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

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

7:02 PM Changeset in webkit [283779] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r282117. rdar://problem/83954734

Ensure ImageBuffers are destroyed on the main thread
https://bugs.webkit.org/show_bug.cgi?id=229906
<rdar://problem/82745925>

Reviewed by Ryosuke Niwa.

  • platform/graphics/ImageBuffer.h:

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

7:02 PM Changeset in webkit [283778] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WTF

Cherry-pick r282007. rdar://problem/83957048

[WK2] Turn on support for Cross-Origin-Opener-Policy / Cross-Origin-Embedder-Policy
https://bugs.webkit.org/show_bug.cgi?id=229818

Reviewed by Sam Weinig.

Turn on support for Cross-Origin-Opener-Policy / Cross-Origin-Embedder-Policy on WebKit2 now that
the feature is complete and all known issues have been fixed.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

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

7:02 PM Changeset in webkit [283777] by Russell Epstein
  • 13 edits
    6 deletes in branches/safari-612-branch

Cherry-pick r281779. rdar://problem/83957360

Migrate PrivateClickMeasurements from ResourceLoadStatistics database to new database
https://bugs.webkit.org/show_bug.cgi?id=229646

Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-30
Reviewed by Kate Cheney.

Source/WebKit:

In r281721 I moved the PCM database to be separate from the ResourceLoadStatistics database.
This patch extracts data from the old database and sends it to the new database.

I added some tests that create databases in each of the 3 historical schemas then verify that
data is successfully migrated to the new database.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: (WebKit::ResourceLoadStatisticsDatabaseStore::checkForMissingTablesInSchema): (WebKit::ResourceLoadStatisticsDatabaseStore::tableExists): (WebKit::ResourceLoadStatisticsDatabaseStore::deleteTable): (WebKit::ResourceLoadStatisticsDatabaseStore::migrateDataToPCMDatabaseIfNecessary): (WebKit::ResourceLoadStatisticsDatabaseStore::openAndUpdateSchemaIfNecessary): (WebKit::ResourceLoadStatisticsDatabaseStore::destroyStatements):
  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
  • NetworkProcess/DatabaseUtilities.cpp: (WebKit::DatabaseUtilities::buildPrivateClickMeasurementFromDatabase):
  • NetworkProcess/DatabaseUtilities.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp: (WebKit::PCM::Database::insertPrivateClickMeasurement): (WebKit::PCM::Database::findPrivateClickMeasurement): (WebKit::PCM::Database::allAttributedPrivateClickMeasurement): (WebKit::PCM::Database::getDomainStringFromDomainID const): (WebKit::PCM::Database::buildPrivateClickMeasurementFromDatabase): Deleted. (WebKit::PCM::Database::getDomainStringFromDomainID): Deleted.
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.h:
  • UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
  • UIProcess/API/Cocoa/WKWebViewTesting.mm: (-[WKWebView _dumpPrivateClickMeasurement:]):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm: (webViewWithResourceLoadStatisticsEnabledInNetworkProcess): (addValuesToTable): (earliestTimeToSend): (addAttributedPCMv1): (addUnattributedPCMv1): (addAttributedPCMv2): (addUnattributedPCMv2): (addAttributedPCMv3): (addUnattributedPCMv3): (dumpedPCM): (pollUntilPCMIsMigrated): (emptyObservationsDBPath): (cleanUp): (createAndPopulateObservedDomainTable): (setUp): (TEST):
  • TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutFraudPreventionDatabase.db: Removed.
  • TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutFraudPreventionDatabase.db-shm: Removed.
  • TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutFraudPreventionDatabase.db-wal: Removed.
  • TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutReportingColumns.db: Removed.
  • TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutReportingColumns.db-shm: Removed.
  • TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutReportingColumns.db-wal: Removed.

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

7:02 PM Changeset in webkit [283776] by Russell Epstein
  • 5 edits in branches/safari-612-branch

Cherry-pick r281723. rdar://problem/83957360

Add UIEventAttribution SPI that uses PrivateClickMeasurementAttributionEphemeral::Yes
https://bugs.webkit.org/show_bug.cgi?id=229623

Reviewed by John Wilander.

Source/WebKit:

This will be used by rdar://80806283.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/ios/WKWebViewIOS.mm: (-[WKWebView _setEphemeralUIEventAttribution:]): (-[WKWebView _ephemeralUIEventAttribution]):

Tools:

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

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

7:01 PM Changeset in webkit [283775] by Russell Epstein
  • 37 edits
    3 copies
    6 adds in branches/safari-612-branch

Cherry-pick r281721. rdar://problem/83957360

Separate PrivateClickMeasurement database from ResourceLoadStatistics database and add SPI to set its location
https://bugs.webkit.org/show_bug.cgi?id=229527

Reviewed by Kate Cheney.

Source/WebCore:

  • loader/PrivateClickMeasurement.cpp: (WebCore::PrivateClickMeasurement::SourceSecretToken::isolatedCopy const): (WebCore::PrivateClickMeasurement::EphemeralSourceNonce::isolatedCopy const): (WebCore::PrivateClickMeasurement::SourceUnlinkableToken::isolatedCopy const): (WebCore::PrivateClickMeasurement::isolatedCopy const):
  • loader/PrivateClickMeasurement.h:

Source/WebKit:

This will be used by rdar://80806283

In order to do this, I moved common code to DatabaseUtilities and moved the PCM logic from ResourceLoadStatisticsDatabaseStore
to a new class. It puts the data in a different file in the same directory unless SPI tells it to put it in a different directory.

The biggest functional change I needed to do was to make a PCMObservedDomains table in the new DB instead of an ObservedDomains table,
which contained more information than I needed. I need just an index and a list of domains.

Another slight implementation change is that instead of checking isEphemeral in WebResourceLoadStatisticsStore, I just pass an empty
String to the Store if it's ephemeral, which causes no DB to be created, which causes equivalent behavior.

I also moved the debug message broadcasting to PrivateClickMeasurementManager::attribute in order to make the Database object not
need to know about the NetworkProcess and not need to keep state of whether debug mode is enabled. Database::attributePrivateClickMeasurement
now returns a DebugInfo object and PrivateClickMeasurementManager::attribute checks whether debug mode is enabled and broadcasts the messages.

I added a few calls to PrivateClickMeasurement::isolatedCopy when moving an PrivateClickMeasurement object to another thread.

I added a CompletionHandler to clearPrivateClickMeasurement and clearPrivateClickMeasurementForRegistrableDomain
so that clearing website data doesn't say it's done until it's done.

An even smaller change is I added a "ForTesting" suffix on some function names of functions that are only used in tests.

The rest of this patch just moves code from one location to another.

I still need to implement migrating data from the old DB to the new DB. I'll do that in another patch soon.

  • CMakeLists.txt:
  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: (WebKit::expectedTableAndIndexQueries): (WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore): (WebKit::ResourceLoadStatisticsDatabaseStore::openITPDatabase): (WebKit::ResourceLoadStatisticsDatabaseStore::needsUpdatedSchema): (WebKit::insertDistinctValuesInTableStatement): (WebKit::ResourceLoadStatisticsDatabaseStore::openAndUpdateSchemaIfNecessary): (WebKit::ResourceLoadStatisticsDatabaseStore::interruptAllDatabases): (WebKit::ResourceLoadStatisticsDatabaseStore::createUniqueIndices): (WebKit::ResourceLoadStatisticsDatabaseStore::createSchema): (WebKit::ResourceLoadStatisticsDatabaseStore::destroyStatements): (WebKit::ResourceLoadStatisticsDatabaseStore::clearDatabaseContents): (WebKit::expectedUnattributedColumns): Deleted. (WebKit::expectedAttributedColumns): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::close): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::enableForeignKeys): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::needsUpdatedPrivateClickMeasurementSchema): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::addMissingColumnsToTable): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::addMissingColumnsIfNecessary): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::renameColumnInTable): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::renameColumnsIfNecessary): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::scopedStatement const): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::interrupt): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::buildPrivateClickMeasurementFromDatabase): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::findPrivateClickMeasurement): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::insertPrivateClickMeasurement): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::markAllUnattributedPrivateClickMeasurementAsExpiredForTesting): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::removeUnattributed): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::attributePrivateClickMeasurement): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::allAttributedPrivateClickMeasurement): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::clearPrivateClickMeasurement): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::clearExpiredPrivateClickMeasurement): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::attributionToString): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::privateClickMeasurementToString): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::earliestTimesToSend): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::markReportAsSentToSource): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::markReportAsSentToDestination): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::clearSentAttribution): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::markAttributedPrivateClickMeasurementsAsExpiredForTesting): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::beginTransactionIfNecessary): Deleted.
  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: (WebKit::pcmStoreDirectory): (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore): (WebKit::WebResourceLoadStatisticsStore::create): (WebKit::WebResourceLoadStatisticsStore::didDestroyNetworkSession): (WebKit::WebResourceLoadStatisticsStore::suspend): (WebKit::WebResourceLoadStatisticsStore::insertPrivateClickMeasurement): Deleted. (WebKit::WebResourceLoadStatisticsStore::markAllUnattributedPrivateClickMeasurementAsExpiredForTesting): Deleted. (WebKit::WebResourceLoadStatisticsStore::attributePrivateClickMeasurement): Deleted. (WebKit::WebResourceLoadStatisticsStore::allAttributedPrivateClickMeasurement): Deleted. (WebKit::WebResourceLoadStatisticsStore::clearPrivateClickMeasurement): Deleted. (WebKit::WebResourceLoadStatisticsStore::clearPrivateClickMeasurementForRegistrableDomain): Deleted. (WebKit::WebResourceLoadStatisticsStore::clearExpiredPrivateClickMeasurement): Deleted. (WebKit::WebResourceLoadStatisticsStore::privateClickMeasurementToString): Deleted. (WebKit::WebResourceLoadStatisticsStore::clearSentAttribution): Deleted. (WebKit::WebResourceLoadStatisticsStore::markAttributedPrivateClickMeasurementsAsExpiredForTesting): Deleted.
  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
  • NetworkProcess/DatabaseUtilities.cpp: Added. (WebKit::DatabaseUtilities::DatabaseUtilities): (WebKit::DatabaseUtilities::~DatabaseUtilities): (WebKit::DatabaseUtilities::scopedStatement const): (WebKit::DatabaseUtilities::beginTransactionIfNecessary): (WebKit::DatabaseUtilities::openDatabaseAndCreateSchemaIfNecessary): (WebKit::DatabaseUtilities::enableForeignKeys): (WebKit::DatabaseUtilities::close): (WebKit::DatabaseUtilities::interrupt):
  • NetworkProcess/DatabaseUtilities.h: Copied from Source/WebKit/NetworkProcess/webrtc/NetworkRTCResolver.h.
  • NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::deleteWebsiteData): (WebKit::NetworkProcess::deleteWebsiteDataForOrigins): (WebKit::NetworkProcess::prepareToSuspend): (WebKit::NetworkProcess::resume): (WebKit::NetworkProcess::clearPrivateClickMeasurement):
  • NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::willSendRedirectedRequest): (WebKit::NetworkResourceLoader::continueWillSendRedirectedRequest):
  • NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::NetworkSession): (WebKit::NetworkSession::setResourceLoadStatisticsEnabled): (WebKit::NetworkSession::recreateResourceLoadStatisticStore): (WebKit::NetworkSession::dumpPrivateClickMeasurement): (WebKit::NetworkSession::clearPrivateClickMeasurement): (WebKit::NetworkSession::clearPrivateClickMeasurementForRegistrableDomain):
  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp: Added. (WebKit::PCM::Database::Database): (WebKit::PCM::Database::~Database): (WebKit::PCM::Database::interruptAllDatabases): (WebKit::PCM::Database::createSchema): (WebKit::PCM::Database::insertPrivateClickMeasurement): (WebKit::PCM::Database::markAllUnattributedPrivateClickMeasurementAsExpiredForTesting): (WebKit::PCM::Database::findPrivateClickMeasurement): (WebKit::PCM::Database::attributePrivateClickMeasurement): (WebKit::PCM::Database::buildPrivateClickMeasurementFromDatabase): (WebKit::PCM::Database::removeUnattributed): (WebKit::PCM::Database::allAttributedPrivateClickMeasurement): (WebKit::PCM::Database::privateClickMeasurementToStringForTesting): (WebKit::PCM::Database::attributionToStringForTesting): (WebKit::PCM::Database::markAttributedPrivateClickMeasurementsAsExpiredForTesting): (WebKit::PCM::Database::clearPrivateClickMeasurement): (WebKit::PCM::Database::clearExpiredPrivateClickMeasurement): (WebKit::PCM::Database::clearSentAttribution): (WebKit::PCM::Database::markReportAsSentToDestination): (WebKit::PCM::Database::markReportAsSentToSource): (WebKit::PCM::Database::earliestTimesToSend): (WebKit::PCM::Database::domainID): (WebKit::PCM::Database::getDomainStringFromDomainID): (WebKit::PCM::Database::ensureDomainID): (WebKit::PCM::Database::destroyStatements):
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.h: Added.
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDebugInfo.cpp: Copied from Source/WebKit/NetworkProcess/webrtc/NetworkRTCResolver.h. (WebKit::PCM::DebugInfo::isolatedCopy const): (WebKit::PCM::DebugInfo::Message::isolatedCopy const):
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDebugInfo.h: Copied from Source/WebKit/NetworkProcess/webrtc/NetworkRTCResolver.h.
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementStore.cpp: Added. (WebKit::PCM::sharedWorkQueue): (WebKit::PCM::Store::prepareForProcessToSuspend): (WebKit::PCM::Store::processDidResume): (WebKit::PCM::Store::Store): (WebKit::PCM::Store::postTask): (WebKit::PCM::Store::postTaskReply): (WebKit::PCM::Store::insertPrivateClickMeasurement): (WebKit::PCM::Store::markAllUnattributedPrivateClickMeasurementAsExpiredForTesting): (WebKit::PCM::Store::attributePrivateClickMeasurement): (WebKit::PCM::Store::privateClickMeasurementToStringForTesting): (WebKit::PCM::Store::allAttributedPrivateClickMeasurement): (WebKit::PCM::Store::markAttributedPrivateClickMeasurementsAsExpiredForTesting): (WebKit::PCM::Store::clearPrivateClickMeasurement): (WebKit::PCM::Store::clearPrivateClickMeasurementForRegistrableDomain): (WebKit::PCM::Store::clearExpiredPrivateClickMeasurement): (WebKit::PCM::Store::clearSentAttribution): (WebKit::PCM::Store::close):
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementStore.h: Added. (WebKit::PCM::Store::create):
  • NetworkProcess/PrivateClickMeasurementManager.cpp: (WebKit::PrivateClickMeasurementManager::insertPrivateClickMeasurement): (WebKit::PrivateClickMeasurementManager::attribute): (WebKit::PrivateClickMeasurementManager::clearSentAttribution): (WebKit::PrivateClickMeasurementManager::firePendingAttributionRequests): (WebKit::PrivateClickMeasurementManager::clear): (WebKit::PrivateClickMeasurementManager::clearForRegistrableDomain): (WebKit::PrivateClickMeasurementManager::clearExpired): (WebKit::PrivateClickMeasurementManager::toStringForTesting const): (WebKit::PrivateClickMeasurementManager::markAllUnattributedAsExpiredForTesting): (WebKit::PrivateClickMeasurementManager::markAttributedPrivateClickMeasurementsAsExpiredForTesting): (WebKit::PrivateClickMeasurementManager::toString const): Deleted.
  • NetworkProcess/PrivateClickMeasurementManager.h:
  • NetworkProcess/PrivateClickMeasurementNetworkLoader.cpp: (WebKit::PrivateClickMeasurementNetworkLoader::~PrivateClickMeasurementNetworkLoader): (WebKit::PrivateClickMeasurementNetworkLoader::cancel): (WebKit::PrivateClickMeasurementNetworkLoader::willSendRedirectedRequest):
  • NetworkProcess/PrivateClickMeasurementNetworkLoader.h:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
  • NetworkProcess/webrtc/NetworkRTCResolver.h:
  • NetworkProcess/webrtc/NetworkRTCResolverCocoa.cpp: (WebKit::resolvedName):
  • Shared/ResourceLoadStatisticsParameters.h: (WebKit::ResourceLoadStatisticsParameters::encode const): (WebKit::ResourceLoadStatisticsParameters::decode):
  • Sources.txt:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm: (+[WKWebsiteDataStore _setNetworkProcessSuspensionAllowedForTesting:]): (+[WKWebsiteDataStore _preventNetworkProcessSuspensionForTesting]): Deleted.
  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm: (-[_WKWebsiteDataStoreConfiguration privateClickMeasurementStorageDirectory]): (-[_WKWebsiteDataStoreConfiguration setPrivateClickMeasurementStorageDirectory:]):
  • UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::setSuspensionAllowedForTesting): (WebKit::NetworkProcessProxy::sendPrepareToSuspend): (WebKit::NetworkProcessProxy::preventSuspensionForTesting): Deleted.
  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary): (WebKit::WebsiteDataStore::parameters):
  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: (WebKit::WebsiteDataStoreConfiguration::copy const):
  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h: (WebKit::WebsiteDataStoreConfiguration::privateClickMeasurementStorageDirectory const): (WebKit::WebsiteDataStoreConfiguration::setPrivateClickMeasurementStorageDirectory):
  • WebKit.xcodeproj/project.pbxproj:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::runBasicEventAttributionTest): (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm: (TEST):

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

7:01 PM Changeset in webkit [283774] by Russell Epstein
  • 4 edits in branches/safari-612-branch

Cherry-pick r281699. rdar://problem/83953557

REGRESSION (r281516): imported/w3c/web-platform-tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html is failing
https://bugs.webkit.org/show_bug.cgi?id=229501
<rdar://problem/82346152>

Reviewed by Darin Adler.

Tools:

In case of a COOP process-swap, the old process gets a didFailProvisionalLoadWithErrorForFrame delegate call. We want to ignore
this call in WKTR's injected bundle since it causes the test to dump its output too eagerly, before the test has had a chance
to run in the new process.

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): (WTR::InjectedBundlePage::didCommitLoadForFrame):
  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:

LayoutTests:

Unskip tests now that they should no longer be flaky.

  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:

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

7:01 PM Changeset in webkit [283773] by Russell Epstein
  • 3 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r281661. rdar://problem/83955525

Manually release SharedBitmap if CGBitmapContextCreateWithData fails and doesn't do it
https://bugs.webkit.org/show_bug.cgi?id=229428
<rdar://problem/82264138>

Reviewed by Darin Adler.

  • Shared/ShareableBitmap.h:
  • Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::createGraphicsContext): (WebKit::ShareableBitmap::releaseBitmapContextData):

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

7:01 PM Changeset in webkit [283772] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r281495. rdar://problem/83954155

ThreadSanitizer: data race in WTF::StringImpl::deref() for WebCore::FormDataElement::EncodedFileData::filename
https://bugs.webkit.org/show_bug.cgi?id=229432

Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-24
Reviewed by Darin Adler.

Call the FormDataElement destructor on the main thread in advanceCurrentStream.

  • platform/network/cf/FormDataStreamCFNet.cpp: (WebCore::advanceCurrentStream): (WebCore::createHTTPBodyCFReadStream):

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

7:01 PM Changeset in webkit [283771] by Russell Epstein
  • 3 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r281488. rdar://problem/83952981

Avoid unnecessary CGColor creation in Gradient::createCGGradient for common sRGB-only cases
https://bugs.webkit.org/show_bug.cgi?id=229422
<rdar://problem/82261384>

Reviewed by Sam Weinig.

  • platform/graphics/Gradient.h:
  • platform/graphics/cg/GradientCG.cpp: (WebCore::Gradient::hasOnlyBoundedSRGBColorStops const): (WebCore::Gradient::createCGGradient):

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

7:01 PM Changeset in webkit [283770] by Russell Epstein
  • 25 edits
    2 adds in branches/safari-612-branch

Cherry-pick r281480. rdar://problem/83957360

PCM: Support ephemeral measurement with non-persistent WebCore::PrivateClickMeasurement
https://bugs.webkit.org/show_bug.cgi?id=228984
<rdar://problem/81778213>

Reviewed by Kate Cheney.

This patch adds support for ephemeral measurement with non-persistent
WebCore::PrivateClickMeasurement for direct response advertising.
Such advertising means there is only one pending click, held in memory,
and only stored right before the triggering event causes attribution
reports to be scheduled.

Source/WebCore:

Test: http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-ephemeral.html

  • loader/PrivateClickMeasurement.h: (WebCore::PrivateClickMeasurement::SourceSite::operator!= const): (WebCore::PrivateClickMeasurement::AttributionDestinationSite::operator!= const): (WebCore::PrivateClickMeasurement::PrivateClickMeasurement):

Now takes an optional PrivateClickMeasurementAttributionEphemeral
parameter, set to PrivateClickMeasurementAttributionEphemeral::No
by default.

(WebCore::PrivateClickMeasurement::isEphemeral const):
(WebCore::PrivateClickMeasurement::setEphemeral):
(WebCore::PrivateClickMeasurement::encode const):
(WebCore::PrivateClickMeasurement::decode):

Source/WebKit:

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: (WebKit::WebResourceLoadStatisticsStore::attributePrivateClickMeasurement):

Now takes an optional ephemeral PrivateClickMeasurement parameter
and stores it right before moving on with attribution.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
  • NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::setPrivateClickMeasurementEphemeralMeasurementForTesting):

Test infrastructure.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::setPrivateClickMeasurementEphemeralMeasurementForTesting):

Test infrastructure.

  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/PrivateClickMeasurementManager.cpp: (WebKit::PrivateClickMeasurementManager::storeUnattributed): (WebKit::PrivateClickMeasurementManager::getSignedUnlinkableToken): (WebKit::PrivateClickMeasurementManager::insertPrivateClickMeasurement):

New convenience function. Only stores in memory if the
PrivateClickMeasurement parameter is marked as ephemeral.

(WebKit::PrivateClickMeasurementManager::attribute):

Checks that the triggering event matches the ephemeral measurement if
it exists, and if so, forwards it.

(WebKit::PrivateClickMeasurementManager::clear):

Now clears the ephemeral state too.

  • NetworkProcess/PrivateClickMeasurementManager.h: (WebKit::PrivateClickMeasurementManager::setEphemeralMeasurementForTesting):

Test infrastructure.

  • UIProcess/API/C/WKPage.cpp: (WKPageSetPrivateClickMeasurementEphemeralMeasurementForTesting):

Test infrastructure.

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setPrivateClickMeasurementEphemeralMeasurementForTesting):

Test infrastructure.

  • UIProcess/WebPageProxy.h:

Tools:

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setPrivateClickMeasurementEphemeralMeasurementForTesting):
  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp: (WTR::TestController::setPrivateClickMeasurementEphemeralMeasurementForTesting):
  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-ephemeral-expected.txt: Added.
  • http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-ephemeral.html: Added.
  • http/tests/privateClickMeasurement/resources/util.js: (tearDownAndFinish):

Resets the new testRunner.setPrivateClickMeasurementEphemeralMeasurementForTesting().

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

7:01 PM Changeset in webkit [283769] by Russell Epstein
  • 28 edits
    6 adds in branches/safari-612-branch

Cherry-pick r281470. rdar://problem/83957311

LayoutTests/imported/w3c:
Preserve color space when getting current color in DisplayListDrawGlyphsRecorder.
https://bugs.webkit.org/show_bug.cgi?id=229024
<rdar://problem/81828477>

Reviewed by Sam Weinig.

Add tests for calling fillText() and strokeText() with a display-p3
color for fillStyle, strokeStyle, and shadowColor, on a display-p3 canvas.

  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText-expected.txt: Added.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.html: Added.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.shadow-expected.txt: Added.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.shadow.html: Added.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.strokeText-expected.txt: Added.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.strokeText.html: Added.
  • web-platform-tests/html/canvas/tools/yaml/element/color_space.yaml:

Source/WebCore:
Preserve color space when getting current color in DisplayList::DrawGlyphsRecorder
https://bugs.webkit.org/show_bug.cgi?id=229024
<rdar://problem/81828477>

Reviewed by Sam Weinig.

When GPU canvas is enabled, DrawGlyphsRecorder records the text fill,
stroke, and shadow colors by getting them from the context using
CGGStateGetFillColor etc. This is done so that color glyphs have each
part painted in the right color. But the current conversion from
CGColor to WebCore::Color lossily converts to sRGB. So we need to get
the color space and color components from the CGColor and preserve them.

The existing Color(CGColorRef) constructor is replaced by two
constructor functions, createAndPreserveColorSpace and
roundAndClampToSRGBALossy, so the conversion behavior is clear at call
sites. createAndPreserveColorSpace will match the CGColor's color
space to one of the predefined spaces that WebCore::Color can
represent. If it's some other color space, we convert to XYZ (on
platforms where that's available), since that will result in the least
loss, or to sRGB (on platforms where XYZ is not available).

CGColorSpaceEqualToColorSpace, which is used when determining the
CGColor's color space, is not very expensive, but it will do more than a
pointer comparison in case we pass in two CGColorSpaceRefs that are
equivalent but not the same pointer value. Since our new
colorSpaceForCGColorSpace function will be used with CGColors that have
been set WebCore during canvas drawing, we will get back the same
pointers that we have cached in sRGBColorSpaceRef(),
displayP3ColorSpaceRef(), etc. If calling CGColorSpaceEqualToColorSpace
on all our supported color spaces turns out to be too expensive, we
could start by doing a pointer comparison on each before calling
CGColorSpaceEqualToColorSpace.

The way colorSpaceForCGColorSpace is written we could end up
instantiating all of our supported color spaces, if an author used an
XYZ color when drawing text (the last color profile we check). We
could try harder to avoid doing this if it's important.

Tests: imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.html

imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.shadow.html
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.strokeText.html

  • page/CaptionUserPreferencesMediaAF.cpp: (WebCore::CaptionUserPreferencesMediaAF::captionsWindowCSS const): (WebCore::CaptionUserPreferencesMediaAF::captionsBackgroundCSS const): (WebCore::CaptionUserPreferencesMediaAF::captionsTextColor const):
  • platform/graphics/Color.h: (WebCore::Color::createAndPreserveColorSpace): (WebCore::Color::createAndLosslesslyConvertToSupportedColorSpace):
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: (WebCore::PlatformCALayerCocoa::backgroundColor const):
  • platform/graphics/ca/cocoa/WebTiledBackingLayer.mm: (-[WebTiledBackingLayer setBorderColor:]):
  • platform/graphics/ca/win/PlatformCALayerWin.cpp: (PlatformCALayerWin::backgroundColor const): (printColor):
  • platform/graphics/ca/win/PlatformCALayerWinInternal.cpp: (PlatformCALayerWinInternal::drawRepaintCounters):
  • platform/graphics/cg/ColorCG.cpp: (WebCore::roundAndClampToSRGBALossy): (WebCore::Color::createAndLosslesslyConvertToSupportedColorSpace): (WebCore::Color::createAndPreserveColorSpace): (WebCore::platformConvertColorComponents):
  • platform/graphics/cg/ColorSpaceCG.cpp: (WebCore::colorSpaceForCGColorSpace):
  • platform/graphics/cg/ColorSpaceCG.h:
  • platform/graphics/displaylists/DisplayListDrawGlyphsRecorderCoreText.cpp: (WebCore::DisplayList::DrawGlyphsRecorder::updateShadow): (WebCore::DisplayList::DrawGlyphsRecorder::recordDrawGlyphs):
  • platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp: (WebCore::MediaPlayerPrivateFullscreenWindow::setRootChildLayer):
  • platform/ios/PlatformPasteboardIOS.mm: (WebCore::PlatformPasteboard::color):
  • rendering/RenderThemeIOS.mm: (WebCore::systemColorFromCSSValueSystemColorInformation):

Source/WebKit:
Preserve color space when getting current color in DisplayList::DrawGlyphsRecorder
https://bugs.webkit.org/show_bug.cgi?id=229024
<rdar://problem/81828477>

Reviewed by Sam Weinig.

Change existing CGColor -> WebCore::Color conversions to be explicit
about lossily converting to sRGB.

  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView setUnderPageBackgroundColor:]):
  • UIProcess/API/Cocoa/_WKApplicationManifest.mm: (-[_WKApplicationManifest initWithCoder:]):
  • UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::platformUnderPageBackgroundColor const):
  • WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::PDFPlugin):

Tools:
Preserve color space when getting current color in DisplayList::DrawGlyphsRecorder
https://bugs.webkit.org/show_bug.cgi?id=229024
<rdar://problem/81828477>

Reviewed by Sam Weinig.

Change existing CGColor -> WebCore::Color conversions to be explicit
about lossily converting to sRGB.

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

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

7:01 PM Changeset in webkit [283768] by Russell Epstein
  • 6 edits
    2 adds in branches/safari-612-branch

Cherry-pick r281463. rdar://problem/83955719

Pre-formatted content gets distorted when attempting to select content
https://bugs.webkit.org/show_bug.cgi?id=228655
<rdar://81288187>

Reviewed by Simon Fraser.

Source/WebCore:

https://drafts.csswg.org/css-text/#overflow-wrap-property

"This property specifies whether the UA may break at otherwise disallowed points within
a line to prevent overflow, when an otherwise-unbreakable string is too long to fit within the line box.
It only has an effect when white-space allows wrapping."

(also see https://trac.webkit.org/changeset/10095/webkit where the wrapping behavior was introduced)

Test: fast/text/no-wrap-in-pre-with-word-wrap.html

  • rendering/line/BreakingContext.h: (WebCore::BreakingContext::handleText):

LayoutTests:

  • fast/text/no-wrap-in-pre-with-word-wrap-expected.html: Added.
  • fast/text/no-wrap-in-pre-with-word-wrap.html: Added.

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

7:01 PM Changeset in webkit [283767] by Russell Epstein
  • 11 edits in branches/safari-612-branch

Cherry-pick r281349. rdar://problem/83957360

Make UIEventAttribution tests less platform dependent
https://bugs.webkit.org/show_bug.cgi?id=229323

Reviewed by John Wilander.

Source/WebKit:

This allows me to run the UIEventAttribution tests on macOS.
It also makes them not time out, which they were doing since r277447.
To accomplish this, I added more test SPI to prevent the network process
suspension message, which was causing the test to time out on the iOS simulator.

  • UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
  • UIProcess/API/Cocoa/WKWebViewTesting.mm: (-[WKWebView _addEventAttributionWithSourceID:destinationURL:sourceDescription:purchaser:reportEndpoint:optionalNonce:]):
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm: (+[WKWebsiteDataStore _preventNetworkProcessSuspensionForTesting]):
  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
  • UIProcess/API/ios/WKWebViewTestingIOS.mm: (-[WKWebView _setUIEventAttributionForTesting:withNonce:]): Deleted.
  • UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::preventSuspensionForTesting): (WebKit::NetworkProcessProxy::sendPrepareToSuspend):
  • UIProcess/Network/NetworkProcessProxy.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::exampleURL): (TestWebKitAPI::runBasicEventAttributionTest): (TestWebKitAPI::TEST):

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

6:43 PM Changeset in webkit [283766] by mmaxfield@apple.com
  • 3 edits in trunk/Source/WebKit

[GPU Process] Unique RenderingResourceIdentifiers Part 2: Unroll PendingWakeupInformation::arguments
https://bugs.webkit.org/show_bug.cgi?id=231403

Reviewed by Wenson Hsieh.

We're in the process of replacing RenderingResourceIdentifiers in the GPU process with
QualifiedRenderingResourceIdentifier. Unfortunately, PendingWakeupInformation holds
a GPUProcessWakeupMessageArguments which itself holds a RenderingResourceIdentifiers.
PendingWakeupInformation is part of the GPU process, so it needs to migrate to
QualifiedRenderingResourceIdentifier, but GPUProcessWakeupMessageArguments is the type
of the arguments to the WakeUpAndApplyDisplayList message, so it can't hold a
QualifiedRenderingResourceIdentifier.

So, the solution is to unroll PendingWakeupInformation::arguments, and hoist its fields
directly into the PendingWakeupInformation. That way, PendingWakeupInformation can be
updated to use QualifiedRenderingResourceIdentifier, without affecting
the WakeUpAndApplyDisplayList message.

No new tests because there is no behavior change.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::createImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::nextDestinationImageBufferAfterApplyingDisplayLists):
(WebKit::RemoteRenderingBackend::wakeUpAndApplyDisplayList):
(WebKit::RemoteRenderingBackend::setNextItemBufferToRead):
(WebKit::RemoteRenderingBackend::cacheNativeImageWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::cacheFontWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::finalizeRenderingUpdate):
(WebKit::RemoteRenderingBackend::didCreateSharedDisplayListHandleWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::resumeFromPendingWakeupInformation):

  • GPUProcess/graphics/RemoteRenderingBackend.h:

(WebKit::RemoteRenderingBackend::PendingWakeupInformation::arguments const):
(WebKit::RemoteRenderingBackend::PendingWakeupInformation::shouldPerformWakeup const):

6:34 PM Changeset in webkit [283765] by Alexey Shvayka
  • 13 edits in trunk

highWaterMark should be a readonly WebIDL attribute of queuing strategies
https://bugs.webkit.org/show_bug.cgi?id=231355

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/streams/idlharness.any-expected.txt:
  • web-platform-tests/streams/idlharness.any.worker-expected.txt:
  • web-platform-tests/streams/queuing-strategies.any-expected.txt:
  • web-platform-tests/streams/queuing-strategies.any.worker-expected.txt:

Source/JavaScriptCore:

Removes now unused @Object.@defineProperty private method.
In most cases, property descriptor merging is unnecessary and @putDirect should be used instead.

  • runtime/ObjectConstructor.cpp:

(JSC::ObjectConstructor::finishCreation):

Source/WebCore:

This patch:

  1. Makes highWaterMark a readonly WebIDL attribute, backed by private name, as per current spec [1], instead of an strategy's own property that was required before Streams Standard was moved to WebIDL. Ensures a TypeError is thrown for incorrect |this| value.
  1. Aligns extraction of highWaterMark for ByteLengthQueuingStrategy constructor with the spec [2]: throws a TypeError with user-friendly message for non-object argument instead of the obscure "undefined is not an object" and coerces highWaterMark member, if present, to a number; otherwise, throws a TypeError.
  1. Increases "length" of queuing strategy constructors to 1 as init argument is required.

Aligns WebKit with Blink and Gecko.

[1] https://streams.spec.whatwg.org/#blqs-internal-slots (also see note)
[2] https://heycam.github.io/webidl/#es-dictionary

Tests: imported/w3c/web-platform-tests/streams/idlharness.any.js

imported/w3c/web-platform-tests/streams/queuing-strategies.any.js

  • Modules/streams/ByteLengthQueuingStrategy.idl:
  • Modules/streams/ByteLengthQueuingStrategy.js:

(getter.highWaterMark):
(initializeByteLengthQueuingStrategy):

  • Modules/streams/CountQueuingStrategy.idl:
  • Modules/streams/CountQueuingStrategy.js:

(getter.highWaterMark):
(initializeCountQueuingStrategy):

  • Modules/streams/StreamInternals.js:

(extractHighWaterMarkFromQueuingStrategyInit):

5:45 PM Changeset in webkit [283764] by Russell Epstein
  • 1 copy in tags/Safari-612.2.9.1.6

Tag Safari-612.2.9.1.6.

5:39 PM Changeset in webkit [283763] by Russell Epstein
  • 1 copy in tags/Safari-612.2.9.0.6

Tag Safari-612.2.9.0.6.

5:34 PM Changeset in webkit [283762] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebCore

De-virtualize two overrides of GraphicsContext::drawImage
https://bugs.webkit.org/show_bug.cgi?id=231399

Reviewed by Devin Rousso.

  • platform/graphics/GraphicsContext.h:

(WebCore::GraphicsContext::drawImage):

  • platform/graphics/NullGraphicsContext.h:

Devin correctly noted in https://bugs.webkit.org/show_bug.cgi?id=231385#c5
that it doesn't make sense for the two variants of drawImage() that
just call the version with more arguments to be virtual, and indeed, they
are not overridden. Devirtualize them, and remove the NullGraphicsContext overrides.

5:32 PM Changeset in webkit [283761] by Simon Fraser
  • 9 edits in trunk/Source

Minor refactoring to use ScrollUpdate in more places
https://bugs.webkit.org/show_bug.cgi?id=231395

Reviewed by Myles C. Maxfield.
Source/WebCore:

ScrollUpdate is used to communicate changes from the scrolling tree back to FrameView etc.

Future patches will extend ScrollUpdate a little. Move to ScrollingCoordinatorTypes.h, and
pass ScrollUpdate to some more AsyncScrollingCoordinator functions, only unpacking at the
last minute.

Move ScrollType to the end of the updateScrollPositionAfterAsyncScroll() argument list since
it's not part of ScrollUpdate.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::synchronizeStateFromScrollingTree):
(WebCore::AsyncScrollingCoordinator::applyPendingScrollUpdates):
(WebCore::AsyncScrollingCoordinator::applyScrollUpdate):
(WebCore::AsyncScrollingCoordinator::applyScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):

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

(WebCore::ScrollUpdate::canMerge const):
(WebCore::ScrollUpdate::merge):

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::takePendingScrollUpdates):

  • page/scrolling/ScrollingTree.h:

(WebCore::ScrollingTree::ScrollUpdate::canMerge const): Deleted.
(WebCore::ScrollingTree::ScrollUpdate::merge): Deleted.

  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):

Source/WebKit:

  • WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm:

(WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):

5:22 PM Changeset in webkit [283760] by Russell Epstein
  • 1 copy in tags/Safari-611.4.2.0.3

Tag Safari-611.4.2.0.3.

5:09 PM Changeset in webkit [283759] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitscmpy] Library should own contributors.json loading
https://bugs.webkit.org/show_bug.cgi?id=231310
<rdar://problem/83941327>

Unreviewed follow-up fix.

  • Scripts/git-webkit: Fix imports.
4:45 PM Changeset in webkit [283758] by Jonathan Bedard
  • 9 edits in trunk/Tools

[webkitscmpy] Library should own contributors.json loading
https://bugs.webkit.org/show_bug.cgi?id=231310
<rdar://problem/83941327>

Reviewed by Dewei Zhu.

  • Scripts/git-webkit: Do not load contributors from webkitpy.
  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py:

(Contributor.Encoder.default): Save contributor status to json.
(Contributor.Mapping.load): contributors.json is a list, may include
status, aliases and nicks.
(Contributor.Mapping.save): Save contributors to json file.
(Contributor.Mapping.iter): Iterate through all contributors.
(Contributor.init): Add status to contributor.

  • Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:

(Scm.init): Attempt to load contributors.

  • Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:

(Svn.init): Set root_path before constructing base class.

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

(ScmBase.init): Only reset path if it's not already defined.

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

(TestContributor.test_iteration):

4:43 PM Changeset in webkit [283757] by Aditya Keerthi
  • 27 edits
    2 adds in trunk/Source/WebCore

Introduce ShadowPseudoIds to store all UA shadow root pseudo-element ids
https://bugs.webkit.org/show_bug.cgi?id=231383

Reviewed by Wenson Hsieh.

Organize all UA shadow root pseudo-element ids in ShadowPseudoIds.

This refactoring also enables detection of a specific UA shadow root
element (for example: answering the question "is this element a caps
lock indicator?"). The implementation of 'appearance: auto' relies on
being able to to answer that question.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/BaseDateAndTimeInputType.cpp:

(WebCore::BaseDateAndTimeInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/ColorInputType.cpp:

(WebCore::ColorInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/FileInputType.cpp:

(WebCore::UploadButtonElement::createInternal):

  • html/HTMLKeygenElement.cpp:
  • html/HTMLMeterElement.cpp:

(WebCore::setValueClass):
(WebCore::HTMLMeterElement::didAddUserAgentShadowRoot):

  • html/RangeInputType.cpp:

(WebCore::RangeInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/SearchInputType.cpp:

(WebCore::updateResultButtonPseudoType):

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):
(WebCore::TextFieldInputType::createDataListDropdownIndicator):
(WebCore::autoFillButtonTypeToAutoFillButtonPseudoClassName):
(WebCore::isAutoFillButtonTypeChanged):
(WebCore::TextFieldInputType::createContainer):

  • html/ValidationMessage.cpp:

(WebCore::ValidationMessage::buildBubbleTree):

  • html/shadow/DateTimeEditElement.cpp:

(WebCore::DateTimeEditBuilder::visitLiteral):
(WebCore::DateTimeEditElement::create):
(WebCore::DateTimeEditElement::layout):

  • html/shadow/DetailsMarkerControl.cpp:

(WebCore::DetailsMarkerControl::create):

  • html/shadow/MediaControlTextTrackContainerElement.cpp:

(WebCore::MediaControlTextTrackContainerElement::create):

  • html/shadow/ProgressShadowElement.cpp:

(WebCore::ProgressInnerElement::create):
(WebCore::ProgressBarElement::create):
(WebCore::ProgressValueElement::create):

  • html/shadow/ShadowPseudoIds.cpp: Added.

(WebCore::ShadowPseudoIds::cue):
(WebCore::ShadowPseudoIds::fileSelectorButton):
(WebCore::ShadowPseudoIds::placeholder):
(WebCore::ShadowPseudoIds::webkitContactsAutoFillButton):
(WebCore::ShadowPseudoIds::webkitCredentialsAutoFillButton):
(WebCore::ShadowPseudoIds::webkitCreditCardAutoFillButton):
(WebCore::ShadowPseudoIds::webkitStrongPasswordAutoFillButton):
(WebCore::ShadowPseudoIds::webkitCapsLockIndicator):
(WebCore::ShadowPseudoIds::webkitColorSwatch):
(WebCore::ShadowPseudoIds::webkitColorSwatchWrapper):
(WebCore::ShadowPseudoIds::webkitDatetimeEdit):
(WebCore::ShadowPseudoIds::webkitDatetimeEditText):
(WebCore::ShadowPseudoIds::webkitDatetimeEditFieldsWrapper):
(WebCore::ShadowPseudoIds::webkitDateAndTimeValue):
(WebCore::ShadowPseudoIds::webkitDetailsMarker):
(WebCore::ShadowPseudoIds::webkitGenericCueRoot):
(WebCore::ShadowPseudoIds::webkitInnerSpinButton):
(WebCore::ShadowPseudoIds::webkitKeygenSelect):
(WebCore::ShadowPseudoIds::webkitListButton):
(WebCore::ShadowPseudoIds::webkitMediaSliderThumb):
(WebCore::ShadowPseudoIds::webkitMediaSliderContainer):
(WebCore::ShadowPseudoIds::webkitMediaTextTrackContainer):
(WebCore::ShadowPseudoIds::webkitMediaTextTrackDisplay):
(WebCore::ShadowPseudoIds::webkitMediaTextTrackDisplayBackdrop):
(WebCore::ShadowPseudoIds::webkitMediaTextTrackRegion):
(WebCore::ShadowPseudoIds::webkitMediaTextTrackRegionContainer):
(WebCore::ShadowPseudoIds::webkitMeterBar):
(WebCore::ShadowPseudoIds::webkitMeterInnerElement):
(WebCore::ShadowPseudoIds::webkitMeterOptimumValue):
(WebCore::ShadowPseudoIds::webkitMeterSuboptimumValue):
(WebCore::ShadowPseudoIds::webkitMeterEvenLessGoodValue):
(WebCore::ShadowPseudoIds::webkitPluginReplacement):
(WebCore::ShadowPseudoIds::webkitProgressBar):
(WebCore::ShadowPseudoIds::webkitProgressValue):
(WebCore::ShadowPseudoIds::webkitProgressInnerElement):
(WebCore::ShadowPseudoIds::webkitSearchDecoration):
(WebCore::ShadowPseudoIds::webkitSearchResultsButton):
(WebCore::ShadowPseudoIds::webkitSearchResultsDecoration):
(WebCore::ShadowPseudoIds::webkitSearchCancelButton):
(WebCore::ShadowPseudoIds::webkitSliderRunnableTrack):
(WebCore::ShadowPseudoIds::webkitSliderThumb):
(WebCore::ShadowPseudoIds::webkitSliderContainer):
(WebCore::ShadowPseudoIds::webkitTextfieldDecorationContainer):
(WebCore::ShadowPseudoIds::webkitValidationBubble):
(WebCore::ShadowPseudoIds::webkitValidationBubbleArrowClipper):
(WebCore::ShadowPseudoIds::webkitValidationBubbleArrow):
(WebCore::ShadowPseudoIds::webkitValidationBubbleMessage):
(WebCore::ShadowPseudoIds::webkitValidationBubbleIcon):
(WebCore::ShadowPseudoIds::webkitValidationBubbleTextBlock):
(WebCore::ShadowPseudoIds::webkitValidationBubbleHeading):
(WebCore::ShadowPseudoIds::webkitValidationBubbleBody):

  • html/shadow/ShadowPseudoIds.h: Added.
  • html/shadow/SliderThumbElement.cpp:

(WebCore::SliderThumbElement::resolveCustomStyle):
(WebCore::SliderContainerElement::resolveCustomStyle):

  • html/shadow/SpinButtonElement.cpp:

(WebCore::SpinButtonElement::create):

  • html/shadow/TextControlInnerElements.cpp:

(WebCore::TextControlPlaceholderElement::create):
(WebCore::SearchFieldCancelButtonElement::create):

  • html/shadow/YouTubeEmbedShadowElement.cpp:

(WebCore::YouTubeEmbedShadowElement::create):

  • html/track/TextTrackCue.cpp:

(WebCore::TextTrackCueBox::initialize):
(WebCore::tagPseudoObjects):
(WebCore::TextTrackCue::rebuildDisplayTree):
(WebCore::TextTrackCue::cueShadowPseudoId): Deleted.
(WebCore::TextTrackCue::cueBoxShadowPseudoId): Deleted.
(WebCore::TextTrackCue::cueBackdropShadowPseudoId): Deleted.

  • html/track/TextTrackCue.h:
  • html/track/VTTCue.cpp:

(WebCore::VTTCue::getDisplayTree):

  • html/track/VTTRegion.cpp:

(WebCore::VTTRegion::getDisplayTree):
(WebCore::VTTRegion::prepareRegionDisplayTree):
(WebCore::VTTRegion::textTrackCueContainerShadowPseudoId): Deleted.
(WebCore::VTTRegion::textTrackRegionShadowPseudoId): Deleted.

  • html/track/VTTRegion.h:
  • page/CaptionUserPreferencesMediaAF.cpp:

(WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride const):

  • style/RuleData.cpp:

(WebCore::Style::determinePropertyAllowlistType):

4:37 PM Changeset in webkit [283756] by mmaxfield@apple.com
  • 4 edits
    2 adds in trunk

Shadowing of @font-palette-values rules doesn't work
https://bugs.webkit.org/show_bug.cgi?id=231218
<rdar://problem/83872258>

Reviewed by Wenson Hsieh.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-fonts/font-palette-32-expected.html: Added.
  • web-platform-tests/css/css-fonts/font-palette-32.html: Added.

Source/WebCore:

https://drafts.csswg.org/css-fonts-4/#font-palette-values says:

When a given descriptor occurs multiple times in a given @font-palette-values rule,
only the last descriptor declaration is used.

Test: imported/w3c/web-platform-tests/css/css-fonts/font-palette-32.html

  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::buildStarted):
(WebCore::CSSFontSelector::addFontPaletteValuesRule):
(WebCore::CSSFontSelector::lookupFontPaletteValues):

  • css/CSSFontSelector.h:
4:30 PM Changeset in webkit [283755] by mmaxfield@apple.com
  • 9 edits
    2 adds in trunk/Source

Source/WebCore:
Do not check for firstLineStyle while constructing RenderText
https://bugs.webkit.org/show_bug.cgi?id=231370
<rdar://83973189>

Patch by Alan Bujtas <Alan Bujtas> on 2021-10-07
Reviewed by Antti Koivisto.

First line computation requires the renderer to be fully attached to the tree.
Let's check for "can use simplified text measuring for first line" at a later time, when we
construct the LFC tree instead.

Test: fast/inline/first-line-style-too-early-crash.html

  • layout/formattingContexts/inline/InlineTextItem.cpp:

(WebCore::Layout::InlineTextItem::createAndAppendTextItems):

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

(WebCore::Layout::TextUtil::canUseSimplifiedTextMeasuringForFirstLine):

  • layout/formattingContexts/inline/text/TextUtil.h:
  • layout/integration/LayoutIntegrationBoxTree.cpp:

(WebCore::LayoutIntegration::BoxTree::buildTree):

  • rendering/RenderText.cpp:

(WebCore::RenderText::computeCanUseSimplifiedTextMeasuring const):

Source/WebKit:
[GPU Process] Unique RenderingResourceIdentifiers Part 1: Uniquify at entry points
https://bugs.webkit.org/show_bug.cgi?id=231281
<rdar://problem/83920780>

Reviewed by Chris Dumez.

Each web process creates its own RenderingResourceIdentifiers. Because the GPU process
can service multiple web processes, these identifiers can collide in the GPU process.
This is somewhat error prone, and might cause us to make a mistake in the future and
introduce a bug which lets one web process see another web process's resources (which
would be mega bad).

The goal of this project is to treat RenderingResourceIdentifiers in the GPU process
as a tuple of (the identifer we got from the web process, the process identifier of
the web process). This way, the tuples uniquely identify a resource across the entire
GPU process. Doing it this way makes it less likely that we'll make a mega bad mistake
in the future.

This patch is the first step: It introduces the QualifiedRenderingResourceIdentifier
type, which holds the tuple described above, and makes all the GPU process message
receivers immediately turn any RenderingResourceIdentifiers they received from the
web processes into QualifiedRenderingResourceIdentifiers. Not only do the identifiers
immediately get packed, but each message receiver now has an implementation function
which only accepts the QualifiedRenderingResourceIdentifier, so we can't make a
mistake and use the unpacked one accidentally.

Because this patch is just the first step, the QualifiedRenderingResourceIdentifiers
get unpacked eagerly, and the inner logic of the GPU process is unaffected. The
subsequent two patches will push the QualifiedRenderingResourceIdentifiers deeper
into the guts of the GPU process, eventually to the point where
RenderingResourceIdentifiers are never used there.

  • GPUProcess/graphics/QualifiedRenderingResourceIdentifier.h: Added.
  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::RemoteGraphicsContextGL):
(WebKit::RemoteGraphicsContextGL::paintRenderingResultsToCanvas):
(WebKit::RemoteGraphicsContextGL::paintRenderingResultsToCanvasWithQualifiedIdentifier):
(WebKit::RemoteGraphicsContextGL::paintCompositedResultsToCanvas):
(WebKit::RemoteGraphicsContextGL::paintCompositedResultsToCanvasWithQualifiedIdentifier):
(WebKit::RemoteGraphicsContextGL::paintPixelBufferToImageBuffer):

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::createImageBuffer):
(WebKit::RemoteRenderingBackend::createImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::getDataURLForImageBuffer):
(WebKit::RemoteRenderingBackend::getDataURLForImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::getDataForImageBuffer):
(WebKit::RemoteRenderingBackend::getDataForImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::getShareableBitmapForImageBuffer):
(WebKit::RemoteRenderingBackend::getShareableBitmapForImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::cacheNativeImage):
(WebKit::RemoteRenderingBackend::cacheNativeImageWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::cacheFont):
(WebKit::RemoteRenderingBackend::cacheFontWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::releaseRemoteResource):
(WebKit::RemoteRenderingBackend::releaseRemoteResourceWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::didCreateSharedDisplayListHandle):
(WebKit::RemoteRenderingBackend::didCreateSharedDisplayListHandleWithQualifiedIdentifier):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • WebKit.xcodeproj/project.pbxproj:
4:25 PM Changeset in webkit [283754] by Alan Bujtas
  • 8 edits
    2 adds in trunk

Do not check for firstLineStyle while constructing RenderText
https://bugs.webkit.org/show_bug.cgi?id=231370
<rdar://83973189>

Reviewed by Antti Koivisto.

Source/WebCore:

First line computation requires the renderer to be fully attached to the tree.
Let's check for "can use simplified text measuring for first line" at a later time, when we
construct the LFC tree instead.

Test: fast/inline/first-line-style-too-early-crash.html

  • layout/formattingContexts/inline/InlineTextItem.cpp:

(WebCore::Layout::InlineTextItem::createAndAppendTextItems):

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

(WebCore::Layout::TextUtil::canUseSimplifiedTextMeasuringForFirstLine):

  • layout/formattingContexts/inline/text/TextUtil.h:
  • layout/integration/LayoutIntegrationBoxTree.cpp:

(WebCore::LayoutIntegration::BoxTree::buildTree):

  • rendering/RenderText.cpp:

(WebCore::RenderText::computeCanUseSimplifiedTextMeasuring const):

LayoutTests:

  • TestExpectations: existing bug surfaced by this change.
  • fast/inline/first-line-style-too-early-crash-expected.txt: Added.
  • fast/inline/first-line-style-too-early-crash.html: Added.
4:12 PM Changeset in webkit [283753] by Alan Coon
  • 6 edits
    1 add in branches/safari-611.4.2.0-branch

Apply patch. rdar://problem/83512725

4:05 PM Changeset in webkit [283752] by mmaxfield@apple.com
  • 10 edits in trunk

Stop parsing font palette things that we can't implement
https://bugs.webkit.org/show_bug.cgi?id=230799
<rdar://problem/83537772>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-fonts/parsing/font-palette-values-valid.html:

Source/WebCore:

We can't implement the <string> values in base-palette and override-colors. It's better
not to parse them, so this behavior can at least be feature detected by JS reading the
serialized value that was parsed.

I'm investigating changing the spec to disallow these unimplementable things in
https://github.com/w3c/csswg-drafts/issues/6627.

For base-palette, we were representing the absence of the descriptor by making the internal
representation hold a null string. Now that we're removing the string value from the internal
representation, this is now being represented by using an std::optional instead.

Test: imported/w3c/web-platform-tests/css/css-fonts/parsing/font-palette-values-valid.html

  • css/CSSFontPaletteValuesRule.cpp:

(WebCore::CSSFontPaletteValuesRule::basePalette const):
(WebCore::CSSFontPaletteValuesRule::overrideColors const):
(WebCore::CSSFontPaletteValuesRule::cssText const):

  • css/StyleRule.cpp:

(WebCore::StyleRuleFontPaletteValues::StyleRuleFontPaletteValues):

  • css/StyleRule.h:
  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::consumeFontPaletteValuesRule):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeBasePaletteDescriptor):
(WebCore::consumeOverrideColorsDescriptor):

  • platform/graphics/FontPaletteValues.h:

(WebCore::FontPaletteIndex::operator bool const):
(WebCore::FontPaletteIndex::operator== const):
(WebCore::add):
(WebCore::FontPaletteValues::FontPaletteValues):
(WebCore::FontPaletteValues::basePalette const):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::addAttributesForCustomFontPalettes):

4:00 PM Changeset in webkit [283751] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitscmpy] Share cache between processes
https://bugs.webkit.org/show_bug.cgi?id=231176
<rdar://problem/83841221>

Reviewed by Dewei Zhu.

Generating the identifier cache is more expensive than reading a file with
that cache in it. This is particularly relevant for webservers, which are
likely running multiple processes.

Reviewed by Dewei Zhu.

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

(Git.Cache.init): Move cache loading into "load" function.
(Git.Cache.load): Open cache file.
(Git.Cache.to_hash): If we fail to find a match, attempt to load the file
before populating the file.
(Git.Cache.to_revision): Ditto.
(Git.Cache.to_identifier): Ditto.

3:55 PM Changeset in webkit [283750] by Jonathan Bedard
  • 1 edit
    1 delete in trunk/Tools

[contributors.json] Relocation (Part 7)
https://bugs.webkit.org/show_bug.cgi?id=229690
<rdar://problem/82552403>

Reviewed by Dewei Zhu.

  • Scripts/webkitpy/common/config/contributors.json: Removed.
3:50 PM Changeset in webkit [283749] by Jonathan Bedard
  • 3 edits in trunk/Tools

[tvOS] Build simulator for arm64
https://bugs.webkit.org/show_bug.cgi?id=231390
<rdar://problem/83998448>

Reviewed by Alexey Proskuryakov.

  • CISupport/build-webkit-org/config.json: Change tvOS simulator build to arm64.
  • CISupport/ews-build/config.json: Ditto.
3:27 PM Changeset in webkit [283748] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS ] Marking expectations as slow for the tests that are flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=231397

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
3:18 PM Changeset in webkit [283747] by timothy_horton@apple.com
  • 7 edits in trunk

BifurcatedGraphicsContext doesn't bifurcate draw{Tiled}Image
https://bugs.webkit.org/show_bug.cgi?id=231385
<rdar://problem/83922633>

Reviewed by Devin Rousso.

Source/WebCore:

New API Test: BifurcatedGraphicsContextTests.DrawGradientImage, DrawTiledGradientImage

  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/GradientImage.h:

Export GradientImage's constructor and GradientImage and GeneratedImage headers.

  • platform/graphics/BifurcatedGraphicsContext.cpp:

(WebCore::BifurcatedGraphicsContext::drawTiledImage):
(WebCore::BifurcatedGraphicsContext::drawImage):
(WebCore::BifurcatedGraphicsContext::drawImageForCanvas):

  • platform/graphics/BifurcatedGraphicsContext.h:

Forward draw{Tiled}Image to both GraphicsContext instances.

I had initially avoided it because I assumed drawNativeImage would
be the eventual result, but because of the non-BitmapImage subclasses
that is actually not the case! For example, in the gradient case,
drawing the image results in GradientCG directly interacting with the
platform context, not round-tripping back through GraphicsContext,
so the commands are not replicated.

Tools:

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

(TestWebKitAPI::TEST):
Add some test.

3:12 PM Changeset in webkit [283746] by Jonathan Bedard
  • 2 edits in trunk/Tools

[build.webkit.org] Build iOS 15 as universal binary
https://bugs.webkit.org/show_bug.cgi?id=231389
<rdar://problem/83997697>

Reviewed by Ryan Haddad.

  • CISupport/build-webkit-org/config.json: Make iOS 15 Simulator Release build universal.
2:29 PM Changeset in webkit [283745] by stephan.szabo@sony.com
  • 2 edits in trunk/Tools

[WinCairo] Support run-jsc-stress-tests without posix commands
https://bugs.webkit.org/show_bug.cgi?id=231101

Reviewed by Adrian Perez de Castro.

Add support for collecting the test result files when not on
a posix host platform by roughly emulating the find command
current used in ruby code when using the ruby-runner or
for playstation.

  • Scripts/run-jsc-stress-tests:
2:25 PM Changeset in webkit [283744] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 Debug ] fast/selectors/is-complex.html is timing out.
https://bugs.webkit.org/show_bug.cgi?id=231391

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
2:22 PM Changeset in webkit [283743] by Jonathan Bedard
  • 6 edits in trunk/Tools

[WebKitBot] Land local changes on production host
https://bugs.webkit.org/show_bug.cgi?id=231388
<rdar://problem/83996428>

Reviewed by Yusuke Suzuki.

  • WebKitBot/src/Commit.mjs: Add Slack ID integration.
  • WebKitBot/src/Contributors.mjs: Ditto.
  • WebKitBot/src/Utility.mjs:
  • WebKitBot/src/WebKitBot.mjs: Add "hi" and "yt" commands.
  • WebKitBot/src/index.mjs:
2:08 PM Changeset in webkit [283742] by Aditya Keerthi
  • 29 edits in trunk

[css-ui] Parsing support for accent-color
https://bugs.webkit.org/show_bug.cgi?id=231334
rdar://83955508

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/css-ui/accent-color-computed-expected.txt:
  • web-platform-tests/css/css-ui/accent-color-parsing-expected.txt:
  • web-platform-tests/css/css-ui/animation/accent-color-interpolation-expected.txt:
  • web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:

Source/WebCore:

Add parsing support for accent-color as specified in
https://www.w3.org/TR/css-ui-4/#widget-accent. The grammar is
"accent-color: auto | <color>".

Implemented behind a disabled-by-default experimental setting.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

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

(WebCore::operator==):
(WebCore::add):
(WebCore::CSSParserContext::isPropertyRuntimeDisabled const):

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

(WebCore::parseColorWithAuto):
(WebCore::CSSParserFastPaths::maybeParseValue):
(WebCore::parseCaretColor): Deleted.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeColorWithAuto):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::consumeCaretColor): Deleted.

  • rendering/style/RenderStyle.cpp:

(WebCore::rareInheritedDataChangeRequiresRepaint):
(WebCore::RenderStyle::unresolvedColorForProperty const):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::setAccentColor):
(WebCore::RenderStyle::setHasAutoAccentColor):
(WebCore::RenderStyle::accentColor const):
(WebCore::RenderStyle::hasAutoAccentColor const):

  • rendering/style/StyleRareInheritedData.cpp:

(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator== const):

  • rendering/style/StyleRareInheritedData.h:
  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyInitialAccentColor):
(WebCore::Style::BuilderCustom::applyInheritAccentColor):
(WebCore::Style::BuilderCustom::applyValueAccentColor):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

LayoutTests:

Platform-specific rebaselines.

  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
1:59 PM Changeset in webkit [283741] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

Cleaning up expectations for iOS 15.
https://bugs.webkit.org/show_bug.cgi?id=230968

Unreviewed test gardening.

  • platform/ios/TestExpectations:
1:36 PM Changeset in webkit [283740] by Chris Dumez
  • 10 edits in trunk/Source/WebCore

Cache PannerNode's azimuth, elevation and coneGain
https://bugs.webkit.org/show_bug.cgi?id=231314

Reviewed by Eric Carlson.

Cache PannerNode's azimuth, elevation and coneGain for better performance. I have noticed while profiling
https://downloads.scirra.com/labs/bugs/safaripannerquality/ that PannerNode::process() spends most of its
CPU time under PannerNode::calculateAzimuthElevation(). We shouldn't have to re-calculate those properties
for every rendering quantum.

  • Modules/webaudio/AudioListener.cpp:

(WebCore::AudioListener::updateDirtyState):

  • Modules/webaudio/AudioListener.h:

(WebCore::AudioListener::isPositionDirty const):
(WebCore::AudioListener::isOrientationDirty const):
(WebCore::AudioListener::isUpVectorDirty const):

  • Modules/webaudio/BaseAudioContext.cpp:

(WebCore::BaseAudioContext::handlePreRenderTasks):

  • Modules/webaudio/PannerNode.cpp:

(WebCore::PannerNode::process):
(WebCore::PannerNode::processSampleAccurateValues):
(WebCore::PannerNode::setDistanceModelForBindings):
(WebCore::PannerNode::setRefDistanceForBindings):
(WebCore::PannerNode::setMaxDistanceForBindings):
(WebCore::PannerNode::setRolloffFactorForBindings):
(WebCore::PannerNode::setConeOuterGainForBindings):
(WebCore::PannerNode::setConeOuterAngleForBindings):
(WebCore::PannerNode::setConeInnerAngleForBindings):
(WebCore::PannerNode::calculateAzimuthElevation):
(WebCore::PannerNode::azimuthElevation const):
(WebCore::PannerNode::calculateDistanceConeGain):
(WebCore::PannerNode::distanceConeGain):
(WebCore::PannerNode::invalidateCachedPropertiesIfNecessary):
(WebCore::PannerNode::azimuthElevation): Deleted.

  • Modules/webaudio/PannerNode.h:
  • platform/audio/Cone.cpp:

(WebCore::ConeEffect::gain const):
(WebCore::ConeEffect::gain): Deleted.

  • platform/audio/Cone.h:
  • platform/audio/Distance.cpp:

(WebCore::DistanceEffect::gain const):
(WebCore::DistanceEffect::linearGain const):
(WebCore::DistanceEffect::inverseGain const):
(WebCore::DistanceEffect::exponentialGain const):
(WebCore::DistanceEffect::gain): Deleted.
(WebCore::DistanceEffect::linearGain): Deleted.
(WebCore::DistanceEffect::inverseGain): Deleted.
(WebCore::DistanceEffect::exponentialGain): Deleted.

  • platform/audio/Distance.h:
1:26 PM Changeset in webkit [283739] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 Debug ] imported/w3c/web-platform-tests/IndexedDB/interleaved-cursors-small.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231387

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
1:17 PM Changeset in webkit [283738] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ BigSur wk2 ] http/tests/resourceLoadStatistics/website-data-removal-for-site-with-user-interaction.html is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=231386.

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
1:11 PM Changeset in webkit [283737] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Remove expectation for accessibility/misspelling-range.html from ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=231261

Unreviewed test gardening.

12:57 PM Changeset in webkit [283736] by commit-queue@webkit.org
  • 6 edits in trunk

Misc compiler warning fixes, October 2021
https://bugs.webkit.org/show_bug.cgi?id=231377

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-10-07
Reviewed by Adrian Perez de Castro.

Source/WebCore:

Fix -Wreturn-type warnings.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::fontPaletteFromStyle):

  • css/CSSFontPaletteValuesRule.cpp:

(WebCore::CSSFontPaletteValuesRule::basePalette const):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:

(WebCore::GraphicsContextGLOpenGL::releaseThreadResources):

Tools:

Stop testing the default value of the XSS auditor setting. I could have used
IGNORE_DEPRECATED_DECLARATIONS_BEGIN instead, but I see no point in testing the default
value of a setting that no longer does anything.

  • TestWebKitAPI/Tests/WebKit/WKPreferences.cpp:

(TestWebKitAPI::TEST):

12:48 PM Changeset in webkit [283735] by commit-queue@webkit.org
  • 5 edits
    1 delete in trunk

[GTK][WPE] Disable privateClickMeasurement when creating the network process
https://bugs.webkit.org/show_bug.cgi?id=231175

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-10-07
Reviewed by Adrian Perez de Castro.

Source/WebKit:

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::sendCreationParametersToNewProcess):

LayoutTests:

Skip privateClickMeasurement tests on GTK and WPE.

  • platform/glib/TestExpectations:
  • platform/glib/http/tests/privateClickMeasurement/attribution-conversion-through-cross-site-image-redirect-expected.txt: Removed.
  • platform/glib/http/tests/privateClickMeasurement/attribution-conversion-through-fetch-keepalive-expected.txt: Removed.
  • platform/glib/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-ephemeral-expected.txt: Removed.
  • platform/glib/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window-expected.txt: Removed.
  • platform/glib/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority-expected.txt: Removed.
  • platform/glib/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-without-priority-expected.txt: Removed.
  • platform/glib/http/tests/privateClickMeasurement/conversion-disabled-in-ephemeral-session-expected.txt: Removed.
  • platform/glib/http/tests/privateClickMeasurement/private-click-measurement-with-source-nonce-null-content-expected.txt: Removed.
  • platform/glib/http/tests/privateClickMeasurement/private-click-measurement-with-source-nonce-wrong-content-type-expected.txt: Removed.
  • platform/glib/http/tests/privateClickMeasurement/second-attribution-converted-with-higher-priority-expected.txt: Removed.
  • platform/glib/http/tests/privateClickMeasurement/second-attribution-converted-with-lower-priority-expected.txt: Removed.
  • platform/glib/http/tests/privateClickMeasurement/second-conversion-with-higher-priority-expected.txt: Removed.
  • platform/glib/http/tests/privateClickMeasurement/second-conversion-with-lower-priority-expected.txt: Removed.
  • platform/glib/http/tests/privateClickMeasurement/store-private-click-measurement-expected.txt: Removed.
  • platform/wpe/TestExpectations:
12:31 PM Changeset in webkit [283734] by Russell Epstein
  • 2 edits in branches/safari-613.1.4-branch/Source/JavaScriptCore

Cherry-pick r283632. rdar://problem/83985604

Speculative fix for a null pointer dereference in ByteCodeParser::handlePutByVal.
https://bugs.webkit.org/show_bug.cgi?id=231252
rdar://83310320

Reviewed by Yusuke Suzuki.

We're seeing a null pointer dereference in ByteCodeParser::handlePutByVal().
Adding a null check here as a speculative fix to mitigate crashes while we
investigate further.

  • dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::handlePutByVal):

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

12:31 PM Changeset in webkit [283733] by Russell Epstein
  • 9 edits in branches/safari-613.1.4-branch/Source/WebKit

Revert r283187. rdar://problem/83985586

12:27 PM WikiStart edited by jer.noble@apple.com
(diff)
12:24 PM AnalyzingBuildPerformance edited by jer.noble@apple.com
(diff)
12:14 PM AnalyzingBuildPerformance edited by jer.noble@apple.com
(diff)
12:12 PM Changeset in webkit [283732] by Chris Dumez
  • 5 edits in trunk/Source

Add feature flag for COOP / COEP violation reporting and turn off by default
https://bugs.webkit.org/show_bug.cgi?id=231371

Reviewed by Youenn Fablet.

Add feature flag for COOP / COEP violation reporting and turn off by default since our
implementation doesn't match the latest specification.

Source/WebCore:

  • loader/CrossOriginEmbedderPolicy.cpp:

(WebCore::sendCOEPPolicyInheritenceViolation):
(WebCore::sendCOEPCORPViolation):

  • loader/CrossOriginOpenerPolicy.cpp:

(WebCore::sendViolationReportWhenNavigatingToCOOPResponse):
(WebCore::sendViolationReportWhenNavigatingAwayFromCOOPResponse):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
11:56 AM Changeset in webkit [283731] by Aditya Keerthi
  • 2 edits in trunk/Source/WebKit

Fix the macCatalyst build
https://bugs.webkit.org/show_bug.cgi?id=231373
rdar://83984197

Reviewed by Tim Horton.

  • UIProcess/API/ios/WKWebViewIOS.mm: Add missing import.
11:55 AM Changeset in webkit [283730] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

security/contentSecurityPolicy/video-with-blob-url-allowed-by-media-src-star.html and security/contentSecurityPolicy/video-with-data-url-allowed-by-media-src-star.html are flaky.
https://bugs.webkit.org/show_bug.cgi?id=155196

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:41 AM Changeset in webkit [283729] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 ] Rebaselining platform/ios/ios/fast/text/opticalFontWithWeight.html.
https://bugs.webkit.org/show_bug.cgi?id=231380

Unreviewed test gardening.

  • platform/ios/ios/fast/text/opticalFontWithWeight-expected.txt:
11:38 AM Changeset in webkit [283728] by BJ Burg
  • 11 edits in trunk

Web Inspector: WebInspectorExtensionTabContentView should not reload its iframe when detached
https://bugs.webkit.org/show_bug.cgi?id=230758
<rdar://74714861>

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

When an <iframe> element detaches from the DOM, the script context is destroyed, which we don't
want to happen for _WKInspectorExtension tabs. Fix this by teaching ContentViewContainer to
'hide' such content views by setting display:none rather than detaching from the DOM.

  • UserInterface/Views/ContentViewContainer.js:

(WI.ContentViewContainer.prototype._showEntry):
(WI.ContentViewContainer.prototype._hideEntry):
Set and unset 'display:none' instead of calling addSubview() / removeSubview().

  • UserInterface/Views/ContentViewContainer.css:

(.content-view-container > .content-view.hidden-for-detach): Added.

(WI.ContentViewContainer.prototype._disassociateFromContentView):
Clean up any remaining content views that were not detached due to overriding shouldNotRemoveFromDOMWhenHidden.

  • UserInterface/Views/ContentView.js:

(WI.ContentView.prototype.get shouldNotRemoveFromDOMWhenHidden): Added.

  • UserInterface/Views/WebInspectorExtensionTabContentView.js:

(WI.WebInspectorExtensionTabContentView):
(WI.WebInspectorExtensionTabContentView.prototype.get shouldNotRemoveFromDOMWhenHidden):
Override this to opt into the alternate behavior that does not detach from the DOM. It is still
necessary to call attached() and detached() so that WebInpectorExtensionTabContentView can generate
didShowExtensionTab/didHideExtensionTab event callbacks.

  • UserInterface/Controllers/WebInspectorExtensionController.js:

(WI.WebInspectorExtensionController.prototype.get registeredExtensionIDs):

  • UserInterface/Debug/Bootstrap.js:

(updateMockWebExtensionTab):
(WI.runBootstrapOperations):
This is a drive-by fix to address a console assertion seen while developing the API test.
Don't unregister the mock extension if it is not registered in the first place.

Tools:

Add a new test to verify that re-selecting an extension tab does not cause it to reload.

  • TestWebKitAPI/Tests/WebKitCocoa/InspectorExtension-basic-tab.html:
  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm:

(TEST):

11:35 AM Changeset in webkit [283727] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ BigSur wk2 Release ] http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231379.

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
11:32 AM Changeset in webkit [283726] by Antti Koivisto
  • 4 edits in trunk/Source/WebCore

[LFC][Integration] Use optimized InlineContent::boxesForRect for hit testing
https://bugs.webkit.org/show_bug.cgi?id=231363

Reviewed by Alan Bujtas.

This makes hit testing large blocks faster.

  • layout/integration/LayoutIntegrationInlineContent.cpp:

(WebCore::LayoutIntegration::InlineContent::boxesForRect const):
(WebCore::LayoutIntegration:: const): Deleted.

  • layout/integration/LayoutIntegrationInlineContent.h:

(WebCore::LayoutIntegration::InlineContent::BoxRange::begin const):
(WebCore::LayoutIntegration::InlineContent::BoxRange::end const):
(WebCore::LayoutIntegration::InlineContent::BoxRange::rbegin const):
(WebCore::LayoutIntegration::InlineContent::BoxRange::rend const):

Add a reversable iterator.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::hitTest):

Hit test using boxesForRect.

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

[ iOS 15 ] platform/ios/fast/text/system-monospaced-numbers.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=231378

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:17 AM Changeset in webkit [283724] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS ] CSS Flexbox tests are constant failure (fixed-table-layout-with-percentage-width-in-flex-item.html and flex-item-compressible-001.html).
https://bugs.webkit.org/show_bug.cgi?id=230773

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:15 AM Changeset in webkit [283723] by Nikita Vasilyev
  • 10 edits
    3 adds
    2 deletes in trunk

Web Inspector: Styles: format style declarations after editing
https://bugs.webkit.org/show_bug.cgi?id=178835
<rdar://problem/35185060>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Indent CSS properties with spaces/tabs set in Web Inspector settings. Increse indentation level when CSS rules are
inside of at-rules (e.g. @media, @keyframes, @supports).

Don't indent CSS properties in style attributes. Keep them on the single line, separated by a space character:

style="font-size: 12px; color: black;"

  • UserInterface/Models/CSSProperty.js:

(WI.CSSProperty.prototype.set text):
Introduce _isTextPendingSave flag. It's needed when saving pasted text, and saving commented out or uncommented CSS properties.

(WI.CSSProperty.prototype.get formattedText):

(WI.CSSProperty.prototype.replaceWithText): Deleted.
This is redundant - setting text works the same.

(WI.CSSProperty.prototype._updateStyleText):
(WI.CSSProperty.prototype._updateOwnerStyleText):
(WI.CSSProperty.prototype._prependSemicolonIfNeeded): Deleted.
Greatly simplify the logic now that we save formatted text and don't modify styleText.

  • UserInterface/Models/CSSStyleDeclaration.js:

(WI.CSSStyleDeclaration.prototype.removeProperty):
Remode unnecessary code that modifies _styleSheetTextRange. The backend sends new _styleSheetTextRange data
upon a change.

(WI.CSSStyleDeclaration.prototype.generateFormattedText): Renamed from 'generateCSSRuleString'.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:

(WI.SpreadsheetCSSStyleDeclarationSection.prototype._populateIconElementContextMenu):

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.remove):

LayoutTests:

  • Indent text of expected CSS properties.
  • Test generateFormattedText with all permutations of its options.
  • Add a basic test ensuring styleSheetTextRange updates correctly from the backend.
  • inspector/css/add-css-property.html:
  • inspector/css/generateCSSRuleString-expected.txt: Removed.
  • inspector/css/generateCSSRuleString.html: Removed.
  • inspector/css/generateFormattedText-expected.txt: Added.
  • inspector/css/generateFormattedText.html: Added.
  • inspector/css/modify-css-property-expected.txt:
  • inspector/css/modify-css-property.html:
  • inspector/css/modify-inline-style-expected.txt:
  • inspector/css/resources/modify-css-property.css: Added.

(.rule-a):
(.rule-b):
(.rule-c):
(.rule-d):

11:08 AM Changeset in webkit [283722] by Ross Kirsling
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix for non-unified JSC.

  • dfg/DFGBackwardsPropagationPhase.cpp:

Add missing include.

10:58 AM Changeset in webkit [283721] by Darin Adler
  • 23 edits in trunk/Source

Get rid of the deviceClass function, up-leveling to deviceClassIsSmallScreen
https://bugs.webkit.org/show_bug.cgi?id=231344

Reviewed by Tim Horton.

Source/WebCore:

  • platform/ios/Device.cpp:

(WebCore::deviceClassIsSmallScreen): Replaced deviceClass with this.

  • platform/ios/Device.h: Ditto.

Source/WebKit:

  • Shared/UserInterfaceIdiom.h:
  • Shared/UserInterfaceIdiom.mm:

(WebKit::currentUserInterfaceIdiomIsSmallScreen): Renamed to say "is small screen"
instead of "is phone or watch", the same concept. Also switched to TriState instead
of using a unique enumeration.
(WebKit::setCurrentUserInterfaceIdiomIsSmallScreen): Ditto.
(WebKit::updateCurrentUserInterfaceIdiom): Updated for name change.

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const): Updated for name change.
(WebKit::WebProcessCreationParameters::decode): Ditto.

  • Shared/WebProcessCreationParameters.h: Ditto.
  • Shared/ios/WebPreferencesDefaultValuesIOS.mm:

(WebKit::defaultTextAutosizingUsesIdempotentMode): Updated for name change.
(WebKit::defaultMediaSourceEnabled): Use !deviceClassIsSmallScreen instead of
deviceClass != iPhone and != iPod, and also remove unneeded compile time conditionals.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm: Removed uneeded Device.h include.

(-[WKWebViewConfiguration init]): Updated for name change.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess): Ditto.
(WebKit::WebProcessPool::registerNotificationObservers): Ditto, also got rid of
local variable.

  • UIProcess/ios/SmartMagnificationController.mm:

(WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
Updated for name change.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKFormInputSession setAccessoryViewCustomButtonTitle:]): Ditto.
(-[WKContentView endEditingAndUpdateFocusAppearanceWithReason:]): Ditto.
(-[WKContentView _shouldShowAutomaticKeyboardUIIgnoringInputMode]): Ditto.
(-[WKContentView _zoomToRevealFocusedElement]): Ditto.
(-[WKContentView _elementTypeRequiresAccessoryView:]): Ditto.
(-[WKContentView _updateAccessory]): Ditto.
(-[WKContentView _shouldUseLegacySelectPopoverDismissalBehavior]): Ditto.

  • UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm:

(WebKit::WebDataListSuggestionsDropdownIOS::show): Ditto.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::desktopClassBrowsingSupported): Ditto.

  • UIProcess/ios/forms/WKAirPlayRoutePicker.mm:

(-[WKAirPlayRoutePicker show:fromRect:]): Ditto.

  • UIProcess/ios/forms/WKFileUploadPanel.mm:

(-[WKFileUploadPanel _showPhotoPickerWithSourceType:]): Ditto.
(-[WKFileUploadPanel _presentMenuOptionForCurrentInterfaceIdiom:]): Ditto.

  • UIProcess/ios/forms/WKFormSelectControl.mm:

(-[WKFormSelectControl initWithView:]): Ditto.

  • UIProcess/ios/forms/WKFormSelectPicker.mm:

(-[WKSelectMultiplePicker configurePresentation]): Ditto.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess): Ditto.
(WebKit::WebProcess::userInterfaceIdiomDidChange): Ditto.

Source/WebKitLegacy/mac:

  • WebView/WebPreferences.mm: Removed uneeded Device.h include.
  • WebView/WebPreferencesDefaultValues.mm:

(WebKit::defaultAllowsInlineMediaPlayback): Use !deviceClassIsSmallScreen
instead of deviceClass == iPad.
(WebKit::defaultAllowsInlineMediaPlaybackAfterFullscreen): Use
deviceClassIsSmallScreen instead of deviceClass != iPad.
(WebKit::defaultInlineMediaPlaybackRequiresPlaysInlineAttribute): Ditto.
(WebKit::defaultMediaSourceEnabled): Use !deviceClassIsSmallScreen instead of
deviceClass != iPhone and != iPod, and also remove unneeded compile time conditionals.

10:46 AM Changeset in webkit [283720] by Russell Epstein
  • 8 edits in branches/safari-612.2.9.0-branch/Source

Versioning.

WebKit-7612.2.9.0.6

10:32 AM Changeset in webkit [283719] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ BigSur AS EWS ] http/tests/xmlhttprequest/access-control-response-with-body.html is flaky crashing.
https://bugs.webkit.org/show_bug.cgi?id=231372

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
10:18 AM Changeset in webkit [283718] by Antti Koivisto
  • 14 edits in trunk

Cascade layer styles should be lower priority than unlayered styles
https://bugs.webkit.org/show_bug.cgi?id=231342

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Update from the WPT repo.

  • web-platform-tests/css/css-cascade/layer-basic.html:
  • web-platform-tests/css/css-cascade/layer-font-face-override-expected.txt:
  • web-platform-tests/css/css-cascade/layer-font-face-override.html:
  • web-platform-tests/css/css-cascade/layer-import.html:
  • web-platform-tests/css/css-cascade/layer-keyframes-override-expected.txt:
  • web-platform-tests/css/css-cascade/layer-keyframes-override.html:
  • web-platform-tests/css/css-cascade/layer-stylesheet-sharing.html:

Source/WebCore:

Update the implementation to match the resolution for https://github.com/w3c/csswg-drafts/issues/6284.

  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::addMatchedRule):
(WebCore::Style::compareRules):

  • style/ElementRuleCollector.h:
  • style/RuleSet.h:

(WebCore::Style::RuleSet::cascadeLayerPriorityForIdentifier const):
(WebCore::Style::RuleSet::cascadeLayerPriorityFor const):

Return std::numeric_limits<unsigned>::max() for unlayered rules.

(WebCore::Style::RuleSet::cascadeLayerOrderForIdentifier const): Deleted.
(WebCore::Style::RuleSet::cascadeLayerOrderFor const): Deleted.

Also update naming order->priority to better match the spec text.

  • style/RuleSetBuilder.cpp:

(WebCore::Style::RuleSetBuilder::~RuleSetBuilder):
(WebCore::Style::RuleSetBuilder::updateCascadeLayerPriorities):
(WebCore::Style::RuleSetBuilder::addMutatingRulesToResolver):
(WebCore::Style::RuleSetBuilder::updateCascadeLayerOrder): Deleted.

  • style/RuleSetBuilder.h:
9:49 AM Changeset in webkit [283717] by Alan Coon
  • 8 edits in branches/safari-611.4.2.0-branch/Source

Versioning.

WebKit-7611.4.2.0.3

9:20 AM Changeset in webkit [283716] by Simon Fraser
  • 14 edits in trunk/Source/WebCore

Clean up state maintenance around animated scrolls
https://bugs.webkit.org/show_bug.cgi?id=231347

Reviewed by Martin Robinson.

ScrollBehaviorStatus tracked whether an animated scroll is in progress. Rename it
for clarity, and remove the "non-native" term since this will never track native
vs. non-native animations.

Since ScrollBehaviorStatus is specifically about programmatic smooth scroll animations
triggered from script, it should be stored on ScrollableArea and is not relevant to the
scrolling tree. Remove it from the ScrollingTreeScrollingNodeDelegates.

The state becomes ScrollAnimationStatus::Animating immediately when JS triggers animations,
but the animation completion signal may come back in future from the scrolling thread.
Currently it comes via ScrollingEffectsController::scrollAnimationDidEnd().

We never need to call setScrollAnimationStatus(ScrollAnimationStatus::NotAnimating) other
than from scrollAnimationDidEnd(), because canceling an ongoing animation will always
call that.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::scrollTo const):

  • page/FrameView.cpp:

(WebCore::FrameView::scrollToPositionWithAnimation):

  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
  • page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.h:
  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::scrollToPositionWithAnimation):
(WebCore::ScrollAnimator::retargetRunningAnimation):
(WebCore::ScrollAnimator::willStartAnimatedScroll):
(WebCore::ScrollAnimator::didStopAnimatedScroll):
(WebCore::ScrollAnimator::setScrollBehaviorStatus): Deleted.
(WebCore::ScrollAnimator::scrollBehaviorStatus const): Deleted.

  • platform/ScrollAnimator.h:
  • platform/ScrollTypes.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::setScrollPosition):

  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::scrollToPositionWithAnimation):
(WebCore::ScrollableArea::resnapAfterLayout):

  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::scrollAnimationStatus):
(WebCore::ScrollableArea::setScrollAnimationStatus):
(WebCore::ScrollableArea::currentScrollBehaviorStatus): Deleted.
(WebCore::ScrollableArea::setScrollBehaviorStatus): Deleted.

  • platform/ScrollingEffectsController.cpp:

(WebCore::ScrollingEffectsController::scrollAnimationDidEnd):

  • platform/ScrollingEffectsController.h:

(WebCore::ScrollingEffectsControllerClient::willStartAnimatedScroll):
(WebCore::ScrollingEffectsControllerClient::didStopAnimatedScroll):

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::scrollToOffset):
(WebCore::RenderLayerScrollableArea::scrollTo):
(WebCore::RenderLayerScrollableArea::updateScrollPosition):

8:40 AM Changeset in webkit [283715] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][IFC] InlineDisplay::Box should be able to tell if it's the first or the last box within the associated Layout::Box
https://bugs.webkit.org/show_bug.cgi?id=231341

Reviewed by Antti Koivisto.

This patch helps the iterators to jump right to the first/last display box inside a layout box. This is used when a certain Layout::Box (e.g. <span>)
overlaps multiple lines producing multiple display boxes.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::isFirstLastBox):
(WebCore::Layout::InlineDisplayContentBuilder::build):
(WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineContent):
(WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineSpanningInlineBoxes):

  • layout/formattingContexts/inline/InlineLevelBox.h:

(WebCore::Layout::InlineLevelBox::isFirstBox const):
(WebCore::Layout::InlineLevelBox::isLastBox const):
(WebCore::Layout::InlineLevelBox::InlineLevelBox):
(WebCore::Layout::InlineLevelBox::setIsFirstBox):
(WebCore::Layout::InlineLevelBox::setIsLastBox):
(WebCore::Layout::m_isLastWithinLayoutBox):
(WebCore::Layout::InlineLevelBox::createInlineBox):

  • layout/formattingContexts/inline/InlineLineBox.cpp:

(WebCore::Layout::LineBox::LineBox):
(): Deleted.

  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

(WebCore::Layout::LineBoxBuilder::constructAndAlignInlineLevelBoxes):

  • layout/formattingContexts/inline/display/InlineDisplayBox.h:

(WebCore::InlineDisplay::Box::Box):
(WebCore::InlineDisplay::Box::isFirstBox const):
(WebCore::InlineDisplay::Box::isLastBox const):

8:20 AM Changeset in webkit [283714] by youenn@apple.com
  • 3 edits in trunk/Tools

REGRESSION (r283613): [ macOS ] TestWebKitAPI.ResourceLoadDelegate.LoadInfo is failing
https://bugs.webkit.org/show_bug.cgi?id=231303
<rdar://problem/83940067>

Reviewed by Chris Dumez.

Make sure to clear all data store at the end of PushAPI test, as well as at the beginning of ResourceLoadDelegate test.

  • TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadDelegate.mm:
8:16 AM Changeset in webkit [283713] by Wenson Hsieh
  • 6 edits
    1 add in trunk/Source/WebKit

Add the ability to dispatch messages to multiple receiver types in IPC::StreamServerConnection
https://bugs.webkit.org/show_bug.cgi?id=231305

Reviewed by Kimmo Kinnunen.

In preparation for using streamable IPC for display list rendering in the GPU process (i.e. 2D canvas and DOM
rendering), refactor StreamServerConnection such that it is capable of dispatching stream messages to generic
StreamMessageReceivers. This has the disadvantage of performing a vtable lookup with each message dispatch, but
I did not measure this to be a significant performance regression on any of the canvas subtests in MotionMark.

  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::RemoteGraphicsContextGL):

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:

Make RemoteGraphicsContextGL subclass StreamMessageReceiver.

  • Platform/IPC/StreamMessageReceiver.h: Added.

(IPC::StreamMessageReceiver::~StreamMessageReceiver):

  • Platform/IPC/StreamServerConnection.cpp:

(IPC::StreamServerConnection::startReceivingMessages):
(IPC::StreamServerConnection::stopReceivingMessages):
(IPC::StreamServerConnection::dispatchStreamMessages):
(IPC::StreamServerConnection::processSetStreamDestinationID):
(IPC::StreamServerConnection::dispatchStreamMessage):
(IPC::StreamServerConnection::dispatchOutOfStreamMessage):

Now that these methods are no longer templated, we can move their implementations from the header to the
implementation file.

  • Platform/IPC/StreamServerConnection.h:

Remove the template argument from StreamServerConnection, and instead make this start and stop receiving
messages for generic StreamMessageReceiver objects.

(IPC::StreamServerConnection<Receiver>::startReceivingMessages): Deleted.
(IPC::StreamServerConnection<Receiver>::stopReceivingMessages): Deleted.
(IPC::StreamServerConnection<Receiver>::dispatchStreamMessages): Deleted.
(IPC::StreamServerConnection<Receiver>::processSetStreamDestinationID): Deleted.
(IPC::StreamServerConnection<Receiver>::dispatchStreamMessage): Deleted.
(IPC::StreamServerConnection<Receiver>::dispatchOutOfStreamMessage): Deleted.

  • WebKit.xcodeproj/project.pbxproj:
8:02 AM Changeset in webkit [283712] by ddkilzer@apple.com
  • 4 edits
    2 adds in trunk/Tools

Add back RetainPtrARC and TypeCastsCocoaARC tests to TestWTF
<https://webkit.org/b/231251>
<rdar://problem/83902809>

Reviewed by Darin Adler.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • Add RetainPtrARC.mm and TypeCastsCocoaARC.mm to the project.
  • TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoa.mm:

(TestWebKitAPI::TEST):

  • Modify tests to clean up autoreleased objects in Debug builds that are optimized out of Release builds.
  • TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoaARC.mm: Add.
  • TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm:

(TestWebKitAPI::TEST):

  • Modify tests to clean up autoreleased objects in Debug builds that are optimized out of Release builds.
  • TestWebKitAPI/Tests/WTF/ns/RetainPtrARC.mm: Add.
8:01 AM Changeset in webkit [283711] by Antti Koivisto
  • 4 edits in trunk/Source/WebCore

[LFC][Integration] Optimize InlineContent::boxesForRect
https://bugs.webkit.org/show_bug.cgi?id=231356

Reviewed by Alan Bujtas.

  • layout/integration/LayoutIntegrationInlineContent.cpp:

(WebCore::LayoutIntegration::InlineContent::boxesForRect const):

Approximate the starting points from the rect using the average line height and then search for
the first and last line that paint fully outside the rect.

  • layout/integration/LayoutIntegrationInlineContent.h:
  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):

Add a bit that tells if the content has lines with paint area exceeding those of the neighboring lines.
We can't use the optimization in this rare case.

7:55 AM Changeset in webkit [283710] by Chris Dumez
  • 4 edits in trunk/Tools

ASSERTION FAILED: This HTTPServer does not know how to respond to a request for /popup-after-redirection.html
https://bugs.webkit.org/show_bug.cgi?id=231256
<rdar://problem/83904937>

Reviewed by Alex Christensen.

Stop hardcoding the HTTPServer port in COOP API tests to address flakiness.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
  • TestWebKitAPI/cocoa/HTTPServer.h:
  • TestWebKitAPI/cocoa/HTTPServer.mm:

(TestWebKitAPI::HTTPServer::addResponse):

7:19 AM Changeset in webkit [283709] by Antti Koivisto
  • 3 edits
    2 adds in trunk

REGRESSION (IFC selections): Overlapping selection rectangles when selecting preformatted text
https://bugs.webkit.org/show_bug.cgi?id=231291
<rdar://problem/83939949>

Reviewed by Alan Bujtas.

Source/WebCore:

We are painting selections for soft linebreaks.

Test: editing/selection/soft-line-break-no-paint.html

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::paint):

Like legacy, don't paint any linebreak boxes.

LayoutTests:

  • editing/selection/soft-line-break-no-paint-expected.html: Added.
  • editing/selection/soft-line-break-no-paint.html: Added.
7:11 AM Changeset in webkit [283708] by ntim@apple.com
  • 3 edits in trunk/LayoutTests

Stop relying on autofocus for deleteFromDocument-crash.html
https://bugs.webkit.org/show_bug.cgi?id=231357

Reviewed by Antti Koivisto.

Stop relying on current autofocus sync timing which will become async.

  • imported/blink/editing/selection/deleteFromDocument-crash-expected.html:
  • imported/blink/editing/selection/deleteFromDocument-crash.html:
6:41 AM Changeset in webkit [283707] by Carlos Garcia Campos
  • 10 edits in trunk

[GTK] Reenable -fvisibility=hidden
https://bugs.webkit.org/show_bug.cgi?id=181916

Reviewed by Michael Catanzaro.

.:

  • Source/cmake/OptionsGTK.cmake:

Source/JavaScriptCore:

  • shell/PlatformGTK.cmake:

Source/WebCore:

  • PlatformGTK.cmake:
  • dom/EventTarget.cpp:
  • dom/EventTarget.h:

Tools:

  • TestWebKitAPI/PlatformGTK.cmake:
4:55 AM Changeset in webkit [283706] by Jean-Yves Avenard
  • 37 edits in trunk/Source/WebCore

Streamline and make call to objective-C methods more consistent across call sites.
https://bugs.webkit.org/show_bug.cgi?id=231351
rdar://problem/83966853

Since bug 97403, RetainPtr<T*> has a T* conversion operator; the call to
RetainPtr::get() is now redundant under some circumstances.
Make the use of RetainPtr<T*> in objective-C call more consistent by using the pattern:
RetainPtr<T*> foo;
[foo methodOfT];
Source-wide replacement of "\[([_a-zA-Z]+)\.get\(\) " by "\[([_a-zA-Z]+)\ ",
then manually fixing NeverDestroyed<RetainPtr<T*>> cases which do not yet allow
for that.

Reviewed by Tim Horton.

No change in observable behaviour.

  • bindings/js/ScriptControllerMac.mm:

(WebCore::ScriptController::updatePlatformScriptObjects):

  • bridge/objc/objc_instance.mm:

(JSC::Bindings::ObjcInstance::~ObjcInstance):
(JSC::Bindings::ObjcInstance::supportsInvokeDefaultMethod const):
(JSC::Bindings::ObjcInstance::invokeDefaultMethod):
(JSC::Bindings::ObjcInstance::defaultValue const):

  • bridge/objc/objc_runtime.mm:

(JSC::Bindings::ObjcArray::setValueAt const):
(JSC::Bindings::ObjcArray::valueAt const):
(JSC::Bindings::ObjcArray::getLength const):

  • editing/cocoa/DataDetection.mm:

(WebCore::resultIsURL):

  • page/cocoa/ResourceUsageOverlayCocoa.mm:

(WebCore::ResourceUsageOverlay::platformInitialize):
(WebCore::ResourceUsageOverlay::platformDraw):

  • platform/cocoa/ParentalControlsContentFilter.mm:

(WebCore::ParentalControlsContentFilter::addData):
(WebCore::ParentalControlsContentFilter::finishedAddingData):

  • platform/gamepad/cocoa/GameControllerGamepad.mm:

(WebCore::GameControllerGamepad::setupAsExtendedGamepad):

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

(WebCore::AVOutputDeviceMenuControllerTargetPicker::devicePicker):
(WebCore::AVOutputDeviceMenuControllerTargetPicker::outputContext):

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

(WebCore::CDMSessionAVFoundationObjC::generateKeyRequest):

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

(WebCore::InbandTextTrackPrivateAVFObjC::label const):
(WebCore::InbandTextTrackPrivateAVFObjC::language const):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createImageGenerator):
(WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
(WebCore::MediaPlayerPrivateAVFoundationObjC::checkPlayability):
(WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata):
(WebCore::MediaPlayerPrivateAVFoundationObjC::accessLog const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::errorLog const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformSetVisible):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::currentMediaTime const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVolume):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setMuted):
(WebCore::MediaPlayerPrivateAVFoundationObjC::assetStatus const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
(WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoOutput):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastPixelBuffer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::firstEnabledTrack const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasLoadedMediaSelectionGroups):
(WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForLegibleMedia):
(WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia):
(WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia):
(WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack):
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget):
(WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):

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

(WebCore::WebCoreAVFResourceLoader::startLoading):
(WebCore::WebCoreAVFResourceLoader::responseReceived):
(WebCore::WebCoreAVFResourceLoader::loadFailed):
(WebCore::WebCoreAVFResourceLoader::loadFinished):
(WebCore::WebCoreAVFResourceLoader::newDataStoredInSharedBuffer):

  • platform/graphics/cocoa/TextTrackRepresentationCocoa.mm:

(WebCore::TextTrackRepresentationCocoa::TextTrackRepresentationCocoa):
(WebCore::TextTrackRepresentationCocoa::~TextTrackRepresentationCocoa):
(WebCore::TextTrackRepresentationCocoa::update):
(WebCore::TextTrackRepresentationCocoa::setContentScale):
(WebCore::TextTrackRepresentationCocoa::setHidden const):
(WebCore::TextTrackRepresentationCocoa::bounds const):

  • platform/ios/DragImageIOS.mm:

(WebCore::scaleDragImage):
(WebCore::createDragImageFromImage):
(WebCore::createDragImageForRange):

  • platform/ios/LegacyTileCache.mm:

(WebCore::LegacyTileCache::~LegacyTileCache):

  • platform/ios/LegacyTileLayerPool.mm:

(WebCore::LegacyTileLayerPool::addLayer):

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::readBuffer const):

  • platform/ios/PlatformSpeechSynthesizerIOS.mm:

(WebCore::PlatformSpeechSynthesizer::pause):
(WebCore::PlatformSpeechSynthesizer::resume):
(WebCore::PlatformSpeechSynthesizer::speak):
(WebCore::PlatformSpeechSynthesizer::cancel):
(WebCore::PlatformSpeechSynthesizer::resetState):

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(-[WebAVPlayerLayer setVideoGravity:]):
(-[WebAVPlayerViewController enterFullScreenAnimated:completionHandler:]):
(-[WebAVPlayerViewController exitFullScreenAnimated:completionHandler:]):
(-[WebAVPlayerViewController MY_NO_RETURN]):
(-[WebAVPlayerViewController removeFromParentViewController]):

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::PlatformPasteboard::getTypes):
(WebCore::PlatformPasteboard::bufferForType):
(WebCore::PlatformPasteboard::getPathnamesForType const):
(WebCore::PlatformPasteboard::changeCount const):
(WebCore::PlatformPasteboard::copy):
(WebCore::PlatformPasteboard::addTypes):
(WebCore::PlatformPasteboard::setURL):
(WebCore::PlatformPasteboard::setStringForType):

  • platform/mac/PlatformSpeechSynthesizerMac.mm:

(WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
(WebCore::PlatformSpeechSynthesizer::pause):
(WebCore::PlatformSpeechSynthesizer::resume):
(WebCore::PlatformSpeechSynthesizer::speak):
(WebCore::PlatformSpeechSynthesizer::cancel):
(WebCore::PlatformSpeechSynthesizer::resetState):

  • platform/mac/SerializedPlatformDataCueMac.mm:

(WebCore::SerializedPlatformDataCueMac::isEqual const):
(WebCore::SerializedPlatformDataCueMac::encodableValue const):

  • platform/mac/WebCoreFullScreenPlaceholderView.mm:

(-[WebCoreFullScreenPlaceholderView initWithFrame:]):

  • platform/mac/WebCoreFullScreenWarningView.mm:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:

(WebCore::MediaRecorderPrivateWriter::initialize):
(WebCore::MediaRecorderPrivateWriter::startAssetWriter):
(WebCore::MediaRecorderPrivateWriter::appendCompressedAudioSampleBufferIfPossible):
(WebCore::MediaRecorderPrivateWriter::appendCompressedVideoSampleBuffer):
(WebCore::MediaRecorderPrivateWriter::flushCompressedSampleBuffers):

  • platform/mediastream/mac/AVCaptureDeviceManager.mm:

(WebCore::AVCaptureDeviceManager::updateCachedAVCaptureDevices):

  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
(-[WebCoreAVVideoCaptureSourceObserver observeValueForKeyPath:ofObject:change:context:]):

  • platform/network/cocoa/ResourceRequestCocoa.mm:

(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::doUpdateResourceHTTPBody):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):

  • platform/network/cocoa/ResourceResponseCocoa.mm:

(WebCore::ResourceResponse::initNSURLResponse const):
(WebCore::ResourceResponse::platformLazyInit):

  • platform/network/mac/AuthenticationMac.mm:

(WebCore::AuthenticationChallenge::setAuthenticationClient):
(WebCore::AuthenticationChallenge::authenticationClient const):

  • platform/network/mac/ResourceErrorMac.mm:

(WebCore::createNSErrorFromResourceErrorBase):
(WebCore::ResourceError::mapPlatformError):
(WebCore::ResourceError::platformLazyInit):

  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:

(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):

  • platform/text/cocoa/LocaleCocoa.mm:

(WebCore::LocaleCocoa::LocaleCocoa):
(WebCore::LocaleCocoa::timeAMPMLabels):
(WebCore::LocaleCocoa::initializeLocaleData):

  • platform/text/cocoa/LocalizedDateCache.mm:

(WebCore::LocalizedDateCache::calculateMaximumWidth):

  • rendering/RenderThemeCocoa.mm:

(WebCore::RenderThemeCocoa::mediaControlsFormattedStringForDuration):

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::paintSystemPreviewBadge):

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::popupButton const):
(WebCore::RenderThemeMac::search const):
(WebCore::RenderThemeMac::sliderThumbHorizontal const):
(WebCore::RenderThemeMac::sliderThumbVertical const):
(WebCore::RenderThemeMac::textField const):

4:27 AM Changeset in webkit [283705] by commit-queue@webkit.org
  • 9 edits in trunk

[JSC] Temporal tweaks to pass more test262 tests
https://bugs.webkit.org/show_bug.cgi?id=231331

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

JSTests:

  • test262/config.yaml: Three tests no longer crash, but they still depend on unimplemented functionality, so skip them.
  • test262/expectations.yaml:

Source/JavaScriptCore:

  • runtime/ISO8601.h:

(JSC::ISO8601::Duration::operator[]): Add an overload for Duration[]

that indexes by TemporalUnit enum instead of integer index.

(JSC::ISO8601::Duration::operator[] const):

  • runtime/TemporalDuration.cpp:

(JSC::TemporalDuration::fromDurationLike): Access Duration properties in

the order defined in the specification.

(JSC::TemporalDuration::with const): Access Duration properties in the

order defined in the specification.

(JSC::TemporalDuration::round const): Temporarily throw an exception

here instead of failing an assertion, when attempting to use
unimplemented relativeTo functionality.

  • runtime/TemporalObject.cpp:

(JSC::temporalUnitPluralPropertyName): Rename from

temporalUnitPropertyName.

(JSC::temporalUnitSingularPropertyName): Added.

  • runtime/TemporalObject.h: Add array corresponding to the table in the spec text specifying alphabetical access order for unit properties.
  • runtime/TemporalPlainTime.cpp:

(JSC::toTemporalTimeRecord): Access PlainTime properties in the order

defined in the specification.

(JSC::toPartialTime): Access PlainTime properties in the order defined

in the specification.

1:35 AM Changeset in webkit [283704] by commit-queue@webkit.org
  • 13 edits
    7 adds
    2 deletes in trunk/LayoutTests

Resync the-img-element WPT tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=231297

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

LayoutTests/imported/w3c:

Resync html the-img-element tests from upstream 163d457f7eec.

  • resources/import-expectations.json:
  • web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-below-viewport-dynamic.html:
  • web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-viewport-dynamic.html:
  • web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-negative-margin-expected.txt: Added.
  • web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-negative-margin.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-relevant-mutations.html:
  • web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow-aspect-ratio.html:
  • web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow.html:
  • web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-to-eager.html:
  • web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-use-list-of-available-images-expected.txt: Added.
  • web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-use-list-of-available-images.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-img-element/list-of-available-images-does-not-coalesce-in-flight-requests.sub.tentative-expected.txt: Added.
  • web-platform-tests/html/semantics/embedded-content/the-img-element/list-of-available-images-does-not-coalesce-in-flight-requests.sub.tentative.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations-expected.txt: Removed.
  • web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html: Removed.
  • web-platform-tests/html/semantics/embedded-content/the-img-element/resources/image-and-stash.py: Added.

(main):

  • web-platform-tests/html/semantics/embedded-content/the-img-element/resources/image-loading-lazy-below-viewport.html:
  • web-platform-tests/html/semantics/embedded-content/the-img-element/resources/w3c-import.log:
  • web-platform-tests/html/semantics/embedded-content/the-img-element/w3c-import.log:

LayoutTests:

No lazy image loading available on wk1.

  • platform/mac-wk1/TestExpectations:
1:08 AM Changeset in webkit [283703] by commit-queue@webkit.org
  • 16 edits
    2 moves
    2 deletes in trunk/Source

ScopedEGLDefaultDisplay should be removed
https://bugs.webkit.org/show_bug.cgi?id=231011

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-10-07
Reviewed by Kenneth Russell.

Source/WebCore:

Hard-coding the code to EGL_DEFAULT_DISPLAY only and using the scoped
holder is making the EGLDisplays harder to use than neccessary. The
implementation target, e.g. the ability to call EGLTerminate, was also a bit
more convoluted than needed.

Move the "call EGLTerminate" logic from a bit convoluted refcount mechanism
in ScopedEGLDefaultDisplay to the explicit GraphicsContextGLOpenGL::releaseResources().
The callers are expected to do the refcounting anyway, as the existing client
WebKit::ScopedWebGLRenderingResourcesRequest already did.

Make GraphicsContextGLOpenGL::releaseResources() available on all platforms.
It is implemented on all ANGLE implementations.
Platforms can augment the implementation by implementing
GraphicsContextGLOpenGL::platformReleaseResources(). For Cocoa, this function
resets the currentContext cache that is used to optimize making context current.

No new tests, refactor.

  • CMakeLists.txt:
  • Headers.cmake:
  • PlatformMac.cmake:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/angle/ANGLEUtilities.cpp: Renamed from Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLEEGLUtilities.h.

(WebCore::platformIsANGLEAvailable):

  • platform/graphics/angle/ANGLEUtilities.h: Renamed from Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLEUtilities.h.

Rename GraphicsContextGLANGLEUtilities to simpler and more descriptive ANGLEUtilities.
Add the isANGLEAvailable to there.

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::releaseResources):
(WebCore::GraphicsContextGLOpenGL::platformReleaseResources):

  • platform/graphics/angle/GraphicsContextGLANGLEEGLUtilities.cpp: Removed.

(WebCore::refDefaultDisplay): Deleted.
(WebCore::unrefDefaultDisplayIfNeeded): Deleted.
(WebCore::ScopedEGLDefaultDisplay::operator=): Deleted.
(WebCore::ScopedEGLDefaultDisplay::ScopedEGLDefaultDisplay): Deleted.
(WebCore::ScopedEGLDefaultDisplay::~ScopedEGLDefaultDisplay): Deleted.
(WebCore::ScopedEGLDefaultDisplay::releaseAllResourcesIfUnused): Deleted.

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::platformIsANGLEAvailable):
(WebCore::initializeEGLDisplay):
(WebCore::GraphicsContextGLOpenGL::platformReleaseResources):
(WebCore::isANGLEAvailable): Deleted.
(WebCore::GraphicsContextGLOpenGL::releaseCurrentContext): Deleted.
(WebCore::GraphicsContextGLOpenGL::releaseAllResourcesIfUnused): Deleted.

  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:

(WebCore::GraphicsContextGLOpenGL::releaseResources):
(WebCore::GraphicsContextGLOpenGL::platformReleaseResources):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/ios/wak/WebCoreThread.mm:

Source/WebKit:

Implement the release of WebGL resources with the amended
GraphicsContextGLOpenGL::releaseResources() instead of
previous separate function GraphicsContextGLOpenGL::releaseAllResources().

Use the resource release code path universally, as
GraphicsContextGLOpenGL::releaseResources() is now common code.

  • GPUProcess/graphics/ScopedWebGLRenderingResourcesRequest.cpp:

(WebKit::ScopedWebGLRenderingResourcesRequest::scheduleFreeWebGLRenderingResources):
(WebKit::ScopedWebGLRenderingResourcesRequest::freeWebGLRenderingResources):

  • GPUProcess/graphics/ScopedWebGLRenderingResourcesRequest.h:
  • GPUProcess/graphics/ScopedWebGLRenderingResourcesRequestCocoa.cpp: Removed.

(WebKit::ScopedWebGLRenderingResourcesRequest::scheduleFreeWebGLRenderingResources): Deleted.
(WebKit::ScopedWebGLRenderingResourcesRequest::freeWebGLRenderingResources): Deleted.

  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
12:56 AM Changeset in webkit [283702] by basuke.suzuki@sony.com
  • 10 edits in trunk/Source/WebKit

Change the confusing feature name for testing purpose
https://bugs.webkit.org/show_bug.cgi?id=231259

Reviewed by Tim Horton.

ENABLE(EXPERIMENTAL_FEATURE) was used in the test, but that is very confusing with
ENABLE_EXPERIMENTAL_FEATURES. Change them to more obvious ENABLE(FEATURE_FOR_TESTING).

  • Scripts/webkit/parser_unittest.py:
  • Scripts/webkit/tests/MessageArgumentDescriptions.cpp:

(IPC::jsValueForArguments):
(IPC::messageArgumentDescriptions):

  • Scripts/webkit/tests/MessageNames.cpp:

(IPC::isValidMessageName):

  • Scripts/webkit/tests/TestWithLegacyReceiver.messages.in:
  • Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp:

(WebKit::TestWithLegacyReceiver::didReceiveTestWithLegacyReceiverMessage):

  • Scripts/webkit/tests/TestWithLegacyReceiverMessages.h:
  • Scripts/webkit/tests/TestWithoutAttributes.messages.in:
  • Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp:

(WebKit::TestWithoutAttributes::didReceiveMessage):

  • Scripts/webkit/tests/TestWithoutAttributesMessages.h:

Oct 6, 2021:

10:33 PM Changeset in webkit [283701] by timothy@apple.com
  • 2 edits in trunk/Source/WebKit

_WKRemoteObjectRegistry's ReplyBlockCallChecker should always dealloc on the main thread
https://bugs.webkit.org/show_bug.cgi?id=231346
rdar://problem/83965481

Reviewed by Chris Dumez.

  • Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:

(-[_WKRemoteObjectRegistry _invokeMethod:]): Added WTF::DestructionThread::MainRunLoop to ReplyBlockCallChecker.

9:39 PM AnalyzingBuildPerformance created by jer.noble@apple.com
9:15 PM Changeset in webkit [283700] by Ben Nham
  • 16 edits
    15 adds in trunk

Add PushSubscription stubs
https://bugs.webkit.org/show_bug.cgi?id=231278

Reviewed Alex Christensen.

LayoutTests/imported/w3c:

Updated the WPT test results to reflect the newly implemented interfaces.

  • web-platform-tests/push-api/idlharness.https.any-expected.txt:
  • web-platform-tests/push-api/idlharness.https.any.serviceworker-expected.txt:

Source/WebCore:

This adds PushSubscription-related IDL to WebCore. Currently the objects are just data
containers and PushSubscription.unsubscribe() does nothing.

Test: http/wpt/push-api/pushSubscription.https.any.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/push-api/PushEncryptionKeyName.h: Added.
  • Modules/push-api/PushEncryptionKeyName.idl: Added.
  • Modules/push-api/PushSubscription.cpp: Added.

(WebCore::PushSubscription::create):
(WebCore::PushSubscription::PushSubscription):
(WebCore::PushSubscription::endpoint const):
(WebCore::PushSubscription::expirationTime const):
(WebCore::PushSubscription::options const):
(WebCore::PushSubscription::getKey const):
(WebCore::PushSubscription::unsubscribe):
(WebCore::PushSubscription::toJSON const):

  • Modules/push-api/PushSubscription.h: Added.
  • Modules/push-api/PushSubscription.idl: Added.
  • Modules/push-api/PushSubscriptionJSON.h: Added.
  • Modules/push-api/PushSubscriptionJSON.idl: Added.
  • Modules/push-api/PushSubscriptionOptions.cpp: Added.

(WebCore::PushSubscriptionOptions::create):
(WebCore::PushSubscriptionOptions::PushSubscriptionOptions):
(WebCore::PushSubscriptionOptions::userVisibleOnly const):
(WebCore::PushSubscriptionOptions::serverVAPIDPublicKey const):
(WebCore::PushSubscriptionOptions::applicationServerKey const):

  • Modules/push-api/PushSubscriptionOptions.h: Added.
  • Modules/push-api/PushSubscriptionOptions.idl: Added.
  • Modules/push-api/PushSubscriptionOptionsInit.h: Added.
  • Modules/push-api/PushSubscriptionOptionsInit.idl: Added.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:
  • testing/Internals.cpp:

(WebCore::Internals::createPushSubscription):

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

LayoutTests:

Added a basic test for PushSubscription. Right now the test only runs in the window global
scope because it relies on a constructor called via window.internals. I'll add more test
cases and test it in the worker scope as well once we change the test to create a
subscription via a mocked PushManager.subscribe call instead.

  • http/wpt/push-api/pushSubscription.https.any-expected.txt: Added.
  • http/wpt/push-api/pushSubscription.https.any.html: Added.
  • http/wpt/push-api/pushSubscription.https.any.js: Added.

(bytesFrom):
(test):

9:02 PM Changeset in webkit [283699] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] InlineDisplay::Box should not hold on to RenderStyle&
https://bugs.webkit.org/show_bug.cgi?id=231325
<rdar://83925737>

Reviewed by Simon Fraser.

In the long run InlineDisplay::Box should retain the style so that we could paint the content independently, but for now
let's just consult the layout box for the style information.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::build):
(WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineContent):
(WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineSpanningInlineBoxes):

  • layout/formattingContexts/inline/display/InlineDisplayBox.h:

(WebCore::InlineDisplay::Box::style const): The assumption here was that the style object stays around for the lifecycle of the display box (i.e. style object is destroyed -> layout -> new set of display boxes).
(WebCore::InlineDisplay::Box::Box):

  • layout/integration/LayoutIntegrationPagination.cpp:

(WebCore::LayoutIntegration::makeAdjustedContent):

8:54 PM Changeset in webkit [283698] by Simon Fraser
  • 7 edits in trunk/Source/WebCore

Rename the AnimatedScroll enum to ScrollIsAnimated for consistency
https://bugs.webkit.org/show_bug.cgi?id=231336

Reviewed by Wenson Hsieh.

All the other scroll-related enums start with "Scroll" so rename AnimatedScroll to
ScrollIsAnimated to match, and ScrollIsAnimated::Yes and ScrollIsAnimated::No become more
readable.

  • dom/Element.cpp:

(WebCore::Element::scrollTo):
(WebCore::Element::setScrollLeft):
(WebCore::Element::setScrollTop):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::scrollTo const):

  • page/FrameView.cpp:

(WebCore::FrameView::setScrollPosition):

  • platform/ScrollTypes.h:

(WebCore::ScrollPositionChangeOptions::createProgrammaticWithOptions):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollRectToVisible):

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::scrollToOffset):

7:22 PM Changeset in webkit [283697] by Wenson Hsieh
  • 10 edits in trunk/Source

Delete WebCore::DisplayList::SetInlineFillGradient
https://bugs.webkit.org/show_bug.cgi?id=231326

Reviewed by Simon Fraser.

Source/WebCore:

Remove this display list item, because:

  • It should never have been encoded and decoded as POD data in the first place, due to the fact that it

indirectly contains Variants.

  • Deleting this item does not cause any significant performance impact when using streaming IPC for

display lists.

  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::append):

  • platform/graphics/displaylists/DisplayListItemBuffer.cpp:

(WebCore::DisplayList::ItemHandle::apply):
(WebCore::DisplayList::ItemHandle::destroy):
(WebCore::DisplayList::ItemHandle::safeCopy const):

  • platform/graphics/displaylists/DisplayListItemType.cpp:

(WebCore::DisplayList::sizeOfItemInBytes):
(WebCore::DisplayList::isDrawingItem):
(WebCore::DisplayList::isInlineItem):

  • platform/graphics/displaylists/DisplayListItemType.h:
  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::operator<<):
(WebCore::DisplayList::SetInlineFillGradient::SetInlineFillGradient): Deleted.
(WebCore::DisplayList::SetInlineFillGradient::gradient const): Deleted.
(WebCore::DisplayList::SetInlineFillGradient::apply const): Deleted.
(WebCore::DisplayList::SetInlineFillGradient::isInline): Deleted.

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::SetInlineFillGradient::isValid const): Deleted.

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::containsOnlyInlineStateChanges):
(WebCore::DisplayList::Recorder::appendStateChangeItem):

Source/WebKit:

See WebCore/ChangeLog for more details.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::decodeItem):

7:21 PM Changeset in webkit [283696] by Wenson Hsieh
  • 3 edits in trunk/Source/WebKit

Add a configurable wake up message hysteresis to IPC::StreamClientConnection
https://bugs.webkit.org/show_bug.cgi?id=231304

Reviewed by Simon Fraser.

Make it possible to avoid sending the wakeup message in StreamClientConnection, until some configurable number
of messages have been queued up. This allows us to avoid triggering excessive wakeups in the GPU Process when
using streaming IPC for display lists in the Canvas Lines subtest in MotionMark, which exercises sending a
massive, constant stream of cheap drawing commands to the GPUP.

By default, this hysteresis remains at 0, which means that we'll continue to immediately send GL commands to the
GPU Process when using GPU Process for WebGL. In a future patch, I intend on defaulting to a small hysteresis
(i.e. ~256) for 2D canvas and DOM rendering.

  • Platform/IPC/StreamClientConnection.cpp:

(IPC::StreamClientConnection::wakeUpServer):
(IPC::StreamClientConnection::deferredWakeUpServer):
(IPC::StreamClientConnection::decrementRemainingMessageCountBeforeSendingWakeUp):
(IPC::StreamClientConnection::sendDeferredWakeUpMessageIfNeeded):

  • Platform/IPC/StreamClientConnection.h:

Also mark StreamClientConnection with WTF_MAKE_FAST_ALLOCATED, so that we can wrap the client connection in a
std::unique_ptr in a future patch.

(IPC::StreamClientConnection::trySendStream):

When sending a normal (non-blocking) stream message, if the wakeup hysteresis count is non-zero, avoid
immediately signaling the semaphore and instead just set the hysteresis count to the client's specified count
(m_wakeUpMessageHysteresis).

(IPC::StreamClientConnection::trySendSyncStream):

When sending a sync message, we always want to immediately flush out any pending wakeup message regardless of
the current hysteresis, since we're waiting for the server to process a reply.

7:15 PM Changeset in webkit [283695] by Russell Epstein
  • 8 edits in branches/safari-612.2.9.1-branch/Source

Versioning.

WebKit-7612.2.9.1.6

6:39 PM Changeset in webkit [283694] by Russell Epstein
  • 2 edits in branches/safari-612.2.9.3-branch/Source/JavaScriptCore

Revert "Cherry-pick r283632. rdar://problem/83942645"

This reverts commit r283653.

6:19 PM Changeset in webkit [283693] by Russell Epstein
  • 1 copy in tags/Safari-612.2.9.1.5

Tag Safari-612.2.9.1.5.

5:56 PM Changeset in webkit [283692] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r283490. rdar://problem/83954408

Vorbis decoder can't be instantiated - follow up on Bug 230742
https://bugs.webkit.org/show_bug.cgi?id=231154
rdar://problem/83825162

Fix typo in expression.

Reviewed by Tim Horton.

  • Scripts/process-entitlements.sh: Add missing bool keyword.

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

5:56 PM Changeset in webkit [283691] by Russell Epstein
  • 3 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r283209. rdar://problem/83956699

Crash in WebKit::DisplayLink::displayLinkCallback()
https://bugs.webkit.org/show_bug.cgi?id=230917
<rdar://82528370>

Reviewed by Tim Horton.

We have evidence of a divide-by-zero crash in DisplayLink::notifyObserversDisplayWasRefreshed()
where m_currentUpdate.updatesPerSecond is zero. The only way I can see this happening
is if DisplayLink::DisplayLink() returns early, which should log. Protect against
this by initializing m_displayNominalFramesPerSecond to 60, and do another check,
with a log, in DisplayLink::addObserver() before we use m_displayNominalFramesPerSecond
for the first time.

Convert the logging to RELEASE_LOG_FAULT reports.

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

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

5:52 PM Changeset in webkit [283690] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/JavaScriptCore

Cherry-pick r283632. rdar://problem/83942704

Speculative fix for a null pointer dereference in ByteCodeParser::handlePutByVal.
https://bugs.webkit.org/show_bug.cgi?id=231252
rdar://83310320

Reviewed by Yusuke Suzuki.

We're seeing a null pointer dereference in ByteCodeParser::handlePutByVal().
Adding a null check here as a speculative fix to mitigate crashes while we
investigate further.

  • dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::handlePutByVal):

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

5:52 PM Changeset in webkit [283689] by Russell Epstein
  • 16 edits
    2 adds in branches/safari-612-branch

Cherry-pick r283556. rdar://problem/83956477

[JSC] JSPropertyNameEnumerator should not have cached prototype chain since empty JSPropertyNameEnumerator is shared
https://bugs.webkit.org/show_bug.cgi?id=231202
JSTests:

Reviewed by Keith Miller.

  • stress/for-in-validation-poly-proto.js: Added. (shouldBe): (test): (factory.Test): (factory):
  • stress/for-in-validation-watchpoint.js: Added. (shouldBe): (test): (Test): (factory):

Source/JavaScriptCore:

rdar://83815122

Reviewed by Keith Miller.

r282014 assumed an invariant that JSPropertyNameEnumerator's StructureChain is immutable.
This invariant is also used in validation of JSPropertyNameEnumerator. However, this
invariant was broken since we now have shared empty sentinel JSPropertyNameEnumerator, which can
be used for different structures having different prototype chain.

Since now we have shared JSPropertyNameEnumerator, JSPropertyNameEnumerator should not have
StructureChain in its member. When invalidating StructureChain in Structure, we also clear
cached JSPropertyNameEnumerator so that we do not get a stale JSPropertyNameEnumerator from
Structure even though watchpoint-based validation is not used.

This patch also removes ValidatedViaWatchpoint flag in JSPropertyNameEnumerator due to the same
reason. We should not modify JSPropertyNameEnumerator once it is instantiated. Instead, we encode
this flag as a lowest bit of m_cachedPropertyNameEnumerator. If it is validated via traversing (not watchpoints),
then this bit is set. So when loading that pointer from StructureRareData, we can quickly detect
it without even accessing to the enumerator. This fixes the issue, and it is even cleaner.
We rename m_cachedPropertyNameEnumerator to m_cachedPropertyNameEnumeratorAndFlag since it now
includes this flag.

While reviewing the code, we also found that watchpoint-based validation didn't care about PolyProto.
We should disable watchpoint-based validation if PolyProto is used.

  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileGetPropertyEnumerator):
  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_get_property_enumerator):
  • llint/LLIntSlowPaths.cpp: (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  • llint/LowLevelInterpreter64.asm:
  • runtime/JSPropertyNameEnumerator.cpp: (JSC::JSPropertyNameEnumerator::visitChildrenImpl):
  • runtime/JSPropertyNameEnumerator.h: (JSC::propertyNameEnumerator):
  • runtime/Structure.cpp: (JSC::Structure::visitChildrenImpl): (JSC::Structure::setCachedPropertyNameEnumerator): (JSC::Structure::cachedPropertyNameEnumeratorAndFlag const):
  • runtime/Structure.h: (JSC::Structure::propertyNameEnumeratorShouldWatch const):
  • runtime/StructureInlines.h: (JSC::Structure::prototypeChain const): (JSC::Structure::clearCachedPrototypeChain):
  • runtime/StructureRareData.cpp: (JSC::StructureRareData::visitChildrenImpl):
  • runtime/StructureRareData.h:
  • runtime/StructureRareDataInlines.h: (JSC::StructureRareData::cachedPropertyNameEnumerator const): (JSC::StructureRareData::cachedPropertyNameEnumeratorAndFlag const): (JSC::StructureRareData::setCachedPropertyNameEnumerator): (JSC::StructureChainInvalidationWatchpoint::fireInternal): (JSC::StructureRareData::tryCachePropertyNameEnumeratorViaWatchpoint): (JSC::StructureRareData::clearCachedPropertyNameEnumerator): (JSC::StructureRareData::invalidateWatchpointBasedValidation): Deleted.

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

5:52 PM Changeset in webkit [283688] by Russell Epstein
  • 7 edits in branches/safari-612-branch/Source

Cherry-pick r283444. rdar://problem/83960033

Remove JSC hack after r283410
https://bugs.webkit.org/show_bug.cgi?id=230261

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • runtime/JSObject.cpp: (JSC::JSObject::getOwnPropertyDescriptor):
  • runtime/PropertySlot.h:

Source/WebCore:

We revert a hack for accessors in JSC since this is not necessary.

  • bindings/scripts/CodeGeneratorJS.pm: (GetJSCAttributesForAttribute):
  • bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjDOMConstructor::construct): (WebCore::jsTestObj_searchGetter): (WebCore::JSC_DEFINE_CUSTOM_GETTER): (WebCore::setJSTestObj_searchSetter): (WebCore::JSC_DEFINE_CUSTOM_SETTER):
  • bindings/scripts/test/TestObj.idl:

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

5:52 PM Changeset in webkit [283687] by Russell Epstein
  • 16 edits in branches/safari-612-branch

Cherry-pick r283410. rdar://problem/83960033

Disable new incumbent-window until it is fully implemented
https://bugs.webkit.org/show_bug.cgi?id=230261
<rdar://problem/83099726>

Reviewed by Chris Dumez and Geoffrey Garen.

LayoutTests/imported/w3c:

  • web-platform-tests/html/webappapis/scripting/events/compile-event-handler-settings-objects-expected.txt:
  • web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-incumbent-expected.txt:

Source/JavaScriptCore:

  • interpreter/CallFrame.cpp: (JSC::CallFrame::globalObjectOfClosestCodeBlock):
  • runtime/JSObject.cpp: (JSC::JSObject::getOwnPropertyDescriptor):
  • runtime/PropertySlot.h:

Source/WebCore:

This patch disables new incumbent-window until it is fully implemented to avoid compatibility issue.

  • bindings/js/JSDOMConvertCallbacks.h: (WebCore::Converter<IDLCallbackFunction<T>>::convert): (WebCore::Converter<IDLCallbackInterface<T>>::convert):
  • bindings/js/JSDOMGlobalObject.cpp: (WebCore::callerGlobalObject): (WebCore::legacyActiveGlobalObjectForAccessor):
  • bindings/js/JSDOMGlobalObject.h:
  • bindings/js/JSDOMWindowBase.cpp: (WebCore::incumbentDOMWindow): (WebCore::legacyActiveDOMWindowForAccessor):
  • bindings/js/JSDOMWindowBase.h:
  • bindings/scripts/CodeGeneratorJS.pm: (GetJSCAttributesForAttribute): (GenerateCallWith):
  • page/Location.idl:

LayoutTests:

  • http/tests/security/frameNavigation/context-for-location-href-gopd-expected.txt:

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

5:46 PM Changeset in webkit [283686] by Russell Epstein
  • 1 copy in tags/Safari-612.2.9.0.5

Tag Safari-612.2.9.0.5.

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

Have SourceBufferPrivateAVJObjC use WorkQueue instead of dispatch_async
https://bugs.webkit.org/show_bug.cgi?id=230881
rdar://83429276

This change is twofold:
1- dispatch_async takes an objective-C block which doesn't support C++ move
semantics. As such the lambda would be copied including the captured variables.
When use with a non-thread safe refcounted object it could lead to a race
on the refcount which would result in a leak.
By using a WorkQueue instead, we avoid the above problem.
2- We want to unify in the media code how threads are created and task
dispatched: WorkQueue is a nice solution.

Reviewed by Chris Dumez.

No observable difference.

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

(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::append):
(WebCore::SourceBufferPrivateAVFObjC::resetParserState):

5:32 PM Changeset in webkit [283684] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r283294. rdar://problem/83956654

Add weakThis check in addition to null check added in r282881
https://bugs.webkit.org/show_bug.cgi?id=231000
<rdar://83605614>

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

r282881 made NetworkLoad::start call didCompleteWithError, which can cause the
NetworkResourceLoader to be deleted. It added a null check on m_networkLoad which
sometimes reads freed memory. This certainly isn't great, but luckily we have a way
to check if this object has been deleted. Let's do that.

  • NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::startNetworkLoad):

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

5:32 PM Changeset in webkit [283683] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebKitLegacy/mac

Cherry-pick r283225. rdar://problem/83953851

Make WebLocalizedString() thread-safe
https://bugs.webkit.org/show_bug.cgi?id=230954

Reviewed by Alexey Proskuryakov.

Make WebLocalizedString() thread-safe. It takes minimal effort to make it thread-safe given
that the NSBundle API is thread-safe [1] and clients keep calling it on the background thread.

[1] https://developer.apple.com/documentation/foundation/nslocalizedstringwithdefaultvalue
"As of OS X 10.11 and iOS 9, NSBundle is thread-safe. As such, you can safely call

NSLocalizedStringWithDefaultValue from any execution context."

  • Misc/WebLocalizableStrings.mm:

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

5:09 PM Changeset in webkit [283682] by Fujii Hironori
  • 13 edits in trunk

Python 3: run-inspector-generator-tests and generate-inspector-protocol-bindings.py
https://bugs.webkit.org/show_bug.cgi?id=231055

Reviewed by Jonathan Bedard.

Source/JavaScriptCore:

BaseException.message has been deprecated as of Python 2.6. Use
str(e) instead.

It seems that using frozenset causes flaky test failures in Python

  1. Stopped using frozenset.

Rebaselined test expected results with Python 3. This change is
not Python 2 compatible because Python 2 represent a unicode text
as u'pagee' while Python 3 does 'pagee'.

  • inspector/scripts/codegen/models.py:
  • inspector/scripts/generate-inspector-protocol-bindings.py:
  • inspector/scripts/tests/expected/fail-on-command-targetType-matching-domain-debuggableType.json-error:
  • inspector/scripts/tests/expected/fail-on-command-targetTypes-value.json-error:
  • inspector/scripts/tests/expected/fail-on-domain-debuggableTypes-value.json-error:
  • inspector/scripts/tests/expected/fail-on-domain-targetType-matching-domain-debuggableType.json-error:
  • inspector/scripts/tests/expected/fail-on-domain-targetTypes-value.json-error:
  • inspector/scripts/tests/expected/fail-on-event-targetType-matching-domain-debuggableType.json-error:
  • inspector/scripts/tests/expected/fail-on-event-targetTypes-value.json-error:

Tools:

  • Scripts/run-inspector-generator-tests:
  • Scripts/webkitpy/inspector/main.py:

(InspectorGeneratorTests.generate_from_json): Use sys.executable
to invoke generate-inspector-protocol-bindings.py because 'python'
is python2.

5:06 PM Changeset in webkit [283681] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Fix unified source-related build failures in RemoteSourceBufferProxy.cpp
https://bugs.webkit.org/show_bug.cgi?id=231335

Reviewed by Tim Horton.

We directly use WebCore::AudioTrackPrivate and WebCore::VideoTrackPrivate in RemoteSourceBufferProxy.cpp, but we
don't import their respective WebCore headers; this causes the build to break when shifting around unified
source groupings. Resolve this via the usual means (by importing these headers).

  • GPUProcess/media/RemoteSourceBufferProxy.cpp:
4:56 PM Changeset in webkit [283680] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebCore

AX: Make AccessibilityObjectInterface::contents return-by-value instead of return-by-out-parameter
https://bugs.webkit.org/show_bug.cgi?id=231289

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-10-06
Reviewed by Darin Adler.

Make AccessibilityObjectInterface::contents return-by-value instead of
return-by-out-parameter as this is more ergonomic.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::contents):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::contents):

  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

4:49 PM Changeset in webkit [283679] by Wenson Hsieh
  • 5 edits in trunk/Source/WebKit

Add some helper functions to RemoteResourceCache and RemoteResourceCacheProxy
https://bugs.webkit.org/show_bug.cgi?id=231319

Reviewed by Simon Fraser.

Add a few const getters to RemoteResourceCache, and make an existing getter on RemoteResourceCacheProxy const.
I plan to use these in future patches, to support using streamable IPC for display list rendering in the GPU
process.

  • GPUProcess/graphics/RemoteResourceCache.cpp:

(WebKit::RemoteResourceCache::cachedImageBuffer const):
(WebKit::RemoteResourceCache::cachedNativeImage const):
(WebKit::RemoteResourceCache::cachedFont const):
(WebKit::RemoteResourceCache::cachedImageBuffer): Deleted.

  • GPUProcess/graphics/RemoteResourceCache.h:
  • WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp:

(WebKit::RemoteResourceCacheProxy::cachedImageBuffer const):
(WebKit::RemoteResourceCacheProxy::cachedImageBuffer): Deleted.

  • WebProcess/GPU/graphics/RemoteResourceCacheProxy.h:
4:18 PM Changeset in webkit [283678] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Adopt WTF::ApproximateTime in IPC::Timeout
https://bugs.webkit.org/show_bug.cgi?id=231301

Reviewed by Simon Fraser.

When computing time out deadlines for IPC messages, the time granularities (on the order of hundreds of
milliseconds) are many, many orders of magnitude greater than the granularity of ApproximateTime; this makes it
much cheaper to use ApproximateTime instead of MonotonicTime when computing these deadlines, which significantly
improves performance in the case where we're streaming high volumes of IPC messages.

Additionally, in the case where the timeout duration is infinite, we can avoid asking for the current time
altogether, and simply use ApproximateTime::infinity().

  • Platform/IPC/Timeout.h:

(IPC::Timeout::Timeout):
(IPC::Timeout::secondsUntilDeadline const):
(IPC::Timeout::deadline const):
(IPC::Timeout::didTimeOut const):

4:15 PM Changeset in webkit [283677] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 Debug ] imported/w3c/web-platform-tests/xhr/send-timeout-events.htm is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231337

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
3:58 PM Changeset in webkit [283676] by sihui_liu@apple.com
  • 37 edits
    3 copies
    4 adds in trunk

Add support for FileSystemSyncAccessHandle
https://bugs.webkit.org/show_bug.cgi?id=231185
<rdar://problem/83847859>

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-sync-access-handle-lock.https.tentative.worker-expected.txt:

Source/WebCore:

Implement basic support for FileSystemSyncAccessHandle as proposal:
https://github.com/WICG/file-system-access/blob/main/AccessHandle.md

FileSystemSyncAccessHandle can be created via FileSystemFileHandle, and it commuicates with backend via
FileSystemFileHandle.

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

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Headers.cmake:
  • Modules/filesystemaccess/FileSystemFileHandle.cpp:

(WebCore::FileSystemFileHandle::createSyncAccessHandle):
(WebCore::FileSystemFileHandle::getSize):
(WebCore::FileSystemFileHandle::truncate):
(WebCore::FileSystemFileHandle::flush):
(WebCore::FileSystemFileHandle::close):

  • Modules/filesystemaccess/FileSystemFileHandle.h:
  • Modules/filesystemaccess/FileSystemFileHandle.idl:
  • Modules/filesystemaccess/FileSystemStorageConnection.h:
  • Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp: Added.

(WebCore::FileSystemSyncAccessHandle::create):
(WebCore::FileSystemSyncAccessHandle::FileSystemSyncAccessHandle):
(WebCore::FileSystemSyncAccessHandle::~FileSystemSyncAccessHandle):
(WebCore::FileSystemSyncAccessHandle::truncate):
(WebCore::FileSystemSyncAccessHandle::getSize):
(WebCore::FileSystemSyncAccessHandle::flush):
(WebCore::FileSystemSyncAccessHandle::close):
(WebCore::FileSystemSyncAccessHandle::didClose):

  • Modules/filesystemaccess/FileSystemSyncAccessHandle.h: Added.
  • Modules/filesystemaccess/FileSystemSyncAccessHandle.idl: Added.
  • Modules/filesystemaccess/FileSystemSyncAccessHandleIdentifier.h: Added.
  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp:

(WebCore::WorkerFileSystemStorageConnection::scopeClosed):
(WebCore::WorkerFileSystemStorageConnection::removeEntry):
(WebCore::WorkerFileSystemStorageConnection::didCreateSyncAccessHandle):
(WebCore::WorkerFileSystemStorageConnection::completeIntegerCallback):
(WebCore::WorkerFileSystemStorageConnection::completeVoidCallback):
(WebCore::WorkerFileSystemStorageConnection::createSyncAccessHandle):
(WebCore::WorkerFileSystemStorageConnection::getSize):
(WebCore::WorkerFileSystemStorageConnection::truncate):
(WebCore::WorkerFileSystemStorageConnection::flush):
(WebCore::WorkerFileSystemStorageConnection::close):
(WebCore::WorkerFileSystemStorageConnection::didRemoveEntry): Deleted.

  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.h:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:

Source/WebKit:

Currently we only allow one open access handle on one file. Second access handle can be created after the first
is closed.

  • NetworkProcess/storage/FileSystemStorageError.h:

(WebKit::convertToException):
(WebKit::convertToExceptionOr):
(WebKit::convertToExceptionCode): Deleted.

  • NetworkProcess/storage/FileSystemStorageHandle.cpp:

(WebKit::FileSystemStorageHandle::createSyncAccessHandle):
(WebKit::FileSystemStorageHandle::getSize):
(WebKit::FileSystemStorageHandle::truncate):
(WebKit::FileSystemStorageHandle::flush):
(WebKit::FileSystemStorageHandle::close):

  • NetworkProcess/storage/FileSystemStorageHandle.h:
  • NetworkProcess/storage/FileSystemStorageManager.cpp:

(WebKit::FileSystemStorageManager::connectionClosed):
(WebKit::FileSystemStorageManager::acquireLockForFile):
(WebKit::FileSystemStorageManager::releaseLockForFile):

  • NetworkProcess/storage/FileSystemStorageManager.h:
  • NetworkProcess/storage/NetworkStorageManager.cpp:

(WebKit::NetworkStorageManager::createSyncAccessHandle):
(WebKit::NetworkStorageManager::getSizeForAccessHandle):
(WebKit::NetworkStorageManager::truncateForAccessHandle):
(WebKit::NetworkStorageManager::flushForAccessHandle):
(WebKit::NetworkStorageManager::closeAccessHandle):

  • NetworkProcess/storage/NetworkStorageManager.h:
  • NetworkProcess/storage/NetworkStorageManager.messages.in:
  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):

  • WebProcess/WebCoreSupport/WebFileSystemStorageConnection.cpp:

(WebKit::WebFileSystemStorageConnection::getFileHandle):
(WebKit::WebFileSystemStorageConnection::getDirectoryHandle):
(WebKit::WebFileSystemStorageConnection::removeEntry):
(WebKit::WebFileSystemStorageConnection::resolve):
(WebKit::WebFileSystemStorageConnection::createSyncAccessHandle):
(WebKit::WebFileSystemStorageConnection::getSize):
(WebKit::WebFileSystemStorageConnection::truncate):
(WebKit::WebFileSystemStorageConnection::flush):
(WebKit::WebFileSystemStorageConnection::close):

  • WebProcess/WebCoreSupport/WebFileSystemStorageConnection.h:
  • WebProcess/WebCoreSupport/WebStorageConnection.cpp:

(WebKit::WebStorageConnection::fileSystemGetDirectory):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
  • wtf/FileSystem.h:
  • wtf/glib/FileSystemGlib.cpp:

(WTF::FileSystemImpl::flushFile):

  • wtf/posix/FileSystemPOSIX.cpp:

(WTF::FileSystemImpl::flushFile):

  • wtf/win/FileSystemWin.cpp:

(WTF::FileSystemImpl::flushFile):

LayoutTests:

  • storage/filesystemaccess/resources/sync-access-handle-basics.js: Added.

(finishTest):
(getDirectory):

  • storage/filesystemaccess/sync-access-handle-basics-worker-expected.txt: Added.
  • storage/filesystemaccess/sync-access-handle-basics-worker.html: Added.
3:41 PM Changeset in webkit [283675] by Wenson Hsieh
  • 9 edits
    2 deletes in trunk

Make ImageBuffer::drawingContext() return GraphicsContext instead of DisplayList::DrawingContext
https://bugs.webkit.org/show_bug.cgi?id=231296

Reviewed by Simon Fraser.

Source/WebCore:

In preparation for decoupling RemoteImageBufferProxy from DisplayList::ImageBuffer (as well as DrawingContext),
we refactor ImageBuffer::drawingContext() to no longer return a DisplayList::DrawingContext, but rather a
generic GraphicsContext. In future patches, this allows us to create a new GraphicsContext subclass that doesn't
manage its own DisplayList, but instead uses streamable IPC messages to send individual display list items (or
eventually, just their arguments) over to the GPU process.

Unfortunately, this means that HTMLCanvasElement can no longer use its display list drawing context to track
display list items. However, since this capability was only used for a single layout test, we can simply remove
it altogether (and simplify some of the code in HTMLCanvasElement in the process).

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::createImageBuffer const):
(WebCore::HTMLCanvasElement::setTracksDisplayListReplay): Deleted.
(WebCore::HTMLCanvasElement::displayListAsText const): Deleted.
(WebCore::HTMLCanvasElement::replayDisplayListAsText const): Deleted.

  • html/HTMLCanvasElement.h:
  • platform/graphics/displaylists/DisplayListImageBuffer.h:
  • testing/Internals.cpp:

(WebCore::Internals::setElementTracksDisplayListReplay):
(WebCore::Internals::displayListForElement):
(WebCore::Internals::replayDisplayListForElement):

LayoutTests:

Remove support for display list tracking in the canvas element. See WebCore ChangeLog for more details.

  • displaylists/canvas-display-list-expected.txt: Removed.
  • displaylists/canvas-display-list.html: Removed.
  • platform/ios/TestExpectations:
  • platform/mac-wk1/TestExpectations:
3:41 PM Changeset in webkit [283674] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 ] media/track/track-forced-subtitles-in-band.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=231333

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
3:35 PM Changeset in webkit [283673] by Ryan Haddad
  • 1 edit
    4 adds in trunk/LayoutTests

[ iOS 15 ]2 fast/dom/HTMLAnchorElement tests are failing
https://bugs.webkit.org/show_bug.cgi?id=231293

Unreviewed test gardening.

Add iOS 14 baselines.

  • platform/ios-14/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate-expected.txt: Added.
  • platform/ios-14/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-expected.txt: Added.
3:26 PM Changeset in webkit [283672] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Unreviewed, reverting r283634.
https://bugs.webkit.org/show_bug.cgi?id=231332

Some debug assertions. RenderLayer needs to be fixed first

Reverted changeset:

"Ensure that the top layer is always anchored to the
RenderView"
https://bugs.webkit.org/show_bug.cgi?id=231292
https://commits.webkit.org/r283634

3:12 PM Changeset in webkit [283671] by Alan Coon
  • 7 edits in branches/safari-613.1.4-branch/Source/WebKit

Revert r283374. rdar://problem/83847918

3:08 PM Changeset in webkit [283670] by Wenson Hsieh
  • 16 edits
    1 move in trunk

Move FlushIdentifier out of the DisplayList namespace
https://bugs.webkit.org/show_bug.cgi?id=231263

Reviewed by Simon Fraser.

Source/WebCore:

See WebKit/ChangeLog for more details.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/GraphicsContextFlushIdentifier.h: Renamed from Source/WebCore/platform/graphics/displaylists/DisplayListFlushIdentifier.h.
  • platform/graphics/ImageBuffer.h:

(WebCore::ImageBuffer::didFlush):

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::FlushContext::FlushContext):
(WebCore::DisplayList::FlushContext::identifier const):

  • platform/graphics/displaylists/DisplayListRecorder.h:

(WebCore::DisplayList::Recorder::flushContext):

Source/WebKit:

In a future patch, I plan to use DisplayList::FlushIdentifier in code that is not specific to WebCore display
lists. As such, move this out into a separate header (GraphicsContextFlushIdentifier.h), and rename the enum
class accordingly.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::didFlush):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):
(headers_for_type):

  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:

(WebKit::RemoteImageBufferProxy::lastSentFlushIdentifier const):
(WebKit::RemoteImageBufferProxy::waitForDidFlushOnSecondaryThread):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::didFlush):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.messages.in:

Tools:

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

(TestWebKitAPI::TEST):

3:03 PM Changeset in webkit [283669] by Ross Kirsling
  • 2 edits in trunk/JSTests

Unreviewed, ensure test262 expectations reflect BigSur release mode.

  • test262/expectations.yaml:
2:47 PM Changeset in webkit [283668] by Russell Epstein
  • 8 edits in branches/safari-612-branch/Source

Versioning.

WebKit-7612.3.1

2:45 PM Changeset in webkit [283667] by Kyle Piddington
  • 8 edits
    3 adds
    2 deletes in trunk

Shadertoy "truchet district" fails to compile with error: Internal error compiling shader with Metal backend"
https://bugs.webkit.org/show_bug.cgi?id=229378
<rdar://problem/82299053>

Reviewed by Kenneth Russell.

Source/ThirdParty/ANGLE:

Change TranslatorMetalDirect to prefix '_u' to all user defined variables.
Clean up builtins like samplers and ANGLE structs that were being
accidently promoted to userDefined variables.

  • src/compiler/translator/TranslatorMetalDirect.cpp:

(sh::GetMslKeywords):

  • src/compiler/translator/TranslatorMetalDirect/Name.cpp:

(Name::emit const):

  • src/compiler/translator/TranslatorMetalDirect/SymbolEnv.cpp:

(SymbolEnv::getTextureEnv):
(SymbolEnv::getSamplerStruct):
(sh::GetTextureTypeName):

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

(rx::mtl::GenerateTransformFeedbackVaryingOutput):

LayoutTests:

Add a test testing Metal reserved words and standard library macros.

  • webgl/pending/conformance/glsl/misc/shader-with-reserved-words-2-expected.txt: Added.
  • webgl/pending/conformance/glsl/misc/shader-with-reserved-words-2.html: Added.
  • webgl/pending/resources/webgl_test_files/conformance/glsl/misc/shader-with-reserved-words-2.html: Added.
2:38 PM Changeset in webkit [283666] by commit-queue@webkit.org
  • 1 edit
    27 adds in trunk/JSTests

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

Add tests that were somehow cut off in the previous patch.

Patch by Philip Chimento <pchimento@igalia.com> on 2021-10-06
Reviewed by Ross Kirsling.

  • test262/test/built-ins/Temporal/Now/*: Added.
2:24 PM Changeset in webkit [283665] by Alan Coon
  • 1 copy in tags/Safari-613.1.3.2

Tag Safari-613.1.3.2.

2:23 PM Changeset in webkit [283664] by Alan Coon
  • 2 edits in branches/safari-613.1.4-branch/Source/WebCore

Cherry-pick r283641. rdar://problem/83951373

Clear glyph cache in InlineContent::clearAndDetach
https://bugs.webkit.org/show_bug.cgi?id=231312

Reviewed by Alan Bujtas.

We may be leaving stale glyph cache entries behind.

  • layout/integration/LayoutIntegrationInlineContent.cpp: (WebCore::LayoutIntegration::InlineContent::clearAndDetach):

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

2:23 PM Changeset in webkit [283663] by Alan Coon
  • 11 edits in branches/safari-613.1.4-branch

Cherry-pick r283293. rdar://problem/83951351

Print values in a nicer way in the jsc shell
https://bugs.webkit.org/show_bug.cgi?id=230931

Reviewed by Tadeu Zagallo.

JSTests:

  • ChakraCore/test/jsc-lib.js:

Source/JavaScriptCore:

Currently, print(1), print("1"), and print([1]) all print to stdout
simply as "1" (without the quotes). Same for values when running the
REPL. This isn't super helpful. Let's print quotes for strings, and
brackets for arrays.

Some tests rely on the old print behavior. Those tests now use the legacyPrint
instead.

  • jsc.cpp: (toCString): (printInternal): (JSC_DEFINE_HOST_FUNCTION): (runInteractive): (cStringFromViewWithString): Deleted.
  • runtime/JSCJSValue.cpp: (JSC::JSValue::toWTFStringForConsole const):
  • runtime/JSCJSValue.h:

LayoutTests:

  • resources/standalone-pre.js:

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

2:20 PM Changeset in webkit [283662] by Aditya Keerthi
  • 6 edits in trunk/Source

Fix watchOS, tvOS, and macCatalyst builds after r283592
https://bugs.webkit.org/show_bug.cgi?id=231300
rdar://83936867

Reviewed by Wenson Hsieh.

Source/WebKit:

  • Platform/spi/ios/PhotosUISPI.h:
  • UIProcess/ios/forms/WKFileUploadPanel.mm:

(-[WKFileUploadPanel imagePickerController:didFinishPickingMultipleMediaWithInfo:]):

Source/WTF:

  • wtf/PlatformEnableCocoa.h:
  • wtf/PlatformHave.h:
2:08 PM Changeset in webkit [283661] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 ] http/tests/websocket/tests/hybi/close-code-and-reason.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=231329

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
2:07 PM Changeset in webkit [283660] by Kocsen Chung
  • 8 edits in branches/safari-613.1.3-branch/Source

Versioning.

WebKit-7613.1.3.2

1:57 PM Changeset in webkit [283659] by ntim@apple.com
  • 10 edits in trunk/LayoutTests

Replace setTimeout(x, 0) with requestAnimationFrame(x) in some autofocus tests
https://bugs.webkit.org/show_bug.cgi?id=231323

Reviewed by Chris Dumez.

Reason being the new autofocus behavior will happen asynchronously during "update rendering"
steps which is caught by the first, but not the second method.

Other minor changes:

  • Remove "in XHTML", because the file extensions aren't actually XHTML...
  • Remove not needed attributes from <script> tag
  • Remove unneeded whitespace
  • fast/forms/autofocus-opera-001.html:
  • fast/forms/autofocus-opera-002.html:
  • fast/forms/autofocus-opera-003.html:
  • fast/forms/autofocus-opera-004.html:
  • fast/forms/autofocus-opera-005.html:
  • fast/forms/autofocus-opera-006.html:
  • fast/forms/autofocus-opera-007.html:
  • fast/forms/autofocus-opera-008.html:
  • fast/forms/textarea/textarea-autofocus-removal-while-focusing.html:
1:53 PM Changeset in webkit [283658] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/JavaScriptCore

Cherry-pick r281647. rdar://problem/83776284

[AppleWin] JSC build failure
https://bugs.webkit.org/show_bug.cgi?id=229578

Reviewed by Don Olmstead.

Add new build dependency between LLIntOffsetsExtractor and JSCBuiltins targets.

  • CMakeLists.txt:

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

1:47 PM Changeset in webkit [283657] by ntim@apple.com
  • 2 edits in trunk/LayoutTests

Rewrite plugins/object-onfocus-mutation-crash.html to stop relying on autofocus
https://bugs.webkit.org/show_bug.cgi?id=231327

Reviewed by Chris Dumez.

This test mostly tests onfocus and <object>, we don't need it to use autofocus.
The new autofocus timing will be async so we don't want this test to break with the new
behavior implemented. Use input.focus() instead.

  • plugins/object-onfocus-mutation-crash.html:
1:46 PM Changeset in webkit [283656] by Russell Epstein
  • 2 edits in branches/safari-612.2.9.1-branch/Source/JavaScriptCore

Cherry-pick r281647. rdar://problem/83782432

[AppleWin] JSC build failure
https://bugs.webkit.org/show_bug.cgi?id=229578

Reviewed by Don Olmstead.

Add new build dependency between LLIntOffsetsExtractor and JSCBuiltins targets.

  • CMakeLists.txt:

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

1:44 PM Changeset in webkit [283655] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix for non-unified build.

  • Modules/webaudio/WaveShaperProcessor.cpp:
1:41 PM Changeset in webkit [283654] by Ayumi Kojima
  • 3 edits in trunk/LayoutTests

[ iOS macOS wk2 ] http/tests/preload/onload_event.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=231328

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
1:26 PM Changeset in webkit [283653] by Russell Epstein
  • 2 edits in branches/safari-612.2.9.3-branch/Source/JavaScriptCore

Cherry-pick r283632. rdar://problem/83942645

Speculative fix for a null pointer dereference in ByteCodeParser::handlePutByVal.
https://bugs.webkit.org/show_bug.cgi?id=231252
rdar://83310320

Reviewed by Yusuke Suzuki.

We're seeing a null pointer dereference in ByteCodeParser::handlePutByVal().
Adding a null check here as a speculative fix to mitigate crashes while we
investigate further.

  • dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::handlePutByVal):

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

1:25 PM Changeset in webkit [283652] by Russell Epstein
  • 8 edits in branches/safari-612.2.9.3-branch/Source

Versioning.

WebKit-7612.2.9.3.4

1:20 PM Changeset in webkit [283651] by commit-queue@webkit.org
  • 597 edits
    2847 adds
    15 deletes in trunk/JSTests

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

Patch by Philip Chimento <pchimento@igalia.com> on 2021-10-06
Reviewed by Ross Kirsling.

Update test262 to latest, to bring in Temporal tests.

  • test262/config.yaml: Ignore tests that depend on unimplemented parts

of Temporal.

  • test262/expectations.yaml: Add new failures.
  • test262/*: Update from upstream.
  • test262/test262-Revision.txt:
1:09 PM Changeset in webkit [283650] by Russell Epstein
  • 2 edits in branches/safari-612.2.9.0-branch/Source/JavaScriptCore

Cherry-pick r283632. rdar://problem/83942677

Speculative fix for a null pointer dereference in ByteCodeParser::handlePutByVal.
https://bugs.webkit.org/show_bug.cgi?id=231252
rdar://83310320

Reviewed by Yusuke Suzuki.

We're seeing a null pointer dereference in ByteCodeParser::handlePutByVal().
Adding a null check here as a speculative fix to mitigate crashes while we
investigate further.

  • dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::handlePutByVal):

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

1:07 PM Changeset in webkit [283649] by Russell Epstein
  • 8 edits in branches/safari-612.2.9.0-branch/Source

Versioning.

WebKit-7612.2.9.0.5

1:05 PM Changeset in webkit [283648] by Ben Nham
  • 2 edits in trunk/Source/WebCore

WaveShaperProcessor missing JSTypedArrays include

Unreviewed build fix.

The missing include can cause a build failure when adding a new file to Sources.txt.

  • Modules/webaudio/WaveShaperProcessor.cpp:
12:52 PM Changeset in webkit [283647] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[ iOS15 Release ] TestWebKitAPI.WebSocket.CloseCode
https://bugs.webkit.org/show_bug.cgi?id=231306

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

This test starts by navigating, opening a websocket connection, then navigating away.
Sometimes in release builds we only get one didFinishNavigation callback.
The important thing about this test is that the server receives the expected close code
whenever the page is navigated away from, so drop the two didFinishNavigation checks.

I manually verified that on iOS15 simulator release builds the test would time out here,
and that it doesn't any more.

  • TestWebKitAPI/Tests/WebKitCocoa/WebSocket.mm:

(TestWebKitAPI::TEST):

12:32 PM Changeset in webkit [283646] by Chris Dumez
  • 2 edits
    3 adds in trunk/LayoutTests

[ iOS 15 ]2 fast/dom/HTMLAnchorElement tests are failing
https://bugs.webkit.org/show_bug.cgi?id=231293
<rdar://problem/83935262>

Unreviewed, land iOS15 baselines for those tests.

  • platform/ios-wk2/TestExpectations:
  • platform/ios/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate-expected.txt: Added.
  • platform/ios/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-expected.txt: Added.
12:24 PM Changeset in webkit [283645] by commit-queue@webkit.org
  • 5 edits
    158 adds in trunk/LayoutTests

Import css/motion tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=231195

Patch by Kiet Ho <Kiet Ho> on 2021-10-06
Reviewed by Myles C. Maxfield.

LayoutTests/imported/w3c:

Imported from git hash 4060609421747fbcd6f99d59ded3df9eaf3018b4.

  • resources/import-expectations.json:
  • resources/resource-files.json:
  • web-platform-tests/css/motion/META.yml: Added.
  • web-platform-tests/css/motion/animation/offset-anchor-composition-expected.txt: Added.
  • web-platform-tests/css/motion/animation/offset-anchor-composition.html: Added.
  • web-platform-tests/css/motion/animation/offset-anchor-interpolation-expected.txt: Added.
  • web-platform-tests/css/motion/animation/offset-anchor-interpolation.html: Added.
  • web-platform-tests/css/motion/animation/offset-distance-composition-expected.txt: Added.
  • web-platform-tests/css/motion/animation/offset-distance-composition.html: Added.
  • web-platform-tests/css/motion/animation/offset-distance-interpolation-expected.txt: Added.
  • web-platform-tests/css/motion/animation/offset-distance-interpolation.html: Added.
  • web-platform-tests/css/motion/animation/offset-interpolation-expected.txt: Added.
  • web-platform-tests/css/motion/animation/offset-interpolation.html: Added.
  • web-platform-tests/css/motion/animation/offset-path-composition-expected.txt: Added.
  • web-platform-tests/css/motion/animation/offset-path-composition.html: Added.
  • web-platform-tests/css/motion/animation/offset-path-interpolation-001-expected.txt: Added.
  • web-platform-tests/css/motion/animation/offset-path-interpolation-001.html: Added.
  • web-platform-tests/css/motion/animation/offset-path-interpolation-002-expected.txt: Added.
  • web-platform-tests/css/motion/animation/offset-path-interpolation-002.html: Added.
  • web-platform-tests/css/motion/animation/offset-path-interpolation-003-expected.txt: Added.
  • web-platform-tests/css/motion/animation/offset-path-interpolation-003.html: Added.
  • web-platform-tests/css/motion/animation/offset-path-interpolation-004-expected.txt: Added.
  • web-platform-tests/css/motion/animation/offset-path-interpolation-004.html: Added.
  • web-platform-tests/css/motion/animation/offset-path-interpolation-005-expected.txt: Added.
  • web-platform-tests/css/motion/animation/offset-path-interpolation-005.html: Added.
  • web-platform-tests/css/motion/animation/offset-position-composition-expected.txt: Added.
  • web-platform-tests/css/motion/animation/offset-position-composition.html: Added.
  • web-platform-tests/css/motion/animation/offset-position-interpolation-expected.txt: Added.
  • web-platform-tests/css/motion/animation/offset-position-interpolation.html: Added.
  • web-platform-tests/css/motion/animation/offset-rotate-composition-expected.txt: Added.
  • web-platform-tests/css/motion/animation/offset-rotate-composition.html: Added.
  • web-platform-tests/css/motion/animation/offset-rotate-interpolation-expected.txt: Added.
  • web-platform-tests/css/motion/animation/offset-rotate-interpolation.html: Added.
  • web-platform-tests/css/motion/animation/reftests/offset-distance-interpolation-001-expected.html: Added.
  • web-platform-tests/css/motion/animation/reftests/offset-distance-interpolation-001.html: Added.
  • web-platform-tests/css/motion/animation/reftests/offset-path-path-interpolation-001-expected.html: Added.
  • web-platform-tests/css/motion/animation/reftests/offset-path-path-interpolation-001.html: Added.
  • web-platform-tests/css/motion/animation/reftests/offset-path-with-transforms-001-expected.html: Added.
  • web-platform-tests/css/motion/animation/reftests/offset-path-with-transforms-001.html: Added.
  • web-platform-tests/css/motion/animation/reftests/offset-rotate-interpolation-001-expected.html: Added.
  • web-platform-tests/css/motion/animation/reftests/offset-rotate-interpolation-001.html: Added.
  • web-platform-tests/css/motion/animation/reftests/w3c-import.log: Added.
  • web-platform-tests/css/motion/animation/w3c-import.log: Added.
  • web-platform-tests/css/motion/inheritance-expected.txt: Added.
  • web-platform-tests/css/motion/inheritance.html: Added.
  • web-platform-tests/css/motion/offset-anchor-transform-box-fill-box-001-expected.html: Added.
  • web-platform-tests/css/motion/offset-anchor-transform-box-fill-box-001.html: Added.
  • web-platform-tests/css/motion/offset-anchor-transform-box-fill-box-002-expected.html: Added.
  • web-platform-tests/css/motion/offset-anchor-transform-box-fill-box-002.html: Added.
  • web-platform-tests/css/motion/offset-anchor-transform-box-fill-box-003-expected.html: Added.
  • web-platform-tests/css/motion/offset-anchor-transform-box-fill-box-003.html: Added.
  • web-platform-tests/css/motion/offset-distance-001-expected.html: Added.
  • web-platform-tests/css/motion/offset-distance-001.html: Added.
  • web-platform-tests/css/motion/offset-distance-002-expected.html: Added.
  • web-platform-tests/css/motion/offset-distance-002.html: Added.
  • web-platform-tests/css/motion/offset-distance-003-expected.html: Added.
  • web-platform-tests/css/motion/offset-distance-003.html: Added.
  • web-platform-tests/css/motion/offset-distance-004-expected.html: Added.
  • web-platform-tests/css/motion/offset-distance-004.html: Added.
  • web-platform-tests/css/motion/offset-distance-005-expected.html: Added.
  • web-platform-tests/css/motion/offset-distance-005.html: Added.
  • web-platform-tests/css/motion/offset-distance-006-expected.html: Added.
  • web-platform-tests/css/motion/offset-distance-006.html: Added.
  • web-platform-tests/css/motion/offset-distance-007-expected.html: Added.
  • web-platform-tests/css/motion/offset-distance-007.html: Added.
  • web-platform-tests/css/motion/offset-distance-008-expected.html: Added.
  • web-platform-tests/css/motion/offset-distance-008.html: Added.
  • web-platform-tests/css/motion/offset-distance-009-expected.html: Added.
  • web-platform-tests/css/motion/offset-distance-009.html: Added.
  • web-platform-tests/css/motion/offset-path-huge-angle-deg-001-crash.html: Added.
  • web-platform-tests/css/motion/offset-path-huge-angle-grad-001-crash.html: Added.
  • web-platform-tests/css/motion/offset-path-huge-angle-turn-001-crash.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-001-expected.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-001.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-002-expected.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-002.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-003-expected.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-003.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-004-expected.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-004.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-005-expected.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-005.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-006-expected.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-006.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-007-expected.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-007.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-008-expected.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-008.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-009-expected.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-009.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-contain-001-expected.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-contain-001.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-contain-002-expected.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-contain-002.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-contain-003-expected.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-contain-003.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-contain-004-expected.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-contain-004.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-contain-005-expected.html: Added.
  • web-platform-tests/css/motion/offset-path-ray-contain-005.html: Added.
  • web-platform-tests/css/motion/offset-path-serialization-expected.txt: Added.
  • web-platform-tests/css/motion/offset-path-serialization.html: Added.
  • web-platform-tests/css/motion/offset-path-string-001-expected.html: Added.
  • web-platform-tests/css/motion/offset-path-string-001.html: Added.
  • web-platform-tests/css/motion/offset-path-string-002-expected.html: Added.
  • web-platform-tests/css/motion/offset-path-string-002.html: Added.
  • web-platform-tests/css/motion/offset-rotate-001-expected.html: Added.
  • web-platform-tests/css/motion/offset-rotate-001.html: Added.
  • web-platform-tests/css/motion/offset-rotate-002-expected.html: Added.
  • web-platform-tests/css/motion/offset-rotate-002.html: Added.
  • web-platform-tests/css/motion/offset-rotate-003-expected.html: Added.
  • web-platform-tests/css/motion/offset-rotate-003.html: Added.
  • web-platform-tests/css/motion/offset-rotate-004-expected.html: Added.
  • web-platform-tests/css/motion/offset-rotate-004.html: Added.
  • web-platform-tests/css/motion/offset-rotate-005-expected.html: Added.
  • web-platform-tests/css/motion/offset-rotate-005.html: Added.
  • web-platform-tests/css/motion/offset-supports-calc-expected.txt: Added.
  • web-platform-tests/css/motion/offset-supports-calc.html: Added.
  • web-platform-tests/css/motion/parsing/offset-anchor-computed-expected.txt: Added.
  • web-platform-tests/css/motion/parsing/offset-anchor-computed.html: Added.
  • web-platform-tests/css/motion/parsing/offset-anchor-parsing-invalid-expected.txt: Added.
  • web-platform-tests/css/motion/parsing/offset-anchor-parsing-invalid.html: Added.
  • web-platform-tests/css/motion/parsing/offset-anchor-parsing-valid-expected.txt: Added.
  • web-platform-tests/css/motion/parsing/offset-anchor-parsing-valid.html: Added.
  • web-platform-tests/css/motion/parsing/offset-distance-computed-expected.txt: Added.
  • web-platform-tests/css/motion/parsing/offset-distance-computed.html: Added.
  • web-platform-tests/css/motion/parsing/offset-distance-parsing-invalid-expected.txt: Added.
  • web-platform-tests/css/motion/parsing/offset-distance-parsing-invalid.html: Added.
  • web-platform-tests/css/motion/parsing/offset-distance-parsing-valid-expected.txt: Added.
  • web-platform-tests/css/motion/parsing/offset-distance-parsing-valid.html: Added.
  • web-platform-tests/css/motion/parsing/offset-parsing-invalid-expected.txt: Added.
  • web-platform-tests/css/motion/parsing/offset-parsing-invalid.html: Added.
  • web-platform-tests/css/motion/parsing/offset-parsing-valid-expected.txt: Added.
  • web-platform-tests/css/motion/parsing/offset-parsing-valid.html: Added.
  • web-platform-tests/css/motion/parsing/offset-path-computed-expected.txt: Added.
  • web-platform-tests/css/motion/parsing/offset-path-computed.html: Added.
  • web-platform-tests/css/motion/parsing/offset-path-parsing-invalid-expected.txt: Added.
  • web-platform-tests/css/motion/parsing/offset-path-parsing-invalid.html: Added.
  • web-platform-tests/css/motion/parsing/offset-path-parsing-valid-expected.txt: Added.
  • web-platform-tests/css/motion/parsing/offset-path-parsing-valid.html: Added.
  • web-platform-tests/css/motion/parsing/offset-position-computed-expected.txt: Added.
  • web-platform-tests/css/motion/parsing/offset-position-computed.html: Added.
  • web-platform-tests/css/motion/parsing/offset-position-parsing-invalid-expected.txt: Added.
  • web-platform-tests/css/motion/parsing/offset-position-parsing-invalid.html: Added.
  • web-platform-tests/css/motion/parsing/offset-position-parsing-valid-expected.txt: Added.
  • web-platform-tests/css/motion/parsing/offset-position-parsing-valid.html: Added.
  • web-platform-tests/css/motion/parsing/offset-rotate-computed-expected.txt: Added.
  • web-platform-tests/css/motion/parsing/offset-rotate-computed.html: Added.
  • web-platform-tests/css/motion/parsing/offset-rotate-parsing-invalid-expected.txt: Added.
  • web-platform-tests/css/motion/parsing/offset-rotate-parsing-invalid.html: Added.
  • web-platform-tests/css/motion/parsing/offset-rotate-parsing-valid-expected.txt: Added.
  • web-platform-tests/css/motion/parsing/offset-rotate-parsing-valid.html: Added.
  • web-platform-tests/css/motion/parsing/offset-shorthand-expected.txt: Added.
  • web-platform-tests/css/motion/parsing/offset-shorthand.html: Added.
  • web-platform-tests/css/motion/parsing/w3c-import.log: Added.
  • web-platform-tests/css/motion/w3c-import.log: Added.

LayoutTests:

12:04 PM Changeset in webkit [283644] by Ben Nham
  • 2 edits in trunk/Source/WebCore

WaveShaperProcessor missing ArrayBuffer include

Unreviewed build fix.

The missing include can cause a build failure when adding a new file to Sources.txt.

  • Modules/webaudio/WaveShaperProcessor.cpp:
11:58 AM Changeset in webkit [283643] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix.

Fix XPath::Value namespacing after r283635.

  • xml/XPathResult.cpp:

(WebCore::XPathResult::XPathResult):

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

[ iOS 15 ] fast/text/accessibility-bold-system-font-2.html is image failing.
https://bugs.webkit.org/show_bug.cgi?id=231316

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:39 AM Changeset in webkit [283641] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Clear glyph cache in InlineContent::clearAndDetach
https://bugs.webkit.org/show_bug.cgi?id=231312

Reviewed by Alan Bujtas.

We may be leaving stale glyph cache entries behind.

  • layout/integration/LayoutIntegrationInlineContent.cpp:

(WebCore::LayoutIntegration::InlineContent::clearAndDetach):

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

[ iOS ] fast/events/ios/rotation/safe-area-insets-during-safari-type-rotation.html is timing out/ flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=231315

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:28 AM Changeset in webkit [283639] by Russell Epstein
  • 2 edits in branches/safari-612.2.9.1-branch/Source/JavaScriptCore

Cherry-pick r283632. rdar://problem/83943156

Speculative fix for a null pointer dereference in ByteCodeParser::handlePutByVal.
https://bugs.webkit.org/show_bug.cgi?id=231252
rdar://83310320

Reviewed by Yusuke Suzuki.

We're seeing a null pointer dereference in ByteCodeParser::handlePutByVal().
Adding a null check here as a speculative fix to mitigate crashes while we
investigate further.

  • dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::handlePutByVal):

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

11:17 AM Changeset in webkit [283638] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

ASSERTion failure in WebCore::deviceClass() on macCatalyst
https://bugs.webkit.org/show_bug.cgi?id=231279

Reviewed by Anders Carlsson.

  • platform/ios/Device.cpp:

(WebCore::deviceClass):
Simplify deviceClass(); there's no reason to assert here, callers
should be written to assume they don't know the future. Also, this
has been asserting on macOS for ages...

11:11 AM Changeset in webkit [283637] by Aditya Keerthi
  • 10 edits in trunk

Fix serialization of CSSMediaRule
https://bugs.webkit.org/show_bug.cgi?id=231249

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-ui/appearance-serialization-expected.txt: Rebaseline.
  • web-platform-tests/css/css-ui/webkit-appearance-serialization-expected.txt: Rebaseline.
  • web-platform-tests/css/cssom/serialize-media-rule-expected.txt: Mark progression.

Source/WebCore:

See https://drafts.csswg.org/cssom/#serialize-a-css-rule.

New behavior matches Chrome and Firefox.

  • css/CSSMediaRule.cpp:

(WebCore::CSSMediaRule::cssText const):

Remove space before newline.

LayoutTests:

Rebaseline tests to account for the correct serialization.

  • css3/supports-cssom-expected.txt:
  • css3/supports-cssom.html:
  • fast/css/resources/insertRule-media.js:
11:08 AM Changeset in webkit [283636] by Darin Adler
  • 5 edits in trunk/Source/WebCore

Reduce use of "using namespace": eliminate all "using namespace XPath"
https://bugs.webkit.org/show_bug.cgi?id=231302

Reviewed by Sam Weinig.

  • xml/XPathEvaluator.cpp: Removed "using namespace XPath".

(WebCore::XPathEvaluator::evaluate): Use XPath prefix explicitly.

  • xml/XPathExpression.cpp: Removed "using namespace XPath".

(WebCore::XPathExpression::createExpression): Ditto.
(WebCore::XPathExpression::evaluate): Ditto.

  • xml/XPathGrammar.y: Removed "using namespace WebCore" and

"using namespace XPath".

  • xml/XPathResult.cpp: Removed "using namespace XPath".
11:00 AM Changeset in webkit [283635] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Don't use namespace WebCore::XPath at global scope
https://bugs.webkit.org/show_bug.cgi?id=231186

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-06
Reviewed by Sam Weinig.

It causes problems with unified builds, which get confused between WebCore::XPath::Function and WTF::Function.

  • xml/XPathGrammar.cpp:
  • xml/XPathGrammar.h:
  • xml/XPathGrammar.y:
  • xml/XPathParser.cpp:
10:54 AM Changeset in webkit [283634] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Ensure that the top layer is always anchored to the RenderView
https://bugs.webkit.org/show_bug.cgi?id=231292

Reviewed by Simon Fraser.

A fixed positioned block level box is not necessarily anchored to the RenderView (see canContainFixedPositionObjects).
This patch ensures that we skip those ancestors and return the RenderView as the containing block for the top layer content.

https://fullscreen.spec.whatwg.org/#new-stacking-layer
"If the top layer position property computes to fixed, its containing block is the viewport, and the initial containing block otherwise."

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::containingBlock const):
(WebCore::containerForElement):

10:50 AM Changeset in webkit [283633] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS ] fast/events/ios/fast-click-double-tap-to-zoom-in-on-text-and-then-again-to-zoom-out.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231311

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
10:31 AM Changeset in webkit [283632] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Speculative fix for a null pointer dereference in ByteCodeParser::handlePutByVal.
https://bugs.webkit.org/show_bug.cgi?id=231252
rdar://83310320

Reviewed by Yusuke Suzuki.

We're seeing a null pointer dereference in ByteCodeParser::handlePutByVal().
Adding a null check here as a speculative fix to mitigate crashes while we
investigate further.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::handlePutByVal):

10:29 AM Changeset in webkit [283631] by ntim@apple.com
  • 7 edits
    1 delete in trunk

Reset m_isModal flag when removing <dialog> from document
https://bugs.webkit.org/show_bug.cgi?id=231290

Reviewed by Alan Bujtas.

m_isModal triggers the :-internal-modal-dialog pseudo class, which changes position from absolute to fixed.

When removing a modal <dialog> from the document, it is also removed from the top layer, so it makes sense
to reset the m_isModal flag as well as a result.

Updated test expectations to reflect new passing tests.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt:

Source/WebCore:

  • html/HTMLDialogElement.cpp:

(WebCore::HTMLDialogElement::removedFromAncestor):

  • html/HTMLDialogElement.h:

LayoutTests:

  • TestExpectations:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt: Removed.
10:13 AM Changeset in webkit [283630] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

media/modern-media-controls tests are timing out.
https://bugs.webkit.org/show_bug.cgi?id=231187

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
10:11 AM Changeset in webkit [283629] by Russell Epstein
  • 8 edits in branches/safari-612.2.9.1-branch/Source

Versioning.

WebKit-7612.2.9.1.5

9:56 AM Changeset in webkit [283628] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

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

Reviewed by Eric Carlson.

Manually tested.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

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

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

[ iOS 15 Debug ] 3 imported/w3c/web-platform-tests/selection tests are a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=231299

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
9:06 AM Changeset in webkit [283626] by Chris Lord
  • 9 edits
    3 adds in trunk

[GTK][WPE] CSS scroll snapping interacts badly with smooth scrolling
https://bugs.webkit.org/show_bug.cgi?id=229037

Reviewed by Simon Fraser.

Source/WebCore:

Make CSS scroll snapping behave in a predictable way when scrolling
with touchpads/screens on GTK/WPE.

Test: fast/scrolling/gtk/user-scroll-snapping-interaction.html

  • platform/ScrollAnimator.h:

(WebCore::ScrollAnimator::isUserScrollInProgress const):
(WebCore::ScrollAnimator::isScrollSnapInProgress const):

  • platform/ScrollingEffectsController.cpp:

(WebCore::ScrollingEffectsController::processWheelEventForKineticScrolling):
(WebCore::ScrollingEffectsController::adjustDeltaForSnappingIfNeeded):
(WebCore::ScrollingEffectsController::handleWheelEvent):
(WebCore::ScrollingEffectsController::isUserScrollInProgress const):
(WebCore::ScrollingEffectsController::isScrollSnapInProgress const):

  • platform/ScrollingEffectsController.h:
  • platform/mac/ScrollAnimatorMac.h:
  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::ScrollAnimatorMac::isUserScrollInProgress const): Deleted.
(WebCore::ScrollAnimatorMac::isScrollSnapInProgress const): Deleted.

LayoutTests:

Add a GTK-only test to verify CSS scroll snapping and kinetic/touchpad
scrolling behave correctly.

  • TestExpectations:
  • fast/scrolling/gtk/user-scroll-snapping-interaction-expected.txt: Added.
  • fast/scrolling/gtk/user-scroll-snapping-interaction.html: Added.
  • platform/gtk/TestExpectations:
8:57 AM Changeset in webkit [283625] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

Style checker should check spacing inside braces with elements in them
https://bugs.webkit.org/show_bug.cgi?id=231199

In order to automate this and prevent reviewers from having to comment
on it, ensure that spaces are required by webkit-check-style inside of
braces with elements in them (e.g., initializer lists.)

In order to avoid false positives, ignore brace spacing if the braces
are surrounded by double-quotes on the same line, assuming that means
it's likely the braces are inside a string.

Patch by Philip Chimento <pchimento@igalia.com> on 2021-10-06
Reviewed by Jonathan Bedard.

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

(check_spacing):

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

(CppStyleTest):
(NoNonVirtualDestructorsTest):
(WebKitStyleTest.test_indentation):

8:56 AM Changeset in webkit [283624] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 ] 2 http/tests/app-privacy-report tests are timing out.
https://bugs.webkit.org/show_bug.cgi?id=231295

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
8:49 AM Changeset in webkit [283623] by sbarati@apple.com
  • 8 edits
    1 add in trunk

Run backwards propagation before we prune the graph after ForceOSRExit nodes in BytecodeParser
https://bugs.webkit.org/show_bug.cgi?id=230823
<rdar://problem/83565088>

Reviewed by Robin Morisset.

JSTests:

  • run-backwards-propagation-before-osr-exit-pruning.js: Added.

(assert):
(main.async v24):
(main):

Source/JavaScriptCore:

We've found yet another bug where pruning code after OSR exits
before running backwards propagation leads to us breaking the spec
in weird IR situations. In the particular test case here, we end
up not thinking we care about negative zero for an ArithNegate,
and we exit the program while recovering the value 0 instead of -0.

Fundamentally, backwards propagation wants to see all bytecode uses.
Therefore, it seems like a more sound strategy to run backwards propagation
before we end up mucking with the graph. This patch makes it so we run
backwards propagation inside bytecode parser before we prune the IR.
That way, the phase sees the graph as if it's an IR over the whole bytecode
graph.

  • bytecode/Operands.h:

(JSC::Operands::operator!= const):

  • dfg/DFGBackwardsPropagationPhase.cpp:

(JSC::DFG::BackwardsPropagationPhase::BackwardsPropagationPhase):
(JSC::DFG::BackwardsPropagationPhase::run):
(JSC::DFG::BackwardsPropagationPhase::mergeFlags):
(JSC::DFG::BackwardsPropagationPhase::propagate):
(JSC::DFG::performBackwardsPropagation):

  • dfg/DFGBackwardsPropagationPhase.h:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parse):

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::compileInThreadImpl):

  • dfg/DFGUnificationPhase.cpp:

(JSC::DFG::UnificationPhase::run):

8:43 AM Changeset in webkit [283622] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 ]2 fast/dom/HTMLAnchorElement tests are failing.
https://bugs.webkit.org/show_bug.cgi?id=231293

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
8:31 AM Changeset in webkit [283621] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 ] fast/events/ios/rotation/safari-like-rotation.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=231269

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
8:25 AM Changeset in webkit [283620] by Antti Koivisto
  • 9 edits in trunk/Source/WebCore

[LFC] Layout box should own its children
https://bugs.webkit.org/show_bug.cgi?id=231288

Reviewed by Alan Bujtas.

Avoid the need to have a separate ownership scheme.

Also make the box tree use CheckedPtrs.

  • layout/integration/LayoutIntegrationBoxTree.cpp:

(WebCore::LayoutIntegration::BoxTree::appendChild):

  • layout/integration/LayoutIntegrationBoxTree.h:
  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::setParent):
(WebCore::Layout::Box::setNextSibling):
(WebCore::Layout::Box::setPreviousSibling):

  • layout/layouttree/LayoutBox.h:

(WebCore::Layout::Box::nextSibling const):
(WebCore::Layout::Box::previousSibling const):
(WebCore::Layout::Box::nextSibling):
(WebCore::Layout::Box::setParent): Deleted.
(WebCore::Layout::Box::setNextSibling): Deleted.
(WebCore::Layout::Box::setPreviousSibling): Deleted.

  • layout/layouttree/LayoutContainerBox.cpp:

(WebCore::Layout::ContainerBox::~ContainerBox):
(WebCore::Layout::ContainerBox::appendChild):
(WebCore::Layout::ContainerBox::destroyChildren):
(WebCore::Layout::ContainerBox::setFirstChild): Deleted.
(WebCore::Layout::ContainerBox::setLastChild): Deleted.

  • layout/layouttree/LayoutContainerBox.h:

(WebCore::Layout::ContainerBox::firstChild const):
(WebCore::Layout::ContainerBox::lastChild const):
(WebCore::Layout::ContainerBox::firstChild):
(): Deleted.

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::LayoutTree::LayoutTree):
(WebCore::Layout::appendChild):
(WebCore::Layout::TreeBuilder::buildLayoutTree):
(WebCore::Layout::TreeBuilder::TreeBuilder):
(WebCore::Layout::TreeBuilder::createReplacedBox):
(WebCore::Layout::TreeBuilder::createTextBox):
(WebCore::Layout::TreeBuilder::createLineBreakBox):
(WebCore::Layout::TreeBuilder::createContainer):
(WebCore::Layout::TreeBuilder::createLayoutBox):
(WebCore::Layout::TreeBuilder::buildTableStructure):
(WebCore::Layout::TreeBuilder::buildSubTree):

  • layout/layouttree/LayoutTreeBuilder.h:

(WebCore::Layout::LayoutTree::root const):
(WebCore::Layout::LayoutTree::append): Deleted.

8:23 AM Changeset in webkit [283619] by Megan Gardner
  • 9 edits in trunk/Source

Allow text selection to flip.
https://bugs.webkit.org/show_bug.cgi?id=231234
rdar://83889188

Reviewed by Wenson Hsieh.

Source/WebKit:

In order to bring webkit more in line with UIKit, allow text selection to flip.
This also requires a UIKit change tracked in rdar://83788439
This is currently guarded behind an off-by-default flag so that we can
test this new behavior before turning it on by default.

  • Platform/spi/ios/UIKitSPI.h:
  • Shared/ios/GestureTypes.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(toUIWKSelectionFlags):
(toSelectionFlags):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::selectionFlippingEnabled const):
(WebKit::WebPage::setSelectionFlippingEnabled):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::rangeForPointInRootViewCoordinates):
(WebKit::WebPage::updateSelectionWithTouches):

Source/WTF:

Add an internal flag to guard text selection flipping while
we test to make sure this is reasonable to turn on everywhere.

  • Scripts/Preferences/WebPreferencesInternal.yaml:
8:21 AM Changeset in webkit [283618] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

IPC SimpleArgumentEncoder should static_assert(std::is_trivially_copyable<T>)
https://bugs.webkit.org/show_bug.cgi?id=230743
<rdar://problem/83757335>

Reviewed by Kimmo Kinnunen.

Add static_assert(std::is_trivially_copyable<T>) to IPC SimpleArgumentEncoder to avoid misuses.

  • Platform/IPC/ArgumentCoders.h:
7:56 AM Changeset in webkit [283617] by Wenson Hsieh
  • 6 edits in trunk/Source/WebKit

[WebKit2] Refactor some IPC argument encoder logic to work with StreamConnectionEncoder
https://bugs.webkit.org/show_bug.cgi?id=230714
rdar://83477591

Reviewed by Tim Horton.

Make it possible to use IPC::StreamConnectionEncoder to encode display list items (and their members) in an
IPC stream. This patch comprises two main sets of changes in ArgumentCoders, and WebCoreArgumentCoders. See
below for more details.

  • Platform/IPC/ArgumentCoders.cpp:

(IPC::ArgumentCoder<audit_token_t>::decode):
(IPC::ArgumentCoder<Monostate>::encode): Deleted.
(IPC::ArgumentCoder<Monostate>::decode): Deleted.

  • Platform/IPC/ArgumentCoders.h:

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

Many of these encode() methods are currently non-templated, which means that Encoder and Decoder used here
refer solely to IPC::Encoder and IPC::Decoder (respectively) instead of other types of encoders (namely,
StreamConnectionEncoder). Make these use templated encode methods intead, so that they work with generic
encoders.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<AffineTransform>::encode): Deleted.
(IPC::ArgumentCoder<AffineTransform>::decode): Deleted.
(IPC::ArgumentCoder<FloatPoint>::encode): Deleted.
(IPC::ArgumentCoder<FloatPoint>::decode): Deleted.
(IPC::ArgumentCoder<FloatPoint3D>::encode): Deleted.
(IPC::ArgumentCoder<FloatPoint3D>::decode): Deleted.
(IPC::ArgumentCoder<FloatRect>::encode): Deleted.
(IPC::ArgumentCoder<FloatRect>::decode): Deleted.
(IPC::ArgumentCoder<FloatBoxExtent>::encode): Deleted.
(IPC::ArgumentCoder<FloatBoxExtent>::decode): Deleted.
(IPC::ArgumentCoder<FloatSize>::encode): Deleted.
(IPC::ArgumentCoder<FloatSize>::decode): Deleted.
(IPC::ArgumentCoder<FloatRoundedRect>::encode): Deleted.
(IPC::ArgumentCoder<FloatRoundedRect>::decode): Deleted.
(IPC::ArgumentCoder<IntPoint>::encode): Deleted.
(IPC::ArgumentCoder<IntPoint>::decode): Deleted.
(IPC::ArgumentCoder<IntRect>::encode): Deleted.
(IPC::ArgumentCoder<IntRect>::decode): Deleted.
(IPC::ArgumentCoder<IntSize>::encode): Deleted.
(IPC::ArgumentCoder<IntSize>::decode): Deleted.
(IPC::ArgumentCoder<LayoutSize>::encode): Deleted.
(IPC::ArgumentCoder<LayoutSize>::decode): Deleted.
(IPC::ArgumentCoder<LayoutPoint>::encode): Deleted.
(IPC::ArgumentCoder<LayoutPoint>::decode): Deleted.

These WebCore argument coders are also currently incompatible with StreamConnectionEncoder, since they are non-
templated (and thus only work with IPC::Encoder). Since these are all encodable as POD types, we can just use
SimpleArgumentCoder for all of these. We also add new DEFINE_SIMPLE_ARGUMENT_CODER_FOR_(HEADER|SOURCE) macros
to make this code a bit easier to read, which adds SimpleArgumentCoder for the given type, for both standard
IPC::Encoder as well as IPC::StreamConnectionEncoder.

  • Shared/WebCoreArgumentCoders.h:
  • Shared/mac/WebCoreArgumentCodersMac.mm:

(IPC::ArgumentCoder<CGRect>::encode): Deleted.
(IPC::ArgumentCoder<CGRect>::decode): Deleted.
(IPC::ArgumentCoder<CGSize>::encode): Deleted.
(IPC::ArgumentCoder<CGSize>::decode): Deleted.
(IPC::ArgumentCoder<CGPoint>::encode): Deleted.
(IPC::ArgumentCoder<CGPoint>::decode): Deleted.
(IPC::ArgumentCoder<CGAffineTransform>::encode): Deleted.
(IPC::ArgumentCoder<CGAffineTransform>::decode): Deleted.

7:41 AM Changeset in webkit [283616] by Chris Dumez
  • 2 edits in trunk

Unreviewed, mark Kimmo Kinnunen as reviewer in the right contributors.json file this time.

  • metadata/contributors.json:
7:25 AM Changeset in webkit [283615] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Make containerForElement logic more explicit
https://bugs.webkit.org/show_bug.cgi?id=231275

Reviewed by Simon Fraser.

  1. Non-RenderElement renderers (e.g. text content) should return their parents. They are always in-flow, static positioned.
  2. Have the explicit list of position types where the parent is the containing block.
  • rendering/RenderObject.cpp:

(WebCore::containerForElement):

6:40 AM Changeset in webkit [283614] by Alan Bujtas
  • 5 edits in trunk

[LFC][IFC] word-break: break-all only allows mid-word arbitrary breaking positions
https://bugs.webkit.org/show_bug.cgi?id=231247

Reviewed by Antti Koivisto.

Source/WebCore:

Introduce a new type of breaking type where the arbitrary position is only applied when breaking mid-word within a continuous content.
While normally when we search for a breaking position inside an overflowing continuous set of runs, we find ourselves inside a "word" and any breaking
position would match the definition of the mid-work break.

However in other cases when these runs consist more than just a "word", for example

'XX ' (where the "white-space: break-spaces" sets the line breaking opportunity after the trailing whitespace)
'word-break: break-all' does not affect the breaking behavior between the trailing X and the ' ' and therefore it is not a breaking position.

It may very well be a valid breaking position if some other CSS properties allow it, but the notion of being able to break at any position (break-all) does not apply here.

see https://drafts.csswg.org/css-text-3/#word-break-property

WPT progressions.

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::nextTextRunIndex):
(WebCore::Layout::previousTextRunIndex):
(WebCore::Layout::findTrailingRunIndex):
(WebCore::Layout::InlineContentBreaker::tryBreakingOverflowingRun const):
(WebCore::Layout::InlineContentBreaker::tryBreakingPreviousNonOverflowingRuns const):
(WebCore::Layout::InlineContentBreaker::tryBreakingNextOverflowingRuns const):
(WebCore::Layout::InlineContentBreaker::processOverflowingContentWithText const):
(WebCore::Layout::InlineContentBreaker::wordBreakBehavior const):
(WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const):

  • layout/formattingContexts/inline/InlineContentBreaker.h:

LayoutTests:

4:26 AM Changeset in webkit [283613] by youenn@apple.com
  • 19 edits
    1 add in trunk

Implement https://w3c.github.io/push-api/#receiving-a-push-message
https://bugs.webkit.org/show_bug.cgi?id=231070
<rdar://problem/83759574>

Reviewed by Chris Dumez.

Source/WebCore:

Implement firing a functional event and push message specialization.
Covered by API test.

  • workers/service/server/SWServer.cpp:
  • workers/service/server/SWServer.h:
  • workers/service/server/SWServerToContextConnection.h:

Source/WebKit:

Add temporary SPI in WKWebsiteDataStore to allow pushing messages to service workers.
It takes a completion handler to check whether the message is acknowledged or not.
The service worker registration is identified by its scope for now.
A few additional things might need to be done:

  • The case where the service worker is launched with no client.
  • Handling of background assertions, especially if service worker has no client.
  • Optimizations: skip events, optimization of network process launch by only loading the service worker registrations of an origin.
  • NetworkProcess/NetworkProcess.cpp:
  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:
  • UIProcess/Network/NetworkProcessProxy.h:
  • WebProcess/Storage/WebSWContextManagerConnection.cpp:
  • WebProcess/Storage/WebSWContextManagerConnection.h:
  • WebProcess/Storage/WebSWContextManagerConnection.messages.in:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm: Added.
3:33 AM Changeset in webkit [283612] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. [GTK] Fix /webkit/WebKitAccessibility/accessible/state with ATSPI

Add missing #else I didn't add by mistake in r283361.

  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(testAccessibleState):

3:14 AM Changeset in webkit [283611] by youenn@apple.com
  • 4 edits in trunk/Source/WebCore

Simplify BaseAudioSharedUnit client management
https://bugs.webkit.org/show_bug.cgi?id=231230
<rdar://83884131>

Reviewed by Eric Carlson.

Before the patch, m_clientsLock was used to handle BaseAudioSharedUnit concurrent access from main thread and audio thread.
The potential issue is that if the audio unit is running and m_clients is locked in main thread due to a call of forEach,
the audio thread might have to wait for the lock to be removed.
This is not great as this might cause glitches and potential deadlocks if trying to stop the audio unit in main thread inside a forEach call.

Instead of doing that, we now exclusively access m_clients from main thread, it does not require a lock anymore.
The audio thread accesses a copy of m_clients, called m_audioThreadClients, which is only accessed in addClient/removeClient and from the audio thread.
This reduces the possibility for stopping the audio thread and removes any potential deadlock.

Covered by existing tests.

  • platform/mediastream/mac/BaseAudioSharedUnit.cpp:
  • platform/mediastream/mac/BaseAudioSharedUnit.h:
  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:
3:13 AM Changeset in webkit [283610] by youenn@apple.com
  • 8 edits in trunk/Source/ThirdParty/libwebrtc

ObjectiveC WebRTC frame buffers are autoreleased late, especially on Debug builds
https://bugs.webkit.org/show_bug.cgi?id=231162

Reviewed by David Kilzer.

Instead of waiting for the autorelease pool to release these objects, we explicitly release them by calling close.
This ensures that pixel buffers get released very quickly.

  • Source/webrtc/sdk/WebKit/WebKitEncoder.mm:
  • Source/webrtc/sdk/objc/api/video_frame_buffer/RTCNativeI420Buffer+Private.h:
  • Source/webrtc/sdk/objc/api/video_frame_buffer/RTCNativeI420Buffer.mm:
  • Source/webrtc/sdk/objc/base/RTCI420Buffer.h:
  • Source/webrtc/sdk/objc/base/RTCVideoFrameBuffer.h:
  • Source/webrtc/sdk/objc/components/video_frame_buffer/RTCCVPixelBuffer.h:
  • Source/webrtc/sdk/objc/components/video_frame_buffer/RTCCVPixelBuffer.mm:
  • Source/webrtc/sdk/objc/native/src/objc_frame_buffer.mm:
3:07 AM WebKitFlatpakSDK/DebugWithApitrace created by Philippe Normand
3:03 AM WebKitFlatpakSDK edited by Philippe Normand
(diff)
2:48 AM Changeset in webkit [283609] by aboya@igalia.com
  • 8 edits in trunk

[MSE][GStreamer] Honor MP4 edit lists
https://bugs.webkit.org/show_bug.cgi?id=231019

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

This patch takes into consideration the GstSegment attached to a
sample to offset the PTS and DTS. This ensures accurate timestamps are
obtained for MP4 files containing edit lists (commonly necessary for
files containing video with B frames to have PTS starting at zero).

Before this was implemented, a workaround was in place based on a
heuristic (DTS = 0 && PTS > 0 && PTS < 0.1). The workaround is
preserved for the sake of content without proper edit lists, but
any edit list takes preference.

The time fudge factor has been modified from 0.083 seconds up to
0.100 seconds to accomodate the size of the empty edit in test.mp4
used by Web Platform Tests.

This test fixes improves expectation results and fixes two subtests in
imported/w3c/web-platform-tests/media-source/mediasource-remove.html.

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::currentTimeFudgeFactor):

  • platform/graphics/SourceBufferPrivate.h:

(WebCore::SourceBufferPrivate::timeFudgeFactor const):

  • platform/graphics/gstreamer/MediaSampleGStreamer.cpp:

(WebCore::MediaSampleGStreamer::extendToTheBeginning): Deleted.

  • platform/graphics/gstreamer/MediaSampleGStreamer.h:
  • platform/graphics/gstreamer/mse/AppendPipeline.cpp:

(WebCore::bufferTimeToStreamTimeClamped):
(WebCore::AppendPipeline::appsinkNewSample):

LayoutTests:

Update expectations for mediasource-remove.html in the GStreamer
ports, as a couple subtests get fixed.

  • platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-remove-expected.txt:
2:35 AM Changeset in webkit [283608] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

[JSC][32bit] Remove a bunch of compiler warnings
https://bugs.webkit.org/show_bug.cgi?id=231091

Patch by Xan López <Xan Lopez> on 2021-10-06
Reviewed by Carlos Alberto Lopez Perez.

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::compileExit): silence warning about unused
variable, it's not used in 32-bit.

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_enter): use an unsigned int for the loop count.

2:25 AM Changeset in webkit [283607] by commit-queue@webkit.org
  • 2 edits
    1 add in trunk/Tools/buildstream

[Flatpak SDK] Add apitrace
https://bugs.webkit.org/show_bug.cgi?id=230967

Patch by Philippe Normand <pnormand@igalia.com> on 2021-10-06
Reviewed by Carlos Alberto Lopez Perez.

APITrace can be used to debug GL calls.

  • elements/sdk-platform.bst:
  • elements/sdk/apitrace.bst: Added.
1:07 AM Changeset in webkit [283606] by Carlos Garcia Campos
  • 4 edits
    1 add in trunk

[WPE][GTK] TestJSC incorrectly expects garbage collector to collect variables still on the stack
https://bugs.webkit.org/show_bug.cgi?id=222972

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

Add JSCContextInternal.h header to be used by unit tests to use private JSC API and add
jscContextGarbageCollect().

  • API/glib/JSCContext.cpp:

(jscContextGarbageCollect): Moved from unit tests here adding a parameter to optionally call
sanitizeStackForVM() before doing the garbage collection.

  • API/glib/JSCContextInternal.h: Added.

Tools:

Include JSCContextInternal.h instead of JSCContextPrivate.h and remove the jscContextGarbageCollect() implementation.

  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:

(testJSCWeakValue): Call sanitizeStackForVM() before the garbage collection.
(jscContextGarbageCollect): Deleted.

12:49 AM Changeset in webkit [283605] by jer.noble@apple.com
  • 57 edits
    2 copies in trunk

[Build-time perf] Forward declare JS TypedArrays
https://bugs.webkit.org/show_bug.cgi?id=231196

Reviewed by Tim Horton.

Source/JavaScriptCore:

Add a new file, Forward.h, containing forward declarations of commonly used JavaScriptCore types. Removed duplicate declarations
of TypedArray classes from TypedArrayAdapters.h and TypedArrays.h.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • runtime/Forward.h: Added.
  • runtime/TypedArrayAdaptors.h:
  • runtime/TypedArrayAdaptersForwardDeclarations.h: Added.
  • runtime/TypedArrays.h:

Source/WebCore:

According to clang -ftime-trace, compilation is spending a large amount of time inside TypedArrays.h.
Most of the places where JavaScriptCore/<Type>Array.h is included in a header only needed a forward
declaration, so include the new JavaScriptCore/Forward.h header instead, and move the include of the
<Type>Array.h header into the implementation file.

  • Modules/encryptedmedia/legacy/LegacyCDM.h:
  • Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
  • Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
  • Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp:
  • Modules/encryptedmedia/legacy/WebKitMediaKeys.h:
  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/webaudio/AudioBuffer.h:
  • Modules/webaudio/AudioParam.h:
  • Modules/webaudio/AudioParamTimeline.h:
  • Modules/webaudio/IIRFilterNode.h:
  • Modules/webaudio/PeriodicWave.h:
  • Modules/webaudio/RealtimeAnalyser.h:
  • Modules/webaudio/WaveShaperDSPKernel.cpp:
  • Modules/webaudio/WaveShaperProcessor.h:
  • Modules/webxr/WebXRRigidTransform.h:
  • Modules/webxr/WebXRView.h:
  • css/DOMMatrix.cpp:
  • css/DOMMatrixReadOnly.h:
  • dom/TextEncoder.h:
  • dom/TextEncoderStreamEncoder.h:
  • html/ImageData.h:
  • html/WebKitMediaKeyError.h:
  • html/canvas/WebGLAny.h:
  • html/canvas/WebGLBuffer.cpp:

(WebCore::WebGLBuffer::elementArrayBuffer const):

  • html/canvas/WebGLBuffer.h:
  • platform/graphics/LegacyCDMSession.h:
  • platform/graphics/MediaPlayer.h:
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:
  • platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:

(WebCore::CDMSessionAVFoundationCF::cachedKeyForKeyID const):

  • platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
  • platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h:
  • platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:

(WebCore::CDMSessionAVContentKeySession::cachedKeyForKeyID const):

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

(WebCore::CDMSessionAVFoundationObjC::cachedKeyForKeyID const):

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

(WebCore::CDMSessionAVStreamSession::cachedKeyForKeyID const):

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
  • platform/graphics/cocoa/SourceBufferParser.h:
  • platform/graphics/filters/FELighting.h:
  • platform/graphics/filters/FilterEffect.h:
  • testing/Internals.h:
  • testing/LegacyMockCDM.cpp:

Source/WebKit:

  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

Tools:

  • TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp:
12:34 AM Changeset in webkit [283604] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Close NetworkRTCProvider sockets explicitly when closing NetworkRTCProvider
https://bugs.webkit.org/show_bug.cgi?id=231228
<rdar://83237496>

Reviewed by Eric Carlson.

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:

(WebKit::NetworkRTCProvider::close):
Make sure to explictly closing the socket before deleting it.

12:15 AM Changeset in webkit [283603] by commit-queue@webkit.org
  • 4 edits in trunk/Source/JavaScriptCore

Fix wrong edge type from get-by-val in 32 bits
https://bugs.webkit.org/show_bug.cgi?id=231179

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

After https://bugs.webkit.org/show_bug.cgi?id=230801, a different type
can be set in DFG nodes, however, in 32 bits jsc was always setting the
type to Cell. This caused jsc to abort when verify the type of the edge:

DFG ASSERTION FAILED: Edge verification error: D@64->Check:Object:D@60 was expected to have type Object but has type Cell (43984760078335)

This patch changes the 32 bits version of the compileEnumeratorGetByVal
to manually speculate the edge if it is a Cell, since a differente Kind
could've been during Fixup.

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compileEnumeratorGetByVal):

Oct 5, 2021:

11:14 PM Changeset in webkit [283602] by basuke.suzuki@sony.com
  • 2 edits in trunk/Source/WebCore

[PlayStation] Fix build break after r283441
https://bugs.webkit.org/show_bug.cgi?id=231277

Unreviewed.

No new tests because there is no behavior change.

  • platform/graphics/Path.h:

(WebCore::Path::strokeBoundingRect):

10:40 PM Changeset in webkit [283601] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebCore

AX: Move handling of AXContents from platform wrapper to AX core
https://bugs.webkit.org/show_bug.cgi?id=231231

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

No changed functionality.

Moved handling of the AXContents (NSAccessibilityContentsAttribute) from the
Mac wrapper accessibilityAttributeValue handler to AXCoreObject::contents.
This makes it possible to share this code across multiple platforms.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::contents):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):

  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/isolatedtree/AXIsolatedTree.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

10:20 PM Changeset in webkit [283600] by sbarati@apple.com
  • 3 edits
    1 add in trunk

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

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/dont-pass-DontBuildStrings-when-building-empty-arguments-list.js: Added.

(main.a.prototype.g.toString.string_appeared_here):
(main.a):
(main):

Source/JavaScriptCore:

We might need the string, it turns out!

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseArguments):

8:47 PM Changeset in webkit [283599] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[ iOS15 ] TestWebKitAPI.ResourceLoadStatistics.DataTaskIdentifierCollision is a constant crash
https://bugs.webkit.org/show_bug.cgi?id=231246

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

For a reason that is mysterious to me, this test was timing out on iOS
in the call to synchronouslyLoadHTMLString unless I added "addToWindow:NO"
to the TestWKWebView initialization.

For a reason that is also mysterious to me, the test was crashing when closing
because of something in the autoreleasepool, but using Vector<String> instead of
RetainPtr<NSArray<NSString *>> in DataTaskIdentifierCollisionDelegate makes that
stop crashing.

I've looked quite closely and don't see why this fixes it, but I verified that it does.

While I was at it, I migrated from TCPServer to HTTPServer to be more robust against timeouts,
because the TCPServer destructor waits forever for threads to join, and if not everything is
perfect it will make the tests time out, which isn't great. HTTPServer does everything on the
main thread with callbacks instead.

  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:

(-[DataTaskIdentifierCollisionDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(-[DataTaskIdentifierCollisionDelegate waitForMessages:]):
(waitUntilTwoServersConnected):
(TEST):

7:06 PM Changeset in webkit [283598] by Russell Epstein
  • 1 copy in tags/Safari-612.2.9.2.3

Tag Safari-612.2.9.2.3.

7:03 PM Changeset in webkit [283597] by Russell Epstein
  • 1 copy in tags/Safari-612.2.9.3.3

Tag Safari-612.2.9.3.3.

6:42 PM Changeset in webkit [283596] by Russell Epstein
  • 1 copy in tags/Safari-612.2.9.0.4

Tag Safari-612.2.9.0.4.

6:16 PM Changeset in webkit [283595] by commit-queue@webkit.org
  • 9 edits in trunk/Source/WebKit

Do daily activity in AdAttributionDaemon based off of when the xpc activity happens
https://bugs.webkit.org/show_bug.cgi?id=231254

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-05
Reviewed by Kate Cheney.

Before this change, we did the activity 5 seconds after startup of the daemon, which can be started
by sending an attribution to it or by the daily xpc activity. We want to do it only because of the xpc activity.

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementClient.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementClientImpl.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDaemonClient.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::PrivateClickMeasurementManager):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManager.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManagerInterface.cpp:

(WebKit::PCM::doDailyActivityInManager):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManagerInterface.h:
  • Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonEntryPoint.mm:

(WebKit::registerScheduledActivityHandler):

5:56 PM Changeset in webkit [283594] by Russell Epstein
  • 1 copy in tags/Safari-612.2.9.1.4

Tag Safari-612.2.9.1.4.

5:46 PM Changeset in webkit [283593] by wilander@apple.com
  • 3 edits
    3 adds in trunk

PCM: Allow measurement of links in nested, cross-site iframes
https://bugs.webkit.org/show_bug.cgi?id=229204
<rdar://problem/82310386>

Reviewed by Alex Christensen.

Developers have said it would be great to allow measurement of links served in
nested, cross-site iframes on the click source. The click still count as if it
happened on the first party click source site, and any attribution report still
goes to that first party. This change enables the *serving* of measurable links
in nested, cross-site iframes.

The standards issue where this was discussed:
https://github.com/privacycg/private-click-measurement/issues/7

Source/WebCore:

Test: http/tests/privateClickMeasurement/store-private-click-measurement-nested.html

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::parsePrivateClickMeasurement const):

Removed the block for nested, cross-site iframes.

LayoutTests:

  • http/tests/privateClickMeasurement/resources/nestedTargetLink.html: Added.
  • http/tests/privateClickMeasurement/store-private-click-measurement-nested-expected.txt: Added.
  • http/tests/privateClickMeasurement/store-private-click-measurement-nested.html: Added.
5:42 PM Changeset in webkit [283592] by Aditya Keerthi
  • 8 edits
    1 add in trunk/Source

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

Reviewed by Tim Horton.

Source/WebCore:

  • en.lproj/Localizable.strings:

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

Source/WebCore/PAL:

Add AVFoundation API needed to transcode video.

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

Source/WebKit:

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

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

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

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

  • Platform/spi/ios/PhotosUISPI.h: Added.
  • UIProcess/ios/forms/WKFileUploadPanel.mm:

(-[_WKFileUploadItem setFileURL:]):

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

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

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

(-[WKFileUploadMediaTranscoder start]):

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

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

(-[WKFileUploadMediaTranscoder _processItemAtIndex:]):

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

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

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

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

Remove redundant platform conditional.

(-[WKFileUploadPanel _uploadMediaItemsTranscodingVideo:]):

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

  • WebKit.xcodeproj/project.pbxproj:
5:20 PM Changeset in webkit [283591] by Fujii Hironori
  • 42 edits in trunk/LayoutTests

[WinCairo] Unreviewed test gardening after r283550

  • platform/wincairo/editing/deleting/delete-at-paragraph-boundaries-002-expected.txt:
  • platform/wincairo/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt:
  • platform/wincairo/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt:
  • platform/wincairo/editing/deleting/delete-at-paragraph-boundaries-005-expected.txt:
  • platform/wincairo/editing/deleting/delete-at-paragraph-boundaries-006-expected.txt:
  • platform/wincairo/editing/deleting/delete-at-paragraph-boundaries-007-expected.txt:
  • platform/wincairo/editing/deleting/delete-at-paragraph-boundaries-008-expected.txt:
  • platform/wincairo/editing/deleting/delete-at-paragraph-boundaries-009-expected.txt:
  • platform/wincairo/editing/deleting/delete-at-paragraph-boundaries-010-expected.txt:
  • platform/wincairo/editing/deleting/delete-at-paragraph-boundaries-011-expected.txt:
  • platform/wincairo/editing/deleting/non-smart-delete-expected.txt:
  • platform/wincairo/editing/input/emacs-ctrl-o-expected.txt:
  • platform/wincairo/editing/inserting/insert-br-quoted-001-expected.txt:
  • platform/wincairo/editing/inserting/insert-br-quoted-002-expected.txt:
  • platform/wincairo/editing/inserting/insert-br-quoted-003-expected.txt:
  • platform/wincairo/editing/inserting/insert-br-quoted-004-expected.txt:
  • platform/wincairo/editing/inserting/insert-br-quoted-005-expected.txt:
  • platform/wincairo/editing/inserting/insert-br-quoted-006-expected.txt:
  • platform/wincairo/editing/inserting/insert-div-026-expected.txt:
  • platform/wincairo/editing/inserting/return-key-with-selection-001-expected.txt:
  • platform/wincairo/editing/inserting/return-key-with-selection-002-expected.txt:
  • platform/wincairo/editing/inserting/return-key-with-selection-003-expected.txt:
  • platform/wincairo/editing/style/block-styles-007-expected.txt:
  • platform/wincairo/editing/style/smoosh-styles-001-expected.txt:
  • platform/wincairo/editing/style/smoosh-styles-003-expected.txt:
  • platform/wincairo/editing/style/style-3998892-fix-expected.txt:
  • platform/wincairo/editing/style/style-boundary-001-expected.txt:
  • platform/wincairo/editing/style/style-boundary-002-expected.txt:
  • platform/wincairo/editing/style/style-boundary-003-expected.txt:
  • platform/wincairo/editing/style/style-boundary-004-expected.txt:
  • platform/wincairo/editing/style/style-boundary-005-expected.txt:
  • platform/wincairo/editing/unsupported-content/list-delete-001-expected.txt:
  • platform/wincairo/editing/unsupported-content/list-delete-003-expected.txt:
  • platform/wincairo/editing/unsupported-content/list-type-after-expected.txt:
  • platform/wincairo/editing/unsupported-content/list-type-before-expected.txt:
  • platform/wincairo/editing/unsupported-content/table-delete-002-expected.txt:
  • platform/wincairo/editing/unsupported-content/table-type-after-expected.txt:
  • platform/wincairo/editing/unsupported-content/table-type-before-expected.txt:
  • platform/wincairo/fast/css/first-line-text-decoration-expected.txt:
  • platform/wincairo/fast/css/first-line-text-decoration-inherited-from-parent-expected.txt:
  • platform/wincairo/fast/text/firstline/001-expected.txt:
5:16 PM Changeset in webkit [283590] by Chris Dumez
  • 4 edits
    6 adds in trunk

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

Reviewed by Ryosuke Niwa.

Source/WebCore:

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

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

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

intersection-observer/observe-disconnected-target.html

  • page/IntersectionObserver.cpp:

(WebCore::IntersectionObserver::observe):
(WebCore::IntersectionObserver::unobserve):
(WebCore::IntersectionObserver::removeAllTargets):
(WebCore::IntersectionObserver::notify):
(WebCore::IntersectionObserver::isReachableFromOpaqueRoots const):

  • page/IntersectionObserver.h:

LayoutTests:

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

  • intersection-observer/observe-disconnected-target-crash-expected.txt: Added.
  • intersection-observer/observe-disconnected-target-crash.html: Added.
  • intersection-observer/observe-disconnected-target-expected.txt: Added.
  • intersection-observer/observe-disconnected-target.html: Added.
4:52 PM Changeset in webkit [283589] by Russell Epstein
  • 1 copy in tags/Safari-611.4.2.0.2

Tag Safari-611.4.2.0.2.

4:51 PM Changeset in webkit [283588] by Russell Epstein
  • 8 edits in branches/safari-611.4.2.0-branch/Source

Versioning.

WebKit-7611.4.2.0.2

4:48 PM Changeset in webkit [283587] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS Release ] fast/events/ios/rotation/layout-viewport-during-safari-type-rotation.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=231266

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
4:47 PM Changeset in webkit [283586] by commit-queue@webkit.org
  • 5 edits in trunk

Add an entitlement check to only allow AdAttributionDaemon to be connected to by the network process
https://bugs.webkit.org/show_bug.cgi?id=231248

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

Source/WebKit:

Adding a restricted entitlement on macOS when using a non-internal SDK causes the network process to not start,
so in open source builds (in which the daemon is only used for unit tests) just skip the entitlement check.

  • Scripts/process-entitlements.sh:
  • Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonEntryPoint.mm:

(WebKit::startListeningForMachServiceConnections):

Tools:

Also add a system call to "launchctl unload" to clear any residual state in launchd before starting the unit test.
Otherwise we could get into a state where the plist is registered with launchd from an old test that registered it
but didn't start the daemon, causing the test to time out until you reboot the machine. This makes it recover nicely.

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::attemptConnectionInProcessWithoutEntitlement):
(TestWebKitAPI::setInjectedBundleClient): Deleted.
(TestWebKitAPI::webViewWithOpenInspector): Deleted.

4:43 PM Changeset in webkit [283585] by Jean-Yves Avenard
  • 4 edits
    2 adds in trunk

createImageBitmap using a HLS video as source always return a black image.
https://bugs.webkit.org/show_bug.cgi?id=231225
rdar://83884031

Source/WebCore:

When playing HLS content, [AVURLAsset tracks] return an empty array.
We need to instead retrieve it from the AVPlayerItem object. The method
paintWithVideoOutput would have bailed out early as a consequence.
So we refactor the code a little to retrieve the tracks where they can be found

Reviewed by Eric Carlson.

Test: http/tests/media/video-hls-copy-into-canvas.html

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateRotationSession):
(WebCore::MediaPlayerPrivateAVFoundationObjC::audioSourceProvider):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage):
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
(WebCore::MediaPlayerPrivateAVFoundationObjC::firstEnabledTrack const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::firstEnabledAudibleTrack const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::firstEnabledVisibleTrack const):

LayoutTests:

Reviewed by Eric Carlson.

  • http/tests/media/video-hls-copy-into-canvas-expected.txt: Added.
  • http/tests/media/video-hls-copy-into-canvas.html: Added.
4:29 PM Changeset in webkit [283584] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 ] fast/events/ios/rotation/layout-viewport-during-rotation.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=231264

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
4:28 PM Changeset in webkit [283583] by Jean-Yves Avenard
  • 3 edits in trunk/Source/WebCore

REGRESSION (Monterey): paramountplus.com: Cannot enter fullscreen in Safari
https://bugs.webkit.org/show_bug.cgi?id=231005

The page performs a lot of canvas readbacks when entering or exiting
fullscreen mode.
When the media is encrypted, attempting to do so would have made the
sync call from the content to GPU process hang for one full second.
Worse the CATransaction should it fail to paint would retry continuously.
After 10 attempts (and blocking the process for over 10s) the
content process would get automatically killed.
This works around rdar://83867877 where outputMediaDataWillChange isn't
called following a call to
[AVPlayerItemVideoOutput requestNotificationOfMediaDataChangeWithAdvanceInterval].
In case we timed out. we will disable this functionality until there's a
track change.

Reviewed by Eric Carlson.

We do not have the infrastructure to easily test interacting with encrypted
content. Once bug 231006 is fixed, we could write a test to ensure that canvas
readbacks do not lock-up.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
(WebCore::MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange):

3:47 PM Changeset in webkit [283582] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS ] fast/events/ios/rotation/resize-iframe-after-orientation-change.html is crashing/ failing.
https://bugs.webkit.org/show_bug.cgi?id=231262

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
3:39 PM Changeset in webkit [283581] by Russell Epstein
  • 16 edits
    2 adds in branches/safari-612.2.9.3-branch

Cherry-pick r283556. rdar://problem/83899967

[JSC] JSPropertyNameEnumerator should not have cached prototype chain since empty JSPropertyNameEnumerator is shared
https://bugs.webkit.org/show_bug.cgi?id=231202
JSTests:

Reviewed by Keith Miller.

  • stress/for-in-validation-poly-proto.js: Added. (shouldBe): (test): (factory.Test): (factory):
  • stress/for-in-validation-watchpoint.js: Added. (shouldBe): (test): (Test): (factory):

Source/JavaScriptCore:

rdar://83815122

Reviewed by Keith Miller.

r282014 assumed an invariant that JSPropertyNameEnumerator's StructureChain is immutable.
This invariant is also used in validation of JSPropertyNameEnumerator. However, this
invariant was broken since we now have shared empty sentinel JSPropertyNameEnumerator, which can
be used for different structures having different prototype chain.

Since now we have shared JSPropertyNameEnumerator, JSPropertyNameEnumerator should not have
StructureChain in its member. When invalidating StructureChain in Structure, we also clear
cached JSPropertyNameEnumerator so that we do not get a stale JSPropertyNameEnumerator from
Structure even though watchpoint-based validation is not used.

This patch also removes ValidatedViaWatchpoint flag in JSPropertyNameEnumerator due to the same
reason. We should not modify JSPropertyNameEnumerator once it is instantiated. Instead, we encode
this flag as a lowest bit of m_cachedPropertyNameEnumerator. If it is validated via traversing (not watchpoints),
then this bit is set. So when loading that pointer from StructureRareData, we can quickly detect
it without even accessing to the enumerator. This fixes the issue, and it is even cleaner.
We rename m_cachedPropertyNameEnumerator to m_cachedPropertyNameEnumeratorAndFlag since it now
includes this flag.

While reviewing the code, we also found that watchpoint-based validation didn't care about PolyProto.
We should disable watchpoint-based validation if PolyProto is used.

  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileGetPropertyEnumerator):
  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_get_property_enumerator):
  • llint/LLIntSlowPaths.cpp: (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  • llint/LowLevelInterpreter64.asm:
  • runtime/JSPropertyNameEnumerator.cpp: (JSC::JSPropertyNameEnumerator::visitChildrenImpl):
  • runtime/JSPropertyNameEnumerator.h: (JSC::propertyNameEnumerator):
  • runtime/Structure.cpp: (JSC::Structure::visitChildrenImpl): (JSC::Structure::setCachedPropertyNameEnumerator): (JSC::Structure::cachedPropertyNameEnumeratorAndFlag const):
  • runtime/Structure.h: (JSC::Structure::propertyNameEnumeratorShouldWatch const):
  • runtime/StructureInlines.h: (JSC::Structure::prototypeChain const): (JSC::Structure::clearCachedPrototypeChain):
  • runtime/StructureRareData.cpp: (JSC::StructureRareData::visitChildrenImpl):
  • runtime/StructureRareData.h:
  • runtime/StructureRareDataInlines.h: (JSC::StructureRareData::cachedPropertyNameEnumerator const): (JSC::StructureRareData::cachedPropertyNameEnumeratorAndFlag const): (JSC::StructureRareData::setCachedPropertyNameEnumerator): (JSC::StructureChainInvalidationWatchpoint::fireInternal): (JSC::StructureRareData::tryCachePropertyNameEnumeratorViaWatchpoint): (JSC::StructureRareData::clearCachedPropertyNameEnumerator): (JSC::StructureRareData::invalidateWatchpointBasedValidation): Deleted.

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

3:38 PM Changeset in webkit [283580] by Russell Epstein
  • 8 edits in branches/safari-612.2.9.3-branch/Source

Versioning.

WebKit-7612.2.9.3.3

3:37 PM Changeset in webkit [283579] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[ iOS ] accessibility/misspelling-range.html is constantly failing
https://bugs.webkit.org/show_bug.cgi?id=231261

Unreviewed test gardening.

3:32 PM Changeset in webkit [283578] by Russell Epstein
  • 16 edits
    2 adds in branches/safari-612.2.9.2-branch

Cherry-pick r283556. rdar://problem/83899913

[JSC] JSPropertyNameEnumerator should not have cached prototype chain since empty JSPropertyNameEnumerator is shared
https://bugs.webkit.org/show_bug.cgi?id=231202
JSTests:

Reviewed by Keith Miller.

  • stress/for-in-validation-poly-proto.js: Added. (shouldBe): (test): (factory.Test): (factory):
  • stress/for-in-validation-watchpoint.js: Added. (shouldBe): (test): (Test): (factory):

Source/JavaScriptCore:

rdar://83815122

Reviewed by Keith Miller.

r282014 assumed an invariant that JSPropertyNameEnumerator's StructureChain is immutable.
This invariant is also used in validation of JSPropertyNameEnumerator. However, this
invariant was broken since we now have shared empty sentinel JSPropertyNameEnumerator, which can
be used for different structures having different prototype chain.

Since now we have shared JSPropertyNameEnumerator, JSPropertyNameEnumerator should not have
StructureChain in its member. When invalidating StructureChain in Structure, we also clear
cached JSPropertyNameEnumerator so that we do not get a stale JSPropertyNameEnumerator from
Structure even though watchpoint-based validation is not used.

This patch also removes ValidatedViaWatchpoint flag in JSPropertyNameEnumerator due to the same
reason. We should not modify JSPropertyNameEnumerator once it is instantiated. Instead, we encode
this flag as a lowest bit of m_cachedPropertyNameEnumerator. If it is validated via traversing (not watchpoints),
then this bit is set. So when loading that pointer from StructureRareData, we can quickly detect
it without even accessing to the enumerator. This fixes the issue, and it is even cleaner.
We rename m_cachedPropertyNameEnumerator to m_cachedPropertyNameEnumeratorAndFlag since it now
includes this flag.

While reviewing the code, we also found that watchpoint-based validation didn't care about PolyProto.
We should disable watchpoint-based validation if PolyProto is used.

  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileGetPropertyEnumerator):
  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_get_property_enumerator):
  • llint/LLIntSlowPaths.cpp: (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  • llint/LowLevelInterpreter64.asm:
  • runtime/JSPropertyNameEnumerator.cpp: (JSC::JSPropertyNameEnumerator::visitChildrenImpl):
  • runtime/JSPropertyNameEnumerator.h: (JSC::propertyNameEnumerator):
  • runtime/Structure.cpp: (JSC::Structure::visitChildrenImpl): (JSC::Structure::setCachedPropertyNameEnumerator): (JSC::Structure::cachedPropertyNameEnumeratorAndFlag const):
  • runtime/Structure.h: (JSC::Structure::propertyNameEnumeratorShouldWatch const):
  • runtime/StructureInlines.h: (JSC::Structure::prototypeChain const): (JSC::Structure::clearCachedPrototypeChain):
  • runtime/StructureRareData.cpp: (JSC::StructureRareData::visitChildrenImpl):
  • runtime/StructureRareData.h:
  • runtime/StructureRareDataInlines.h: (JSC::StructureRareData::cachedPropertyNameEnumerator const): (JSC::StructureRareData::cachedPropertyNameEnumeratorAndFlag const): (JSC::StructureRareData::setCachedPropertyNameEnumerator): (JSC::StructureChainInvalidationWatchpoint::fireInternal): (JSC::StructureRareData::tryCachePropertyNameEnumeratorViaWatchpoint): (JSC::StructureRareData::clearCachedPropertyNameEnumerator): (JSC::StructureRareData::invalidateWatchpointBasedValidation): Deleted.

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

3:29 PM Changeset in webkit [283577] by Ayumi Kojima
  • 11 edits in trunk/Source/WebCore

Unreviewed, reverting r283339.

Reverting because this commit may have caused fast/attachment
tests to crash

Reverted changeset:

"[iOS][GPU Process] support <attachment>"
https://bugs.webkit.org/show_bug.cgi?id=230781
https://commits.webkit.org/r283339

3:26 PM Changeset in webkit [283576] by Russell Epstein
  • 8 edits in branches/safari-612.2.9.2-branch/Source

Versioning.

WebKit-7612.2.9.2.3

3:20 PM Changeset in webkit [283575] by Russell Epstein
  • 16 edits
    2 adds in branches/safari-612.2.9.0-branch

Cherry-pick r283556. rdar://problem/83900126

[JSC] JSPropertyNameEnumerator should not have cached prototype chain since empty JSPropertyNameEnumerator is shared
https://bugs.webkit.org/show_bug.cgi?id=231202
JSTests:

Reviewed by Keith Miller.

  • stress/for-in-validation-poly-proto.js: Added. (shouldBe): (test): (factory.Test): (factory):
  • stress/for-in-validation-watchpoint.js: Added. (shouldBe): (test): (Test): (factory):

Source/JavaScriptCore:

rdar://83815122

Reviewed by Keith Miller.

r282014 assumed an invariant that JSPropertyNameEnumerator's StructureChain is immutable.
This invariant is also used in validation of JSPropertyNameEnumerator. However, this
invariant was broken since we now have shared empty sentinel JSPropertyNameEnumerator, which can
be used for different structures having different prototype chain.

Since now we have shared JSPropertyNameEnumerator, JSPropertyNameEnumerator should not have
StructureChain in its member. When invalidating StructureChain in Structure, we also clear
cached JSPropertyNameEnumerator so that we do not get a stale JSPropertyNameEnumerator from
Structure even though watchpoint-based validation is not used.

This patch also removes ValidatedViaWatchpoint flag in JSPropertyNameEnumerator due to the same
reason. We should not modify JSPropertyNameEnumerator once it is instantiated. Instead, we encode
this flag as a lowest bit of m_cachedPropertyNameEnumerator. If it is validated via traversing (not watchpoints),
then this bit is set. So when loading that pointer from StructureRareData, we can quickly detect
it without even accessing to the enumerator. This fixes the issue, and it is even cleaner.
We rename m_cachedPropertyNameEnumerator to m_cachedPropertyNameEnumeratorAndFlag since it now
includes this flag.

While reviewing the code, we also found that watchpoint-based validation didn't care about PolyProto.
We should disable watchpoint-based validation if PolyProto is used.

  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileGetPropertyEnumerator):
  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_get_property_enumerator):
  • llint/LLIntSlowPaths.cpp: (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  • llint/LowLevelInterpreter64.asm:
  • runtime/JSPropertyNameEnumerator.cpp: (JSC::JSPropertyNameEnumerator::visitChildrenImpl):
  • runtime/JSPropertyNameEnumerator.h: (JSC::propertyNameEnumerator):
  • runtime/Structure.cpp: (JSC::Structure::visitChildrenImpl): (JSC::Structure::setCachedPropertyNameEnumerator): (JSC::Structure::cachedPropertyNameEnumeratorAndFlag const):
  • runtime/Structure.h: (JSC::Structure::propertyNameEnumeratorShouldWatch const):
  • runtime/StructureInlines.h: (JSC::Structure::prototypeChain const): (JSC::Structure::clearCachedPrototypeChain):
  • runtime/StructureRareData.cpp: (JSC::StructureRareData::visitChildrenImpl):
  • runtime/StructureRareData.h:
  • runtime/StructureRareDataInlines.h: (JSC::StructureRareData::cachedPropertyNameEnumerator const): (JSC::StructureRareData::cachedPropertyNameEnumeratorAndFlag const): (JSC::StructureRareData::setCachedPropertyNameEnumerator): (JSC::StructureChainInvalidationWatchpoint::fireInternal): (JSC::StructureRareData::tryCachePropertyNameEnumeratorViaWatchpoint): (JSC::StructureRareData::clearCachedPropertyNameEnumerator): (JSC::StructureRareData::invalidateWatchpointBasedValidation): Deleted.

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

3:16 PM Changeset in webkit [283574] by achristensen@apple.com
  • 2 edits in trunk/Tools

TestWebKitAPI.PrivateClickMeasurement.DaemonBasicFunctionality is timing out
https://bugs.webkit.org/show_bug.cgi?id=231257

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

Originally reviewed as part of https://bugs.webkit.org/show_bug.cgi?id=231248
this should fix the error that happens when a previous test run has registered
the test AdAttributionDaemon but then failed before it was started, which leaves
launchd in a state of having already loaded a plist for the mach service named
"org.webkit.pcmtestdaemon.service" so it refuses to load another. The solution is
just to try unloading any previously loaded plist before loading another to clear
state in launchd.

3:15 PM Changeset in webkit [283573] by Russell Epstein
  • 16 edits
    2 adds in branches/safari-612.2.9.1-branch

Cherry-pick r283556. rdar://problem/83900153

[JSC] JSPropertyNameEnumerator should not have cached prototype chain since empty JSPropertyNameEnumerator is shared
https://bugs.webkit.org/show_bug.cgi?id=231202
JSTests:

Reviewed by Keith Miller.

  • stress/for-in-validation-poly-proto.js: Added. (shouldBe): (test): (factory.Test): (factory):
  • stress/for-in-validation-watchpoint.js: Added. (shouldBe): (test): (Test): (factory):

Source/JavaScriptCore:

rdar://83815122

Reviewed by Keith Miller.

r282014 assumed an invariant that JSPropertyNameEnumerator's StructureChain is immutable.
This invariant is also used in validation of JSPropertyNameEnumerator. However, this
invariant was broken since we now have shared empty sentinel JSPropertyNameEnumerator, which can
be used for different structures having different prototype chain.

Since now we have shared JSPropertyNameEnumerator, JSPropertyNameEnumerator should not have
StructureChain in its member. When invalidating StructureChain in Structure, we also clear
cached JSPropertyNameEnumerator so that we do not get a stale JSPropertyNameEnumerator from
Structure even though watchpoint-based validation is not used.

This patch also removes ValidatedViaWatchpoint flag in JSPropertyNameEnumerator due to the same
reason. We should not modify JSPropertyNameEnumerator once it is instantiated. Instead, we encode
this flag as a lowest bit of m_cachedPropertyNameEnumerator. If it is validated via traversing (not watchpoints),
then this bit is set. So when loading that pointer from StructureRareData, we can quickly detect
it without even accessing to the enumerator. This fixes the issue, and it is even cleaner.
We rename m_cachedPropertyNameEnumerator to m_cachedPropertyNameEnumeratorAndFlag since it now
includes this flag.

While reviewing the code, we also found that watchpoint-based validation didn't care about PolyProto.
We should disable watchpoint-based validation if PolyProto is used.

  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileGetPropertyEnumerator):
  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_get_property_enumerator):
  • llint/LLIntSlowPaths.cpp: (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  • llint/LowLevelInterpreter64.asm:
  • runtime/JSPropertyNameEnumerator.cpp: (JSC::JSPropertyNameEnumerator::visitChildrenImpl):
  • runtime/JSPropertyNameEnumerator.h: (JSC::propertyNameEnumerator):
  • runtime/Structure.cpp: (JSC::Structure::visitChildrenImpl): (JSC::Structure::setCachedPropertyNameEnumerator): (JSC::Structure::cachedPropertyNameEnumeratorAndFlag const):
  • runtime/Structure.h: (JSC::Structure::propertyNameEnumeratorShouldWatch const):
  • runtime/StructureInlines.h: (JSC::Structure::prototypeChain const): (JSC::Structure::clearCachedPrototypeChain):
  • runtime/StructureRareData.cpp: (JSC::StructureRareData::visitChildrenImpl):
  • runtime/StructureRareData.h:
  • runtime/StructureRareDataInlines.h: (JSC::StructureRareData::cachedPropertyNameEnumerator const): (JSC::StructureRareData::cachedPropertyNameEnumeratorAndFlag const): (JSC::StructureRareData::setCachedPropertyNameEnumerator): (JSC::StructureChainInvalidationWatchpoint::fireInternal): (JSC::StructureRareData::tryCachePropertyNameEnumeratorViaWatchpoint): (JSC::StructureRareData::clearCachedPropertyNameEnumerator): (JSC::StructureRareData::invalidateWatchpointBasedValidation): Deleted.

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

3:12 PM Changeset in webkit [283572] by Patrick Angle
  • 9 edits in trunk/Source

Web Inspector: Show color space for canvases in the Graphics tab on the overview cards
https://bugs.webkit.org/show_bug.cgi?id=231205

Reviewed by Devin Rousso.

Source/JavaScriptCore:

Use an enum instead of strings for color space values sent to the frontend.

  • inspector/protocol/Canvas.json:
  • inspector/scripts/codegen/generator.py:

Source/WebCore:

Use an enum instead of strings for color space values sent to the frontend.

  • inspector/InspectorCanvas.cpp:

(WebCore::buildObjectForCanvasContextAttributes):

Source/WebInspectorUI:

For canvas context's with a color space attribute, show the color space next to the context type in the header
of each context card in the Graphics tab.

  • UserInterface/Models/Canvas.js:

(WI.Canvas.displayNameForColorSpace):

  • UserInterface/Views/CanvasContentView.js:

(WI.CanvasContentView.prototype.initialLayout):

  • UserInterface/Views/CanvasOverviewContentView.css:

(.content-view.canvas-overview > .content-view.canvas > header > .titles > :matches(.subtitle, .color-space),):
(.content-view.canvas-overview > .content-view.canvas > header .color-space::before):

3:04 PM Changeset in webkit [283571] by Russell Epstein
  • 1 copy in tags/Safari-611.4.2.0.1

Tag Safari-611.4.2.0.1.

2:54 PM Changeset in webkit [283570] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Remove leftover ASSERT.

Unreviewed.

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::inlineItemWidth const): We could very well run the fast text measuring codepath with different styles e.g. when there's color difference.

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

[ iOS 15 ] ASSERTION FAILED: isRunningTest(WebCore::applicationBundleIdentifier()).
https://bugs.webkit.org/show_bug.cgi?id=231255

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
1:12 PM Changeset in webkit [283568] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

Incorrect Length constructor used after blending negative Length
https://bugs.webkit.org/show_bug.cgi?id=230873

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2021-10-05
Reviewed by Antoine Quint.

Source/WebCore:

Test: fast/borders/border-radius-cubic-bezier-timing-function-negative-value.html

  • platform/Length.cpp:

(WebCore::blend):

Only call current Length constructor for the non-LengthType::Calculated types when the value is negative, otherwise use behavior before r273603.

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertToRadiusLength):

Clamp BuilderConverter::convertToRadiusLength Lengths to values >= 0

LayoutTests:

  • fast/borders/border-radius-cubic-bezier-timing-function-negative-value-expected.txt: Added.
  • fast/borders/border-radius-cubic-bezier-timing-function-negative-value.html: Added.
12:20 PM Changeset in webkit [283567] by mark.lam@apple.com
  • 6 edits
    1 add in trunk

CodeBlock should not add/remove LoopHintExecutionCounters.
https://bugs.webkit.org/show_bug.cgi?id=231209
rdar://83571235

Reviewed by Saam Barati.

JSTests:

  • stress/codeBlock-should-not-add-remove-loop-hint-execution-counters-due-to-cached-unlinked-baseline-code.js: Added.

Source/JavaScriptCore:

This is because cached unlinked baseline JIT code would retain a pointer to those
counters. Hence, the UnlinkedCodeBlock should do the add /remove of the counters
instead.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::~CodeBlock):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::initializeLoopHintExecutionCounter):
(JSC::UnlinkedCodeBlock::~UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:
  • bytecode/UnlinkedCodeBlockGenerator.cpp:

(JSC::UnlinkedCodeBlockGenerator::finalize):

12:12 PM Changeset in webkit [283566] by Kate Cheney
  • 35 edits
    2 adds in trunk

CSP: unsafe-eval tests timing out or failing
https://bugs.webkit.org/show_bug.cgi?id=231113
<rdar://problem/83425041>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • web-platform-tests/content-security-policy/script-src/script-src-1_4-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-1_4_1-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-1_4_2-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_eval-expected.txt: Added.
  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_new_function-expected.txt: Added.
  • web-platform-tests/content-security-policy/securitypolicyviolation/blockeduri-eval-expected.txt:

This test gets the report but gets an incorrect column number. The bug
seems tangential to this patch and we should fix it in a followup.

  • web-platform-tests/content-security-policy/unsafe-eval/eval-blocked-and-sends-report.sub-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-eval/eval-blocked-in-about-blank-iframe.sub-expected.txt:

This test gets the report but reveals a bug where we don't allow
inline script to execute after calling eval() when unsafe-inline is
specified but not unsafe-eval. Tracking in rdar://83846298.

  • web-platform-tests/content-security-policy/unsafe-eval/eval-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-eval/eval-scripts-setInterval-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-eval/eval-scripts-setTimeout-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-eval/function-constructor-blocked.sub-expected.txt:

Source/JavaScriptCore:

Many imported unsafe-eval tests are failing because we don't report
violations to the DOM or report URI when an eval is blocked. This
patch adds support for that by calling
ContentSecurityPolicy::allowEval() when eval is disabled.

Eventually I think we can remove the evalEnabled() code and check the
CSP policy instead, but I will save that for another patch.

  • API/JSAPIGlobalObject.cpp:
  • API/JSAPIGlobalObject.mm:
  • interpreter/Interpreter.cpp:

(JSC::eval):

  • jsc.cpp:
  • runtime/DirectEvalExecutable.cpp:

(JSC::DirectEvalExecutable::create):

  • runtime/FunctionConstructor.cpp:

(JSC::constructFunction):

  • runtime/IndirectEvalExecutable.cpp:

(JSC::IndirectEvalExecutable::create):

  • runtime/JSGlobalObject.cpp:
  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::reportViolationForUnsafeEval):
Per the spec we should send the report to the element's document and
bubble it up to the window.

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

Source/WebCore:

No new tests. This will cause existing tests to pass.

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::reportViolationForUnsafeEval):
Add new parameter LogToConsole to ContentSecurityPolicy::allowEval()
because in many cases we already log to console for eval violations
when we throw an error.

  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSRemoteDOMWindowBase.cpp:

Per the spec, we should set the DOM target to be the element's
document. If the element is null, we set it to the window's document.

  • bindings/js/JSWorkerGlobalScopeBase.cpp:

(WebCore::JSWorkerGlobalScopeBase::reportViolationForUnsafeEval):

  • bindings/js/JSWorkerGlobalScopeBase.h:
  • bindings/js/JSWorkletGlobalScopeBase.cpp:

(WebCore::JSWorkletGlobalScopeBase::reportViolationForUnsafeEval):

  • bindings/js/JSWorkletGlobalScopeBase.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::setTimeout):
(WebCore::DOMWindow::setInterval):
Cases where we do not log to console already, so we should do it when
we check for a violation.

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::allowEval const):
(WebCore::ContentSecurityPolicy::reportViolation const):
Per the spec, the blockedURI for eval violations should be "eval".
This patch updates the blockedURI to be a string when passed to
reportViolation to allow this to happen.

(WebCore::ContentSecurityPolicy::logToConsole const):
Don't log an empty string to console. This allows us to pass an empty
string when shouldLogToConsole == LogToConsole::No so we don't need to
add an extra boolean to a lot of places to know whether to log.

  • page/csp/ContentSecurityPolicy.h:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::setTimeout):
(WebCore::WorkerGlobalScope::setInterval):

11:48 AM Changeset in webkit [283565] by Chris Dumez
  • 7 edits
    3 adds in trunk

Authorization header lost on 30x redirects
https://bugs.webkit.org/show_bug.cgi?id=230935
<rdar://problem/83689955>

Reviewed by Darin Adler.

Source/WebCore:

CFNetwork drops the Authorization request header in cases of same-origin redirects, which is not as per
the fetch specification [1] and doesn't match the behavior of other browsers.

To address the issue, WebKit adds the Authorization request back in case of a same-origin redirect.

Test: http/tests/fetch/fetch-redirect-same-origin-authorization.html

  • platform/network/cf/ResourceHandleCFNet.cpp:

(WebCore::ResourceHandle::willSendRequest):

  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::willSendRequest):

Source/WebKit:

CFNetwork drops the Authorization request header in cases of same-origin redirects, which is not as per
the fetch specification [1] and doesn't match the behavior of other browsers.

To address the issue, WebKit adds the Authorization request back in case of a same-origin redirect.

[1] https://fetch.spec.whatwg.org/#concept-http-redirect-fetch

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):

LayoutTests:

  • http/tests/fetch/fetch-redirect-same-origin-authorization-expected.txt: Added.
  • http/tests/fetch/fetch-redirect-same-origin-authorization.html: Added.
  • http/tests/fetch/resources/dump-authorization-header.py: Added.

Add layout test coverage.

  • http/tests/xmlhttprequest/redirections-and-user-headers.html:

Update existing test to reflect behavior change.

11:41 AM Changeset in webkit [283564] by Andres Gonzalez
  • 8 edits in trunk/Source/WebCore

Move handling of AXValue from platform wrapper to AX core code.
https://bugs.webkit.org/show_bug.cgi?id=231200

Reviewed by Chris Fleizach.

No change in functionality.

Moved handling of the AXValue (NSAccessibilityValueAttribute) from the
Mac wrapper accessibilityAttributeValue handler to AXCoreObject::value.
This makes possible to share this code across multiple platforms.

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::headingLevel const):
Returns unsigned instead of int.

  • accessibility/AccessibilityNodeObject.h:
  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::value):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

11:40 AM Changeset in webkit [283563] by timothy_horton@apple.com
  • 12 edits
    1 add in trunk

<model> should be draggable, similar to <img>
https://bugs.webkit.org/show_bug.cgi?id=229246

Reviewed by Wenson Hsieh.

Source/WebCore:

  • page/DragActions.h:

(WebCore::anyDragSourceAction):

  • page/DragController.cpp:

(WebCore::DragController::draggableElement const):
(WebCore::DragController::startDrag):

  • page/EventHandler.cpp:

(WebCore::EventHandler::dragHysteresisExceeded const):
Make <model> draggable, vending a PasteboardImage with the model data and correct MIME type.
We currently make a DragImage from a node snapshot, but later will want a richer DragImage.

Source/WebKit:

  • UIProcess/ios/DragDropInteractionState.mm:

(WebKit::shouldUseDragImageToCreatePreviewForDragSource):
For now, use the Web-Content-process-painted node-snapshot DragImage for the targeted preview on iOS.

Source/WebKitLegacy/mac:

  • WebView/WebView.mm:

(kit):
Do nothing for <model> drags in legacy WebKit.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/cube.usdz: Added.
  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:

(-[ModelLoadingMessageHandler userContentController:didReceiveScriptMessage:]):
(TestWebKitAPI::TEST):
Add a test that ensures that dragging a <model> works.

11:26 AM Changeset in webkit [283562] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

Unsupported blending of mixed length types leads to nullptr deref when accessing m_value.calc in CSSPrimitiveValue::primitiveType()
https://bugs.webkit.org/show_bug.cgi?id=230929

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2021-10-05
Source/WebCore:

Reviewed by Darin Adler.

Test: fast/layoutformattingcontext/fit-content-min-height-animation.html

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::init):

  • platform/Length.cpp:

(WebCore::blendMixedTypes):

LayoutTests:

Reviewed by Reviewed by Darin Adler.

  • fast/layoutformattingcontext/fit-content-min-height-animation-expected.txt: Added.
  • fast/layoutformattingcontext/fit-content-min-height-animation.html: Added.
11:19 AM Changeset in webkit [283561] by commit-queue@webkit.org
  • 6 edits in trunk

radial-gradient does not accept calc values that combine length and percent
https://bugs.webkit.org/show_bug.cgi?id=230388

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

Source/WebCore:

Removed outdated check that disallowed combined percentage and length expressions.
Added code to calculate radius for combined percentage and length expressions.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeRadialGradient):

LayoutTests:

  • css3/calc/css3-radial-gradients-expected.html:
  • css3/calc/css3-radial-gradients.html:
11:15 AM Changeset in webkit [283560] by timothy_horton@apple.com
  • 8 edits in trunk/Source

Add an alternate style for form controls, and implement it for checkboxes and radio buttons
https://bugs.webkit.org/show_bug.cgi?id=231160

Reviewed by Sam Weinig.

  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::checkboxRadioBackgroundColor):
Add alternate background colors. Currently these are not specified as
semantic colors, so we inline the values.

(WebCore::RenderThemeIOS::checkboxRadioBackgroundGradient):
Add a gradient fill for checkbox and radio button backgrounds.

(WebCore::RenderThemeIOS::paintCheckboxRadioInnerShadow):
Add two inner shadows (really, a shadow and a glow) to the checkbox and radio button.

(WebCore::RenderThemeIOS::paintCheckbox):
(WebCore::RenderThemeIOS::paintRadio):
Drop the border and use a filled background and inner shadows instead,
when the setting is enabled.

  • Scripts/Preferences/WebPreferences.yaml:
  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultAlternateFormControlDesignEnabled):

  • Shared/WebPreferencesDefaultValues.h:
11:12 AM Changeset in webkit [283559] by achristensen@apple.com
  • 20 edits
    3 adds
    1 delete in trunk

Implement missing functions in PrivateClickMeasurementDaemonClient
https://bugs.webkit.org/show_bug.cgi?id=231060

Reviewed by Chris Dumez.

Source/WebKit:

Enable debug mode in the daemon if any connected clients have debug mode enabled.
Broadcast debug messages to all clients, which will then broadcast them to all web processes.
Add an API test that turns it on then off and checks that the debug messages make it all the way to the inspector.

  • NetworkProcess/NetworkSession.cpp:

(WebKit::managerOrProxy):
(WebKit::NetworkSession::setPrivateClickMeasurementDebugMode):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementConnection.cpp:

(WebKit::PCM::ConnectionToMachService::ConnectionToMachService):
(WebKit::PCM::ConnectionToMachService::send const):
(WebKit::PCM::ConnectionToMachService::sendWithReply const):
(WebKit::PCM::Connection::Connection): Deleted.
(WebKit::PCM::Connection::send const): Deleted.
(WebKit::PCM::Connection::sendWithReply const): Deleted.

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementConnection.h:

(WebKit::PCM::Connection::Connection):
(WebKit::PCM::Connection::get const):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDaemonClient.cpp:

(WebKit::PCM::DaemonClient::broadcastConsoleMessage):
(WebKit::PCM::DaemonClient::debugModeEnabled const):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::setDebugModeIsEnabled):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManager.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManagerInterface.cpp:

(WebKit::PCM::messageTypeSendsReply):
(WebKit::PCM::handlePCMMessageSetDebugModeIsEnabled):
(WebKit::PCM::decodeMessageAndSendToManager):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManagerInterface.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManagerProxy.cpp:

(WebKit::PCM::ManagerProxy::ManagerProxy):
(WebKit::PCM::ManagerProxy::setDebugModeIsEnabled):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManagerProxy.h:
  • NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementConnectionCocoa.mm: Renamed from Source/WebKit/NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementDaemonConnectionCocoa.mm.

(WebKit::PCM::ConnectionToMachService::initializeConnectionIfNeeded const):
(WebKit::PCM::ConnectionToMachService::sendDebugModeIsEnabledMessageIfNecessary const):
(WebKit::PCM::ConnectionToMachService::checkForDebugMessageBroadcast const):
(WebKit::PCM::Connection::send const):
(WebKit::PCM::Connection::sendWithReply const):
(WebKit::PCM::ConnectionToMachService::send const):
(WebKit::PCM::ConnectionToMachService::sendWithReply const):

  • Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonConnectionSet.h: Copied from Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementConnection.h.
  • Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonConnectionSet.mm: Added.

(WebKit::PCM::DaemonConnectionSet::singleton):
(WebKit::PCM::DaemonConnectionSet::add):
(WebKit::PCM::DaemonConnectionSet::remove):
(WebKit::PCM::DaemonConnectionSet::setConnectedNetworkProcessHasDebugModeEnabled):
(WebKit::PCM::DaemonConnectionSet::debugModeEnabled const):
(WebKit::PCM::DaemonConnectionSet::broadcastConsoleMessage):

  • Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonEntryPoint.mm:

(WebKit::connectionEventHandler):
(WebKit::startListeningForMachServiceConnections):
(WebKit::peers): Deleted.

  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _setPrivateClickMeasurementDebugModeEnabledForTesting:]):

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::testDaemonPList):
(TestWebKitAPI::cleanUpDaemon):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/cocoa/TestUIDelegate.h:
  • TestWebKitAPI/cocoa/TestUIDelegate.mm:

(-[TestUIDelegate _webView:didAttachLocalInspector:]):
(-[TestUIDelegate waitForInspectorToShow]):
(-[WKWebView _test_waitForInspectorToShow]):

10:59 AM Changeset in webkit [283558] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS15 WK2 ] http/tests/media/modern-media-controls/overflow-support/playback-speed-live-broadcast.html is a constant timeout.
<rdar://80393995>

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
10:51 AM Changeset in webkit [283557] by commit-queue@webkit.org
  • 9 edits in trunk/Source/JavaScriptCore

[JSC][32bit] Fix bugs after unlinked baseline jit
https://bugs.webkit.org/show_bug.cgi?id=231232

Patch by Xan López <Xan Lopez> on 2021-10-05
Reviewed by Yusuke Suzuki.

Fix a bunch of bugs introduced with unlinked baseline jit. As of
now we are disabling DataIC on baseline JIT to get things working
ASAP, making that work will be the next step. This makes us almost
go back to green bots.

(Patch co-authored with Geza Lore)

  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::emitDataICFastPath): ASSERT we are not using DataIC on 32-bit.

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::hasDebuggerRequests const):
(JSC::CodeBlock::debuggerRequestsAddress): Deleted.

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileOpCall): don't use DataIC.
(JSC::JIT::compileOpCallSlowCase): set missing label.

  • jit/JITCode.h:

(JSC::JITCode::useDataIC): disable DataIC on baseline JIT for 32-bit.

  • jit/JITInlines.h:

(JSC::JIT::getConstantOperand): get constants from the CodeBlock,
since we don't do sharing on 32-bit.
(JSC::JIT::emitValueProfilingSite): remove an overzealous ASSERT.
(JSC::JIT::loadConstant): use sizeof(void*) instead of '8', makes
things work on 32-bit.

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_debug): share this with 32-bit.

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_debug): Deleted.

  • llint/LowLevelInterpreter32_64.asm: do not thrash the PC register.
10:49 AM Changeset in webkit [283556] by ysuzuki@apple.com
  • 16 edits
    2 adds in trunk

[JSC] JSPropertyNameEnumerator should not have cached prototype chain since empty JSPropertyNameEnumerator is shared
https://bugs.webkit.org/show_bug.cgi?id=231202
JSTests:

Reviewed by Keith Miller.

  • stress/for-in-validation-poly-proto.js: Added.

(shouldBe):
(test):
(factory.Test):
(factory):

  • stress/for-in-validation-watchpoint.js: Added.

(shouldBe):
(test):
(Test):
(factory):

Source/JavaScriptCore:

rdar://83815122

Reviewed by Keith Miller.

r282014 assumed an invariant that JSPropertyNameEnumerator's StructureChain is immutable.
This invariant is also used in validation of JSPropertyNameEnumerator. However, this
invariant was broken since we now have shared empty sentinel JSPropertyNameEnumerator, which can
be used for different structures having different prototype chain.

Since now we have shared JSPropertyNameEnumerator, JSPropertyNameEnumerator should not have
StructureChain in its member. When invalidating StructureChain in Structure, we also clear
cached JSPropertyNameEnumerator so that we do not get a stale JSPropertyNameEnumerator from
Structure even though watchpoint-based validation is not used.

This patch also removes ValidatedViaWatchpoint flag in JSPropertyNameEnumerator due to the same
reason. We should not modify JSPropertyNameEnumerator once it is instantiated. Instead, we encode
this flag as a lowest bit of m_cachedPropertyNameEnumerator. If it is validated via traversing (not watchpoints),
then this bit is set. So when loading that pointer from StructureRareData, we can quickly detect
it without even accessing to the enumerator. This fixes the issue, and it is even cleaner.
We rename m_cachedPropertyNameEnumerator to m_cachedPropertyNameEnumeratorAndFlag since it now
includes this flag.

While reviewing the code, we also found that watchpoint-based validation didn't care about PolyProto.
We should disable watchpoint-based validation if PolyProto is used.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetPropertyEnumerator):

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_property_enumerator):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter64.asm:
  • runtime/JSPropertyNameEnumerator.cpp:

(JSC::JSPropertyNameEnumerator::visitChildrenImpl):

  • runtime/JSPropertyNameEnumerator.h:

(JSC::propertyNameEnumerator):

  • runtime/Structure.cpp:

(JSC::Structure::visitChildrenImpl):
(JSC::Structure::setCachedPropertyNameEnumerator):
(JSC::Structure::cachedPropertyNameEnumeratorAndFlag const):

  • runtime/Structure.h:

(JSC::Structure::propertyNameEnumeratorShouldWatch const):

  • runtime/StructureInlines.h:

(JSC::Structure::prototypeChain const):
(JSC::Structure::clearCachedPrototypeChain):

  • runtime/StructureRareData.cpp:

(JSC::StructureRareData::visitChildrenImpl):

  • runtime/StructureRareData.h:
  • runtime/StructureRareDataInlines.h:

(JSC::StructureRareData::cachedPropertyNameEnumerator const):
(JSC::StructureRareData::cachedPropertyNameEnumeratorAndFlag const):
(JSC::StructureRareData::setCachedPropertyNameEnumerator):
(JSC::StructureChainInvalidationWatchpoint::fireInternal):
(JSC::StructureRareData::tryCachePropertyNameEnumeratorViaWatchpoint):
(JSC::StructureRareData::clearCachedPropertyNameEnumerator):
(JSC::StructureRareData::invalidateWatchpointBasedValidation): Deleted.

9:57 AM Changeset in webkit [283555] by Simon Fraser
  • 3 edits
    2 adds in trunk

REGRESSION (r283335): Momentum scrolling is no longer locked to an axis
https://bugs.webkit.org/show_bug.cgi?id=231206

Reviewed by Wenson Hsieh.

Source/WebCore:

r283335 removed the line that constrained the scroll delta to an axis, so restore it.

This bug only manifested during the momentum phase because both EventDispatcher and
EventHandler send only non-momentum events through the filter. We should also filter
deltas on momentum events (webkit.org/b/231207).

Test: fast/scrolling/mac/momentum-axis-locking.html

  • platform/mac/ScrollingEffectsController.mm:

(WebCore::ScrollingEffectsController::handleWheelEvent):

LayoutTests:

  • fast/scrolling/mac/momentum-axis-locking-expected.txt: Added.
  • fast/scrolling/mac/momentum-axis-locking.html: Added.
9:46 AM Changeset in webkit [283554] by Antti Koivisto
  • 8 edits
    2 adds in trunk/Source/WebCore

[LFC][Integration] Introduce InlineBoxIterator
https://bugs.webkit.org/show_bug.cgi?id=231233

Reviewed by Alan Bujtas.

And use it in InlineBoxPainter.

The adoption is still incomplete here so only the legacy path is covered.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/integration/InlineIteratorBox.h:

(WebCore::InlineIterator::Box::isInlineBox const):
(WebCore::InlineIterator::Box::isRootInlineBox const):

  • layout/integration/InlineIteratorBoxLegacyPath.h:

(WebCore::InlineIterator::BoxLegacyPath::isInlineBox const):
(WebCore::InlineIterator::BoxLegacyPath::isRootInlineBox const):
(WebCore::InlineIterator::BoxLegacyPath::traverseNextInlineBox):
(WebCore::InlineIterator::BoxLegacyPath::traversePreviousInlineBox):
(WebCore::InlineIterator::BoxLegacyPath::inlineFlowBox const):

  • layout/integration/InlineIteratorBoxModernPath.h:

(WebCore::InlineIterator::BoxModernPath::isInlineBox const):
(WebCore::InlineIterator::BoxModernPath::isRootInlineBox const):
(WebCore::InlineIterator::BoxModernPath::traverseNextInlineBox):
(WebCore::InlineIterator::BoxModernPath::traversePreviousInlineBox):

  • layout/integration/InlineIteratorInlineBox.cpp: Added.

(WebCore::InlineIterator::InlineBox::InlineBox):
(WebCore::InlineIterator::InlineBox::nextInlineBox const):
(WebCore::InlineIterator::InlineBox::previousInlineBox const):
(WebCore::InlineIterator::InlineBoxIterator::InlineBoxIterator):
(WebCore::InlineIterator::InlineBoxIterator::traverseNextInlineBox):
(WebCore::InlineIterator::InlineBoxIterator::traversePreviousInlineBox):
(WebCore::InlineIterator::inlineBoxFor):

  • layout/integration/InlineIteratorInlineBox.h: Added.

(WebCore::InlineIterator::InlineBox::renderer const):
(WebCore::InlineIterator::InlineBox::legacyInlineBox const):
(WebCore::InlineIterator::InlineBoxIterator::InlineBoxIterator):
(WebCore::InlineIterator::InlineBoxIterator::operator* const):
(WebCore::InlineIterator::InlineBoxIterator::operator-> const):
(WebCore::InlineIterator::InlineBoxIterator::get const):
(WebCore::InlineIterator::InlineBox::iterator const):
(isType):

  • rendering/InlineBoxPainter.cpp:

(WebCore::InlineBoxPainter::InlineBoxPainter):
(WebCore::clipRectForNinePieceImageStrip):
(WebCore::InlineBoxPainter::paintMask):
(WebCore::InlineBoxPainter::paintDecorations):
(WebCore::InlineBoxPainter::paintFillLayer):
(WebCore::InlineBoxPainter::paintBoxShadow):
(WebCore::InlineBoxPainter::constrainToLineTopAndBottomIfNeeded const):

  • rendering/InlineBoxPainter.h:
9:43 AM Changeset in webkit [283553] by ddkilzer@apple.com
  • 2 edits
    2 deletes in trunk/Tools

REGRESSION (r283476): [ iOS macOS Debug ] TestWTF failures in RetainPtrARC and TypeCastsCocoaARC
<https://webkit.org/b/231172>
<rdar://problem/83836549>

Unreviewed partial revert of r283476.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • Remove RetainPtrARC.mm and TypeCastsCocoaARC.mm from the project.
  • TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoaARC.mm: Delete.
  • TestWebKitAPI/Tests/WTF/ns/RetainPtrARC.mm: Delete.
  • Remove these tests until issues can be fixed.
8:54 AM Changeset in webkit [283552] by Antti Koivisto
  • 6 edits in trunk/Source/WebCore

Remove m_autoShrinkToFitEnabled from RuleSet
https://bugs.webkit.org/show_bug.cgi?id=231214

Reviewed by Alan Bujtas.

Make it RuleSetBuilder setting instead, enabled by default.

  • style/RuleSet.h:

(WebCore::Style::RuleSet::disableAutoShrinkToFit): Deleted.

  • style/RuleSetBuilder.cpp:

(WebCore::Style::RuleSetBuilder::RuleSetBuilder):
(WebCore::Style::m_shrinkToFit):
(WebCore::Style::RuleSetBuilder::~RuleSetBuilder):
(WebCore::Style::m_resolver): Deleted.

  • style/RuleSetBuilder.h:
  • style/StyleInvalidator.cpp:

(WebCore::Style::Invalidator::Invalidator):

Here we still want to avoid shrink-to-fit since the constructed RuleSets are temporary.

  • style/StyleScopeRuleSets.cpp:

(WebCore::Style::ScopeRuleSets::ScopeRuleSets):
(WebCore::Style::ScopeRuleSets::resetAuthorStyle):
(WebCore::Style::ScopeRuleSets::appendAuthorStyleSheets):

Since RuleSetBuilder is scoped over everything we can no use it to do shrink-to-fit.

8:53 AM Changeset in webkit [283551] by ddkilzer@apple.com
  • 4 edits in trunk

Follow-up #2: WTF::RetainPtr<> allows assignment of two pointer types that are not assignable
<https://webkit.org/b/230406>
<rdar://problem/83241893>

Unreviewed attempt to fix API tests.

Source/WTF:

  • wtf/cocoa/TypeCastsCocoa.h:

(WTF::checked_objc_cast):

  • Rename checked_objc_cast<> to checked_objc_castARC<> when compiling with ARC enabled.
  • Also mark as inline function to allow for optimization.

Tools:

  • TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoa.mm:

(TestWebKitAPI::TEST):

  • Revert code back to using objectNS.get() for checked_objc_cast<> tests since it always worked.
8:21 AM Changeset in webkit [283550] by Alan Bujtas
  • 145 edits in trunk

[IFC][Integration] Enable first-line style for modern line layout
https://bugs.webkit.org/show_bug.cgi?id=231178

Reviewed by Antti Koivisto.

Source/WebCore:

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::printReason):
(WebCore::LayoutIntegration::canUseForStyle):
(WebCore::LayoutIntegration::canUseForLineLayoutWithReason):

  • layout/integration/LayoutIntegrationCoverage.h:

LayoutTests:

  • fast/css/empty-inline-line-height-first-line-expected.txt:
  • fast/css/empty-inline-line-height-first-line-quirksmode-expected.txt:
  • platform/ios/editing/deleting/delete-at-paragraph-boundaries-002-expected.txt:
  • platform/ios/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt:
  • platform/ios/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt:
  • platform/ios/editing/deleting/delete-at-paragraph-boundaries-005-expected.txt:
  • platform/ios/editing/deleting/delete-at-paragraph-boundaries-006-expected.txt:
  • platform/ios/editing/deleting/delete-at-paragraph-boundaries-007-expected.txt:
  • platform/ios/editing/deleting/delete-at-paragraph-boundaries-008-expected.txt:
  • platform/ios/editing/deleting/delete-at-paragraph-boundaries-009-expected.txt:
  • platform/ios/editing/deleting/delete-at-paragraph-boundaries-010-expected.txt:
  • platform/ios/editing/deleting/delete-at-paragraph-boundaries-011-expected.txt:
  • platform/ios/editing/deleting/non-smart-delete-expected.txt:
  • platform/ios/editing/inserting/insert-br-quoted-001-expected.txt:
  • platform/ios/editing/inserting/insert-br-quoted-002-expected.txt:
  • platform/ios/editing/inserting/insert-br-quoted-003-expected.txt:
  • platform/ios/editing/inserting/insert-br-quoted-004-expected.txt:
  • platform/ios/editing/inserting/insert-br-quoted-005-expected.txt:
  • platform/ios/editing/inserting/insert-br-quoted-006-expected.txt:
  • platform/ios/editing/inserting/insert-div-026-expected.txt:
  • platform/ios/editing/inserting/return-key-with-selection-001-expected.txt:
  • platform/ios/editing/inserting/return-key-with-selection-002-expected.txt:
  • platform/ios/editing/inserting/return-key-with-selection-003-expected.txt:
  • platform/ios/editing/pasteboard/paste-4038267-fix-expected.txt:
  • platform/ios/editing/pasteboard/paste-line-endings-001-expected.txt:
  • platform/ios/editing/pasteboard/paste-line-endings-002-expected.txt:
  • platform/ios/editing/pasteboard/paste-line-endings-003-expected.txt:
  • platform/ios/editing/pasteboard/paste-line-endings-004-expected.txt:
  • platform/ios/editing/pasteboard/paste-line-endings-005-expected.txt:
  • platform/ios/editing/pasteboard/paste-line-endings-006-expected.txt:
  • platform/ios/editing/pasteboard/paste-line-endings-007-expected.txt:
  • platform/ios/editing/pasteboard/paste-line-endings-008-expected.txt:
  • platform/ios/editing/pasteboard/paste-line-endings-009-expected.txt:
  • platform/ios/editing/pasteboard/paste-line-endings-010-expected.txt:
  • platform/ios/editing/pasteboard/paste-match-style-001-expected.txt:
  • platform/ios/editing/pasteboard/paste-match-style-002-expected.txt:
  • platform/ios/editing/pasteboard/paste-text-019-expected.txt:
  • platform/ios/editing/style/block-styles-007-expected.txt:
  • platform/ios/editing/style/style-3998892-fix-expected.txt:
  • platform/ios/editing/style/style-boundary-001-expected.txt:
  • platform/ios/editing/style/style-boundary-004-expected.txt:
  • platform/ios/editing/unsupported-content/list-delete-003-expected.txt:
  • platform/ios/editing/unsupported-content/list-type-after-expected.txt:
  • platform/ios/fast/css/empty-inline-line-height-first-line-expected.txt:
  • platform/ios/fast/css/empty-inline-line-height-first-line-quirksmode-expected.txt:
  • platform/ios/fast/css/first-line-text-decoration-expected.txt:
  • platform/ios/fast/css/first-line-text-decoration-inherited-from-parent-expected.txt:
  • platform/ios/fast/text/firstline/001-expected.txt:
  • platform/mac/editing/deleting/delete-at-paragraph-boundaries-002-expected.txt:
  • platform/mac/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt:
  • platform/mac/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt:
  • platform/mac/editing/deleting/delete-at-paragraph-boundaries-005-expected.txt:
  • platform/mac/editing/deleting/delete-at-paragraph-boundaries-006-expected.txt:
  • platform/mac/editing/deleting/delete-at-paragraph-boundaries-007-expected.txt:
  • platform/mac/editing/deleting/delete-at-paragraph-boundaries-008-expected.txt:
  • platform/mac/editing/deleting/delete-at-paragraph-boundaries-009-expected.txt:
  • platform/mac/editing/deleting/delete-at-paragraph-boundaries-010-expected.txt:
  • platform/mac/editing/deleting/delete-at-paragraph-boundaries-011-expected.txt:
  • platform/mac/editing/deleting/non-smart-delete-expected.txt:
  • platform/mac/editing/inserting/insert-br-quoted-001-expected.txt:
  • platform/mac/editing/inserting/insert-br-quoted-002-expected.txt:
  • platform/mac/editing/inserting/insert-br-quoted-003-expected.txt:
  • platform/mac/editing/inserting/insert-br-quoted-004-expected.txt:
  • platform/mac/editing/inserting/insert-br-quoted-005-expected.txt:
  • platform/mac/editing/inserting/insert-br-quoted-006-expected.txt:
  • platform/mac/editing/inserting/insert-div-026-expected.txt:
  • platform/mac/editing/inserting/return-key-with-selection-001-expected.txt:
  • platform/mac/editing/inserting/return-key-with-selection-002-expected.txt:
  • platform/mac/editing/inserting/return-key-with-selection-003-expected.txt:
  • platform/mac/editing/pasteboard/emacs-cntl-y-001-expected.txt:
  • platform/mac/editing/pasteboard/emacs-ctrl-k-y-001-expected.txt:
  • platform/mac/editing/pasteboard/paste-4038267-fix-expected.txt:
  • platform/mac/editing/pasteboard/paste-line-endings-001-expected.txt:
  • platform/mac/editing/pasteboard/paste-line-endings-002-expected.txt:
  • platform/mac/editing/pasteboard/paste-line-endings-003-expected.txt:
  • platform/mac/editing/pasteboard/paste-line-endings-004-expected.txt:
  • platform/mac/editing/pasteboard/paste-line-endings-005-expected.txt:
  • platform/mac/editing/pasteboard/paste-line-endings-006-expected.txt:
  • platform/mac/editing/pasteboard/paste-line-endings-007-expected.txt:
  • platform/mac/editing/pasteboard/paste-line-endings-008-expected.txt:
  • platform/mac/editing/pasteboard/paste-line-endings-009-expected.txt:
  • platform/mac/editing/pasteboard/paste-line-endings-010-expected.txt:
  • platform/mac/editing/pasteboard/paste-match-style-001-expected.txt:
  • platform/mac/editing/pasteboard/paste-match-style-002-expected.txt:
  • platform/mac/editing/pasteboard/paste-text-019-expected.txt:
  • platform/mac/editing/style/block-styles-007-expected.txt:
  • platform/mac/editing/style/smoosh-styles-001-expected.txt:
  • platform/mac/editing/style/smoosh-styles-003-expected.txt:
  • platform/mac/editing/style/style-3998892-fix-expected.txt:
  • platform/mac/editing/style/style-boundary-001-expected.txt:
  • platform/mac/editing/style/style-boundary-002-expected.txt:
  • platform/mac/editing/style/style-boundary-003-expected.txt:
  • platform/mac/editing/style/style-boundary-004-expected.txt:
  • platform/mac/editing/style/style-boundary-005-expected.txt:
  • platform/mac/editing/unsupported-content/list-delete-001-expected.txt:
  • platform/mac/editing/unsupported-content/list-delete-003-expected.txt:
  • platform/mac/editing/unsupported-content/list-type-after-expected.txt:
  • platform/mac/editing/unsupported-content/list-type-before-expected.txt:
  • platform/mac/editing/unsupported-content/table-delete-002-expected.txt:
  • platform/mac/editing/unsupported-content/table-type-after-expected.txt:
  • platform/mac/editing/unsupported-content/table-type-before-expected.txt:
  • platform/mac/fast/css/first-line-text-decoration-expected.txt:
  • platform/mac/fast/css/first-line-text-decoration-inherited-from-parent-expected.txt:
  • platform/mac/fast/text/firstline/001-expected.txt:
  • platform/win/editing/deleting/delete-at-paragraph-boundaries-002-expected.txt:
  • platform/win/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt:
  • platform/win/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt:
  • platform/win/editing/deleting/delete-at-paragraph-boundaries-005-expected.txt:
  • platform/win/editing/deleting/delete-at-paragraph-boundaries-006-expected.txt:
  • platform/win/editing/deleting/delete-at-paragraph-boundaries-007-expected.txt:
  • platform/win/editing/deleting/delete-at-paragraph-boundaries-008-expected.txt:
  • platform/win/editing/deleting/delete-at-paragraph-boundaries-009-expected.txt:
  • platform/win/editing/deleting/delete-at-paragraph-boundaries-010-expected.txt:
  • platform/win/editing/deleting/delete-at-paragraph-boundaries-011-expected.txt:
  • platform/win/editing/deleting/non-smart-delete-expected.txt:
  • platform/win/editing/inserting/insert-br-quoted-001-expected.txt:
  • platform/win/editing/inserting/insert-br-quoted-002-expected.txt:
  • platform/win/editing/inserting/insert-br-quoted-003-expected.txt:
  • platform/win/editing/inserting/insert-br-quoted-004-expected.txt:
  • platform/win/editing/inserting/insert-br-quoted-005-expected.txt:
  • platform/win/editing/inserting/insert-br-quoted-006-expected.txt:
  • platform/win/editing/inserting/insert-div-026-expected.txt:
  • platform/win/editing/inserting/return-key-with-selection-001-expected.txt:
  • platform/win/editing/inserting/return-key-with-selection-002-expected.txt:
  • platform/win/editing/inserting/return-key-with-selection-003-expected.txt:
  • platform/win/editing/style/block-styles-007-expected.txt:
  • platform/win/editing/style/smoosh-styles-001-expected.txt:
  • platform/win/editing/style/smoosh-styles-003-expected.txt:
  • platform/win/editing/style/style-3998892-fix-expected.txt:
  • platform/win/editing/style/style-boundary-001-expected.txt:
  • platform/win/editing/style/style-boundary-002-expected.txt:
  • platform/win/editing/style/style-boundary-003-expected.txt:
  • platform/win/editing/style/style-boundary-004-expected.txt:
  • platform/win/editing/style/style-boundary-005-expected.txt:
  • platform/win/editing/unsupported-content/list-delete-001-expected.txt:
  • platform/win/editing/unsupported-content/list-delete-003-expected.txt:
  • platform/win/editing/unsupported-content/list-type-after-expected.txt:
  • platform/win/editing/unsupported-content/list-type-before-expected.txt:
  • platform/win/editing/unsupported-content/table-delete-002-expected.txt:
  • platform/win/editing/unsupported-content/table-type-after-expected.txt:
  • platform/win/editing/unsupported-content/table-type-before-expected.txt:
7:49 AM Changeset in webkit [283549] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Move tryBreaking*Run logic to standalone functions
https://bugs.webkit.org/show_bug.cgi?id=231198

Reviewed by Antti Koivisto.

InlineContentBreaker::processOverflowingContentWithText is getting way to long and while I love keeping logic like this local, the upcoming WordBreak::BreakWord functionality
makes this function body overlap multiple pages.

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::findTrailingRunIndex):
(WebCore::Layout::isWrappableRun):
(WebCore::Layout::InlineContentBreaker::tryBreakingOverflowingRun const):
(WebCore::Layout::InlineContentBreaker::tryBreakingPreviousNonOverflowingRuns const):
(WebCore::Layout::InlineContentBreaker::tryBreakingNextOverflowingRuns const):
(WebCore::Layout::InlineContentBreaker::processOverflowingContentWithText const):
(): Deleted.

  • layout/formattingContexts/inline/InlineContentBreaker.h:
6:57 AM Changeset in webkit [283548] by Chris Lord
  • 15 edits
    2 deletes in trunk/Source/WebCore

[GTK][WPE] REGRESSION: Async scrolling jumps to the top of the page until keyboard-initiated paging
https://bugs.webkit.org/show_bug.cgi?id=230953

Reviewed by Martin Robinson.

Update the non-Mac/iOS async scrolling path to work correctly after the
scrolling refactor. Trying to summarise, this implements
ScrollingEffectsController in ScrollingTreeScrollingNodeDelegateNicosia
and moves smooth and kinetic scrolling animations to
ScrollingEffectsController, to be shared by both sync and async paths.

No new tests, covered by existing tests (hopefully).

  • PlatformPlayStation.cmake:
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:

(WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateAfterChildren):

  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:

(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::commitStateAfterChildren):

  • page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp:

(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::ScrollingTreeScrollingNodeDelegateNicosia):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::updateFromStateNode):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::updateVisibleLengths):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::handleWheelEvent):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::stopScrollAnimations):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::animationTimerFired):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::createTimer):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::startAnimationCallback):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::stopAnimationCallback):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::allowsHorizontalScrolling const):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::allowsVerticalScrolling const):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::immediateScrollBy):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::adjustScrollPositionToBoundsIfNecessary):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::scrollOffset const):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::willStartScrollSnapAnimation):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::didStopScrollSnapAnimation):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::pageScaleFactor const):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::scrollExtents const):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::resetCurrentPosition): Deleted.
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::ensureScrollAnimationKinetic): Deleted.
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::ensureScrollAnimationSmooth): Deleted.
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::pageScaleFactor): Deleted.
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::scrollAnimationDidUpdate): Deleted.
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::scrollAnimationDidEnd): Deleted.
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::scrollExtentsForAnimation): Deleted.
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::startTimerIfNecessary): Deleted.

  • page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.h:
  • platform/ScrollAnimationKinetic.h:
  • platform/ScrollAnimationSmooth.h:
  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::retargetRunningAnimation):
(WebCore::ScrollAnimator::handleWheelEvent):
(WebCore::ScrollAnimator::scrollAnimationEnabled const):

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

(WebCore::ScrollingEffectsController::retargetAnimatedScroll):
(WebCore::ScrollingEffectsController::processWheelEventForKineticScrolling):
(WebCore::ScrollingEffectsController::handleWheelEvent):
(WebCore::ScrollingEffectsController::regargetAnimatedScroll): Deleted.

  • platform/ScrollingEffectsController.h:

(WebCore::ScrollingEffectsControllerClient::scrollAnimationEnabled const):

  • platform/generic/ScrollAnimatorGeneric.cpp: Removed.

(WebCore::ScrollAnimator::create): Deleted.
(WebCore::ScrollAnimatorGeneric::ScrollAnimatorGeneric): Deleted.
(WebCore::ScrollAnimatorGeneric::handleWheelEvent): Deleted.

  • platform/generic/ScrollAnimatorGeneric.h: Removed.

(): Deleted.

6:54 AM Changeset in webkit [283547] by Antti Koivisto
  • 15 edits in trunk/Source/WebCore

[LFC][Integration] Split BoxIterator into a base class and LeafBoxIterator
https://bugs.webkit.org/show_bug.cgi?id=231229

Reviewed by Alan Bujtas.

LeafBoxIterator contains function for traversing non-inline boxes.
BoxIterator becomes a non-instantiated base class.

This is in preparation for adding InlineBoxIterator.

  • dom/Position.cpp:

(WebCore::Position::inlineRunAndOffset const):

  • editing/InlineRunAndOffset.h:
  • editing/RenderedPosition.cpp:

(WebCore::RenderedPosition::RenderedPosition):
(WebCore::RenderedPosition::previousLeafOnLine const):
(WebCore::RenderedPosition::nextLeafOnLine const):

  • editing/RenderedPosition.h:
  • editing/VisibleUnits.cpp:

(WebCore::isTextOrLineBreakRun):
(WebCore::previousTextOrLineBreakRun):
(WebCore::nextTextOrLineBreakRun):
(WebCore::startTextOrLineBreakRun):
(WebCore::endTextOrLineBreakRun):
(WebCore::logicallyPreviousRun):
(WebCore::logicallyNextRun):
(WebCore::visualWordPosition):

  • layout/integration/InlineIteratorBox.cpp:

(WebCore::InlineIterator::Box::nextOnLine const):
(WebCore::InlineIterator::Box::previousOnLine const):
(WebCore::InlineIterator::Box::nextOnLineIgnoringLineBreak const):
(WebCore::InlineIterator::Box::previousOnLineIgnoringLineBreak const):
(WebCore::InlineIterator::LeafBoxIterator::LeafBoxIterator):
(WebCore::InlineIterator::LeafBoxIterator::traverseNextOnLine):
(WebCore::InlineIterator::LeafBoxIterator::traversePreviousOnLine):
(WebCore::InlineIterator::LeafBoxIterator::traverseNextOnLineIgnoringLineBreak):
(WebCore::InlineIterator::LeafBoxIterator::traversePreviousOnLineIgnoringLineBreak):
(WebCore::InlineIterator::LeafBoxIterator::traverseNextOnLineInLogicalOrder):
(WebCore::InlineIterator::LeafBoxIterator::traversePreviousOnLineInLogicalOrder):
(WebCore::InlineIterator::boxFor):
(WebCore::InlineIterator::BoxIterator::traverseNextOnLine): Deleted.
(WebCore::InlineIterator::BoxIterator::traversePreviousOnLine): Deleted.
(WebCore::InlineIterator::BoxIterator::traverseNextOnLineIgnoringLineBreak): Deleted.
(WebCore::InlineIterator::BoxIterator::traversePreviousOnLineIgnoringLineBreak): Deleted.
(WebCore::InlineIterator::BoxIterator::traverseNextOnLineInLogicalOrder): Deleted.
(WebCore::InlineIterator::BoxIterator::traversePreviousOnLineInLogicalOrder): Deleted.

  • layout/integration/InlineIteratorBox.h:

(WebCore::InlineIterator::BoxIterator::BoxIterator):

  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::Line::firstRun const):
(WebCore::InlineIterator::Line::lastRun const):
(WebCore::InlineIterator::Line::logicalStartRun const):
(WebCore::InlineIterator::Line::logicalEndRun const):
(WebCore::InlineIterator::Line::logicalStartRunWithNode const):
(WebCore::InlineIterator::Line::logicalEndRunWithNode const):
(WebCore::InlineIterator::Line::closestRunForPoint const):
(WebCore::InlineIterator::Line::closestRunForLogicalLeftPosition const):
(WebCore::InlineIterator::Line::firstSelectedBox const):
(WebCore::InlineIterator::Line::lastSelectedBox const):

  • layout/integration/InlineIteratorLine.h:
  • layout/integration/InlineIteratorTextBox.cpp:

(WebCore::InlineIterator::TextBoxIterator::TextBoxIterator):

  • layout/integration/InlineIteratorTextBox.h:
  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::boxFor const):

  • layout/integration/LayoutIntegrationLineLayout.h:
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):

5:10 AM Changeset in webkit [283546] by Martin Robinson
  • 5 edits
    1 delete in trunk

[css-position-sticky] scrollIntoView should not take into account sticky positioning offsets
https://bugs.webkit.org/show_bug.cgi?id=230689

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-position/sticky/position-sticky-scrollIntoView-expected.txt: Update results to show newly

passing test.

Source/WebCore:

When calculating the location for absolute anchors rectangles,
do not take into account sticky offsets. This means that when
scrolling to elements that are stickily positioned, their static
positions will be targeted.

No new tests. This is covered by an existing WPT test.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::getLeadingCorner const): Do not take into account sticky position when calculating this point.
(WebCore::RenderElement::getTrailingCorner const): Ditto.

LayoutTests:

  • platform/ios-wk2/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-scrollIntoView-expected.txt: Removed.
4:48 AM Changeset in webkit [283545] by youenn@apple.com
  • 7 edits in trunk/LayoutTests

Removing no longer needed flaky expectations from WebRTC tests
https://bugs.webkit.org/show_bug.cgi?id=231223

Unreviewed.

Update expectations based on results.webkit.org results.

  • TestExpectations:
  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
3:59 AM Changeset in webkit [283544] by ntim@apple.com
  • 5 edits in trunk/Source/WebCore

Replace document.topDocument().securityOrigin() with document.topOrigin()
https://bugs.webkit.org/show_bug.cgi?id=231221

Reviewed by Youenn Fablet.

No behaviour change, Document::topOrigin() is defined as:

SecurityOrigin& topOrigin() const final { return topDocument().securityOrigin(); }

  • dom/BroadcastChannel.cpp:

(WebCore::shouldPartitionOrigin):

  • dom/DocumentStorageAccess.cpp:

(WebCore::DocumentStorageAccess::hasStorageAccessQuickCheck):
(WebCore::DocumentStorageAccess::hasStorageAccess):
(WebCore::DocumentStorageAccess::requestStorageAccessQuickCheck):
(WebCore::DocumentStorageAccess::requestStorageAccess):

  • dom/Element.cpp:

(WebCore::Element::focus):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):

2:54 AM Changeset in webkit [283543] by ntim@apple.com
  • 3 edits in trunk/Source/WebCore

Clean up shouldAutofocus in HTMLFormControlElement.cpp
https://bugs.webkit.org/show_bug.cgi?id=231220

Reviewed by Youenn Fablet.

No behaviour change.

Minor cleanups:

  • Make shouldAutofocus take const HTMLFormControlElement& instead of HTMLFormControlElement*
  • Clean up repeated calls to element->document()
  • Use topOrigin() instead topDocument().securityOrigin() (same thing, but shorter)
  • html/HTMLFormControlElement.cpp:

(WebCore::shouldAutofocus):
(WebCore::HTMLFormControlElement::didAttachRenderers):

  • html/HTMLFormControlElement.h:

(WebCore::HTMLFormControlElement::hasAutofocused const):
(WebCore::HTMLFormControlElement::hasAutofocused): Deleted.

1:36 AM Changeset in webkit [283542] by ntim@apple.com
  • 4 edits in trunk/LayoutTests

Remove unnecessary autofocus attribute dependencies in tests
https://bugs.webkit.org/show_bug.cgi?id=231219

Reviewed by Antti Koivisto.

The new autofocus behaviour timing happens asynchronously with the page "update rendering" steps.

Some tests are using it solely to focus synchronously on elements. We should just use HTMLElement.focus()
there so they don't rely on the current synchronous timing of autofocus.

  • fast/forms/number/number-placeholder-with-unacceptable-value-expected.html:
  • fast/forms/number/number-placeholder-with-unacceptable-value.html:
  • fast/forms/range/range-type-change-onchange.html:
12:20 AM Changeset in webkit [283541] by Cameron McCormack
  • 2 edits in trunk/Source/WTF

Enable 2D canvas color space support on Apple platforms
https://bugs.webkit.org/show_bug.cgi?id=231145
<rdar://82948394>

Reviewed by Simon Fraser.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
12:08 AM Changeset in webkit [283540] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Negative integers in @font-palette-values are invalid
https://bugs.webkit.org/show_bug.cgi?id=230788
<rdar://problem/83528806>

Unreviewed post-review cleanup.

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::consumeFontPaletteValuesRule):

12:04 AM Changeset in webkit [283539] by mmaxfield@apple.com
  • 5 edits in trunk/LayoutTests/imported/w3c

Test a font palette identifier of just "--"
https://bugs.webkit.org/show_bug.cgi?id=230975
<rdar://problem/83681811>

Reviewed by Tim Horton.

It's a valid <dashed-ident>:
"The <dashed-ident> production is a <custom-ident>, with all the case-sensitivity
that implies, with the additional restriction that it must start with two dashes
(U+002D HYPHEN-MINUS)."

This is being upstreamed at https://github.com/web-platform-tests/wpt/pull/30963.

  • web-platform-tests/css/css-fonts/parsing/font-palette-valid-expected.txt:
  • web-platform-tests/css/css-fonts/parsing/font-palette-valid.html:
  • web-platform-tests/css/css-fonts/parsing/font-palette-values-valid-expected.txt:
  • web-platform-tests/css/css-fonts/parsing/font-palette-values-valid.html:
Note: See TracTimeline for information about the timeline view.