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

Timeline



Nov 10, 2021:

10:12 PM Changeset in webkit [285620] by Devin Rousso
  • 7 edits
    2 adds in trunk

REGRESSION(r283863): <attachment> with a long action do not render correctly
https://bugs.webkit.org/show_bug.cgi?id=232645
<rdar://problem/84558377>

Reviewed by Myles C. Maxfield.

Source/WebCore:

Unlike the DisplayList concept in WebCore, when using CGContextDelegateRef (which is
what DrawGlyphsRecorder uses on Cocoa platforms) the callbacks for each action are only
told about the current state of all-the-things at the time of that action, not each of the
corresponding API-level calls that resulted in that final state (e.g. where DisplayList
would see separate scale and rotate calls, CGContextDelegateRef would only be able to
get the final calculated CTM). In order for DrawGlyphsRecorder to (re)generate WebCore
calls, it needs to have information about the starting state of the CGContext before any
actions are performed so it can at least derive some diff/idea of what happened.

This is further complicated by the fact that when drawing text CG separates the state of
all-the-things into two: the CTM and the text matrix. WebKit does not have this separation,
however, so it needs to combine the two into a single CTM, but only when dealing with text.

A new path (drawNativeText) was added in r283863 that allows DrawGlyphsRecorder to be
used directly with native text-related objects (e.g. CTLineRef) instead of objects/data
derived in WebCore. A result of this on Cocoa platforms is that now a single drawNativeText
can result in multiple recordDrawGlyphs invocations if the CTLineRef contains multiple
"groupings" of glyphs to draw (e.g. if a line is truncated with a "..." in the middle then
the three groups will be the remaining text before, the "..." and the remaining text after).

AFAICT before this new path it was never the case that the text matrix had a translate, only
rotate/skew/etc., meaning that when DrawGlyphsRecorder needed to convert from the CG's
computed glyph positions back into WebCore's glyph advances it could use the text matrix
since there would be no translation. With this new path, however, if a drawNativeText call
results in multiple recordDrawGlyphs then there will be a translation in the text matrix
to account for that. As such, we end up double counting the text matrix: once when we
(re)generate the CTM to give to WebCore and _again_ when we (re)compute the WebCore advances.

Since we've already counted the text matrix once, we don't need to do it again. Also, by
this point we've already modified WebCore's CTM, so we only really need to account for the
difference from the original position when we first called drawNativeText. As such, we
just need invert what was used to generate CG positions from WebCore advances.

Note that in the name of expediently fixing a regression, this change only considers
horizontal text as <attachment> are never drawn vertically. Fixing vertical text will be
done in a followup <https://webkit.org/b/232917>.

Test: fast/attachment/attachment-truncated-action.html

  • platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:

(WebCore::DrawGlyphsRecorder::recordDrawGlyphs):

  • platform/graphics/FontCascade.h:
  • platform/graphics/coretext/FontCascadeCoreText.cpp:

(WebCore::fillVectorWithHorizontalGlyphPositions):
(WebCore::fillVectorWithVerticalGlyphPositions):
Add a comment indicating the related nature of these functions with DrawGlyphsRecorder::recordDrawGlyphs.
Drive-by: fillVectorWithHorizontalGlyphPositions is only called by this class, so don't export it.

LayoutTests:

  • fast/attachment/attachment-truncated-action.html: Added.
  • fast/attachment/attachment-truncated-action-expected-mismatch.html: Added.
9:03 PM Changeset in webkit [285619] by Chris Dumez
  • 5 edits in trunk

We should not kill all WebContent processes whenever the WebAuthn process crashes
https://bugs.webkit.org/show_bug.cgi?id=232970
<rdar://83941760>

Reviewed by Geoff Garen.

Source/WebKit:

We should not kill all WebContent processes whenever the WebAuthn process crashes. This is overly aggressive. We should
instead do like for the network process and have the WebProcess re-initiate the connection to the WebAuthn process when
it's gone.

No new tests, updated existing API test.

  • UIProcess/WebAuthentication/WebAuthnProcessProxy.cpp:

(WebKit::WebAuthnProcessProxy::webAuthnProcessCrashed):
Do not terminate all WebProcesses when the WebAuthn process crashes.

  • WebProcess/WebAuthentication/WebAuthnProcessConnection.cpp:

(WebKit::WebAuthnProcessConnection::didClose):
Make sure we call WebProcess::webAuthnProcessConnectionClosed() when the WebProcess
loses its connection to the WebAuthn process. This makes sure we clear m_webAuthnProcessConnection
and properly re-initiate a new WebAuthn process connection the next time WebProcess::ensureWebAuthnProcessConnection()
is called.

Tools:

Update API test coverage to reflect behavior change.

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST):

8:31 PM Changeset in webkit [285618] by Said Abou-Hallawa
  • 19 edits in trunk

[GPU Process] Make CSSFilter be a composite of FilterFunctions
https://bugs.webkit.org/show_bug.cgi?id=232469
rdar://85047148

Reviewed by Simon Fraser.

Source/WebCore:

In this patch, the CSS reference filter is built as an SVGFilter and it
is kept as a FilterFunction in the CSSFilter functions' list. The Filter
associated with the FilterEffects of the referenced filter will be an
SVGFilter instead of the root CSSFilter. This will allow having color
spacing for the referenced filters different from the color spacing of
CSSFilter.

Also this patch makes a single function for building the primitives of
the SVGFilter instead of having two functions.

To allow operating through the SVGFilter as a FilterFunction owned by
CSSFilter, the SVGFilter will have a pointer to its lastEffect.

  • css/CSSFilterImageValue.cpp:

(WebCore::CSSFilterImageValue::image):

  • platform/graphics/filters/Filter.h:
  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::collectEffects): Deleted.
(WebCore::FilterEffect::totalNumberOfEffectInputs const): Deleted.

  • platform/graphics/filters/FilterEffect.h:

(WebCore::FilterEffect::numberOfEffectInputs const):
(WebCore::FilterEffect::setMaxEffectRect):
(WebCore::FilterEffect::outsets const): Deleted.

  • platform/graphics/filters/FilterFunction.h:

(WebCore::FilterFunction::outsets const):
(WebCore::FilterFunction::clearResult):

  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::create):
(WebCore::CSSFilter::CSSFilter):
(WebCore::m_hasFilterThatShouldBeRestrictedBySecurityOrigin):
(WebCore::createBlurEffect):
(WebCore::createBrightnessEffect):
(WebCore::createContrastEffect):
(WebCore::createDropShadowEffect):
(WebCore::createGrayScaleEffect):
(WebCore::createHueRotateEffect):
(WebCore::createInvertEffect):
(WebCore::createOpacityEffect):
(WebCore::createSaturateEffect):
(WebCore::createSepiaEffect):
(WebCore::createSVGFilter):
(WebCore::setupLastEffectProperties):
(WebCore::CSSFilter::buildFilterFunctions):
(WebCore::CSSFilter::inputContext):
(WebCore::CSSFilter::allocateBackingStoreIfNeeded):
(WebCore::CSSFilter::lastEffect):
(WebCore::CSSFilter::determineFilterPrimitiveSubregion):
(WebCore::CSSFilter::clearIntermediateResults):
(WebCore::CSSFilter::apply):
(WebCore::CSSFilter::output):
(WebCore::CSSFilter::setSourceImageRect):
(WebCore::CSSFilter::outputRect):
(WebCore::CSSFilter::outsets const):
(WebCore::m_sourceGraphic): Deleted.
(WebCore::CSSFilter::buildReferenceFilter): Deleted.
(WebCore::CSSFilter::build): Deleted.
(WebCore::CSSFilter::output const): Deleted.
(WebCore::CSSFilter::setMaxEffectRects): Deleted.
(WebCore::CSSFilter::outputRect const): Deleted.

  • rendering/CSSFilter.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::setupFilters):

  • rendering/RenderLayerFilters.cpp:

(WebCore::RenderLayerFilters::buildFilter):
(WebCore::RenderLayerFilters::beginFilterEffect):
(WebCore::RenderLayerFilters::applyFilterEffect):

  • rendering/RenderLayerFilters.h:
  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::applyResource):
(WebCore::RenderSVGResourceFilter::buildPrimitives const): Deleted.

  • rendering/svg/SVGRenderTreeAsText.cpp:

(WebCore::writeSVGResourceContainer):

  • svg/graphics/filters/SVGFilter.cpp:

(WebCore::SVGFilter::create):
(WebCore::SVGFilter::outsets const):
(WebCore::SVGFilter::clearResult):

  • svg/graphics/filters/SVGFilter.h:
  • svg/graphics/filters/SVGFilterBuilder.cpp:

(WebCore::SVGFilterBuilder::setupBuiltinEffects):
(WebCore::colorInterpolationForElement):
(WebCore::collectEffects):
(WebCore::totalNumberFilterEffects):
(WebCore::SVGFilterBuilder::buildFilterEffects):
(WebCore::SVGFilterBuilder::SVGFilterBuilder): Deleted.

  • svg/graphics/filters/SVGFilterBuilder.h:

LayoutTests:

Unskip filter hidpi layout tests.

6:52 PM Changeset in webkit [285617] by J Pascoe
  • 8 edits in trunk

[WebAuthn] Unify _WKWebAuthenticationPanel SPI and AuthenticatorCoordinator's ClientDataJson generation
https://bugs.webkit.org/show_bug.cgi?id=232965
<rdar://problem/85268216>

Reviewed by Brent Fulgham.

Source/WebCore:

The _WKWebAuthenticationPanel SPI and AuthenticatorCoordinator use different methods of generating
clientDataJson, which results in strings with the keys in a different order. This change abstracts
the clientDataJson generation out of AuthenticatorCoordinator and into WebAuthenticationUtils.

  • Modules/webauthn/AuthenticatorCoordinator.cpp:

(WebCore::AuthenticatorCoordinator::create const):
(WebCore::AuthenticatorCoordinator::discoverFromExternalSource const):
(WebCore::AuthenticatorCoordinatorInternal::produceClientDataJson): Deleted.
(WebCore::AuthenticatorCoordinatorInternal::produceClientDataJsonHash): Deleted.

  • Modules/webauthn/WebAuthenticationUtils.cpp:

(WebCore::buildClientDataJson):
(WebCore::buildClientDataJsonHash):

  • Modules/webauthn/WebAuthenticationUtils.h:

Source/WebKit:

The _WKWebAuthenticationPanel SPI and AuthenticatorCoordinator use different methods of generating
clientDataJson, which results in strings with the keys in a different order. This causes problems
because when generating asserts via ASC ui, the hash signed and the client data json used to generate
that hash are different from the client data json returned to js.

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

(produceClientDataJson):

Tools:

Update api tests to reflect different clientDataJson format from WebAuthenticationUtils

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST):

6:20 PM Changeset in webkit [285616] by Alan Coon
  • 1 copy in tags/Safari-613.1.8

Tag Safari-613.1.8.

4:47 PM Changeset in webkit [285615] by ntim@apple.com
  • 42 edits
    16 deletes in trunk

Remove non-standard -webkit-border-fit CSS property
https://bugs.webkit.org/show_bug.cgi?id=229564

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:

Source/WebCore:

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::operator BorderFit const): Deleted.

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

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::adjustForBorderFit const): Deleted.
(WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded): Deleted.

  • rendering/RenderBlockFlow.h:
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeLogicalWidthInFragment const):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::repaintAfterLayoutIfNeeded):

  • rendering/style/RenderStyle.cpp:

(WebCore::rareNonInheritedDataChangeRequiresRepaint):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::borderFit const): Deleted.
(WebCore::RenderStyle::setBorderFit): Deleted.
(WebCore::RenderStyle::initialBorderFit): Deleted.

  • rendering/style/RenderStyleConstants.cpp:
  • rendering/style/RenderStyleConstants.h:
  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):

Source/WebInspectorUI:

  • UserInterface/Models/CSSKeywordCompletions.js:

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:

LayoutTests:

Remove relevant tests and update test expectations.

  • TestExpectations:
  • fast/block/border-fit-with-right-alignment-expected.html: Removed.
  • fast/block/border-fit-with-right-alignment.html: Removed.
  • fast/borders/border-fit-2-expected.txt: Removed.
  • fast/borders/border-fit-2.html: Removed.
  • fast/borders/border-fit-expected.txt: Removed.
  • fast/borders/border-fit.html: Removed.
  • fast/css/getComputedStyle/computed-style-expected.txt:
  • fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • fast/css/getComputedStyle/resources/property-names.js:
  • fast/multicol/widow-relayout-with-border-fit-expected.txt: Removed.
  • fast/multicol/widow-relayout-with-border-fit.html: Removed.
  • fast/repaint/border-fit-lines-expected.html: Removed.
  • fast/repaint/border-fit-lines.html: Removed.
  • platform/glib/fast/borders/border-fit-expected.txt: Removed.
  • platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/glib/svg/css/getComputedStyle-basic-expected.txt:
  • platform/gtk/fast/borders/border-fit-2-expected.png: Removed.
  • platform/gtk/fast/borders/border-fit-expected.png: Removed.
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/ios/TestExpectations:
  • platform/ios/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/ios/svg/css/getComputedStyle-basic-expected.txt:
  • platform/mac/TestExpectations:
  • platform/mac/fast/borders/border-fit-2-expected.png: Removed.
  • platform/mac/fast/borders/border-fit-expected.png: Removed.
  • platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/mac/svg/css/getComputedStyle-basic-expected.txt:
  • platform/win/fast/borders/border-fit-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • svg/css/getComputedStyle-basic-expected.txt:
4:45 PM Changeset in webkit [285614] by Alan Coon
  • 1 copy in tags/Safari-613.1.7.1

Tag Safari-613.1.7.1.

4:45 PM Changeset in webkit [285613] by Alan Coon
  • 1 delete in tags/Safari-613.1.7.1

Delete tag.

4:26 PM Changeset in webkit [285612] by pvollan@apple.com
  • 6 edits in trunk/Source/WebKit

Block sandbox access to consume mach extensions
https://bugs.webkit.org/show_bug.cgi?id=232254
<rdar://problem/84622169>

Reviewed by Brent Fulgham.

Block sandbox access to consume mach extensions that are not issued by WebKit.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
  • WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
4:19 PM Changeset in webkit [285611] by Devin Rousso
  • 3 edits in trunk/Source/WebKit

Unreviewed internal build fix after r285444

  • Platform/spi/Cocoa/AppleMediaServicesUISPI.h:

Make sure that AppleMediaServicesSPI.h is always included.

  • Platform/spi/Cocoa/AppleMediaServicesSPI.h:

Add missing ;.

4:14 PM Changeset in webkit [285610] by Devin Rousso
  • 22 edits
    2 adds in trunk

Add support for marking an <input> as being autofilled with obscured content
https://bugs.webkit.org/show_bug.cgi?id=232903
<rdar://problem/84276999>

Reviewed by Aditya Keerthi.

Source/WebCore:

Test: fast/forms/auto-fill-button/input-auto-filled-and-obscured.html

  • html/HTMLInputElement.h:

(WebCore::HTMLInputElement::isAutoFilledAndObscured const): Added.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::HTMLInputElement):
(WebCore::HTMLInputElement::reset):
(WebCore::HTMLInputElement::setAutoFilledAndObscured): Added.
Add a new boolean state member that is used by injected bundle code (and tests).

  • css/CSSSelector.h:
  • css/CSSSelector.cpp:

(WebCore::CSSSelector::selectorText const):

  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::checkOne const):

  • css/SelectorCheckerTestFunctions.h:

(WebCore::isAutofilledAndObscured): Added.

  • css/SelectorPseudoClassAndCompatibilityElementMap.in:
  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::JSC_DEFINE_JIT_OPERATION):
(WebCore::SelectorCompiler::addPseudoClassType):
Create a new -webkit-autofill-and-obscured pseudo-class.

  • css/html.css:

(input:-webkit-autofill-and-obscured): Added.
(input:-webkit-autofill, input:-webkit-autofill-strong-password, input:-webkit-autofill-strong-password-viewable, input:-webkit-autofill-and-obscured): Renamed from input:-webkit-autofill, input:-webkit-autofill-strong-password, input:-webkit-autofill-strong-password-viewable.
Use -webkit-autofill-and-obscured to change the <input> text into non-interactable discs.

  • testing/Internals.idl:
  • testing/Internals.h:
  • testing/Internals.cpp:

(WebCore::Internals::setAutoFilledAndObscured): Added.

Source/WebKit:

  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:

(WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFilledAndObscured const): Added.
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFilledAndObscured): Added.

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:

(-[WKWebProcessPlugInNodeHandle HTMLInputElementIsAutoFilledAndObscured]): Added.
(-[WKWebProcessPlugInNodeHandle setHTMLInputElementIsAutoFilledAndObscured:]): Added.

  • WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
  • WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:

(WKBundleNodeHandleSetHTMLInputElementAutoFilledAndObscured): Added.
Expose a way to get/set the CSS -webkit-autofill-and-obscured pseudo-class on an <input>.

LayoutTests:

  • fast/forms/auto-fill-button/input-auto-filled-and-obscured.html: Added.
  • fast/forms/auto-fill-button/input-auto-filled-and-obscured-expected.html: Added.
  • platform/win/TestExpectations:
4:03 PM Changeset in webkit [285609] by Wenson Hsieh
  • 16 edits
    2 adds in trunk

Refactor some image overlay logic to work with built-in media controls
https://bugs.webkit.org/show_bug.cgi?id=232899
rdar://83173597

Reviewed by Antoine Quint and Tim Horton.

Source/WebCore:

Make various minor adjustments to allow built-in modern media controls to play well with image overlay content.
See below for more details.

  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::mediaControlsContainerClassName):

  • Modules/mediacontrols/MediaControlsHost.h:

Add a helper function to grab the "media-controls-container" class name, which is used for the div element
containing built-in modern media controls. This is used below to identify existing media control container
elements when determining where to inject the image overlay root container.

  • Modules/mediacontrols/MediaControlsHost.idl:
  • Modules/modern-media-controls/controls/controls-bar.css:

(.controls-bar):

Z-order the media controls bar (which contains all interactible media control elements) above any image overlay
content that may coexist in the same shadow root.

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

(:host):

Remove -webkit-user-select: none; here. This was added to prevent the iOS magnifier UI from showing up when
long pressing inside a video element; we can achieve the same effect without applying this property over the
entire host element by instead changing selection logic in WebKit2.

(.media-controls):

Push the -webkit-user-select: none; property down into the media control children, instead of on
.media-controls itself.

(.media-controls > *):

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

(MediaController):

Change this to ask for mediaControlsContainerClassName from the host, instead of hard-coding it to
"media-controls-container". From code inspection, there does not seem to be any codepath that passes in an
undefined host, except for the modern media controls layout tests (which still pass after this adjustment).

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::isImageOverlayText):
(WebCore::HTMLElement::removeImageOverlaySoonIfNeeded):

Adjust these helper methods to work in the case where the image overlay container is hosted underneath the media
controls container.

(WebCore::HTMLElement::updateWithTextRecognitionResult):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::seekWithTolerance):
(WebCore::HTMLMediaElement::playInternal):

If needed, remove the image overlay when seeking or playing media.

Source/WebKit:

See WebCore/ChangeLog for more details.

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

(canAttemptTextRecognitionForNonImageElements):

Add a new WebKitAdditions integration point.

(-[WKContentView imageAnalysisGestureDidBegin:]):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::selectionPositionInformation):

Adjust for the changes to the built-in media controls stylesheet by adding logic to prevent the magnifier from
showing up when long pressing (or long pressing inside) video elements on iOS.

LayoutTests:

Adjust a modern media controls test, such that it no longer verifies that the -webkit-user-select CSS property
is none on an audio element; in lieu of this, we add a new layout test in editing/selection to verify that
long pressing over the timestamp of an audio element does not trigger text selection.

  • editing/selection/ios/do-not-allow-text-selection-in-audio-element-expected.txt: Added.
  • editing/selection/ios/do-not-allow-text-selection-in-audio-element.html: Added.
  • media/modern-media-controls/audio/audio-controls-styles-expected.txt:
  • media/modern-media-controls/audio/audio-controls-styles.html:
2:49 PM Changeset in webkit [285608] by mmaxfield@apple.com
  • 2 edits in trunk/Tools

[Cocoa] Build WebGPU on our bots
https://bugs.webkit.org/show_bug.cgi?id=232924

Reviewed by Dean Jackson and Alex Christensen.

Simply tell the build script about the existence of WebGPU.

  • Scripts/build-webkit:
12:50 PM Changeset in webkit [285607] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Unreviewed, reverting r285603.
https://bugs.webkit.org/show_bug.cgi?id=232963

broke the watchOS build

Reverted changeset:

"[Cocoa] Build WebGPU on our bots"
https://bugs.webkit.org/show_bug.cgi?id=232924
https://commits.webkit.org/r285603

12:30 PM Changeset in webkit [285606] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS][GPUP] Remove access to sysctl properties
https://bugs.webkit.org/show_bug.cgi?id=232329
<rdar://problem/84679628>

Reviewed by Darin Adler.

Based on telemetry, remove access to unused sysctl properties in the GPU process' sandbox on macOS.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
12:26 PM Changeset in webkit [285605] by ap@apple.com
  • 2 edits in trunk/Source/WebInspectorUI

WebInspectorUI needs to support InstallAPI
https://bugs.webkit.org/show_bug.cgi?id=232955

Reviewed by BJ Burg.

  • Configurations/WebInspectorUIFramework.xcconfig:
12:10 PM Changeset in webkit [285604] by graouts@webkit.org
  • 5 edits
    4 deletes in trunk

The cssText property for a computed style should return an empty string
https://bugs.webkit.org/show_bug.cgi?id=232943

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:

Source/WebCore:

See https://github.com/w3c/csswg-drafts/issues/1033. This was an annoying test to fail because the output
would require a rebaseline every time we'd change something visible in the computed style.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::CSSComputedStyleDeclaration::cssText const):

LayoutTests:

Remove all platform-specific expectations for the WPT css/cssom/cssstyledeclaration-csstext.html since the
assertion that would fail differently on various platforms now passes everywhere.

  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt: Removed.
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt: Removed.
  • platform/ios/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt: Removed.
11:53 AM Changeset in webkit [285603] by mmaxfield@apple.com
  • 2 edits in trunk/Tools

[Cocoa] Build WebGPU on our bots
https://bugs.webkit.org/show_bug.cgi?id=232924

Reviewed by Dean Jackson.

Simply tell the build script about the existence of WebGPU.

  • Scripts/build-webkit:
11:40 AM Changeset in webkit [285602] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] ubidi expects non-preserved new lines as whitespace characters
https://bugs.webkit.org/show_bug.cgi?id=232921

Reviewed by Antti Koivisto.

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::replaceNonPreservedNewLineCharactersAndAppend):
(WebCore::Layout::buildBidiParagraph):

11:37 AM Changeset in webkit [285601] by commit-queue@webkit.org
  • 4 edits in trunk

Coding style for inner namespaces is should be simplified to not indented
https://bugs.webkit.org/show_bug.cgi?id=232073

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-11-10
Reviewed by Antti Koivisto.

.:

  • .clang-format:

Do not indent contents of inner namespaces, match current code.

Websites/webkit.org:

  • code-style.md:

Simplify coding style to match the existing code: contents of inner namespaces
should not be indented.

11:37 AM Changeset in webkit [285600] by Alan Coon
  • 5 edits in branches/safari-612-branch/Source

Cherry-pick r285236. rdar://problem/83950623

This reverts r285508.

11:30 AM Changeset in webkit [285599] by commit-queue@webkit.org
  • 5 edits in trunk

Implement serialization and deserialization of redirect and modify headers actions for WKContentRuleList
https://bugs.webkit.org/show_bug.cgi?id=232901

Patch by Alex Christensen <achristensen@webkit.org> on 2021-11-10
Reviewed by Timothy Hatcher.

Source/WebCore:

I serialized each type so that the first 4 bytes are the total serialized length of that type.
The next time we increment CurrentContentRuleListFileVersion I intend to do that for all existing action serializations.

I used UTF-8 encoding on disk because I anticipate most of the use here will be ASCII because the strings will
either go into URLs or into HTTP headers, both of which use only 8-bit characters when actually used.

URLTransformActions will likely have many cases that don't have all fields, so I optimized by adding one byte
with 8 booleans indicating whether the field is present or not. This way, I don't need 32 bytes of 0's for the
unused fields' serializations.

Future optimization can be done by adding WTF::String::utf8Length() and WTF::String::utf8EncodeIntoBuffer(Span<uint8_t>)
but that will just reduce copies and allocations during compiling, not the serialized format.

Another future optimization that could be done is to use null terminated strings instead of a 4 byte size before each string.
That would reduce the binary size considerably.

  • contentextensions/ContentExtensionActions.cpp:

(WebCore::ContentExtensions::append):
(WebCore::ContentExtensions::uncheckedAppend):
(WebCore::ContentExtensions::deserializeLength):
(WebCore::ContentExtensions::deserializeUTF8String):
(WebCore::ContentExtensions::writeLengthToVectorAtOffset):
(WebCore::ContentExtensions::ModifyHeadersAction::serialize const):
(WebCore::ContentExtensions::ModifyHeadersAction::deserialize):
(WebCore::ContentExtensions::ModifyHeadersAction::serializedLength):
(WebCore::ContentExtensions::ModifyHeadersAction::ModifyHeaderInfo::serialize const):
(WebCore::ContentExtensions::ModifyHeadersAction::ModifyHeaderInfo::deserialize):
(WebCore::ContentExtensions::ModifyHeadersAction::ModifyHeaderInfo::serializedLength):
(WebCore::ContentExtensions::RedirectAction::serialize const):
(WebCore::ContentExtensions::RedirectAction::deserialize):
(WebCore::ContentExtensions::RedirectAction::serializedLength):
(WebCore::ContentExtensions::RedirectAction::URLTransformAction::parse):
(WebCore::ContentExtensions::RedirectAction::URLTransformAction::serialize const):
(WebCore::ContentExtensions::RedirectAction::URLTransformAction::deserialize):
(WebCore::ContentExtensions::RedirectAction::URLTransformAction::serializedLength):
(WebCore::ContentExtensions::RedirectAction::URLTransformAction::QueryTransform::parse):
(WebCore::ContentExtensions::RedirectAction::URLTransformAction::QueryTransform::serialize const):
(WebCore::ContentExtensions::RedirectAction::URLTransformAction::QueryTransform::deserialize):
(WebCore::ContentExtensions::RedirectAction::URLTransformAction::QueryTransform::serializedLength):
(WebCore::ContentExtensions::RedirectAction::URLTransformAction::QueryTransform::QueryKeyValue::serialize const):
(WebCore::ContentExtensions::RedirectAction::URLTransformAction::QueryTransform::QueryKeyValue::deserialize):
(WebCore::ContentExtensions::RedirectAction::URLTransformAction::QueryTransform::QueryKeyValue::serializedLength):

  • contentextensions/ContentExtensionActions.h:

(WebCore::ContentExtensions::ModifyHeadersAction::ModifyHeaderInfo::AppendOperation::isolatedCopy const): Deleted.
(WebCore::ContentExtensions::ModifyHeadersAction::ModifyHeaderInfo::AppendOperation::operator== const): Deleted.
(WebCore::ContentExtensions::ModifyHeadersAction::ModifyHeaderInfo::SetOperation::isolatedCopy const): Deleted.
(WebCore::ContentExtensions::ModifyHeadersAction::ModifyHeaderInfo::SetOperation::operator== const): Deleted.
(WebCore::ContentExtensions::ModifyHeadersAction::ModifyHeaderInfo::RemoveOperation::isolatedCopy const): Deleted.
(WebCore::ContentExtensions::ModifyHeadersAction::ModifyHeaderInfo::RemoveOperation::operator== const): Deleted.
(WebCore::ContentExtensions::RedirectAction::ExtensionPathAction::isolatedCopy const): Deleted.
(WebCore::ContentExtensions::RedirectAction::ExtensionPathAction::operator== const): Deleted.
(WebCore::ContentExtensions::RedirectAction::RegexSubstitutionAction::isolatedCopy const): Deleted.
(WebCore::ContentExtensions::RedirectAction::RegexSubstitutionAction::operator== const): Deleted.
(WebCore::ContentExtensions::RedirectAction::URLAction::isolatedCopy const): Deleted.
(WebCore::ContentExtensions::RedirectAction::URLAction::operator== const): Deleted.

Tools:

  • TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:

(TestWebKitAPI::TEST_F):

11:23 AM Changeset in webkit [285598] by Alan Coon
  • 9 edits
    2 deletes in branches/safari-612-branch

Revert r285519. rdar://problem/83971417

This reverts r285519.

11:21 AM Changeset in webkit [285597] by Said Abou-Hallawa
  • 27 edits in trunk

[GPU Process] Make SVGFilter and CSSFilter work in the same coordinates system
https://bugs.webkit.org/show_bug.cgi?id=232457
rdar://85035379

Reviewed by Simon Fraser.

Source/WebCore:

Currently SVGFilter sets the following members of Filter

  1. AffineTransform m_absoluteTransform: this is the scaling part from the transformation from the target element to the outermost coordinate system
  2. FloatSize m_filterResolution: this is the clamping scale if the size of the result ImageBuffers exceeds MaxClampedArea

And the CSSFilter sets the following member of Filter:

  1. float m_filterScale: this is the document().deviceScaleFactor()

The discrepancy happens also when creating the result ImageBuffers. For
SVGFilter, we create them with scaleFactor = 1. This means the logicalSize
of the ImageBuffer is equal to its backendSize. But for CSSFilter we
create them with scaleFactor = m_filterScale. This means the logicalSize
!= backendSize in this case.

We need to unify the coordinates system for both filters. We need also to
replace the three members by a single FloatSize called "m_filterScale".

  • css/CSSFilterImageValue.cpp:

(WebCore::CSSFilterImageValue::image):

  • platform/graphics/coreimage/FilterEffectRendererCoreImage.mm:

(WebCore::FilterEffectRendererCoreImage::renderToImageBuffer):
(WebCore::FilterEffectRendererCoreImage::destRect const):

  • platform/graphics/filters/FEConvolveMatrix.cpp:

(WebCore::FEConvolveMatrix::platformApplySoftware):

  • platform/graphics/filters/FEDisplacementMap.cpp:

(WebCore::FEDisplacementMap::platformApplySoftware):

  • platform/graphics/filters/FEDropShadow.cpp:

(WebCore::FEDropShadow::determineAbsolutePaintRect):
(WebCore::FEDropShadow::platformApplySoftware):

  • platform/graphics/filters/FEGaussianBlur.cpp:

(WebCore::FEGaussianBlur::calculateKernelSize):
(WebCore::FEGaussianBlur::platformApplySoftware):

  • platform/graphics/filters/FEMorphology.cpp:

(WebCore::FEMorphology::determineAbsolutePaintRect):
(WebCore::FEMorphology::platformApplySoftware):

  • platform/graphics/filters/FEOffset.cpp:

(WebCore::FEOffset::determineAbsolutePaintRect):
(WebCore::FEOffset::platformApplySoftware):

  • platform/graphics/filters/FETile.cpp:

(WebCore::FETile::platformApplySoftware):

  • platform/graphics/filters/FETurbulence.cpp:

(WebCore::FETurbulence::fillRegion const):
(WebCore::FETurbulence::platformApplySoftware):

  • platform/graphics/filters/Filter.h:

(WebCore::Filter::filterScale const):
(WebCore::Filter::setFilterScale):
(WebCore::Filter::sourceImageRect const):
(WebCore::Filter::setSourceImageRect):
(WebCore::Filter::filterRegion const):
(WebCore::Filter::setFilterRegion):
(WebCore::Filter::scaledByFilterScale const):
(WebCore::Filter::sourceImage):
(WebCore::Filter::setSourceImage):
(WebCore::Filter::Filter):
(WebCore::Filter::filterResolution const): Deleted.
(WebCore::Filter::setFilterResolution): Deleted.
(WebCore::Filter::absoluteTransform const): Deleted.
(WebCore::Filter::isSVGFilter const): Deleted.
(WebCore::Filter::isCSSFilter const): Deleted.
(WebCore::Filter::scaledByFilterResolution const): Deleted.

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::determineFilterPrimitiveSubregion):
(WebCore::FilterEffect::apply):
(WebCore::FilterEffect::imageBufferResult):
(WebCore::FilterEffect::unmultipliedResult):
(WebCore::FilterEffect::premultipliedResult):
(WebCore::FilterEffect::copyImageBytes const):
(WebCore::FilterEffect::convertPixelBufferToColorSpace):
(WebCore::FilterEffect::convertImageBufferToColorSpace):
(WebCore::FilterEffect::copyUnmultipliedResult):
(WebCore::FilterEffect::copyPremultipliedResult):
(WebCore::FilterEffect::createImageBufferResult):
(WebCore::FilterEffect::createUnmultipliedImageResult):
(WebCore::FilterEffect::createPremultipliedImageResult):

  • platform/graphics/filters/SourceGraphic.cpp:

(WebCore::SourceGraphic::determineAbsolutePaintRect):

  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::create):
(WebCore::CSSFilter::CSSFilter):
(WebCore::CSSFilter::buildReferenceFilter):
(WebCore::CSSFilter::build):
(WebCore::CSSFilter::allocateBackingStoreIfNeeded):
(WebCore::CSSFilter::determineFilterPrimitiveSubregion):
(WebCore::CSSFilter::clearIntermediateResults):
(WebCore::CSSFilter::setSourceImageRect):
(WebCore::CSSFilter::outputRect const):

  • rendering/CSSFilter.h:
  • rendering/RenderLayerFilters.cpp:

(WebCore::RenderLayerFilters::buildFilter):

  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::applyResource):
(WebCore::RenderSVGResourceFilter::postApplyResource):

  • rendering/svg/RenderSVGResourceFilter.h:
  • rendering/svg/SVGRenderTreeAsText.cpp:

(WebCore::writeSVGResourceContainer):

  • svg/graphics/filters/SVGFEImage.cpp:

(WebCore::FEImage::determineAbsolutePaintRect):
(WebCore::FEImage::platformApplySoftware):

  • svg/graphics/filters/SVGFilter.cpp:

(WebCore::SVGFilter::SVGFilter):
(WebCore::SVGFilter::scaledByFilterScale const):
(WebCore::SVGFilter::create):
(WebCore::SVGFilter::scaledByFilterResolution const): Deleted.

  • svg/graphics/filters/SVGFilter.h:

LayoutTests:

Skip the hidpi reference filter tests till we connect the FilterEffects
to the correct parent Filter.

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

Remove unnecessary un-skipping for conic-gradients tests since they were
not skipped globally.

11:15 AM Changeset in webkit [285596] by Alan Coon
  • 2 deletes in branches/safari-612-branch/Source

Remove conflict files that should not have been checked in. rdar://problem/83430097

11:15 AM Changeset in webkit [285595] by Alan Coon
  • 1 edit in branches/safari-612-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

Unreviewed build fix. rdar://83863266

Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:2919:31: error: no member named 'userSelectIncludingInert' in 'WebCore::RenderStyle'

11:14 AM Changeset in webkit [285594] by Chris Dumez
  • 24 edits in trunk

Add basic support for launching CaptivePortalMode WebProcesses
https://bugs.webkit.org/show_bug.cgi?id=232737
<rdar://84473037>

Reviewed by Brent Fulgham.

Source/WebKit:

Add new WKWebpagePreferences.captivePortalModeEnabled API to allow clients apps to opt in or
out of captive portal mode for each navigation (WKWebpagePreferences is passed with the navigation
policy decision). For setting the default state of this setting, the client can set
WebWebViewConfiguration.defaultWebpagePreferences.captivePortalModeEnabled (will impact all views
using this configuration).

Note that both this property can only be set by apps with the browser entitlement on iOS (no
restriction on macOS). On iOS, the default value of WKWebpagePreferences.captivePortalModeEnabled
depends on the corresponding system setting. For now, this is simulated by a NSUserDefault but it
will eventually come from somewhere else (TCC?).

Whenever transitioning in or out of captive portal mode, we process-swap on navigation policy
decision. Whenever captive portal mode is enabled, we turn off JIT, generational and concurrent GC
in the WebProcess, as soon as it launches.

Covered by new API tests.

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:

(WebKit::XPCServiceInitializer):

  • UIProcess/API/APIPageConfiguration.cpp:

(API::PageConfiguration::captivePortalModeEnabled const):

  • UIProcess/API/APIPageConfiguration.h:
  • UIProcess/API/APIWebsitePolicies.cpp:

(API::WebsitePolicies::copy const):
(API::WebsitePolicies::captivePortalModeEnabled const):

  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/Cocoa/WKWebpagePreferences.h:
  • UIProcess/API/Cocoa/WKWebpagePreferences.mm:

(-[WKWebpagePreferences setCaptivePortalModeEnabled:]):
(-[WKWebpagePreferences captivePortalModeEnabled]):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::captivePortalModeEnabledBySystem):

  • UIProcess/Launcher/ProcessLauncher.h:

(WebKit::ProcessLauncher::Client::shouldEnableCaptivePortalMode const):

  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::ProcessLauncher::launchProcess):

  • UIProcess/SuspendedPageProxy.cpp:

(WebKit::SuspendedPageProxy::findReusableSuspendedPageProcess):

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

(WebKit::WebPageProxy::launchProcess):
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::triggerBrowsingContextGroupSwitchForNavigation):
(WebKit::WebPageProxy::isJITEnabled):
(WebKit::WebPageProxy::shouldEnableCaptivePortalMode const):

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

(WebKit::WebProcessCache::takeProcess):

  • UIProcess/WebProcessCache.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::tryTakePrewarmedProcess):
(WebKit::WebProcessPool::prewarmProcess):
(WebKit::WebProcessPool::processForRegistrableDomain):
(WebKit::WebProcessPool::createWebPage):
(WebKit::WebProcessPool::processForNavigation):
(WebKit::WebProcessPool::processForNavigationInternal):
(WebKit::captivePortalModeEnabledBySystem):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::create):
(WebKit::WebProcessProxy::createForServiceWorkers):
(WebKit::WebProcessProxy::WebProcessProxy):

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::captivePortalMode const):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
11:04 AM Changeset in webkit [285593] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS][GPUP] Remove sandbox read access to files
https://bugs.webkit.org/show_bug.cgi?id=232389
<rdar://problem/84717349>

Reviewed by Brent Fulgham.

Based on telemetry, remove read access to files in the GPU process' sandbox on iOS.
This patch also adds some new telemetry for rules related to reading of files.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
10:54 AM Changeset in webkit [285592] by sbarati@apple.com
  • 5 edits
    2 adds in trunk

in_by_val should not constant fold to in_by_id when the property is a property index
https://bugs.webkit.org/show_bug.cgi?id=232753

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/dont-in-by-id-when-index-2.js: Added.

(assert):
(main.v179):
(main.async v244):
(main):

  • stress/dont-in-by-id-when-index.js: Added.

(assert):
(test):

Source/JavaScriptCore:

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGValidate.cpp:
10:46 AM Changeset in webkit [285591] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[JSC][ARMv7] Unskip LayoutTests/js/script-tests/stack-overflow-regexp.js
https://bugs.webkit.org/show_bug.cgi?id=232945

Unreviewed gardening.

This test no longer seems flaky on ARMv7. Remove architecture specific
skip condition.

Patch by Geza Lore <Geza Lore> on 2021-11-10

  • js/script-tests/stack-overflow-regexp.js:
10:45 AM Changeset in webkit [285590] by ysuzuki@apple.com
  • 2 edits in trunk/PerformanceTests

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

useGrouping: 'false' is no longer allowed according to the spec.

  • Intl/numberformat-format-all-options.html:
10:43 AM Changeset in webkit [285589] by commit-queue@webkit.org
  • 46 edits
    2 adds in trunk

AX: Make ancestor computation cheaper by setting flags upon child insertion
https://bugs.webkit.org/show_bug.cgi?id=232466

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-11-10
Reviewed by Andres Gonzalez.

This patch adds bit-flags (named AXAncestorFlags) to our accessibility objects,
and sets these flags upon child insertion to enable cheap
determination of whether any object has ancestors of certain types
(e.g. a document role ancestor). Some AX clients need this
information, and WebKit can compute it more efficiently than they can.

The following flags are added in this patch:

  • HasDocumentRoleAncestor
  • HasWebApplicationAncestor
  • IsInDescriptionListDetail
  • IsInDescriptionListTerm
  • IsInCell

Source/WebCore:

Tests: accessibility/ancestor-computation.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::computeAncestorFlags const): Added.
(WebCore::AccessibilityObject::initializeAncestorFlags): Added.
(WebCore::AccessibilityObject::matchesAncestorFlag const): Added.
(WebCore::AccessibilityObject::hasAncestorMatchingFlag const): Added.
(WebCore::AccessibilityObject::hasDocumentRoleAncestor const): Added.
(WebCore::AccessibilityObject::hasWebApplicationAncestor const):Added.
(WebCore::AccessibilityObject::isInDescriptionListDetail const):Added.
(WebCore::AccessibilityObject::isInDescriptionListTerm const): Added.
(WebCore::AccessibilityObject::isInTableCell const): Added.
(WebCore::accessibilityObjectFrom): Added.
(WebCore::AccessibilityObject::insertChild):
Compute and store AXAncestorFlags for newly inserted children.

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::addAncestorFlags): Added.
(WebCore::AccessibilityObject::ancestorFlagsAreInitialized const): Added.
(WebCore::AccessibilityObject::hasAncestorFlag const): Added.

  • accessibility/AccessibilityObjectInterface.h:

Add AXAncestorFlags enum class and these virtual functions:

  • hasDocumentRoleAncestor
  • hasWebApplicationAncestor
  • isInDescriptionListDetail
  • isInDescriptionListTerm
  • isInCell
  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityHasDocumentRoleAncestor]): Added.
(-[WebAccessibilityObjectWrapper accessibilityHasWebApplicationAncestor]): Added.
(-[WebAccessibilityObjectWrapper accessibilityIsInDescriptionListDefinition]):
Moved to a different part of the file.
(-[WebAccessibilityObjectWrapper accessibilityIsInDescriptionListTerm]):
Moved to a different part of the file.
(-[WebAccessibilityObjectWrapper _accessibilityIsInTableCell]):
Moved to a different part of the file.
(-[WebAccessibilityObjectWrapper tableParent]): Fix grammar in comment.

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):
Initialize new AXPropertyName::AncestorFlags property.
(WebCore::AXIsolatedObject::ancestorFlags const): Added.

  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/isolatedtree/AXIsolatedTree.h:

Add new AXPropertyName::AncestorFlags property. Add new
OptionSet<AXAncestorFlag> type to AXPropertyValueVariant.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(AXAttributeStringSetStyle):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
Handle new AXHasDocumentRoleAncestorAttribute,
AXHasWebApplicationAncestorAttribute, AXIsInDescriptionListDetail,
AXIsInDescriptionListTerm, and AXIsInTableCell attributes.

Tools:

  • DumpRenderTree/AccessibilityUIElement.cpp:

(hasDocumentRoleAncestorCallback):
(hasWebApplicationAncestorCallback):
(isInDescriptionListDetailCallback):
(isInDescriptionListTermCallback):
(isInCellCallback):
Added all of the above.

  • DumpRenderTree/AccessibilityUIElement.h:
  • DumpRenderTree/ios/AccessibilityUIElementIOS.mm:

(AccessibilityUIElement::hasDocumentRoleAncestor const):
(AccessibilityUIElement::hasWebApplicationAncestor const):
(AccessibilityUIElement::isInCell const):
Added all of the above.
(AccessibilityUIElement::isInDescriptionListDetail const): Added.
(AccessibilityUIElement::isInDescriptionListTerm const): Added.
(WTR::AccessibilityUIElement::isInDefinitionListDefinition const): Deleted.
(WTR::AccessibilityUIElement::isInDefinitionListTerm const): Deleted.

  • DumpRenderTree/mac/AccessibilityUIElementMac.mm:

(AccessibilityUIElement::hasDocumentRoleAncestor const):
(AccessibilityUIElement::hasWebApplicationAncestor const):
(AccessibilityUIElement::isInDescriptionListDetail const):
(AccessibilityUIElement::isInDescriptionListTerm const):
(AccessibilityUIElement::isInCell const):
Added all of the above.

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:

(WTR::AccessibilityUIElement::hasDocumentRoleAncestor const):
(WTR::AccessibilityUIElement::hasWebApplicationAncestor const):
(WTR::AccessibilityUIElement::isInCell const):
Added all of the above.
(WTR::AccessibilityUIElement::isInDefinitionListDefinition const): Deleted.
(WTR::AccessibilityUIElement::isInDefinitionListTerm const): Deleted.
(WTR::AccessibilityUIElement::isInDescriptionListDetail const): Added.
(WTR::AccessibilityUIElement::isInDescriptionListTerm const): Added.

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:

Add new attributes hasDocumentRoleAncestor, hasWebApplicationAncestor,
isInDescriptionListDetail, and isInDescriptionListTerm. Change
isInTableCell() to be an attribute named isInCell.

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::hasDocumentRoleAncestor const): Added.
(WTR::AccessibilityUIElement::hasWebApplicationAncestor const): Added.

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::hasDocumentRoleAncestor const):
(WTR::AccessibilityUIElement::hasWebApplicationAncestor const):
(WTR::AccessibilityUIElement::isInDescriptionListDetail const):
(WTR::AccessibilityUIElement::isInDescriptionListTerm const):
(WTR::AccessibilityUIElement::isInCell const):
Added all of the above.

LayoutTests:

  • accessibility/ancestor-computation-expected.txt: Added.
  • accessibility/ancestor-computation.html: Added.
  • accessibility/ios-simulator/description-list-expected.txt:
  • accessibility/ios-simulator/description-list.html:

Renamed from definition-list.html, because the term is "description
list" and not "definition list".

  • accessibility/image-link-expected.txt:
  • accessibility/image-map2-expected.txt:
  • accessibility/internal-link-anchors2-expected.txt:
  • accessibility/ios-simulator/element-in-table-cell-expected.txt:
  • accessibility/ios-simulator/element-in-table-cell.html:
  • accessibility/mac/aria-columnrowheaders-expected.txt:
  • accessibility/mac/bounds-for-range-expected.txt:
  • accessibility/mac/document-attributes-expected.txt:
  • accessibility/mac/document-links-expected.txt:
  • accessibility/mac/internal-link-anchors-expected.txt:
  • accessibility/math-multiscript-attributes-expected.txt:
  • accessibility/table-attributes-expected.txt:
  • accessibility/table-cell-spans-expected.txt:
  • accessibility/table-cells-expected.txt:
  • accessibility/table-detection-expected.txt:
  • accessibility/table-one-cell-expected.txt:
  • accessibility/table-sections-expected.txt:
  • accessibility/table-with-rules-expected.txt:
  • accessibility/transformed-element-expected.txt:
  • platform/mac/accessibility/lists-expected.txt:
  • platform/mac/accessibility/parent-delete-expected.txt:
  • platform/mac/accessibility/plugin-expected.txt:

Add new AXHasDocumentRoleAncestor and AXHasWebApplicationAncestor
attributes to expected output (these tests dump all attributes for
some / all elements).

  • platform/glib/TestExpectations:
  • platform/win/TestExpectations:

Ignore new ancestor-computation.html test due to lack of
AccessibilityUIElement method implementations added to
Mac and iOS only with this patch.

  • platform/ios/TestExpectations:

Enable new ancestor-computation.html test.

9:55 AM Changeset in webkit [285588] by Darin Adler
  • 25 edits in trunk

[CF] Reduce duplication and unneeded buffer allocations and copying in URL code, also remove unused methods and functions
https://bugs.webkit.org/show_bug.cgi?id=232220

Reviewed by Alex Christensen.

Source/WebKit:

  • Shared/API/c/cf/WKURLCF.mm:

(WKURLCreateWithCFURL): Use bytesAsString, saving creation and destruction
of a CString each time this is called.

  • Shared/Cocoa/ArgumentCodersCocoa.mm:

(-[WKSecureCodingURLWrapper encodeWithCoder:]): Use bytesAsVector.

  • Shared/Cocoa/WKNSURLExtras.h: Removed unused methods

+[NSURL _web_URLWithWTFString:relativeToURL:] and
-[NSURL _web_originalDataAsWTFString].

  • Shared/Cocoa/WKNSURLExtras.mm:

(+[NSURL _web_URLWithWTFString:relativeToURL:]): Deleted.
(-[NSURL _web_originalDataAsWTFString]): Deleted.

  • Shared/Cocoa/WKNSURLRequest.mm:

(-[WKNSURLRequest URL]): Removed unneeded call to +[NSURL _web_URLWithWTFString:]
because this code is converting a WTF::URL to an NSURL, which can use the conversion
operator in the WTF::URL class.

  • Shared/cf/ArgumentCodersCF.cpp:

(IPC::ArgumentCoder<CFURLRef>::encode): Use bytesAsVector.

  • UIProcess/API/Cocoa/WKBrowsingContextController.mm:

(-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:userData:]):
Use bytesAsString and bridge_cast.
(-[WKBrowsingContextController loadHTMLString:baseURL:userData:]): Ditto.
(-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]): Ditto.
(setUpPagePolicyClient): Removed unneeded call to +[NSURL _web_URLWithWTFString:]
because this code is converting a WTF::URL to an NSURL, which can use the conversion
operator in the WTF::URL class.

  • UIProcess/Cocoa/LegacyDownloadClient.mm:

(WebKit::LegacyDownloadClient::willSendRequest): Removed unneeded call to
+[NSURL _web_URLWithWTFString:] because this code is converting a WTF::URL to an NSURL,
which can use the conversion operator in the WTF::URL class.

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:

(-[WKWebProcessPlugInFrame URL]): Ditto.

Source/WebKitLegacy/mac:

  • Misc/WebNSURLExtras.h: Tweaked comments a bit. No need to say methods are "new", since

that won't be true in the future. Removed unused methods
+[NSURL _web_URLWithUserTypedString:relativeToURL:],
+[NSURL _webkit_URLWithUserTypedString:relativeToURL:],
+[NSURL _web_URLWithData:], +[NSURL _web_URLWithData:relatveToURL:].
Wanted to remove even more nearly unused methods: many were used only
inside the WebKit project, in legacy plug-in code, and some seemed unused,
but it wasn't easy for me to quickly verify that.

  • Misc/WebNSURLExtras.mm: Removed "using namespace WebCore" and

"using namespace WTF".
(+[NSURL _web_URLWithUserTypedString:relativeToURL:]): Deleted.
(+[NSURL _web_URLWithUserTypedString:]): Use WTF prefix explicitly.
(+[NSURL _webkit_URLWithUserTypedString:relativeToURL:]): Deleted.
(+[NSURL _webkit_URLWithUserTypedString:]): Use WTF prefix explicitly.
(+[NSURL _web_URLWithDataAsString:]): Removed special case for nil since the code
will do the right thing with nil without an explicit check.
(+[NSURL _web_URLWithDataAsString:relativeToURL]): Ditto. Also formatted the code
as a one-liner.
(+[NSURL _web_URLWithData:]): Deleted.
(+[NSURL _web_URLWithData:relativeToURL:]): Deleted.
(-[NSURL _web_originalData]): Use WTF prefix explicitly.
(-[NSURL _web_originalDataAsString]): Ditto.
(-[NSURL _web_isEmpty]): Use bridge_cast and make code style checker happy by using
"!" instead of "== 0".
(-[NSURL _web_URLCString]): Use WTF prefix explicitly.
(-[NSURL _webkit_canonicalize]): Use WebCore prefix explicitly.
(-[NSURL _webkit_URLByRemovingFragment]): Use WTF prefix explicitly.
(-[NSURL _web_schemeSeparatorWithoutColon]): Deleted.
(-[NSURL _web_dataForURLComponentType:]): Deleted.
(-[NSURL _web_hostData]): Use WTF prefix explicitly. Rearranged for clarity and
slightly improved efficiency as well.
(-[NSString _web_isUserVisibleURL]): Use WTF prefix explicitly.
(-[NSString _webkit_stringByReplacingValidPercentEscapes]): Use WebCore prefix
explicitly.
(-[NSString _web_decodeHostName]): Use WTF prefix explicitly.
(-[NSString _web_encodeHostName]): Ditto.
(-[NSString _webkit_decodeHostName]): Ditto.
(-[NSString _webkit_encodeHostName]): Ditto.

Source/WTF:

  • wtf/URL.h: Removed unneeded includes. Use default instead of { }

for empty destructor. Added emptyCFURL function.

  • wtf/cf/CFURLExtras.cpp:

(WTF::bytesAsCFData): Added. Replaces originalURLData from NSURLExtras.mm,
but with a simpler implementation and more error checking. Here it's also
alongside the other nearly identical functions.
(WTF::bytesAsString): Added. Replaces getURLBytes for callers that are
going to turn the bytes into a WTF::String. Before this patch, the callers
were converting from CFURLRef to WTF::CString and then to WTF::String, so
this eliminates the malloc/free pair for CString.
(WTF::bytesAsVector): Added. Replaces getURLBytes using a return value
instead of an out argument. Adds the optimization of filling the buffer if
the inline capacity is sufficient, which was in originalURLData, but not
here in getURLBytes before.
(WTF::isSameOrigin): Renamed from isCFURLSameOrigin and rewrote this to
have fewer type casts and more parallel structure so it's easier to read,
while adapting it to use bytesAsVector.

  • wtf/cf/CFURLExtras.h: Replaced URLCharBuffer, getURLBytes, and

isCFURLSameOrigin with URLBytesVectorInlineCapacity, bytesAsCFData,
bytesAsString, bytesAsVector, and isSameOrigin. Got rid of unneeded
includes.

  • wtf/cf/URLCF.cpp:

(WTF::URL::URL): Use bytesAsString to streamline implementation and
remove allocation/deallcation of a CString.
(WTF::URL::emptyCFURL): Added. Used to refactor createCFURL so we can
share it across Foundation and non-Foundation versions.
(WTF::URL::createCFURL const): Added the logic that was in the version
in URLCocoa.mm so we can share this single version, and removed the #if
surrounding this.
(WTF::URL::fileSystemPath const): Use auto.

  • wtf/cocoa/NSURLExtras.h: Changed URLWithUserTypedString to ignore

the baseURL argument. It's not used, but the function is exported and
currently used in Safari source code, which, like all callers passes
a nil for baseURL. so, for now left the argument. Removed the baseURL
argument from URLWithUserTypedStringDeprecated. Removed unused functions
rangeOfURLScheme and looksLikeAbsoluteURL.

  • wtf/cocoa/NSURLExtras.mm: Removed "using namespace URLHelpers".

(WTF::readIDNAllowedScriptListFile): Use URLHelpers explicitly.
(WTF::decodeHostName): Ditto.
(WTF::encodeHostName): Ditto.
(WTF::URLByTruncatingOneCharacterBeforeComponent): Simplified by using
the bytesAsVector function.
(WTF::URLByRemovingResourceSpecifier): Deleted.
(WTF::URLWithData): Call URLByTruncatingOneCharacterBeforeComponent
directly.
(WTF::URLWithUserTypedString): Removed the unneeded support for a
base URL. Use URLHelpers explicitly.
(WTF::URLWithUserTypedStringDeprecated): Ditto.
(WTF::hasQuestionMarkOnlyQueryString): Use bridge_cast.
(WTF::dataForURLComponentType): Rearranged to simplify a bit, remove support
for special value for CFURLComponentType that means the complete URL, since
no callers were using that, and use bytesAsVector.
(WTF::URLByRemovingComponentAndSubsequentCharacter): Use bridge_cast and
bytesAsVector.
(WTF::originalURLData): Use bridge_cast and bytesAsCFData.
(WTF::userVisibleString): Use URLHelpers explicitly.
(WTF::isUserVisibleURL): Rewrote for simplicity and coding style; since
the local characters are a null-terminated C string, we don't need
length checks as long as we validate characters first, since a '\0'
character can be read and will not be valid.
(WTF::rangeOfURLScheme): Deleted.
(WTF::looksLikeAbsoluteURL): Deleted.

  • wtf/cocoa/URLCocoa.mm:

(WTF::URL::URL): Changed to just call the CFURLRef constructor so we
don't need to repeat things twice.
(WTF::URL::emptyCFURL): Added. This is the one part of the createCFURL
function that depends on Objective-C.
(WTF::URL::createCFURL const): Merged into the function in URLCF.cpp.
(WTF::makeNSArrayElement): Use bridge_cast instead of the trickier
idiom with explicit calls to leakRef and bridge_transfer.

  • wtf/mac/FileSystemMac.mm:

(WTF::FileSystem::setMetadataURL): Updated since URLWithUserTypedString
no longer requires a baseURL of nil to be passed. Also removed explicit
WTF namespace since this code itself is in the WTF namespace.

  • wtf/text/cocoa/StringCocoa.mm:

(WTF::String::String): Use bridge_cast.
(WTF::makeNSArrayElement): Use bridge_cast.

Tools:

  • TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:

(TestWebKitAPI::TEST): Removed extra argument to URLWithUserTypedString/Deprecated.

9:51 AM Changeset in webkit [285587] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

imported/w3c/web-platform-tests/webmessaging/broadcastchannel/workers.html is flaky crashing in debug
https://bugs.webkit.org/show_bug.cgi?id=232920

Reviewed by Alex Christensen.

When WorkerGlobalScope::postTask() gets called, the task may get destroyed on the worker thread, without
getting executed in the case where the worker thread is about to exit. This was causing trouble in
BroadcastChannel::dispatchMessageTo() where we were calling WorkerGlobalScope::postTask() and capturing
a CallbackAggregator. We were relying on the task actually executing to dispatch the CallbackAggregator
back to the maint thread so that the completion handler is always called on the main thread.

To address the issue, we now capture a WTF::ScopeExit which calls the completion handler on the main
thread upon destruction. This way, the completion handler will always get called on the main thread,
no matter what.

  • dom/BroadcastChannel.cpp:

(WebCore::BroadcastChannel::dispatchMessageTo):

9:42 AM Changeset in webkit [285586] by eocanha@igalia.com
  • 5 edits in trunk

[GTK] Layout Test media/video-seek-with-negative-playback.html timeouts on the release bot.
https://bugs.webkit.org/show_bug.cgi?id=135086

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

In some specific cases, an EOS GstEvent can happen right before a seek. The event is translated
by playbin as an EOS GstMessage and posted to the bus, waiting to be forwarded to the main thread.
The EOS message (now irrelevant after the seek) is received and processed right after the seek,
causing the termination of the media at the player private and upper levels. This can even happen
after the seek has completed (m_isSeeking already false).

This patch detects that condition by ensuring that the playback is coherent with the EOS message,
that is, if we're still playing somewhere inside the playable ranges, there should be no EOS at
all. If that's the case, it's considered to be one of those spureous EOS and is ignored.

Live streams (infinite duration) are special and we still have to detect legitimate EOS there, so
this message bailout isn't done in those cases.

Also refactored the code that queries the position to the sinks.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Ignore EOS message if the playback position is inside the playback limits when they're finite. Refactored sink position query code as gstreamerPositionFromSinks().
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Added gstreamerPositionFromSinks().

LayoutTests:

  • platform/glib/TestExpectations: Unskipped test.
9:41 AM Changeset in webkit [285585] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[macOS] Unable to build WebKit with multiple users in the same machine, webpushd uses /tmp/WebKit.dst
https://bugs.webkit.org/show_bug.cgi?id=232940

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

  • WebKit.xcodeproj/project.pbxproj:
9:32 AM Changeset in webkit [285584] by jer.noble@apple.com
  • 22 edits in trunk/Source

[iOS] Adopt -[AVAudioSession setAuditTokensForProcessAssertion:]
https://bugs.webkit.org/show_bug.cgi?id=232909
<rdar://68184444>

Reviewed by Eric Carlson.

Source/WebCore:

  • platform/audio/AudioSession.h:
  • platform/audio/ios/AudioSessionIOS.h:
  • platform/audio/ios/AudioSessionIOS.mm:

(WebCore::AudioSessionIOS::setPresentingProcesses):

Source/WebCore/PAL:

  • pal/spi/cocoa/AVFoundationSPI.h:

Source/WebKit:

When a page is loaded through SafariViewService, the UIProcess is SVS, but the "presenting"
application is the client of SafariViewController. To further compliate things, multiple apps
all using a SafariViewController will use a singleton SafariViewService application. When such
an application goes to the background while playing audio, the audio subsystem will keep the
UIProcess from suspending, but not the presenting application. The audio subsystem will see
that the presenting application has become suspended, and will interrupt audio playback.

Opt into a AVAudioSession behavior where a client can provide an array of audit tokens for
those processes which are "presenting" the audio playback to the user. This will include the
UIProcess, but also the process which is hosting the SafariViewController. The audio subsystem
will keep the processes in that list from becoming suspended during audio playback.

Since there may be different clients of SafariViewService existing simultaneously, only include
those presenting application tokens whose WebContent processes require an "active" audio session.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::GPUConnectionToWebProcess):

  • GPUProcess/GPUConnectionToWebProcess.h:

(WebKit::GPUConnectionToWebProcess::presentingApplicationAuditToken const):

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::audioSessionManager const):

  • GPUProcess/media/RemoteAudioSessionProxy.cpp:

(WebKit::RemoteAudioSessionProxy::tryToSetActive):

  • GPUProcess/media/RemoteAudioSessionProxy.h:

(WebKit::RemoteAudioSessionProxy::gpuConnectionToWebProcess const):

  • GPUProcess/media/RemoteAudioSessionProxyManager.cpp:

(WebKit::RemoteAudioSessionProxyManager::RemoteAudioSessionProxyManager):
(WebKit::RemoteAudioSessionProxyManager::updatePresentingProcesses):

  • GPUProcess/media/RemoteAudioSessionProxyManager.h:
  • Scripts/process-entitlements.sh:
  • Shared/GPUProcessConnectionParameters.h:

(WebKit::GPUProcessConnectionParameters::encode const):
(WebKit::GPUProcessConnectionParameters::decode):

  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::copy):

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:

(-[_WKProcessPoolConfiguration setPresentingApplicationProcessToken:]):
(-[_WKProcessPoolConfiguration presentingApplicationProcessToken]):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::getGPUProcessConnection):

  • WebProcess/GPU/GPUProcessConnection.h:
9:24 AM Changeset in webkit [285583] by commit-queue@webkit.org
  • 19 edits in trunk

[css-contain] Support contain:paint
https://bugs.webkit.org/show_bug.cgi?id=224742

Patch by Rob Buis <rbuis@igalia.com> on 2021-11-10
Reviewed by Alan Bujtas.

LayoutTests/imported/w3c:

Adjust test expectation now that contain: strict is supported.

  • web-platform-tests/css/css-flexbox/flex-item-contains-strict-expected.txt:

Source/WebCore:

This patch implements paint containment as specified[1].

It adds shouldApplyPaintContainment to check whether the element applies for paint containment. Is so, then:

  • an independent formatting context is established.
  • an absolute positioning and fixed positioning containing block is established.
  • a stacking context is created.
  • implements clipping on the overflow clip edge.

This patch also adds effectiveOverflowX/effectiveOverflowY on RenderElement to take
the effect of paint containment on overflow-x/y into account.

[1] https://drafts.csswg.org/css-contain-2/#paint-containment

  • page/FrameView.cpp:

(WebCore::FrameView::applyOverflowToViewport):
(WebCore::FrameView::applyPaginationToViewport):
(WebCore::FrameView::calculateScrollbarModesForLayout):

  • rendering/GridTrackSizingAlgorithm.cpp:

(WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::updateFromStyle):
(WebCore::RenderBox::constrainLogicalWidthInFragmentByMinMax const):
(WebCore::RenderBox::constrainLogicalHeightByMinMax const):
(WebCore::RenderBox::createsNewFormattingContext const):
(WebCore::RenderBox::addOverflowFromChild):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::updateFromStyle):

  • rendering/RenderElement.cpp:

(WebCore::includeNonFixedHeight):
(WebCore::RenderElement::effectiveOverflowX const):
(WebCore::RenderElement::effectiveOverflowY const):

  • rendering/RenderElement.h:

(WebCore::RenderElement::effectiveOverflowInlineDirection const):
(WebCore::RenderElement::effectiveOverflowBlockDirection const):
(WebCore::RenderElement::canContainFixedPositionObjects const):
(WebCore::RenderElement::canContainAbsolutelyPositionedObjects const):

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::mainAxisOverflowForChild const):
(WebCore::RenderFlexibleBox::crossAxisOverflowForChild const):

  • rendering/RenderFragmentContainer.cpp:

(WebCore::RenderFragmentContainer::overflowRectForFragmentedFlowPortion):

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

(WebCore::canCreateStackingContext):
(WebCore::RenderLayer::shouldBeCSSStackingContext const):
(WebCore::RenderLayer::setAncestorChainHasSelfPaintingLayerDescendant):
(WebCore::RenderLayer::setAncestorChainHasVisibleDescendant):
(WebCore::RenderLayer::calculateClipRects const):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::setPaintContainmentApplies):
(WebCore::shouldApplyPaintContainment):

  • rendering/RenderObject.h:

(WebCore::RenderObject::paintContainmentApplies const):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::overflowY const):
(WebCore::RenderStyle::containsPaint const):
(WebCore::RenderStyle::overflowInlineDirection const): Deleted.
(WebCore::RenderStyle::overflowBlockDirection const): Deleted.

  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::RenderSVGRoot::shouldApplyViewportClip const):

LayoutTests:

Unskip tests that pass now.

9:15 AM Changeset in webkit [285582] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS][GPUP] Remove access to sysctl properties
https://bugs.webkit.org/show_bug.cgi?id=232821
<rdar://problem/85162088>

Reviewed by Brent Fulgham.

Based on telemetry, remove access to unused sysctl properties in the GPU process' sandbox on iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
9:12 AM Changeset in webkit [285581] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS][GPUP] Remove access to mach-register
https://bugs.webkit.org/show_bug.cgi?id=232442
<rdar://problem/84763289>

Reviewed by Darin Adler.

Based on telemetry, remove access to mach-register in the GPU process' sandbox on iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
9:09 AM Changeset in webkit [285580] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS][GPUP] Block access to mapping of executables
https://bugs.webkit.org/show_bug.cgi?id=232824
<rdar://problem/85163925>

Reviewed by Brent Fulgham.

Block access to mapping of certain executables in the GPU process on iOS.
These changes are based on collected telemetry.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
9:06 AM Changeset in webkit [285579] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS][GPUP] Remove access to IOKit classes
https://bugs.webkit.org/show_bug.cgi?id=232308
<rdar://problem/84665748>

Reviewed by Brent Fulgham.

Based on telemetry, remove access to unused IOKit classes in the GPU process' sandbox on macOS.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
9:05 AM Changeset in webkit [285578] by commit-queue@webkit.org
  • 2 edits in trunk/JSTests

[JSC][32bit] Unskip JSTests/stress/json-stringify-string-builder-overflow.js
https://bugs.webkit.org/show_bug.cgi?id=232944

Unreviewed gardening.

This seems to survive 1000 iterations on both armv7 and mips
hw. Remove the arch-specific skips leaving the memory limited
ones.

Patch by Xan Lopez <Xan Lopez> on 2021-11-10

  • stress/json-stringify-string-builder-overflow.js:
7:55 AM Changeset in webkit [285577] by youenn@apple.com
  • 1881 edits
    692 adds
    48 deletes in trunk

Update libwebrtc to M96
https://bugs.webkit.org/show_bug.cgi?id=232873

LayoutTests/imported/w3c:

Reviewed by Alex Christensen.

  • web-platform-tests/webrtc/RTCPeerConnection-addTrack.https-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-mandatory-getStats.https-expected.txt:
  • web-platform-tests/webrtc/RTCRtpTransceiver.https-expected.txt:
  • web-platform-tests/webrtc/protocol/dtls-setup.https-expected.txt:

Source/ThirdParty/libwebrtc:

Reviewed by Alex Christensen.

Updated libwebrtc code according M96 upstream branch.

  • CMakeLists.txt:
  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:
  • Source/webrtc: resynced.
  • libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

Reviewed by Alex Christensen.

Update WebCore code according updated libwebrtc API, in particular moving from deprecated CreateDataChannel to CreateDataChannelOrError.
Covered by existing tests.

  • Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::createDataChannel):

  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

(WebCore::BasicPacketSocketFactory::BasicPacketSocketFactory):

  • platform/mediastream/AudioMediaStreamTrackRenderer.cpp:

(WebCore::AudioMediaStreamTrackRenderer::create):

  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
  • platform/mediastream/libwebrtc/gstreamer/GStreamerVideoCommon.cpp:

(WebCore::createH264Format):
(WebCore::supportedH264Formats):

  • platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp:
  • platform/mediastream/libwebrtc/gstreamer/GStreamerVideoEncoderFactory.cpp:
  • testing/MockLibWebRTCPeerConnection.cpp:

(WebCore::MockLibWebRTCPeerConnection::CreateDataChannelOrError):
(WebCore::MockLibWebRTCPeerConnection::CreateDataChannel): Deleted.

  • testing/MockLibWebRTCPeerConnection.h:

Source/WebKit:

Reviewed by Alex Christensen.

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:

(WebKit::NetworkRTCProvider::NetworkRTCProvider):

7:47 AM Changeset in webkit [285576] by youenn@apple.com
  • 7 edits in trunk/Source

[iOS] Add audio gain in case category switches to PlayAndRecord
https://bugs.webkit.org/show_bug.cgi?id=232941
<rdar://85250248>

Reviewed by Eric Carlson.

Source/WebCore:

Add a audio category change observer.
Observer needs to be in the process where the actual iOS shared audio session is living (GPUProcess typically).
Manually tested.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/cocoa/AudioSampleBufferList.h:
  • platform/audio/ios/AudioSessionIOS.h:
  • platform/audio/ios/AudioSessionIOS.mm:

Source/WebKit:

In case of PlayAndRecord, apply a static gain of 5 to audio rendered from MediaStreamTracks.
For that purpose, observe changes to the AudioSession category and react upon it.

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.cpp:

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

7:11 AM Changeset in webkit [285575] by ntim@apple.com
  • 18 edits in trunk/Source

Migrate DialogElementEnabled from RuntimeFlags to Settings
https://bugs.webkit.org/show_bug.cgi?id=232926

Reviewed by Youenn Fablet.

Source/WebCore:

  • html/HTMLDialogElement.idl:
  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::formMethod const):

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::submit):
(WebCore::HTMLFormElement::parseAttribute):
(WebCore::HTMLFormElement::method const):

  • html/HTMLTagNames.in:
  • loader/FormSubmission.cpp:

(WebCore::FormSubmission::Attributes::methodString):
(WebCore::FormSubmission::Attributes::parseMethodType):
(WebCore::FormSubmission::Attributes::updateMethodType):
(WebCore::FormSubmission::create):

  • loader/FormSubmission.h:
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setDialogElementEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::dialogElementEnabled const): Deleted.

  • style/UserAgentStyle.cpp:

(WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):

Source/WebKit:

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetDialogElementEnabled): Deleted.
(WKPreferencesGetDialogElementEnabled): Deleted.

  • UIProcess/API/C/WKPreferencesRefPrivate.h:

Source/WebKitLegacy/mac:

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(-[WebPreferences dialogElementEnabled]): Deleted.
(-[WebPreferences setDialogElementEnabled:]): Deleted.

  • WebView/WebPreferencesPrivate.h:

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
6:40 AM Changeset in webkit [285574] by Antti Koivisto
  • 7 edits
    1 add in trunk/Source/WebCore

Use Hasher for hashing MatchResult for MatchedDeclarationsCache
https://bugs.webkit.org/show_bug.cgi?id=232930

Reviewed by Kimmo Kinnunen.

We currently use hashMemory over a Vector<MatchedProperties>. This works correctly only as long as
the MatchedProperties struct is fully packed. Any unitilized memory in the struct leads to badness.

  • WebCore.xcodeproj/project.pbxproj:
  • style/ElementRuleCollector.h:

(WebCore::Style::MatchResult::operator== const): Deleted.
(WebCore::Style::MatchResult::operator!= const): Deleted.
(WebCore::Style::MatchResult::isEmpty const): Deleted.
(WebCore::Style::operator==): Deleted.
(WebCore::Style::operator!=): Deleted.

Move MatchResult to a file of its own.

  • style/MatchResult.h: Added.

(WebCore::Style::MatchResult::isEmpty const):
(WebCore::Style::operator==):
(WebCore::Style::operator!=):
(WebCore::Style::add):

Implement Hasher functions for the types.

  • style/MatchedDeclarationsCache.cpp:

(WebCore::Style::MatchedDeclarationsCache::computeHash):

use WTF::computeHash

  • style/MatchedDeclarationsCache.h:
  • style/PageRuleCollector.h:
  • style/PropertyCascade.h:
6:31 AM Changeset in webkit [285573] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[GLib] apply-build-revision fails when git-svn is not installed
https://bugs.webkit.org/show_bug.cgi?id=232929

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

Attempt to get the build revision from the git log if the git-svn call failed, either
because git-svn is not installed or the metadata in .git/svn is incomplete.

  • glib/apply-build-revision-to-files.py:

(get_revision_from_most_recent_git_commit):
(get_build_revision):

4:49 AM Changeset in webkit [285572] by Antti Koivisto
  • 4 edits in trunk

Hasher should be able to hash pointers
https://bugs.webkit.org/show_bug.cgi?id=232927

Reviewed by Kimmo Kinnunen.

Source/WTF:

  • wtf/Hasher.h:

(WTF::add):

Tools:

  • TestWebKitAPI/Tests/WTF/Hasher.cpp:

(TestWebKitAPI::TEST):

3:36 AM Changeset in webkit [285571] by eocanha@igalia.com
  • 4 edits
    2 adds in trunk

[Media] Make currentTime compliant with the spec when readyState is HAVE_NOTHING
https://bugs.webkit.org/show_bug.cgi?id=229605
Source/WebCore:

Reviewed by Xabier Rodriguez-Calvar.

Covered by LayoutTests/media/video-seek-have-nothing.html.

Added an internal defaultPlaybackPosition in HTMLMediaElement when currentTime changes
are done when readyState is still HAVE_NOTHING, as mandated by the spec[1] since late
2011: https://html.spec.whatwg.org/#current-playback-position

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::setReadyState): Seek to defaultPlaybackPosition (and reset it) when readyState increases to HAVE_METADATA.
(WebCore::HTMLMediaElement::currentMediaTime const): Return defaultPlaybackPosition when higher than zero.
(WebCore::HTMLMediaElement::setCurrentTimeForBindings): Store the new currentTime in defaultPlaybackPosition when changed during a HAVE_NOTHING readyState.

  • html/HTMLMediaElement.h: Added m_defaultPlaybackStartPosition private attribute.

LayoutTests:

Reviewed by Xabier Rodriguez-Calvar.

New test that checks that changes in currentTime done while on readyState=HAVE_NOTHING
are recorded and trigger a seek as soon as readyState increases to HAVE_METADATA or above.

  • media/video-seek-have-nothing-expected.txt: Added.
  • media/video-seek-have-nothing.html: Added.
1:42 AM Changeset in webkit [285570] by ntim@apple.com
  • 3 edits
    2 adds in trunk

Fix crash in GraphicsContextCG::endTransparencyLayer
https://bugs.webkit.org/show_bug.cgi?id=230230

Reviewed by Myles C. Maxfield.

Source/WebCore:

The crash was due to unbalanced calls to begin and end transparency layers.

A branch handling ancestors of transparent layers that are transform root needed to be
aware of the top layer. Opacity on ancestors don't affect top layer elements so calling
beginTransparencyLayers on parent() is incorrect.

Also fix transparentPaintingAncestor() to be top layer aware to avoid flickering layers
while scrolling.

Test: fast/layers/top-layer-ancestor-opacity-and-transform-crash.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::transparentPaintingAncestor):
(WebCore::RenderLayer::paintLayerWithEffects):

LayoutTests:

  • fast/layers/top-layer-ancestor-opacity-and-transform-crash-expected.txt: Added.
  • fast/layers/top-layer-ancestor-opacity-and-transform-crash.html: Added.
1:30 AM Changeset in webkit [285569] by ntim@apple.com
  • 4 edits in trunk

Enable dialog tests on Windows
https://bugs.webkit.org/show_bug.cgi?id=232911

Reviewed by Youenn Fablet.

The runtime flag sometimes seems to be off for Windows, change the member in
RuntimeEnabledFeatures.h and re-enable tests.

Source/WebCore:

  • page/RuntimeEnabledFeatures.h:

LayoutTests:

  • platform/win/TestExpectations:
12:48 AM Changeset in webkit [285568] by commit-queue@webkit.org
  • 4 edits
    3 adds in trunk/LayoutTests

[GLIB] Update test expectations and baselines after r284521
https://bugs.webkit.org/show_bug.cgi?id=232913

Unreviewed test gardening.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-11-10

  • platform/glib/TestExpectations:
  • platform/glib/svg/foreignObject/background-render-phase-expected.txt: Added.
  • platform/glib/svg/foreignObject/multiple-foreign-objects-expected.txt: Added.
  • platform/glib/svg/wicd/sizing-flakiness-expected.txt: Added.
  • platform/gtk/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt:
  • platform/wpe/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt:
12:38 AM Changeset in webkit [285567] by Manuel Rego Casasnovas
  • 4 edits
    6 adds in trunk

Wavy decorations don't cover the whole line length
https://bugs.webkit.org/show_bug.cgi?id=232663

Reviewed by Myles C. Maxfield.

LayoutTests/imported/w3c:

Import WPT tests from https://github.com/web-platform-tests/wpt/pull/31540.

  • web-platform-tests/css/css-text-decor/text-decoration-line-through-wavy-covers-whole-line-length-001-expected-mismatch.html: Added.
  • web-platform-tests/css/css-text-decor/text-decoration-line-through-wavy-covers-whole-line-length-001.html: Added.
  • web-platform-tests/css/css-text-decor/text-decoration-overline-wavy-covers-whole-line-length-001-expected-mismatch.html: Added.
  • web-platform-tests/css/css-text-decor/text-decoration-overline-wavy-covers-whole-line-length-001.html: Added.
  • web-platform-tests/css/css-text-decor/text-decoration-underline-wavy-covers-whole-line-length-001-expected-mismatch.html: Added.
  • web-platform-tests/css/css-text-decor/text-decoration-underline-wavy-covers-whole-line-length-001.html: Added.
  • web-platform-tests/css/css-text-decor/w3c-import.log:

Source/WebCore:

We have a problem with wavy decorations, because we are only painting
whole waves. Which means that, sometimes, the last part of the line
is not covered by the wavy decorations.

To fix this we're modifying strokeWavyTextDecoration() method.
We paint 2 extra waves before and after the line width,
and we clip the wavy text decoration to match the line's width.

This patch also removes adjustStepToDecorationLength() as the method
was wrong (e.g. passing 40px length and 10px step, it'd modify the step
to be 10.75px which makes no sense).
Apart from that, as we're now clipping the wave to the text line,
this adjustment is no longer needed.

Tests: imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-line-through-wavy-covers-whole-line-length-001.html

imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-overline-wavy-covers-whole-line-length-001.html
imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-underline-wavy-covers-whole-line-length-001.html

  • rendering/TextDecorationPainter.cpp:

(WebCore::strokeWavyTextDecoration):
(WebCore::adjustStepToDecorationLength): Deleted.

12:20 AM Changeset in webkit [285566] by sihui_liu@apple.com
  • 24 edits in trunk

Perform FileSystemSyncAccessHandle operations in web process
https://bugs.webkit.org/show_bug.cgi?id=232146
<rdar://problem/84809428>

Reviewed by Youenn Fablet.

Source/WebCore:

truncate(), getSize() and flush() operations are now performed on a global WorkQueue in web process.

  • Modules/filesystemaccess/FileSystemFileHandle.cpp:

(WebCore::FileSystemFileHandle::getSize): Deleted.
(WebCore::FileSystemFileHandle::truncate): Deleted.
(WebCore::FileSystemFileHandle::flush): Deleted.

  • Modules/filesystemaccess/FileSystemFileHandle.h:
  • Modules/filesystemaccess/FileSystemStorageConnection.h:
  • Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp:

(WebCore::FileSystemSyncAccessHandle::~FileSystemSyncAccessHandle):
(WebCore::FileSystemSyncAccessHandle::truncate):
(WebCore::FileSystemSyncAccessHandle::getSize):
(WebCore::FileSystemSyncAccessHandle::flush):
(WebCore::FileSystemSyncAccessHandle::close):
(WebCore::FileSystemSyncAccessHandle::closeInternal):
(WebCore::FileSystemSyncAccessHandle::closeBackend):
(WebCore::FileSystemSyncAccessHandle::read):
(WebCore::FileSystemSyncAccessHandle::write):
(WebCore::FileSystemSyncAccessHandle::completePromise):

  • Modules/filesystemaccess/FileSystemSyncAccessHandle.h:

(): Deleted.

  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp:

(WebCore::WorkerFileSystemStorageConnection::completeIntegerCallback): Deleted.
(WebCore::WorkerFileSystemStorageConnection::getSize): Deleted.
(WebCore::WorkerFileSystemStorageConnection::truncate): Deleted.
(WebCore::WorkerFileSystemStorageConnection::flush): Deleted.

  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.h:
  • workers/WorkerGlobalScope.cpp:

(WebCore::sharedFileSystemStorageQueue):
(WebCore::WorkerGlobalScope::postFileSystemStorageTask):

  • workers/WorkerGlobalScope.h:

Source/WebKit:

Network process no longer needs to hold open file handle for FileSystemSyncAccessHandle. Now it creates an open
file handle, pass it to web process and close it.

  • NetworkProcess/storage/FileSystemStorageError.h:

(WebKit::convertToException):

  • NetworkProcess/storage/FileSystemStorageHandle.cpp:

(WebKit::FileSystemStorageHandle::createSyncAccessHandle):
(WebKit::FileSystemStorageHandle::close):
(WebKit::FileSystemStorageHandle::move):
(WebKit::FileSystemStorageHandle::~FileSystemStorageHandle): Deleted.
(WebKit::FileSystemStorageHandle::getSize): Deleted.
(WebKit::FileSystemStorageHandle::truncate): Deleted.
(WebKit::FileSystemStorageHandle::flush): Deleted.

  • NetworkProcess/storage/FileSystemStorageHandle.h:

(): Deleted.

  • NetworkProcess/storage/NetworkStorageManager.cpp:

(WebKit::NetworkStorageManager::createSyncAccessHandle):
(WebKit::NetworkStorageManager::getSizeForAccessHandle): Deleted.
(WebKit::NetworkStorageManager::truncateForAccessHandle): Deleted.
(WebKit::NetworkStorageManager::flushForAccessHandle): Deleted.

  • NetworkProcess/storage/NetworkStorageManager.h:
  • NetworkProcess/storage/NetworkStorageManager.messages.in:
  • Platform/IPC/SharedFileHandle.cpp:

(IPC::SharedFileHandle::close):

  • Platform/IPC/SharedFileHandle.h:
  • WebProcess/WebCoreSupport/WebFileSystemStorageConnection.cpp:

(WebKit::WebFileSystemStorageConnection::getSize): Deleted.
(WebKit::WebFileSystemStorageConnection::truncate): Deleted.
(WebKit::WebFileSystemStorageConnection::flush): Deleted.

  • WebProcess/WebCoreSupport/WebFileSystemStorageConnection.h:

LayoutTests:

  • storage/filesystemaccess/handle-move-worker-expected.txt:
  • storage/filesystemaccess/resources/handle-move.js:

(async test):

Nov 9, 2021:

10:52 PM Changeset in webkit [285565] by Chris Dumez
  • 9 edits in trunk

[macOS] Enable NSURLSession partitioning based on first-party domain at CFNetwork level
https://bugs.webkit.org/show_bug.cgi?id=230750
<rdar://problem/83159358>

Reviewed by Alex Christensen.

Source/WebKit:

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
(overrideAttributionContext): Deleted.
Stop disabling CFNetwork NSURLSession partitioning based on first-party domain on
macOS.

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

(WebKit::NetworkSessionCocoa::sessionWrapperForTask):
(WebKit::NetworkSessionCocoa::hasIsolatedSession const):
(WebKit::NetworkSessionCocoa::clearIsolatedSessions):
(WebKit::NetworkSessionCocoa::invalidateAndCancelSessionSet):
Disable ITP session partitioning of certain prevalent domains on platforms where
CFNetwork already does full partitioning of all domains (now that it is enabled
on macOS 12+ and iOS15+).

Source/WTF:

Add HAVE(CFNETWORK_SESSION_PARTITIONING_BASED_ON_FIRST_PARTY_DOMAIN) build time flag that is true
on newer Apple OSes where CFNetwork does NSURLSession partitioning based on first-party domain for
us.

  • wtf/PlatformHave.h:

LayoutTests:

Skip a few ITP session partitioning tests on newer OSes now that session partitioning
happens for all first-party domains at CFNetwork level on these OSes.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
9:23 PM Changeset in webkit [285564] by Ben Nham
  • 29 edits
    5 copies
    6 adds in trunk

Add support for PushSubscriptionChangeEvent
https://bugs.webkit.org/show_bug.cgi?id=232455

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline WPT tests that are now passing.

  • web-platform-tests/push-api/idlharness.https.any.serviceworker-expected.txt:

Source/WebCore:

This adds support for the PushSubscriptionChangeEvent object. I plan to add support for the
onpushsubscriptionchange event handler in a later patch.

While working on this, it seemed reasonable to be able to create PushSubscriptions that
point to a null ServiceWorkerRegistration. This is for subscriptions that are returned via
the oldSubscription property and are therefore already unsubscribed.

I added a new constructor for creating a PushSubscription pointing to a null
ServiceWorkerRegistration, rather than changing the existing constructor to just take a
RefPtr<ServiceWorkerRegistration>. This is because I wanted to remove the WEBCORE_EXPORT
from ServiceWorkerRegistration, and the inline code generated by creating a null
RefPtr<ServiceWorkerRegistration> in the internals dylib caused it to require
ServiceWorkerRegistration::ref/deref to be exported.

Tests: http/wpt/push-api/pushSubscriptionChangeEvent.any.serviceworker.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/push-api/PushManager.cpp:

(WebCore::PushManager::subscribe):
(WebCore::PushManager::getSubscription):
(WebCore::PushManager::permissionState):

  • Modules/push-api/PushManager.h:
  • Modules/push-api/PushManager.idl:
  • Modules/push-api/PushSubscription.cpp:

(WebCore::PushSubscription::PushSubscription):
(WebCore::PushSubscription::unsubscribe):

  • Modules/push-api/PushSubscription.h:
  • Modules/push-api/PushSubscription.idl:
  • Modules/push-api/PushSubscriptionChangeEvent.cpp: Copied from Source/WebCore/Modules/push-api/PushManager.h.

(WebCore::PushSubscriptionChangeEvent::create):
(WebCore::PushSubscriptionChangeEvent::PushSubscriptionChangeEvent):

  • Modules/push-api/PushSubscriptionChangeEvent.h: Copied from Source/WebCore/Modules/push-api/PushManager.h.
  • Modules/push-api/PushSubscriptionChangeEvent.idl: Copied from Source/WebCore/Modules/push-api/PushSubscription.idl.
  • Modules/push-api/PushSubscriptionChangeEventInit.h: Copied from Source/WebCore/Modules/push-api/PushSubscription.idl.
  • Modules/push-api/PushSubscriptionChangeEventInit.idl: Copied from Source/WebCore/Modules/push-api/PushSubscription.idl.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:
  • dom/EventNames.in:
  • testing/Internals.cpp:

(WebCore::Internals::createPushSubscription):

  • testing/Internals.h:
  • testing/Internals.idl:
  • testing/ServiceWorkerInternals.cpp:

(WebCore::ServiceWorkerInternals::createPushSubscription):

  • testing/ServiceWorkerInternals.h:
  • testing/ServiceWorkerInternals.idl:
  • workers/service/ServiceWorkerRegistration.h:
  • workers/service/ServiceWorkerRegistration.idl:

LayoutTests:

Added PushSubscriptionChangeEvent tests and made PushSubscription tests also run in the
service worker context.

  • http/wpt/push-api/constants.js: Added.

(bytesFrom):

  • http/wpt/push-api/pushManager.any.js:
  • http/wpt/push-api/pushSubscription.https.any-expected.txt:
  • http/wpt/push-api/pushSubscription.https.any.js:

(GLOBAL.isWorker):
(async promise_test):
(bytesFrom): Deleted.
(promise_test.async test): Deleted.
(promise_test): Deleted.

  • http/wpt/push-api/pushSubscription.https.any.serviceworker-expected.txt: Added.
  • http/wpt/push-api/pushSubscription.https.any.serviceworker.html: Added.
  • http/wpt/push-api/pushSubscriptionChangeEvent.any.js: Added.

(test):
(promise_test.async newSubscription):
(promise_test.async return):
(promise_test):

  • http/wpt/push-api/pushSubscriptionChangeEvent.any.serviceworker-expected.txt: Added.
  • http/wpt/push-api/pushSubscriptionChangeEvent.any.serviceworker.html: Added.
9:14 PM Changeset in webkit [285563] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS][GPUP] Remove shared memory access
https://bugs.webkit.org/show_bug.cgi?id=232823
<rdar://problem/85163103>

Reviewed by Brent Fulgham.

Based on telemetry, remove shared memory access in the GPU process' sandbox on iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
8:59 PM Changeset in webkit [285562] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS][GPUP] Remove read access to preferences
https://bugs.webkit.org/show_bug.cgi?id=232439
<rdar://problem/84762138>

Reviewed by Darin Adler.

Based on telemetry, remove access to reading some preference domains in the GPU process' sandbox on iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
8:28 PM Changeset in webkit [285561] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Add telemetry for system calls in WP
https://bugs.webkit.org/show_bug.cgi?id=231836
<rdar://problem/84317842>

Reviewed by Brent Fulgham.

Add telemetry for system calls in WP to understand in which context they are being used.

  • WebProcess/com.apple.WebProcess.sb.in:
7:59 PM Changeset in webkit [285560] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS][GPUP] Remove shared memory access
https://bugs.webkit.org/show_bug.cgi?id=232281
<rdar://problem/84635475>

Reviewed by Darin Adler.

Based on telemetry, remove shared memory access in the GPU process' sandbox on macOS.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
7:29 PM Changeset in webkit [285559] by Alan Coon
  • 7 edits in branches/safari-612-branch/Source

Apply patch. rdar://problem/85165713

7:29 PM Changeset in webkit [285558] by Alan Coon
  • 5 edits in branches/safari-612-branch

Cherry-pick r285389. rdar://problem/84380291

Integrator's note: excluded changes to Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm.

AX: WebKit1 PluginViewBase objects with an associated widget()->platformWidget() should be considered attachments
https://bugs.webkit.org/show_bug.cgi?id=232759

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-11-06
Reviewed by Chris Fleizach.

Source/WebCore:

In https://bugs.webkit.org/show_bug.cgi?id=229556 (AX: Make PDFs
loaded via <embed> accessible), we changed AccessibilityRenderObject::isAttachment
to return false if the underlying object represented a PluginViewBase
under the assumption that if a PluginViewBase existed, the object must
be a WebKit2 plugin. That assumption is wrong, because in certain
scenarios an object can be a WebKit1 PluginViewBase (e.g. attachments
inserted by WebKit1 webviews).

This patch changes isAttachment to only return false if the
PluginViewBase doesn't also have an associated platformWidget, which
should be present in WebKit1 only.

This patch also fixes a bug in the Mac -[WebAccessibilityObjectWrapper
subrole]. For objects with a role of group and no children, we
returned a subrole of AXEmptyGroup. However, we didn't check for the
presence of renderWidgetChildren that a group may have.

  • accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isAttachment const): Consider PluginViewBase objects with an associated platformWidget to be attachments.
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (-[WebAccessibilityObjectWrapper subrole]): Don't return AXEmptyGroup subrole for objects with renderWidgetChildren.

LayoutTests:

This patch changes the Mac WebAccessibilityObjectWrapper to not return
an AXEmptyGroup subrole for objects with renderWidgetChildren.

  • accessibility/mac/basic-embed-pdf-accessibility-expected.txt:
  • accessibility/mac/basic-embed-pdf-accessibility.html: Add expectation that the embed container doesn't have an AXEmptyGroup subrole.

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

7:29 PM Changeset in webkit [285557] by Alan Coon
  • 11 edits
    1 add in branches/safari-612-branch/Source/WebCore

Cherry-pick r285318. rdar://problem/85168068

[Cocoa] Migrate from CTFontCopyVariationAxes() to CTFontCopyVariationAxesInternal() if possible
https://bugs.webkit.org/show_bug.cgi?id=232690

Reviewed by Simon Fraser and Cameron McCormack.

Source/WebCore:

CTFontCopyVariationAxesInternal() is faster than CTFontCopyVariationAxes(), but the strings
it provides are not localized. Luckily, we don't actually use the strings in the common case,
so we can migrate to CTFontCopyVariationAxesInternal() safely.

No new tests because there is no behavior change.

  • platform/graphics/cocoa/FontCacheCoreText.cpp: (WebCore::variationAxes): (WebCore::defaultVariationValues): (WebCore::preparePlatformFont):
  • platform/graphics/cocoa/FontCacheCoreText.h:
  • platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::variationAxes const):

Source/WebCore/PAL:

  • pal/spi/cf/CoreTextSPI.h:

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

7:28 PM Changeset in webkit [285556] by Alan Coon
  • 21 edits
    1 add in branches/safari-612-branch

Cherry-pick r285169. rdar://problem/83950623

AX: WebKit needs to include NSAccessibilityChildrenInNavigationOrderAttribute in accessibilityAttributeNames
https://bugs.webkit.org/show_bug.cgi?id=232595

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-11-02
Reviewed by Andres Gonzalez.

This patch adds NSAccessibilityChildrenInNavigationOrderAttribute
(a.k.a. AXChildrenInNavigationOrder) to
WebAccessibilityObjectWrapperMac::accessibilityAttributeNames. The Mac
wrapper supported this attribute prior to this patch, but we didn't
advertise that we supported it because we didn't include it in our
exported attribute names.

Source/WebCore:

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Add NSAccessibilityChildrenInNavigationOrderAttribute to list of base supported attributes.

LayoutTests:

  • accessibility/image-link-expected.txt:
  • accessibility/image-map2-expected.txt:
  • accessibility/internal-link-anchors2-expected.txt:
  • accessibility/mac/aria-columnrowheaders-expected.txt:
  • accessibility/mac/bounds-for-range-expected.txt:
  • accessibility/mac/document-attributes-expected.txt:
  • accessibility/mac/document-links-expected.txt:
  • accessibility/mac/internal-link-anchors-expected.txt:
  • accessibility/math-multiscript-attributes-expected.txt:
  • accessibility/table-attributes-expected.txt:
  • accessibility/table-cell-spans-expected.txt:
  • accessibility/table-cells-expected.txt:
  • accessibility/table-detection-expected.txt:
  • accessibility/table-one-cell-expected.txt:
  • accessibility/table-sections-expected.txt:
  • accessibility/table-with-rules-expected.txt:
  • accessibility/transformed-element-expected.txt:
  • platform/mac/accessibility/lists-expected.txt:
  • platform/mac/accessibility/parent-delete-expected.txt: Add expected AXChildrenInNavigationOrder attribute output.

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

7:28 PM Changeset in webkit [285555] by Alan Coon
  • 60 edits in branches/safari-612-branch/Source

Cherry-pick r284453. rdar://problem/85034820

cachedCGColor() and nsColor() should return smart pointers
https://bugs.webkit.org/show_bug.cgi?id=231909

Reviewed by Tim Horton.

r276283 attempted to make cachedCGColor() and nsColor() thread-safe but the fix was incomplete
since those functions return unretained objects that can be released from the cache on any
other thread. This patch updates cachedCGColor() and nsColor() to return a RetainPtr to address
the issue.

Source/WebCore:

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (AXAttributeStringSetStyle):
  • editing/cocoa/FontAttributesCocoa.mm: (WebCore::FontAttributes::createDictionary const):
  • editing/cocoa/FontShadowCocoa.mm: (WebCore::FontShadow::createShadow const):
  • editing/cocoa/HTMLConverter.mm: (HTMLConverter::convert): (HTMLConverter::_colorForElement): (HTMLConverter::computedAttributesForElement): (HTMLConverter::_fillInBlock): (HTMLConverter::_processElement): (WebCore::editingAttributedString):
  • platform/graphics/Color.h:
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm: (WebCore::LocalSampleBufferDisplayLayer::initialize):
  • platform/graphics/ca/PlatformCALayer.cpp: (WebCore::PlatformCALayer::drawTextAtPoint const):
  • platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: (WebCore::PlatformCAFilters::setFiltersOnLayer):
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: (WebCore::PlatformCALayerCocoa::setBackgroundColor): (WebCore::PlatformCALayerCocoa::setBorderColor):
  • platform/graphics/cg/ColorCG.cpp: (WebCore::cachedCGColor):
  • platform/graphics/cg/GradientCG.cpp: (WebCore::Gradient::createCGGradient):
  • platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::setCGFillColor): (WebCore::setCGShadow): (WebCore::GraphicsContextCG::didUpdateState):
  • platform/graphics/cocoa/ColorCocoa.h:
  • platform/graphics/cocoa/ColorCocoa.mm: (WebCore::platformColor):
  • platform/graphics/cocoa/FontCacheCoreText.cpp: (WebCore::addAttributesForCustomFontPalettes):
  • platform/graphics/cocoa/GraphicsContextCocoa.mm: (WebCore::drawFocusRingAtTime): (WebCore::colorForMarkerLineStyle): (WebCore::GraphicsContextCG::drawDotsForDocumentMarker):
  • platform/graphics/mac/ColorMac.h:
  • platform/graphics/mac/ColorMac.mm: (WTF::RetainPtr<NSColor>>::createValueForKey): (WebCore::nsColor):
  • platform/mac/LocalDefaultSystemAppearance.mm: (WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance):
  • platform/mac/PlatformPasteboardMac.mm: (WebCore::PlatformPasteboard::setColor):
  • platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarThemeMac::setUpOverhangAreaBackground):
  • platform/mac/ThemeMac.mm: (WebCore::drawCellFocusRingWithFrameAtTime):
  • rendering/RenderThemeMac.mm: (WebCore::AttachmentLayout::layOutTitle): (WebCore::AttachmentLayout::layOutSubtitle):
  • testing/cocoa/WebViewVisualIdentificationOverlay.mm: (-[WebViewVisualIdentificationOverlay initWithWebView:kind:deprecated:]): (drawPattern):

Source/WebKit:

  • Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm: (WebKit::cgColorFromColor): (WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView themeColor]): (-[WKWebView underPageBackgroundColor]): (-[WKWebView _pageExtendedBackgroundColor]): (-[WKWebView _sampledPageTopColor]):
  • UIProcess/API/Cocoa/_WKApplicationManifest.mm: (-[_WKApplicationManifest themeColor]):
  • UIProcess/API/mac/WKView.mm: (-[WKView underlayColor]): (-[WKView _pageExtendedBackgroundColor]):
  • UIProcess/API/mac/WKWebViewMac.mm: (-[WKWebView _underlayColor]):
  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::updateTextTouchBar): (WebKit::WebViewImpl::underlayColor const): (WebKit::WebViewImpl::pageExtendedBackgroundColor const):
  • UIProcess/PDF/WKPDFHUDView.mm: (-[WKPDFHUDView _setupLayer:]):
  • UIProcess/mac/WebColorPickerMac.mm: (WebKit::WebColorPickerMac::setSelectedColor): (WebKit::WebColorPickerMac::showColorPicker): (-[WKColorPopoverMac setAndShowPicker:withColor:suggestions:]):
  • WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::setAccentColor):
  • WebProcess/cocoa/VideoFullscreenManager.mm: (WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):

Source/WebKitLegacy/mac:

  • DOM/DOMRGBColor.mm: (-[DOMRGBColor color]):
  • WebView/WebFrame.mm: (-[WebFrame _bodyBackgroundColor]):
  • WebView/WebView.mm: (-[WebView updateTextTouchBar]):

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

6:48 PM Changeset in webkit [285554] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

Unreviewed test gardening, skip failing test.
https://bugs.webkit.org/show_bug.cgi?id=231084
rdar://problem/83770133

Bug 230210 caused a progression on how we would detect stall during playback.
This exposed an issue with the existing test where it could fail differently
if a temporary stall occurred.
This test can't pass as we do not support change of resolution mid-stream
in plain mp4 playback (see bug 232916)

Patch by Jean-Yves Avenard <jyavenard@gmail.com> on 2021-11-09

  • platform/ios-simulator-wk2/TestExpectations:
  • platform/mac/TestExpectations:
6:44 PM Changeset in webkit [285553] by Alan Coon
  • 14 edits in branches/safari-613.1.8-branch

Cherry-pick r285538. rdar://problem/85234466

Unreviewed, reverting r285246.
https://bugs.webkit.org/show_bug.cgi?id=232907

Broke FixedVector

Reverted changeset:

"[JSC] Clean up StructureStubInfo initialization"
https://bugs.webkit.org/show_bug.cgi?id=232652
https://commits.webkit.org/r285246

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

5:57 PM Changeset in webkit [285552] by mmaxfield@apple.com
  • 11 edits
    1 add in trunk/Source/WebCore

[Cocoa] Migrate from CTFontCopyVariationAxes() to CTFontCopyVariationAxesInternal() if possible
https://bugs.webkit.org/show_bug.cgi?id=232690

Reviewed by Simon Fraser and Cameron McCormack.

Source/WebCore:

CTFontCopyVariationAxesInternal() is faster than CTFontCopyVariationAxes(), but the strings
it provides are not localized. Luckily, we don't actually use the strings in the common case,
so we can migrate to CTFontCopyVariationAxesInternal() safely.

No new tests because there is no behavior change.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • inspector/agents/InspectorCSSAgent.cpp:

(WebCore::buildObjectForFont):

  • platform/graphics/FontPlatformData.cpp:

(WebCore::FontPlatformData::variationAxes const):

  • platform/graphics/FontPlatformData.h:
  • platform/graphics/ShouldLocalizeAxisNames.h: Added.
  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::variationAxes):
(WebCore::defaultVariationValues):
(WebCore::preparePlatformFont):
(WebCore::variationCapabilitiesForFontDescriptor):

  • platform/graphics/cocoa/FontCacheCoreText.h:
  • platform/graphics/cocoa/FontPlatformDataCocoa.mm:

(WebCore::FontPlatformData::variationAxes const):

Source/WebCore/PAL:

  • pal/spi/cf/CoreTextSPI.h:
5:39 PM Changeset in webkit [285551] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS][GPUP] Block access to mapping of executables
https://bugs.webkit.org/show_bug.cgi?id=232257
<rdar://problem/84623297>

Reviewed by Brent Fulgham.

Block access to mapping of certain executables in the GPU process on macOS.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
5:25 PM Changeset in webkit [285550] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

REGRESSION (Safari 15): AudioContext.currentTime speeds up (and audio won't play) when Bluetooth speaker connected
https://bugs.webkit.org/show_bug.cgi?id=232728
<rdar://problem/85075538>

Reviewed by Jer Noble.

This was a regression from us moving WebAudio to the GPUProcess in Safari 15. The issue occurred because the
WebProcess (writer) would get further and further ahead of the GPUProcess (reader) after a hardware sample
rate change.

When rendering on https://mdn.github.io/webaudio-examples/audiocontext-states/ with a hardware sample rate of
96Khz, RemoteAudioDestination::render() would get called with a numberOfFrame=128. Each time
RemoteAudioDestination::render() was called, it would signal the IPC semaphore, causing the WebProcess to
produce one WebAudio rendering quantum (128 frames). This would match perfectly and there would be no issues.
However, if during playback, the hardware sample rate changes (which can happen when connecting to bluetooth
speakers), CoreAudio would start calling RemoteAudioDestination::render() with a different numberOfFrame.
For example, when switching the hardware sample rate to 44.1Khz, numberOfFrames would be 278. Every time it
is called, render() would signal the semaphore 3 times, causing the WebProcess to produce 3 WebAudio rendering
quantums (3 * 128 = 384 frames). So each time render() is called, the WebProcess would generate 384 - 278 = 105
frames too many, causing it to get further and further ahead of the GPUProcess. One symptom would be that
AudioContext.currentTime would progress too fast. Also, eventually, our RingBuffer between the 2 process would
fill up and lead to rendering issues.

To address the issue, I updated RemoteAudioDestination::render() to keep track of how many extra samples it
requested from the WebProcess previously. This avoids signalling the IPC semaphore too many times and the
WebProcess can no longer get too far ahead of the GPUProcess. The logic matches what was already done in
RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit::render().

  • GPUProcess/media/RemoteAudioDestinationManager.cpp:
5:17 PM Changeset in webkit [285549] by Megan Gardner
  • 9 edits in trunk

Turn on selection flipping by default.
https://bugs.webkit.org/show_bug.cgi?id=232853

Reviewed by Wenson Hsieh.

Source/WTF:

  • Scripts/Preferences/WebPreferencesInternal.yaml:

LayoutTests:

  • fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-right-to-change-selected-text.html:
  • fast/events/touch/ios/long-press-on-editable-content-then-drag-down-to-change-selected-text-expected.txt:
  • fast/events/touch/ios/long-press-on-editable-content-then-drag-down-to-change-selected-text.html:
  • fast/events/touch/ios/long-press-on-editable-content-then-drag-up-to-change-selected-text-expected.txt:
  • fast/events/touch/ios/long-press-on-editable-content-then-drag-up-to-change-selected-text.html:
  • fast/events/touch/ios/long-press-then-drag-right-to-change-selected-text.html:
5:09 PM Changeset in webkit [285548] by commit-queue@webkit.org
  • 25 edits in trunk

Unreviewed, reverting r285536.
https://bugs.webkit.org/show_bug.cgi?id=232915

causes API test crashes

Reverted changeset:

"[CF] Reduce duplication and unneeded buffer allocations and
copying in URL code, also remove unused methods and functions"
https://bugs.webkit.org/show_bug.cgi?id=232220
https://commits.webkit.org/r285536

5:05 PM Changeset in webkit [285547] by achristensen@apple.com
  • 120 edits
    5 adds in trunk/Tools

Unify build of TestWebKitAPI/Tests/WebKitCocoa
https://bugs.webkit.org/show_bug.cgi?id=232768

Reviewed by Tim Horton.

I found that the Fullscreen.LayoutConstraints was not being built because FullscreenLayoutConstraints.mm was not being built.
Now that it is being built it times out, so I disabled it.

  • TestWebKitAPI/DeprecatedGlobalValues.cpp: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm.

(resetGlobalState):

  • TestWebKitAPI/DeprecatedGlobalValues.h: Copied from Tools/TestWebKitAPI/Tests/WebKit/AboutBlankLoad.cpp.
  • TestWebKitAPI/DeprecatedGlobalValues.mm: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm.
  • TestWebKitAPI/Scripts/generate-unified-sources.sh:
  • TestWebKitAPI/Sources.txt:
  • TestWebKitAPI/SourcesCocoa.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/AVFoundationPreference.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/AdditionalReadAccessAllowedURLs.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ApplePay.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/AsyncPolicyForNavigationResponse.mm:

(-[TestAsyncNavigationDelegate webView:didFinishNavigation:]):
(-[TestAsyncNavigationDelegate webView:didFailNavigation:withError:]):
(-[TestAsyncNavigationDelegate webView:didFailProvisionalNavigation:withError:]):

  • TestWebKitAPI/Tests/WebKitCocoa/BundleParameters.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:

(-[ChallengeDelegate webView:didFinishNavigation:]):
(-[ClientCertificateDelegate webView:didFinishNavigation:]):
(-[ProposedCredentialDelegate webView:didFinishNavigation:]):
(-[ServerTrustDelegate webView:didFailProvisionalNavigation:withError:]):
(-[ServerTrustDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]):

  • TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm:

(WebKit2_CommandBackForwardTestWKView::SetUp):
(WebKit2_CommandBackForwardTestWKView::loadFiles):
(TEST_F):

  • TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm:

(-[TestContextMenuUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]):
(-[TestContextMenuAPIBeforeSPIUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]):
(-[TestContextMenuAPIBeforeSPIUIDelegate _webView:contextMenuConfigurationForElement:completionHandler:]):
(-[TestContextMenuImageUIDelegate _webView:contextMenuConfigurationForElement:completionHandler:]):
(-[TestContextMenuSuggestedActionsUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]):

  • TestWebKitAPI/Tests/WebKitCocoa/CookieAcceptPolicy.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm:

(createWebViewWithCustomPasteboardDataEnabled): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/CopyURL.mm:

(createWebViewWithCustomPasteboardDataEnabled): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/CustomUserAgent.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm:

(-[DecidePolicyForNavigationActionController webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/DeviceOrientation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/DoubleDefersLoading.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/DuplicateCompletionHandlerCalls.mm:

(-[DuplicateCompletionHandlerCallsDelegate webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:]):

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ExitPiPOnSuspendVideoElement.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/GetDisplayMedia.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/IDBObjectStoreInfoUpgradeToV2.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:

(-[IPCTestingAPIDelegate webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:]):

  • TestWebKitAPI/Tests/WebKitCocoa/IconLoadingDelegate.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

(-[AppBoundDomainDelegate webView:didFailProvisionalNavigation:withError:]):
(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm:

(-[DatabaseProcessKillMessageHandler userContentController:didReceiveScriptMessage:]):
(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBFileName.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBInPageCache.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBStructuredCloneBackwardCompatibility.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBSuspendImminently.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBTempFileSize.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBUserDelete.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/JavaScriptDuringNavigation.mm:

(-[JSNavigationDelegate webView:didFinishNavigation:]):

  • TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm:

(-[LoadAlternateHTMLStringFromProvisionalLoadErrorController webView:didStartProvisionalNavigation:]):

  • TestWebKitAPI/Tests/WebKitCocoa/LoadFileThenReload.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/LocalStorageClear.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/LocalStorageDatabaseTracker.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/LocalStorageNullEntries.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm:

(-[LocalStorageNavigationDelegate webView:didFinishNavigation:]):
(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/LocalStorageQuirkTest.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/MediaSession.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ModalAlerts.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:

(-[BroadcastChannelMessageHandler userContentController:didReceiveScriptMessage:]):
(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/NetworkProcessCrashNonPersistentDataStore.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/NotificationAPI.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PDFLinkReferrer.mm:

(emptyReleaseInfoCallback):

  • TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm:

(createWebViewWithCustomPasteboardDataEnabled): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm:

(createWebViewWithCustomPasteboardDataEnabled): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/PasteboardUtilities.h: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm.
  • TestWebKitAPI/Tests/WebKitCocoa/PasteboardUtilities.mm: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm.

(createWebViewWithCustomPasteboardDataEnabled):

  • TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PrepareForMoveToWindow.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

(-[PSONNavigationDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]):
(-[PSONNavigationDelegate webView:didStartProvisionalNavigation:]):
(-[PSONNavigationDelegate webView:didCommitNavigation:]):
(-[PSONUIDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):

  • TestWebKitAPI/Tests/WebKitCocoa/ProvisionalURLNotChange.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:

(-[ProxyDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]):

  • TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm:

(-[QuickLookDelegate navigationError]):
(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/RequiresUserActionForPlayback.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/RunOpenPanel.mm:

(-[RunOpenPanelUIDelegate webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:

(-[SafeBrowsingNavigationDelegate webView:didCommitNavigation:]):
(-[WKWebViewGoBackNavigationDelegate webView:didFinishNavigation:]):

  • TestWebKitAPI/Tests/WebKitCocoa/SchemeRegistry.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

(-[TestSWAsyncNavigationDelegate webView:didFinishNavigation:]):
(-[TestSWAsyncNavigationDelegate webView:didFailNavigation:withError:]):
(-[TestSWAsyncNavigationDelegate webView:didFailProvisionalNavigation:withError:]):

  • TestWebKitAPI/Tests/WebKitCocoa/ShouldOpenExternalURLsInNewWindowActions.mm:

(-[ShouldOpenExternalURLsInNewWindowActionsController webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/SpeechRecognition.mm:

(-[SpeechRecognitionNavigationDelegate webView:didFinishNavigation:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/StoreBlobThenDelete.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/TopContentInset.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:

(-[UITestDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
(-[ModalDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):

  • TestWebKitAPI/Tests/WebKitCocoa/UploadDirectory.mm:

(-[UploadDelegate webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]):

  • TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/UserInitiatedActionInNavigationAction.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/UserMediaDisabled.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm:

(resetInspectorGlobalState):
(-[UIDelegateForTesting _webView:configurationForLocalInspector:]):
(TEST):
(resetGlobalState): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm:

(resetGlobalState): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm:

(resetGlobalState): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionHost.mm:

(resetGlobalState): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm:

(-[NavigationResponseTestDelegate webView:didFinishNavigation:]):

  • TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:

(-[RedirectSchemeHandler webView:didReceiveServerRedirectForProvisionalNavigation:]):

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDiagnosticLogging.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFindString.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSnapshot.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:

(-[BasicNavigationDelegateWithoutCrashHandler webView:didStartProvisionalNavigation:]):

  • TestWebKitAPI/Tests/WebKitCocoa/WebProcessKillIDBCleanup.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WebSQLBasics.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(-[PopUpPoliciesDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):

  • TestWebKitAPI/Tests/WebKitCocoa/_WKInputDelegate.mm:
  • TestWebKitAPI/Tests/WebKitLegacy/ios/DateTimeInputsAccessoryViewTests.mm:
  • TestWebKitAPI/Tests/WebKitLegacy/ios/PreemptVideoFullscreen.mm:
  • TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm:
  • TestWebKitAPI/Tests/WebKitLegacy/ios/WebGLPrepareDisplayOnWebThread.mm:
  • TestWebKitAPI/Tests/WebKitLegacy/mac/AccessingPastedImage.mm:
  • TestWebKitAPI/Tests/WebKitLegacy/mac/ClosingWebView.mm:
  • TestWebKitAPI/Tests/WebKitLegacy/mac/DeallocWebViewInEventListener.mm:
  • TestWebKitAPI/Tests/WebKitLegacy/mac/DownloadThread.mm:
  • TestWebKitAPI/Tests/WebKitObjC/CustomProtocolsTest.mm:
  • TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm:

(-[AsyncPolicyDelegateForInsetTest webView:didFinishNavigation:]):

  • TestWebKitAPI/Tests/mac/ContentFiltering.mm:
5:03 PM Changeset in webkit [285546] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS][GPUP] Add syscalls to sandbox
https://bugs.webkit.org/show_bug.cgi?id=232211
<rdar://problem/84584880>

Reviewed by Darin Adler.

Based on telemetry, add syscalls to the GPU process' sandbox on iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
4:52 PM Changeset in webkit [285545] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS][GPUP] Remove sandbox access to mach services
https://bugs.webkit.org/show_bug.cgi?id=232209
<rdar://problem/84584739>

Reviewed by Darin Adler.

Remove access to mach services in the GPU process' sandbox that are unused according to telemetry.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
4:45 PM Changeset in webkit [285544] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

[WebXR] three.js demos don't work
https://bugs.webkit.org/show_bug.cgi?id=232798
rdar://83559881

Reviewed by Myles C. Maxfield.

Any content using three.js for WebXR was failing for
a couple of reasons. Firstly, we were not correctly
restoring the framebuffer, read, draw and texture
bindings in the native code, and three.js was correctly
assuming it didn't need to rebind.

Secondly, we were not resolving the multisample
framebuffer if the context was created with no alpha.
The issue is that our framebuffer from XR always has
an alpha channel, and you can't blit from RGB to RGBA.

  • Modules/webxr/WebXROpaqueFramebuffer.cpp:

(WebCore::WebXROpaqueFramebuffer::startFrame): Make sure to restore the
bound texture target when exiting the function. Also ensure that we
tell the resolved FBO where its texture data comes from.
(WebCore::WebXROpaqueFramebuffer::endFrame): Restore the framebuffer binding.
(WebCore::WebXROpaqueFramebuffer::setupFramebuffer): Use the correct format.

4:40 PM Changeset in webkit [285543] by Said Abou-Hallawa
  • 51 edits
    2 adds in trunk/Source/WebCore

[GPU Process] Introduce FilterFunction and make it the base class of Filter and FilterEffect
https://bugs.webkit.org/show_bug.cgi?id=232413
rdar://84966765

Reviewed by Myles C. Maxfield.

This allows CSSFilter to hold a list of FilterFunctions. The Filter in
this case will act like a composite pattern of FilterEffects.

This patch also

  1. Removes the virtual function filterName() from all the FilterEffect classes. It replaces it with a static function in FilterFunction.
  2. Removes the virtual function filterEffectType() and the function FilterEffect::filterEffectClassType() since they can both be replaced by FilterFunction::filterType().
  3. Adds trait macros for all FilterEffects and the SVGFilters class.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/coreimage/FilterEffectRendererCoreImage.mm:

(WebCore::FilterEffectRendererCoreImage::supportsCoreImageRendering):
(WebCore::FilterEffectRendererCoreImage::connectCIFilters):

  • platform/graphics/filters/FEBlend.cpp:

(WebCore::FEBlend::FEBlend):

  • platform/graphics/filters/FEBlend.h:

(): Deleted.

  • platform/graphics/filters/FEColorMatrix.cpp:

(WebCore::FEColorMatrix::FEColorMatrix):

  • platform/graphics/filters/FEColorMatrix.h:

(isType): Deleted.

  • platform/graphics/filters/FEComponentTransfer.cpp:

(WebCore::FEComponentTransfer::FEComponentTransfer):

  • platform/graphics/filters/FEComponentTransfer.h:

(isType): Deleted.

  • platform/graphics/filters/FEComposite.cpp:

(WebCore::FEComposite::FEComposite):

  • platform/graphics/filters/FEComposite.h:
  • platform/graphics/filters/FEConvolveMatrix.cpp:

(WebCore::FEConvolveMatrix::FEConvolveMatrix):

  • platform/graphics/filters/FEConvolveMatrix.h:
  • platform/graphics/filters/FEDiffuseLighting.cpp:

(WebCore::FEDiffuseLighting::FEDiffuseLighting):

  • platform/graphics/filters/FEDiffuseLighting.h:
  • platform/graphics/filters/FEDisplacementMap.cpp:

(WebCore::FEDisplacementMap::FEDisplacementMap):

  • platform/graphics/filters/FEDisplacementMap.h:
  • platform/graphics/filters/FEDropShadow.cpp:

(WebCore::FEDropShadow::FEDropShadow):

  • platform/graphics/filters/FEDropShadow.h:

(): Deleted.

  • platform/graphics/filters/FEFlood.cpp:

(WebCore::FEFlood::FEFlood):

  • platform/graphics/filters/FEFlood.h:
  • platform/graphics/filters/FEGaussianBlur.cpp:

(WebCore::FEGaussianBlur::FEGaussianBlur):

  • platform/graphics/filters/FEGaussianBlur.h:

(): Deleted.

  • platform/graphics/filters/FELighting.h:
  • platform/graphics/filters/FEMerge.cpp:

(WebCore::FEMerge::FEMerge):

  • platform/graphics/filters/FEMerge.h:

(): Deleted.

  • platform/graphics/filters/FEMorphology.cpp:

(WebCore::FEMorphology::FEMorphology):

  • platform/graphics/filters/FEMorphology.h:
  • platform/graphics/filters/FEOffset.cpp:

(WebCore::FEOffset::FEOffset):

  • platform/graphics/filters/FEOffset.h:

(): Deleted.

  • platform/graphics/filters/FESpecularLighting.cpp:

(WebCore::FESpecularLighting::FESpecularLighting):

  • platform/graphics/filters/FESpecularLighting.h:
  • platform/graphics/filters/FETile.cpp:

(WebCore::FETile::FETile):
(WebCore::FETile::platformApplySoftware):

  • platform/graphics/filters/FETile.h:
  • platform/graphics/filters/FETurbulence.cpp:

(WebCore::FETurbulence::FETurbulence):

  • platform/graphics/filters/FETurbulence.h:
  • platform/graphics/filters/Filter.h:

(WebCore::Filter::Filter):

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::FilterEffect):
(WebCore::FilterEffect::determineFilterPrimitiveSubregion):
(WebCore::FilterEffect::createImageBufferResult):
(WebCore::FilterEffect::createUnmultipliedImageResult):
(WebCore::FilterEffect::createPremultipliedImageResult):

  • platform/graphics/filters/FilterEffect.h:

(isType):
(WebCore::FilterEffect::filterEffectType const): Deleted.
(WebCore::FilterEffect::filterEffectClassType const): Deleted.

  • platform/graphics/filters/FilterFunction.cpp: Added.

(WebCore::FilterFunction::FilterFunction):
(WebCore::FilterFunction::filterName):

  • platform/graphics/filters/FilterFunction.h: Added.

(WebCore::FilterFunction::filterType const):
(WebCore::FilterFunction::isCSSFilter const):
(WebCore::FilterFunction::isSVGFilter const):
(WebCore::FilterFunction::isFilter const):
(WebCore::FilterFunction::isFilterEffect const):
(WebCore::FilterFunction::sourceAlphaName):
(WebCore::FilterFunction::sourceGraphicName):
(WebCore::FilterFunction::filterName const):

  • platform/graphics/filters/SourceAlpha.cpp:

(WebCore::SourceAlpha::SourceAlpha):
(WebCore::SourceAlpha::effectName): Deleted.

  • platform/graphics/filters/SourceAlpha.h:

(WebCore::SourceAlpha::effectName):
(): Deleted.

  • platform/graphics/filters/SourceGraphic.cpp:

(WebCore::SourceGraphic::effectName): Deleted.

  • platform/graphics/filters/SourceGraphic.h:

(WebCore::SourceGraphic::effectName):
(WebCore::SourceGraphic::SourceGraphic):
(): Deleted.
(isType): Deleted.

  • platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:
  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::CSSFilter):

  • svg/graphics/filters/SVGFEImage.cpp:

(WebCore::FEImage::FEImage):

  • svg/graphics/filters/SVGFEImage.h:
  • svg/graphics/filters/SVGFilter.cpp:

(WebCore::SVGFilter::SVGFilter):

  • svg/graphics/filters/SVGFilter.h:

(isType):

  • svg/graphics/filters/SVGFilterBuilder.cpp:
4:38 PM Changeset in webkit [285542] by ysuzuki@apple.com
  • 6 edits
    1 add in branches/safari-612-branch

[JSC] Don't branch around register allocation in DFG enumerator get by val
https://bugs.webkit.org/show_bug.cgi?id=232260
rdar://84544469

Reviewed by Robin Morisset.

JSTests:

  • stress/dont-branch-around-regalloc-enumerator-get-by-val-float.js: Added.

(foo):

Source/JavaScriptCore:

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByValOnString):
(JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
(JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
(JSC::DFG::SpeculativeJIT::compileGetByValForObjectWithString):
(JSC::DFG::SpeculativeJIT::compileGetByValForObjectWithSymbol):
(JSC::DFG::SpeculativeJIT::compileGetByValOnDirectArguments):
(JSC::DFG::SpeculativeJIT::compileGetByValOnScopedArguments):
(JSC::DFG::SpeculativeJIT::compileEnumeratorGetByVal):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByVal):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByVal):
(JSC::DFG::SpeculativeJIT::compile):

Canonical link: https://commits.webkit.org/243528@main

4:29 PM Changeset in webkit [285541] by ysuzuki@apple.com
  • 6 edits
    1 add in branches/safari-612-branch

EnumeratorGetByVal for IndexedMode+OwnStructureMode doesn't always recover the property name
https://bugs.webkit.org/show_bug.cgi?id=231321
<rdar://problem/84211697>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/enumerator-get-by-val-needs-to-recover-property-name.js: Added.

Source/JavaScriptCore:

When running an EnumeratorGetByVal in IndexedMode+OwnStructureMode, we may
go to the slow path. However, we were incorrectly going to the slow path
before recovering the actual property name. Instead, we were passing in
the integer index value to the get by val.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileEnumeratorGetByVal):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

Canonical link: https://commits.webkit.org/243803@main

4:03 PM Changeset in webkit [285540] by Alan Coon
  • 7 edits in branches/safari-613.1.7-branch/Source

Cherry-pick r285164. rdar://problem/85227922

WebDriver: [Cocoa] support acceptInsecureCerts capability
https://bugs.webkit.org/show_bug.cgi?id=231789

Reviewed by BJ Burg.

Add necessary plumbing to support the acceptInsecureCerts WebDriver capability.

Source/JavaScriptCore:

  • inspector/remote/RemoteInspectorConstants.h:
  • inspector/remote/cocoa/RemoteInspectorCocoa.mm: (Inspector::RemoteInspector::receivedAutomationSessionRequestMessage):

Source/WebKit:

  • UIProcess/API/Cocoa/_WKAutomationSessionConfiguration.h:
  • UIProcess/API/Cocoa/_WKAutomationSessionConfiguration.mm: (-[_WKAutomationSessionConfiguration init]): (-[_WKAutomationSessionConfiguration copyWithZone:]):
  • UIProcess/Cocoa/AutomationClient.mm: (WebKit::AutomationClient::requestAutomationSession):

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

3:53 PM Changeset in webkit [285539] by Devin Rousso
  • 2 edits in trunk/Source/WebKit

Unreviewed internal build fix after r285444

  • Platform/spi/Cocoa/AppleMediaServicesSPI.h:
3:06 PM Changeset in webkit [285538] by commit-queue@webkit.org
  • 14 edits in trunk

Unreviewed, reverting r285246.
https://bugs.webkit.org/show_bug.cgi?id=232907

Broke FixedVector

Reverted changeset:

"[JSC] Clean up StructureStubInfo initialization"
https://bugs.webkit.org/show_bug.cgi?id=232652
https://commits.webkit.org/r285246

3:02 PM Changeset in webkit [285537] by J Pascoe
  • 2 edits in trunk/Source/WebKit

[WebAuthn] User handle is not saved on create via ASC
https://bugs.webkit.org/show_bug.cgi?id=232900
rdar://85216105

Reviewed by Brent Fulgham.

This value is required to be stored along the credential on create calls
such that it can be returned via get calls. Currently, it is always read
as empty because user.id is empty after ipc, while the id is decoded to
idVector.

  • UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:

(WebKit::configureRegistrationRequestContext):

2:58 PM Changeset in webkit [285536] by Darin Adler
  • 25 edits in trunk

[CF] Reduce duplication and unneeded buffer allocations and copying in URL code, also remove unused methods and functions
https://bugs.webkit.org/show_bug.cgi?id=232220

Reviewed by Alex Christensen.

Source/WebKit:

  • Shared/API/c/cf/WKURLCF.mm:

(WKURLCreateWithCFURL): Use bytesAsString, saving creation and destruction
of a CString each time this is called.

  • Shared/Cocoa/ArgumentCodersCocoa.mm:

(-[WKSecureCodingURLWrapper encodeWithCoder:]): Use bytesAsVector.

  • Shared/Cocoa/WKNSURLExtras.h: Removed unused methods

+[NSURL _web_URLWithWTFString:relativeToURL:] and
-[NSURL _web_originalDataAsWTFString].

  • Shared/Cocoa/WKNSURLExtras.mm:

(+[NSURL _web_URLWithWTFString:relativeToURL:]): Deleted.
(-[NSURL _web_originalDataAsWTFString]): Deleted.

  • Shared/Cocoa/WKNSURLRequest.mm:

(-[WKNSURLRequest URL]): Removed unneeded call to +[NSURL _web_URLWithWTFString:]
because this code is converting a WTF::URL to an NSURL, which can use the conversion
operator in the WTF::URL class.

  • Shared/cf/ArgumentCodersCF.cpp:

(IPC::ArgumentCoder<CFURLRef>::encode): Use bytesAsVector.

  • UIProcess/API/Cocoa/WKBrowsingContextController.mm:

(-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:userData:]):
Use bytesAsString and bridge_cast.
(-[WKBrowsingContextController loadHTMLString:baseURL:userData:]): Ditto.
(-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]): Ditto.
(setUpPagePolicyClient): Removed unneeded call to +[NSURL _web_URLWithWTFString:]
because this code is converting a WTF::URL to an NSURL, which can use the conversion
operator in the WTF::URL class.

  • UIProcess/Cocoa/LegacyDownloadClient.mm:

(WebKit::LegacyDownloadClient::willSendRequest): Removed unneeded call to
+[NSURL _web_URLWithWTFString:] because this code is converting a WTF::URL to an NSURL,
which can use the conversion operator in the WTF::URL class.

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:

(-[WKWebProcessPlugInFrame URL]): Ditto.

Source/WebKitLegacy/mac:

  • Misc/WebNSURLExtras.h: Tweaked comments a bit. No need to say methods are "new", since

that won't be true in the future. Removed unused methods
+[NSURL _web_URLWithUserTypedString:relativeToURL:],
+[NSURL _webkit_URLWithUserTypedString:relativeToURL:],
+[NSURL _web_URLWithData:], +[NSURL _web_URLWithData:relatveToURL:].
Wanted to remove even more nearly unused methods: many were used only
inside the WebKit project, in legacy plug-in code, and some seemed unused,
but it wasn't easy for me to quickly verify that.

  • Misc/WebNSURLExtras.mm: Removed "using namespace WebCore" and

"using namespace WTF".
(+[NSURL _web_URLWithUserTypedString:relativeToURL:]): Deleted.
(+[NSURL _web_URLWithUserTypedString:]): Use WTF prefix explicitly.
(+[NSURL _webkit_URLWithUserTypedString:relativeToURL:]): Deleted.
(+[NSURL _webkit_URLWithUserTypedString:]): Use WTF prefix explicitly.
(+[NSURL _web_URLWithDataAsString:]): Removed special case for nil since the code
will do the right thing with nil without an explicit check.
(+[NSURL _web_URLWithDataAsString:relativeToURL]): Ditto. Also formatted the code
as a one-liner.
(+[NSURL _web_URLWithData:]): Deleted.
(+[NSURL _web_URLWithData:relativeToURL:]): Deleted.
(-[NSURL _web_originalData]): Use WTF prefix explicitly.
(-[NSURL _web_originalDataAsString]): Ditto.
(-[NSURL _web_isEmpty]): Use bridge_cast and make code style checker happy by using
"!" instead of "== 0".
(-[NSURL _web_URLCString]): Use WTF prefix explicitly.
(-[NSURL _webkit_canonicalize]): Use WebCore prefix explicitly.
(-[NSURL _webkit_URLByRemovingFragment]): Use WTF prefix explicitly.
(-[NSURL _web_schemeSeparatorWithoutColon]): Deleted.
(-[NSURL _web_dataForURLComponentType:]): Deleted.
(-[NSURL _web_hostData]): Use WTF prefix explicitly. Rearranged for clarity and
slightly improved efficiency as well.
(-[NSString _web_isUserVisibleURL]): Use WTF prefix explicitly.
(-[NSString _webkit_stringByReplacingValidPercentEscapes]): Use WebCore prefix
explicitly.
(-[NSString _web_decodeHostName]): Use WTF prefix explicitly.
(-[NSString _web_encodeHostName]): Ditto.
(-[NSString _webkit_decodeHostName]): Ditto.
(-[NSString _webkit_encodeHostName]): Ditto.

Source/WTF:

  • wtf/URL.h: Removed unneeded includes. Use default instead of { }

for empty destructor. Added emptyCFURL function.

  • wtf/cf/CFURLExtras.cpp:

(WTF::bytesAsCFData): Added. Replaces originalURLData from NSURLExtras.mm,
but with a simpler implementation and more error checking. Here it's also
alongside the other nearly identical functions.
(WTF::bytesAsString): Added. Replaces getURLBytes for callers that are
going to turn the bytes into a WTF::String. Before this patch, the callers
were converting from CFURLRef to WTF::CString and then to WTF::String, so
this eliminates the malloc/free pair for CString.
(WTF::bytesAsVector): Added. Replaces getURLBytes using a return value
instead of an out argument. Adds the optimization of filling the buffer if
the inline capacity is sufficient, which was in originalURLData, but not
here in getURLBytes before.
(WTF::isSameOrigin): Renamed from isCFURLSameOrigin and rewrote this to
have fewer type casts and more parallel structure so it's easier to read,
while adapting it to use bytesAsVector.

  • wtf/cf/CFURLExtras.h: Replaced URLCharBuffer, getURLBytes, and

isCFURLSameOrigin with URLBytesVectorInlineCapacity, bytesAsCFData,
bytesAsString, bytesAsVector, and isSameOrigin. Got rid of unneeded
includes.

  • wtf/cf/URLCF.cpp:

(WTF::URL::URL): Use bytesAsString to streamline implementation and
remove allocation/deallcation of a CString.
(WTF::URL::emptyCFURL): Added. Used to refactor createCFURL so we can
share it across Foundation and non-Foundation versions.
(WTF::URL::createCFURL const): Added the logic that was in the version
in URLCocoa.mm so we can share this single version, and removed the #if
surrounding this.
(WTF::URL::fileSystemPath const): Use auto.

  • wtf/cocoa/NSURLExtras.h: Changed URLWithUserTypedString to ignore

the baseURL argument. It's not used, but the function is exported and
currently used in Safari source code, which, like all callers passes
a nil for baseURL. so, for now left the argument. Removed the baseURL
argument from URLWithUserTypedStringDeprecated. Removed unused functions
rangeOfURLScheme and looksLikeAbsoluteURL.

  • wtf/cocoa/NSURLExtras.mm: Removed "using namespace URLHelpers".

(WTF::readIDNAllowedScriptListFile): Use URLHelpers explicitly.
(WTF::decodeHostName): Ditto.
(WTF::encodeHostName): Ditto.
(WTF::URLByTruncatingOneCharacterBeforeComponent): Simplified by using
the bytesAsVector function.
(WTF::URLByRemovingResourceSpecifier): Deleted.
(WTF::URLWithData): Call URLByTruncatingOneCharacterBeforeComponent
directly.
(WTF::URLWithUserTypedString): Removed the unneeded support for a
base URL. Use URLHelpers explicitly.
(WTF::URLWithUserTypedStringDeprecated): Ditto.
(WTF::hasQuestionMarkOnlyQueryString): Use bridge_cast.
(WTF::dataForURLComponentType): Rearranged to simplify a bit, remove support
for special value for CFURLComponentType that means the complete URL, since
no callers were using that, and use bytesAsVector.
(WTF::URLByRemovingComponentAndSubsequentCharacter): Use bridge_cast and
bytesAsVector.
(WTF::originalURLData): Use bridge_cast and bytesAsCFData.
(WTF::userVisibleString): Use URLHelpers explicitly.
(WTF::isUserVisibleURL): Rewrote for simplicity and coding style; since
the local characters are a null-terminated C string, we don't need
length checks as long as we validate characters first, since a '\0'
character can be read and will not be valid.
(WTF::rangeOfURLScheme): Deleted.
(WTF::looksLikeAbsoluteURL): Deleted.

  • wtf/cocoa/URLCocoa.mm:

(WTF::URL::URL): Changed to just call the CFURLRef constructor so we
don't need to repeat things twice.
(WTF::URL::emptyCFURL): Added. This is the one part of the createCFURL
function that depends on Objective-C.
(WTF::URL::createCFURL const): Merged into the function in URLCF.cpp.
(WTF::makeNSArrayElement): Use bridge_cast instead of the trickier
idiom with explicit calls to leakRef and bridge_transfer.

  • wtf/mac/FileSystemMac.mm:

(WTF::FileSystem::setMetadataURL): Updated since URLWithUserTypedString
no longer requires a baseURL of nil to be passed. Also removed explicit
WTF namespace since this code itself is in the WTF namespace.

  • wtf/text/cocoa/StringCocoa.mm:

(WTF::String::String): Use bridge_cast.
(WTF::makeNSArrayElement): Use bridge_cast.

Tools:

  • TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:

(TestWebKitAPI::TEST): Removed extra argument to URLWithUserTypedString/Deprecated.

2:25 PM Changeset in webkit [285535] by J Pascoe
  • 2 edits in trunk

Add j_pascoe to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=232904
<rdar://problem/85222703>

Unreviewed.

  • metadata/contributors.json:
2:19 PM Changeset in webkit [285534] by Chris Dumez
  • 7 edits in trunk

BroadcastChannel is still disabled in service workers
https://bugs.webkit.org/show_bug.cgi?id=232855

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now passing.

  • web-platform-tests/webmessaging/broadcastchannel/service-worker.https-expected.txt:

Source/WebKit:

No new tests, rebaselined existing test.

  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::WebSWContextManagerConnection::installServiceWorker):
Make sure BroadcastChannel is functional is Service Workers by setting up proper
BroadcastChannelRegistry on the PageConfiguration we use to construct the service
worker's dummy page.

Source/WTF:

Turn on BroadcastChannel experimental feature in WebCore since this is the value that Service Workers
end up using. We only need to disable it in WebKitLegacy.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
1:56 PM Changeset in webkit [285533] by rmorisset@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Using WASM function size as the cap for choosing a register allocator causes performance regressions.
https://bugs.webkit.org/show_bug.cgi?id=217290
<rdar://problem/69934870>

Reviewed by Yusuke Suzuki.

This patch just increases --maximumTmpsForGraphColoring from 25k to 60k.

It was originally lowered to prevent jetsams in some wasm webpages such as mruby-wasm.aotoki.dev.
These jetsams were caused by excessive memory consumption by the interference graphs used by AirAllocateRegistersByGraphColoring and AirAllocateStackByGraphColoring.
I massively optimized these interference graphs in the following two patches (effect on mruby-wasm.aotoki.dev):

So it should now be safe to increase --maximumTmpsForGraphColoring.

It is valuable to increase it, because some webpages such as https://dos.zone/en/play/https%3A%2F%2Fdoszone-uploads.s3.dualstack.eu-central-1.amazonaws.com%2Foriginal%2F2X%2Fb%2Fb4b5275904d86a4ab8a20917b2b7e34f0df47bf7.jsdos see massive performance wins/losses depending on whether we register allocate all of their wasm functions or not.
For example that page has two functions with ~54k temporaries, and its integrated benchmark has a score increase from about 27 to about 70 on an M1 MBP 2020 when they are register allocated.
External reports suggest that this the performance difference is even larger on older machines (5.5 to 48).

  • runtime/OptionsList.h:
1:53 PM Changeset in webkit [285532] by commit-queue@webkit.org
  • 5 edits
    1 add in trunk/Source

[RISCV64] Add assembly, disassembly infrastructure
https://bugs.webkit.org/show_bug.cgi?id=232870

Patch by Zan Dobersek <zdobersek@igalia.com> on 2021-11-09
Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

Provide the necessary facilities for assembling and disassembling
RISC-V instructions. This is just a preliminary patch that introduces
the necessary assembly and disassembly infrastructure while actual
enhancements to RISCV64Assembler and MacroAssemblerRISCV64 classes are
left for later.

In RISCV64Assembler.h header, necessary helper functions, enumerations
and structs are introduced that enable crafting instruction values in
accordance with the base RISC-V specification. All the necessary
immediate and instruction types are supported, and the relevant
instruction definitions are introduced and become usable in future work.

For debugging purposes, a custom RISC-V disassembler is also introduced
and is enabled when appropriate. The implementation utilizes
functionality introduced in RISCV64Assembler.h, and different formatters
are introduced to handle special cases even among the established
instruction types.

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

(JSC::RISCV64Instructions::registerValue):
(JSC::RISCV64Instructions::InstructionValue::InstructionValue):
(JSC::RISCV64Instructions::InstructionValue::field):
(JSC::RISCV64Instructions::InstructionValue::opcode):
(JSC::RISCV64Instructions::ImmediateBase::isValid):
(JSC::RISCV64Instructions::ImmediateBase::v):
(JSC::RISCV64Instructions::ImmediateBase::ImmediateBase):
(JSC::RISCV64Instructions::ImmediateBase::field):
(JSC::RISCV64Instructions::IImmediate::IImmediate):
(JSC::RISCV64Instructions::IImmediate::value):
(JSC::RISCV64Instructions::SImmediate::SImmediate):
(JSC::RISCV64Instructions::SImmediate::value):
(JSC::RISCV64Instructions::BImmediate::BImmediate):
(JSC::RISCV64Instructions::BImmediate::value):
(JSC::RISCV64Instructions::UImmediate::UImmediate):
(JSC::RISCV64Instructions::UImmediate::value):
(JSC::RISCV64Instructions::JImmediate::JImmediate):
(JSC::RISCV64Instructions::JImmediate::value):
(JSC::RISCV64Instructions::RegistersBase::Size):
(JSC::RISCV64Instructions::RTypeBase::construct):
(JSC::RISCV64Instructions::RTypeBase::matches):
(JSC::RISCV64Instructions::RTypeBase::rd):
(JSC::RISCV64Instructions::RTypeBase::rs1):
(JSC::RISCV64Instructions::RTypeBase::rs2):
(JSC::RISCV64Instructions::RTypeBaseWithRoundingMode::construct):
(JSC::RISCV64Instructions::RTypeBaseWithRoundingMode::matches):
(JSC::RISCV64Instructions::RTypeBaseWithRoundingMode::rd):
(JSC::RISCV64Instructions::RTypeBaseWithRoundingMode::rs1):
(JSC::RISCV64Instructions::RTypeBaseWithRoundingMode::rs2):
(JSC::RISCV64Instructions::RTypeBaseWithRoundingMode::rm):
(JSC::RISCV64Instructions::RTypeBaseWithAqRl::construct):
(JSC::RISCV64Instructions::RTypeBaseWithAqRl::matches):
(JSC::RISCV64Instructions::RTypeBaseWithAqRl::rd):
(JSC::RISCV64Instructions::RTypeBaseWithAqRl::rs1):
(JSC::RISCV64Instructions::RTypeBaseWithAqRl::rs2):
(JSC::RISCV64Instructions::RTypeBaseWithAqRl::aqrl):
(JSC::RISCV64Instructions::R4TypeBaseWithRoundingMode::construct):
(JSC::RISCV64Instructions::R4TypeBaseWithRoundingMode::matches):
(JSC::RISCV64Instructions::R4TypeBaseWithRoundingMode::rd):
(JSC::RISCV64Instructions::R4TypeBaseWithRoundingMode::rs1):
(JSC::RISCV64Instructions::R4TypeBaseWithRoundingMode::rs2):
(JSC::RISCV64Instructions::R4TypeBaseWithRoundingMode::rs3):
(JSC::RISCV64Instructions::R4TypeBaseWithRoundingMode::rm):
(JSC::RISCV64Instructions::ITypeBase::construct):
(JSC::RISCV64Instructions::ITypeBase::matches):
(JSC::RISCV64Instructions::ITypeBase::rd):
(JSC::RISCV64Instructions::ITypeBase::rs1):
(JSC::RISCV64Instructions::STypeBase::construct):
(JSC::RISCV64Instructions::STypeBase::matches):
(JSC::RISCV64Instructions::STypeBase::rs1):
(JSC::RISCV64Instructions::STypeBase::rs2):
(JSC::RISCV64Instructions::BTypeBase::construct):
(JSC::RISCV64Instructions::BTypeBase::matches):
(JSC::RISCV64Instructions::BTypeBase::rs1):
(JSC::RISCV64Instructions::BTypeBase::rs2):
(JSC::RISCV64Instructions::UTypeBase::construct):
(JSC::RISCV64Instructions::UTypeBase::matches):
(JSC::RISCV64Instructions::UTypeBase::rd):
(JSC::RISCV64Instructions::JTypeBase::construct):
(JSC::RISCV64Instructions::JTypeBase::matches):
(JSC::RISCV64Instructions::JTypeBase::rd):
(JSC::RISCV64Instructions::SLLI::construct):
(JSC::RISCV64Instructions::SRLI::construct):
(JSC::RISCV64Instructions::SRAI::construct):
(JSC::RISCV64Instructions::SLLIW::construct):
(JSC::RISCV64Instructions::SRLIW::construct):
(JSC::RISCV64Instructions::SRAIW::construct):
(JSC::RISCV64Instructions::FCVTImpl::construct):
(JSC::RISCV64Instructions::FMVImpl::construct):

  • disassembler/RISCV64Disassembler.cpp: Added.

(JSC::RISCV64Disassembler::StringBufferBase::data):
(JSC::RISCV64Disassembler::StringBufferBase::size):
(JSC::RISCV64Disassembler::StringBufferBase::createString):
(JSC::RISCV64Disassembler::registerName<RISCV64Instructions::RegistersBase::GType>):
(JSC::RISCV64Disassembler::registerName<RISCV64Instructions::RegistersBase::FType>):
(JSC::RISCV64Disassembler::roundingMode):
(JSC::RISCV64Disassembler::memoryOperationFlags):
(JSC::RISCV64Disassembler::aqrlFlags):
(JSC::RISCV64Disassembler::InstructionList::contains):
(JSC::RISCV64Disassembler::RTypeDefaultFormatting::disassemble):
(JSC::RISCV64Disassembler::RTypeR2Formatting::disassemble):
(JSC::RISCV64Disassembler::RTypeWithRoundingModeDefaultFormatting::disassemble):
(JSC::RISCV64Disassembler::RTypeWithRoundingModeFSQRTFormatting::disassemble):
(JSC::RISCV64Disassembler::RTypeWithRoundingModeFCVTFormatting::disassemble):
(JSC::RISCV64Disassembler::RTypeWithAqRlDefaultFormatting::disassemble):
(JSC::RISCV64Disassembler::RTypeWithAqRlLRFormatting::disassemble):
(JSC::RISCV64Disassembler::R4TypeWithRoundingModeDefaultFormatting::disassemble):
(JSC::RISCV64Disassembler::ITypeDefaultFormatting::disassemble):
(JSC::RISCV64Disassembler::ITypeImmediateAsOffsetFormatting::disassemble):
(JSC::RISCV64Disassembler::STypeDefaultFormatting::disassemble):
(JSC::RISCV64Disassembler::BTypeDefaultFormatting::disassemble):
(JSC::RISCV64Disassembler::UTypeDefaultFormatting::disassemble):
(JSC::RISCV64Disassembler::JTypeDefaultFormatting::disassemble):
(JSC::RISCV64Disassembler::FenceInstructionFormatting::disassemble):
(JSC::RISCV64Disassembler::FenceIInstructionFormatting::disassemble):
(JSC::RISCV64Disassembler::EnvironmentInstructionFormatting::disassemble):
(JSC::RISCV64Disassembler::DisassemblyFormatting::disassemble):
(JSC::RISCV64Disassembler::Disassembler::disassemble):
(JSC::RISCV64Disassembler::Disassembler<InsnType>::disassemble):
(JSC::RISCV64Disassembler::disassembleOpcode):
(JSC::tryToDisassemble):

Source/WTF:

  • wtf/PlatformEnable.h: Enable RISCV64_DISASSEMBLER when necessary.
1:36 PM Changeset in webkit [285531] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebCore

Fix macCatalyst build after r285509
https://bugs.webkit.org/show_bug.cgi?id=232863

Unreviewed.

  • Modules/speech/cocoa/SpeechRecognizerCocoa.mm:
1:33 PM Changeset in webkit [285530] by commit-queue@webkit.org
  • 8 edits in trunk/Source/JavaScriptCore

Refactoring and PutByVal cleanup
https://bugs.webkit.org/show_bug.cgi?id=232265

Patch by Mikhail R. Gadelha <Mikhail R. Gadelha> on 2021-11-09
Reviewed by Saam Barati.

Follow-up from https://bugs.webkit.org/show_bug.cgi?id=232242,
this patch includes several small code changes but the patch doesn't
add/remove any feature:

  1. Removed several calls to operationPutByVal*Cell* that were

only used by the 32 bit code paths due to the lack of registers.
These calls were replaced by the calls used by the 64 bit paths,
that expect EncodedJSValues

  1. Because of #1, this patch removes those methods, since no one

uses them anymore.

  1. Created compilePutByVal to handle all cases (similar to compileGetByVal).
  2. Removed the Edge& childX from the PutByVal handling (and all methods

that expected them) in favor of getting them from node when needed.

  1. Unified compileContiguousPutByVal so it could be used by both 32

and 64 bit archs.

  1. Removed a lot of whitespace.
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileContiguousPutByVal):
(JSC::DFG::SpeculativeJIT::compileDoublePutByVal):
(JSC::DFG::SpeculativeJIT::compilePutByVal):
(JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
(JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray): Deleted.
(JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetByValForObjectWithString): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetByValForObjectWithSymbol): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetPrivateName): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetPrivateNameByVal): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetPrivateNameById): Deleted.
(JSC::DFG::SpeculativeJIT::compilePutByValForCellWithString): Deleted.
(JSC::DFG::SpeculativeJIT::compilePutByValForCellWithSymbol): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetByValWithThis): Deleted.
(JSC::DFG::SpeculativeJIT::compilePutPrivateName): Deleted.
(JSC::DFG::SpeculativeJIT::compilePutPrivateNameById): Deleted.
(JSC::DFG::SpeculativeJIT::compileCheckPrivateBrand): Deleted.
(JSC::DFG::SpeculativeJIT::compileSetPrivateBrand): Deleted.
(JSC::DFG::SpeculativeJIT::compileCheckTypeInfoFlags): Deleted.
(JSC::DFG::SpeculativeJIT::compileParseInt): Deleted.
(JSC::DFG::SpeculativeJIT::compileOverridesHasInstance): Deleted.
(JSC::DFG::SpeculativeJIT::compileInstanceOfForCells): Deleted.
(JSC::DFG::SpeculativeJIT::compileInstanceOf): Deleted.
(JSC::DFG::SpeculativeJIT::compileValueBitNot): Deleted.
(JSC::DFG::SpeculativeJIT::compileBitwiseNot): Deleted.
(JSC::DFG::SpeculativeJIT::emitUntypedOrAnyBigIntBitOp): Deleted.
(JSC::DFG::SpeculativeJIT::compileValueBitwiseOp): Deleted.
(JSC::DFG::SpeculativeJIT::compileBitwiseOp): Deleted.
(JSC::DFG::SpeculativeJIT::emitUntypedOrBigIntRightShiftBitOp): Deleted.
(JSC::DFG::SpeculativeJIT::compileValueLShiftOp): Deleted.
(JSC::DFG::SpeculativeJIT::compileValueBitRShift): Deleted.
(JSC::DFG::SpeculativeJIT::compileShiftOp): Deleted.
(JSC::DFG::SpeculativeJIT::compileValueAdd): Deleted.
(JSC::DFG::SpeculativeJIT::compileValueSub): Deleted.
(JSC::DFG::SpeculativeJIT::compileMathIC): Deleted.
(JSC::DFG::SpeculativeJIT::compileInstanceOfCustom): Deleted.
(JSC::DFG::SpeculativeJIT::compileIsCellWithType): Deleted.
(JSC::DFG::SpeculativeJIT::compileIsTypedArrayView): Deleted.
(JSC::DFG::SpeculativeJIT::compileToObjectOrCallObjectConstructor): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithAdd): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithAbs): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithClz32): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithDoubleUnaryOp): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithSub): Deleted.
(JSC::DFG::SpeculativeJIT::compileIncOrDec): Deleted.
(JSC::DFG::SpeculativeJIT::compileValueNegate): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithNegate): Deleted.
(JSC::DFG::SpeculativeJIT::compileValueMul): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithMul): Deleted.
(JSC::DFG::SpeculativeJIT::compileValueDiv): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithDiv): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithFRound): Deleted.
(JSC::DFG::SpeculativeJIT::compileValueMod): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithMod): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithRounding): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithUnary): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithSqrt): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithMinMax): Deleted.
(JSC::DFG::compileArithPowIntegerFastPath): Deleted.
(JSC::DFG::SpeculativeJIT::compileValuePow): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithPow): Deleted.
(JSC::DFG::SpeculativeJIT::compare): Deleted.
(JSC::DFG::SpeculativeJIT::compileCompareUnsigned): Deleted.
(JSC::DFG::SpeculativeJIT::compileStrictEq): Deleted.
(JSC::DFG::SpeculativeJIT::compileBooleanCompare): Deleted.
(JSC::DFG::SpeculativeJIT::compileInt32Compare): Deleted.
(JSC::DFG::SpeculativeJIT::compileDoubleCompare): Deleted.
(JSC::DFG::SpeculativeJIT::compileObjectEquality): Deleted.
(JSC::DFG::SpeculativeJIT::compileSymbolEquality): Deleted.
(JSC::DFG::SpeculativeJIT::compilePeepHoleSymbolEquality): Deleted.
(JSC::DFG::SpeculativeJIT::emitBitwiseJSValueEquality): Deleted.
(JSC::DFG::SpeculativeJIT::emitBranchOnBitwiseJSValueEquality): Deleted.
(JSC::DFG::SpeculativeJIT::compileNotDoubleNeitherDoubleNorHeapBigIntNorStringStrictEquality): Deleted.
(JSC::DFG::SpeculativeJIT::compilePeepHoleNotDoubleNeitherDoubleNorHeapBigIntNorStringStrictEquality): Deleted.
(JSC::DFG::SpeculativeJIT::compileStringEquality): Deleted.
(JSC::DFG::SpeculativeJIT::compileStringToUntypedEquality): Deleted.
(JSC::DFG::SpeculativeJIT::compileStringIdentEquality): Deleted.
(JSC::DFG::SpeculativeJIT::compileStringIdentToNotStringVarEquality): Deleted.
(JSC::DFG::SpeculativeJIT::compileStringCompare): Deleted.
(JSC::DFG::SpeculativeJIT::compileStringIdentCompare): Deleted.
(JSC::DFG::SpeculativeJIT::compileSameValue): Deleted.
(JSC::DFG::SpeculativeJIT::compileToBooleanString): Deleted.
(JSC::DFG::SpeculativeJIT::compileToBooleanStringOrOther): Deleted.
(JSC::DFG::SpeculativeJIT::emitStringBranch): Deleted.
(JSC::DFG::SpeculativeJIT::emitStringOrOtherBranch): Deleted.
(JSC::DFG::SpeculativeJIT::compileConstantStoragePointer): Deleted.
(JSC::DFG::SpeculativeJIT::cageTypedArrayStorage): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffset): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetByValOnDirectArguments): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetByValOnScopedArguments): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetScope): Deleted.
(JSC::DFG::SpeculativeJIT::compileSkipScope): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetGlobalObject): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetGlobalThis): Deleted.
(JSC::DFG::SpeculativeJIT::canBeRope): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetArrayLength): Deleted.
(JSC::DFG::SpeculativeJIT::compileCheckIdent): Deleted.
(JSC::DFG::SpeculativeJIT::compileNewFunctionCommon): Deleted.
(JSC::DFG::SpeculativeJIT::compileNewFunction): Deleted.
(JSC::DFG::SpeculativeJIT::compileSetFunctionName): Deleted.
(JSC::DFG::SpeculativeJIT::compileVarargsLength): Deleted.
(JSC::DFG::SpeculativeJIT::compileLoadVarargs): Deleted.
(JSC::DFG::SpeculativeJIT::compileForwardVarargs): Deleted.
(JSC::DFG::SpeculativeJIT::compileCreateActivation): Deleted.
(JSC::DFG::SpeculativeJIT::compileCreateDirectArguments): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetFromArguments): Deleted.
(JSC::DFG::SpeculativeJIT::compilePutToArguments): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetArgument): Deleted.
(JSC::DFG::SpeculativeJIT::compileCreateScopedArguments): Deleted.
(JSC::DFG::SpeculativeJIT::compileCreateClonedArguments): Deleted.
(JSC::DFG::SpeculativeJIT::compileCreateArgumentsButterfly): Deleted.
(JSC::DFG::SpeculativeJIT::compileCreateRest): Deleted.
(JSC::DFG::SpeculativeJIT::compileSpread): Deleted.
(JSC::DFG::SpeculativeJIT::compileNewArray): Deleted.
(JSC::DFG::SpeculativeJIT::compileNewArrayWithSpread): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetRestLength): Deleted.
(JSC::DFG::SpeculativeJIT::emitPopulateSliceIndex): Deleted.
(JSC::DFG::SpeculativeJIT::compileArraySlice): Deleted.
(JSC::DFG::SpeculativeJIT::compileArrayIndexOf): Deleted.
(JSC::DFG::SpeculativeJIT::compileArrayPush): Deleted.
(JSC::DFG::SpeculativeJIT::compileNotifyWrite): Deleted.
(JSC::DFG::SpeculativeJIT::compileIsObject): Deleted.
(JSC::DFG::SpeculativeJIT::compileTypeOfIsObject): Deleted.
(JSC::DFG::SpeculativeJIT::compileIsCallable): Deleted.
(JSC::DFG::SpeculativeJIT::compileIsConstructor): Deleted.
(JSC::DFG::SpeculativeJIT::compileTypeOf): Deleted.
(JSC::DFG::SpeculativeJIT::emitStructureCheck): Deleted.
(JSC::DFG::SpeculativeJIT::compileCheckIsConstant): Deleted.
(JSC::DFG::SpeculativeJIT::compileCheckNotEmpty): Deleted.
(JSC::DFG::SpeculativeJIT::compileCheckStructure): Deleted.
(JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage): Deleted.
(JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage): Deleted.
(JSC::DFG::SpeculativeJIT::compileNukeStructureAndSetButterfly): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetButterfly): Deleted.
(JSC::DFG::allocateTemporaryRegistersForSnippet): Deleted.
(JSC::DFG::SpeculativeJIT::compileCallDOM): Deleted.
(JSC::DFG::SpeculativeJIT::compileCallDOMGetter): Deleted.
(JSC::DFG::SpeculativeJIT::compileCheckJSCast): Deleted.
(JSC::DFG::SpeculativeJIT::temporaryRegisterForPutByVal): Deleted.
(JSC::DFG::SpeculativeJIT::compileToStringOrCallStringConstructorOrStringValueOf): Deleted.
(JSC::DFG::getExecutable): Deleted.
(JSC::DFG::SpeculativeJIT::compileFunctionToString): Deleted.
(JSC::DFG::SpeculativeJIT::compileNumberToStringWithValidRadixConstant): Deleted.
(JSC::DFG::SpeculativeJIT::compileNumberToStringWithRadix): Deleted.
(JSC::DFG::SpeculativeJIT::compileNewStringObject): Deleted.
(JSC::DFG::SpeculativeJIT::compileNewSymbol): Deleted.
(JSC::DFG::SpeculativeJIT::compileNewTypedArrayWithSize): Deleted.
(JSC::DFG::SpeculativeJIT::emitNewTypedArrayWithSizeInRegister): Deleted.
(JSC::DFG::SpeculativeJIT::compileNewRegexp): Deleted.
(JSC::DFG::SpeculativeJIT::speculateCellTypeWithoutTypeFiltering): Deleted.
(JSC::DFG::SpeculativeJIT::speculateCellType): Deleted.
(JSC::DFG::SpeculativeJIT::speculateInt32): Deleted.
(JSC::DFG::SpeculativeJIT::speculateNumber): Deleted.
(JSC::DFG::SpeculativeJIT::speculateRealNumber): Deleted.
(JSC::DFG::SpeculativeJIT::speculateDoubleRepReal): Deleted.
(JSC::DFG::SpeculativeJIT::speculateBoolean): Deleted.
(JSC::DFG::SpeculativeJIT::speculateCell): Deleted.
(JSC::DFG::SpeculativeJIT::speculateCellOrOther): Deleted.
(JSC::DFG::SpeculativeJIT::speculateObject): Deleted.
(JSC::DFG::SpeculativeJIT::speculateFunction): Deleted.
(JSC::DFG::SpeculativeJIT::speculateFinalObject): Deleted.
(JSC::DFG::SpeculativeJIT::speculateRegExpObject): Deleted.
(JSC::DFG::SpeculativeJIT::speculateArray): Deleted.
(JSC::DFG::SpeculativeJIT::speculateProxyObject): Deleted.
(JSC::DFG::SpeculativeJIT::speculateDerivedArray): Deleted.
(JSC::DFG::SpeculativeJIT::speculatePromiseObject): Deleted.
(JSC::DFG::SpeculativeJIT::speculateDateObject): Deleted.
(JSC::DFG::SpeculativeJIT::speculateMapObject): Deleted.
(JSC::DFG::SpeculativeJIT::speculateSetObject): Deleted.
(JSC::DFG::SpeculativeJIT::speculateWeakMapObject): Deleted.
(JSC::DFG::SpeculativeJIT::speculateWeakSetObject): Deleted.
(JSC::DFG::SpeculativeJIT::speculateDataViewObject): Deleted.
(JSC::DFG::SpeculativeJIT::speculateObjectOrOther): Deleted.
(JSC::DFG::SpeculativeJIT::speculateString): Deleted.
(JSC::DFG::SpeculativeJIT::speculateStringOrOther): Deleted.
(JSC::DFG::SpeculativeJIT::speculateStringIdentAndLoadStorage): Deleted.
(JSC::DFG::SpeculativeJIT::speculateStringIdent): Deleted.
(JSC::DFG::SpeculativeJIT::speculateStringObject): Deleted.
(JSC::DFG::SpeculativeJIT::speculateStringOrStringObject): Deleted.
(JSC::DFG::SpeculativeJIT::speculateNotStringVar): Deleted.
(JSC::DFG::SpeculativeJIT::speculateNotSymbol): Deleted.
(JSC::DFG::SpeculativeJIT::speculateSymbol): Deleted.
(JSC::DFG::SpeculativeJIT::speculateHeapBigInt): Deleted.
(JSC::DFG::SpeculativeJIT::speculateNotCell): Deleted.
(JSC::DFG::SpeculativeJIT::speculateNotCellNorBigInt): Deleted.
(JSC::DFG::SpeculativeJIT::speculateNotDouble): Deleted.
(JSC::DFG::SpeculativeJIT::speculateNeitherDoubleNorHeapBigInt): Deleted.
(JSC::DFG::SpeculativeJIT::speculateNeitherDoubleNorHeapBigIntNorString): Deleted.
(JSC::DFG::SpeculativeJIT::speculateOther): Deleted.
(JSC::DFG::SpeculativeJIT::speculateMisc): Deleted.
(JSC::DFG::SpeculativeJIT::speculate): Deleted.
(JSC::DFG::SpeculativeJIT::emitSwitchIntJump): Deleted.
(JSC::DFG::SpeculativeJIT::emitSwitchImm): Deleted.
(JSC::DFG::SpeculativeJIT::emitSwitchCharStringJump): Deleted.
(JSC::DFG::SpeculativeJIT::emitSwitchChar): Deleted.
(JSC::DFG::SpeculativeJIT::emitBinarySwitchStringRecurse): Deleted.
(JSC::DFG::SpeculativeJIT::emitSwitchStringOnString): Deleted.
(JSC::DFG::SpeculativeJIT::emitSwitchString): Deleted.
(JSC::DFG::SpeculativeJIT::emitSwitch): Deleted.
(JSC::DFG::SpeculativeJIT::addBranch): Deleted.
(JSC::DFG::SpeculativeJIT::linkBranches): Deleted.
(JSC::DFG::SpeculativeJIT::compileStoreBarrier): Deleted.
(JSC::DFG::SpeculativeJIT::compilePutAccessorById): Deleted.
(JSC::DFG::SpeculativeJIT::compilePutGetterSetterById): Deleted.
(JSC::DFG::SpeculativeJIT::compileResolveScope): Deleted.
(JSC::DFG::SpeculativeJIT::compileResolveScopeForHoistingFuncDeclInEval): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetGlobalVariable): Deleted.
(JSC::DFG::SpeculativeJIT::compilePutGlobalVariable): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetDynamicVar): Deleted.
(JSC::DFG::SpeculativeJIT::compilePutDynamicVar): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetClosureVar): Deleted.
(JSC::DFG::SpeculativeJIT::compilePutClosureVar): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetInternalField): Deleted.
(JSC::DFG::SpeculativeJIT::compilePutInternalField): Deleted.
(JSC::DFG::SpeculativeJIT::compilePutAccessorByVal): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetRegExpObjectLastIndex): Deleted.
(JSC::DFG::SpeculativeJIT::compileSetRegExpObjectLastIndex): Deleted.
(JSC::DFG::SpeculativeJIT::compileRegExpExec): Deleted.
(JSC::DFG::SpeculativeJIT::compileRegExpTest): Deleted.
(JSC::DFG::SpeculativeJIT::compileStringReplace): Deleted.
(JSC::DFG::SpeculativeJIT::compileRegExpExecNonGlobalOrSticky): Deleted.
(JSC::DFG::SpeculativeJIT::compileRegExpMatchFastGlobal): Deleted.
(JSC::DFG::SpeculativeJIT::compileRegExpMatchFast): Deleted.
(JSC::DFG::SpeculativeJIT::compileLazyJSConstant): Deleted.
(JSC::DFG::SpeculativeJIT::compileMaterializeNewObject): Deleted.
(JSC::DFG::SpeculativeJIT::compileRecordRegExpCachedResult): Deleted.
(JSC::DFG::SpeculativeJIT::compileDefineDataProperty): Deleted.
(JSC::DFG::SpeculativeJIT::compileDefineAccessorProperty): Deleted.
(JSC::DFG::SpeculativeJIT::emitAllocateButterfly): Deleted.
(JSC::DFG::SpeculativeJIT::compileNormalizeMapKey): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetMapBucketHead): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetMapBucketNext): Deleted.
(JSC::DFG::SpeculativeJIT::compileLoadKeyFromMapBucket): Deleted.
(JSC::DFG::SpeculativeJIT::compileLoadValueFromMapBucket): Deleted.
(JSC::DFG::SpeculativeJIT::compileExtractValueFromWeakMapGet): Deleted.
(JSC::DFG::SpeculativeJIT::compileThrow): Deleted.
(JSC::DFG::SpeculativeJIT::compileThrowStaticError): Deleted.
(JSC::DFG::SpeculativeJIT::compileEnumeratorNextUpdateIndexAndMode): Deleted.
(JSC::DFG::SpeculativeJIT::compileEnumeratorNextExtractIndex): Deleted.
(JSC::DFG::SpeculativeJIT::compileEnumeratorNextExtractMode): Deleted.
(JSC::DFG::SpeculativeJIT::compileEnumeratorNextUpdatePropertyName): Deleted.
(JSC::DFG::SpeculativeJIT::compileEnumeratorHasProperty): Deleted.
(JSC::DFG::SpeculativeJIT::compileEnumeratorInByVal): Deleted.
(JSC::DFG::SpeculativeJIT::compileEnumeratorHasOwnProperty): Deleted.
(JSC::DFG::SpeculativeJIT::compilePutByIdFlush): Deleted.
(JSC::DFG::SpeculativeJIT::compilePutById): Deleted.
(JSC::DFG::SpeculativeJIT::compilePutByIdDirect): Deleted.
(JSC::DFG::SpeculativeJIT::compilePutByIdWithThis): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetByOffset): Deleted.
(JSC::DFG::SpeculativeJIT::compilePutByOffset): Deleted.
(JSC::DFG::SpeculativeJIT::compileMatchStructure): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetPropertyEnumerator): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetExecutable): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetGetter): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetSetter): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetCallee): Deleted.
(JSC::DFG::SpeculativeJIT::compileSetCallee): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetArgumentCountIncludingThis): Deleted.
(JSC::DFG::SpeculativeJIT::compileSetArgumentCountIncludingThis): Deleted.
(JSC::DFG::SpeculativeJIT::compileStrCat): Deleted.
(JSC::DFG::SpeculativeJIT::compileNewArrayBuffer): Deleted.
(JSC::DFG::SpeculativeJIT::compileNewArrayWithSize): Deleted.
(JSC::DFG::SpeculativeJIT::compileNewTypedArray): Deleted.
(JSC::DFG::SpeculativeJIT::compileToThis): Deleted.
(JSC::DFG::SpeculativeJIT::compileObjectKeysOrObjectGetOwnPropertyNames): Deleted.
(JSC::DFG::SpeculativeJIT::compileObjectAssign): Deleted.
(JSC::DFG::SpeculativeJIT::compileObjectCreate): Deleted.
(JSC::DFG::SpeculativeJIT::compileCreateThis): Deleted.
(JSC::DFG::SpeculativeJIT::compileCreatePromise): Deleted.
(JSC::DFG::SpeculativeJIT::compileCreateInternalFieldObject): Deleted.
(JSC::DFG::SpeculativeJIT::compileCreateGenerator): Deleted.
(JSC::DFG::SpeculativeJIT::compileCreateAsyncGenerator): Deleted.
(JSC::DFG::SpeculativeJIT::compileNewObject): Deleted.
(JSC::DFG::SpeculativeJIT::compileNewInternalFieldObjectImpl): Deleted.
(JSC::DFG::SpeculativeJIT::compileNewGenerator): Deleted.
(JSC::DFG::SpeculativeJIT::compileNewAsyncGenerator): Deleted.
(JSC::DFG::SpeculativeJIT::compileNewInternalFieldObject): Deleted.
(JSC::DFG::SpeculativeJIT::compileToPrimitive): Deleted.
(JSC::DFG::SpeculativeJIT::compileToPropertyKey): Deleted.
(JSC::DFG::SpeculativeJIT::compileToNumeric): Deleted.
(JSC::DFG::SpeculativeJIT::compileCallNumberConstructor): Deleted.
(JSC::DFG::SpeculativeJIT::compileLogShadowChickenPrologue): Deleted.
(JSC::DFG::SpeculativeJIT::compileLogShadowChickenTail): Deleted.
(JSC::DFG::SpeculativeJIT::compileSetAdd): Deleted.
(JSC::DFG::SpeculativeJIT::compileMapSet): Deleted.
(JSC::DFG::SpeculativeJIT::compileWeakMapGet): Deleted.
(JSC::DFG::SpeculativeJIT::compileWeakSetAdd): Deleted.
(JSC::DFG::SpeculativeJIT::compileWeakMapSet): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetPrototypeOf): Deleted.
(JSC::DFG::SpeculativeJIT::compileIdentity): Deleted.
(JSC::DFG::SpeculativeJIT::compileMiscStrictEq): Deleted.
(JSC::DFG::SpeculativeJIT::emitInitializeButterfly): Deleted.
(JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize): Deleted.
(JSC::DFG::SpeculativeJIT::compileHasIndexedProperty): Deleted.
(JSC::DFG::SpeculativeJIT::compileExtractCatchLocal): Deleted.
(JSC::DFG::SpeculativeJIT::compileClearCatchLocals): Deleted.
(JSC::DFG::SpeculativeJIT::compileProfileType): Deleted.
(JSC::DFG::SpeculativeJIT::cachedPutById): Deleted.
(JSC::DFG::SpeculativeJIT::genericJSValueNonPeepholeCompare): Deleted.
(JSC::DFG::SpeculativeJIT::genericJSValuePeepholeBranch): Deleted.
(JSC::DFG::SpeculativeJIT::compileHeapBigIntEquality): Deleted.
(JSC::DFG::SpeculativeJIT::compileMakeRope): Deleted.
(JSC::DFG::SpeculativeJIT::compileEnumeratorGetByVal): Deleted.

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::compileContiguousPutByVal): Deleted.

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::branchIfEmpty):
(JSC::AssemblyHelpers::branchIfNotEmpty):

1:25 PM Changeset in webkit [285529] by graouts@webkit.org
  • 14 edits
    2 adds in trunk

REGRESSION(r272201): Safari showed red distortion on webview after using Web Inspector, returning from another app
https://bugs.webkit.org/show_bug.cgi?id=231358
<rdar://problem/81505208>

Reviewed by Devin Rousso.

Source/WebCore:

Test: inspector/page/setShowPaintRects.html

When we added support for animating individual transform properties, we moved to a model where all animations
for a given CSS property were wrapped in a dedicated CAAnimationGroup when running accelerated. Those groups
have an infinite duration and thus would never call the -animationDidStop:finished: CAAnimationDelegate method.

An option would have been to set the delegate on all animations contained in a CAAnimationGroup in
PlatformCALayerCocoa::addAnimationForKey(), but as it turns out, the CAAnimationDelegate methods for children
of an animation group aren't fired.

Since the only current use for the -animationDidStop:finished: delegate method is to eventually message back
into WebInspectorClient::animationEndedForLayer() for opacity animations, which don't need to run contained in
groups, our approach to address the issue is to only group animations for transform-related properties and
leave other animations as simple leaf animations.

To do this, inside of GraphicsLayerCA::updateAnimations(), we replace the addAnimation() lambda with a new
addLeafAnimation() lambda which we use for opacity, background-color and filter animations.

In order to be able to test the successful removal of repaint rects as a result of the CAAnimationDelegate
method firing, Patrick Angle contributed the required changes under inspector/ to expose the number of paint
rects to layout tests.

  • inspector/InspectorClient.h:

(WebCore::InspectorClient::paintRectCount const):

  • inspector/InspectorController.cpp:

(WebCore::InspectorController::paintRectCount const):

  • inspector/InspectorController.h:
  • inspector/InspectorOverlay.h:

(WebCore::InspectorOverlay::paintRectCount const):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::updateAnimations):

  • testing/Internals.cpp:

(WebCore::Internals::inspectorHighlightRects):
(WebCore::Internals::inspectorPaintRectCount):

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit:

  • WebProcess/Inspector/WebInspectorClient.h:

LayoutTests:

Add a new test, written by Patrick Angle, that tracks whether paint rects have appeared
and then disappeared as content repaints in an inspected page.

  • inspector/page/setShowPaintRects-expected.txt: Added.
  • inspector/page/setShowPaintRects.html: Added.
  • platform/ios-wk1/TestExpectations:
  • platform/mac-wk1/TestExpectations:
1:17 PM Changeset in webkit [285528] by Megan Gardner
  • 8 edits
    2 adds in trunk/Source

Scroll To Text Fragment directive parsing
https://bugs.webkit.org/show_bug.cgi?id=231410

Reviewed by Chris Dumez.

Text directive parsing for
https://wicg.github.io/scroll-to-text-fragment/
Source/WebCore:

Make a new class to handle the parsing of the text directive.
The parsing is defined in the linked spec.
The directive should be stored on Document and in a future
patch the matching algorithm will find the text and scroll
and highlight it.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.h:

(WebCore::Document::setFragmentDirective):
(WebCore::Document::fragmentDirective const):

  • dom/FragmentDirectiveParser.cpp: Added.

(WebCore::FragmentDirectiveParser::FragmentDirectiveParser):
(WebCore::FragmentDirectiveParser::parseFragmentDirective):

  • dom/FragmentDirectiveParser.h: Added.

(WebCore::FragmentDirectiveParser::parsedTextDirectives const):
(WebCore::FragmentDirectiveParser::fragmentDirective const):
(WebCore::FragmentDirectiveParser::remainingURLFragment const):
(WebCore::FragmentDirectiveParser::isValid const):

  • page/FrameView.cpp:

(WebCore::FrameView::scrollToFragment):

  • platform/Logging.h:

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
1:08 PM Changeset in webkit [285527] by mmaxfield@apple.com
  • 7 edits
    31 copies
    3 moves
    14 adds in trunk

[WebGPU] Stub out methods in WebGPU.framework
https://bugs.webkit.org/show_bug.cgi?id=232872

Reviewed by Dean Jackson.

Source/WebGPU:

This creates empty implementations for all the methods in WebGPU.framework.
This means that there are now implementations for every API call, so PAL
can successfully call into WebGPU.framework and link with it.

  • Configurations/Version.xcconfig: Added.
  • Configurations/WebGPU.xcconfig:
  • WebGPU.xcodeproj/project.pbxproj:
  • WebGPU/Adapter.h: Copied from Source/WebGPU/WebGPU/ShaderModule.h.
  • WebGPU/Adapter.mm: Added.

(WebGPU::Adapter::getLimits):
(WebGPU::Adapter::getProperties):
(WebGPU::Adapter::hasFeature):
(WebGPU::Adapter::requestDevice):
(wgpuAdapterRelease):
(wgpuAdapterGetLimits):
(wgpuAdapterGetProperties):
(wgpuAdapterHasFeature):
(wgpuAdapterRequestDevice):

  • WebGPU/BindGroup.h: Copied from Source/WebGPU/WebGPU/ShaderModule.h.
  • WebGPU/BindGroup.mm: Copied from Source/WebGPU/WebGPU/WebGPUObjC.mm.

(wgpuBindGroupRelease):

  • WebGPU/BindGroupLayout.h: Copied from Source/WebGPU/WebGPU/ShaderModule.h.
  • WebGPU/BindGroupLayout.mm: Renamed from Source/WebGPU/WebGPU/WebGPU.cpp.

(wgpuBindGroupLayoutRelease):

  • WebGPU/Buffer.h: Copied from Source/WebGPU/WebGPU/ShaderModule.h.
  • WebGPU/Buffer.mm: Added.

(WebGPU::Buffer::destroy):
(WebGPU::Buffer::getConstMappedRange):
(WebGPU::Buffer::getMappedRange):
(WebGPU::Buffer::mapAsync):
(WebGPU::Buffer::unmap):
(wgpuBufferRelease):
(wgpuBufferDestroy):
(wgpuBufferGetConstMappedRange):
(wgpuBufferGetMappedRange):
(wgpuBufferMapAsync):
(wgpuBufferUnmap):

  • WebGPU/CommandBuffer.h: Copied from Source/WebGPU/WebGPU/ShaderModule.h.
  • WebGPU/CommandBuffer.mm: Copied from Source/WebGPU/WebGPU/WebGPUObjC.mm.

(wgpuCommandBufferRelease):

  • WebGPU/CommandEncoder.h: Added.
  • WebGPU/CommandEncoder.mm: Added.

(WebGPU::CommandEncoder::beginComputePass):
(WebGPU::CommandEncoder::beginRenderPass):
(WebGPU::CommandEncoder::copyBufferToBuffer):
(WebGPU::CommandEncoder::copyBufferToTexture):
(WebGPU::CommandEncoder::copyTextureToBuffer):
(WebGPU::CommandEncoder::copyTextureToTexture):
(WebGPU::CommandEncoder::finish):
(WebGPU::CommandEncoder::insertDebugMarker):
(WebGPU::CommandEncoder::popDebugGroup):
(WebGPU::CommandEncoder::pushDebugGroup):
(WebGPU::CommandEncoder::resolveQuerySet):
(WebGPU::CommandEncoder::writeTimestamp):
(wgpuCommandEncoderRelease):
(wgpuCommandEncoderBeginComputePass):
(wgpuCommandEncoderBeginRenderPass):
(wgpuCommandEncoderCopyBufferToBuffer):
(wgpuCommandEncoderCopyBufferToTexture):
(wgpuCommandEncoderCopyTextureToBuffer):
(wgpuCommandEncoderCopyTextureToTexture):
(wgpuCommandEncoderFinish):
(wgpuCommandEncoderInsertDebugMarker):
(wgpuCommandEncoderPopDebugGroup):
(wgpuCommandEncoderPushDebugGroup):
(wgpuCommandEncoderResolveQuerySet):
(wgpuCommandEncoderWriteTimestamp):

  • WebGPU/ComputePassEncoder.h: Copied from Source/WebGPU/WebGPU/ShaderModule.h.
  • WebGPU/ComputePassEncoder.mm: Added.

(WebGPU::ComputePassEncoder::beginPipelineStatisticsQuery):
(WebGPU::ComputePassEncoder::dispatch):
(WebGPU::ComputePassEncoder::dispatchIndirect):
(WebGPU::ComputePassEncoder::endPass):
(WebGPU::ComputePassEncoder::endPipelineStatisticsQuery):
(WebGPU::ComputePassEncoder::insertDebugMarker):
(WebGPU::ComputePassEncoder::popDebugGroup):
(WebGPU::ComputePassEncoder::pushDebugGroup):
(WebGPU::ComputePassEncoder::setBindGroup):
(WebGPU::ComputePassEncoder::setPipeline):
(WebGPU::ComputePassEncoder::writeTimestamp):
(wgpuComputePassEncoderRelease):
(wgpuComputePassEncoderBeginPipelineStatisticsQuery):
(wgpuComputePassEncoderDispatch):
(wgpuComputePassEncoderDispatchIndirect):
(wgpuComputePassEncoderEndPass):
(wgpuComputePassEncoderEndPipelineStatisticsQuery):
(wgpuComputePassEncoderInsertDebugMarker):
(wgpuComputePassEncoderPopDebugGroup):
(wgpuComputePassEncoderPushDebugGroup):
(wgpuComputePassEncoderSetBindGroup):
(wgpuComputePassEncoderSetPipeline):
(wgpuComputePassEncoderWriteTimestamp):

  • WebGPU/ComputePipeline.h: Copied from Source/WebGPU/WebGPU/ShaderModule.h.
  • WebGPU/ComputePipeline.mm: Copied from Source/WebGPU/WebGPU/WebGPUObjC.mm.

(WebGPU::ComputePipeline::getBindGroupLayout):
(WebGPU::ComputePipeline::setLabel):
(wgpuComputePipelineRelease):
(wgpuComputePipelineGetBindGroupLayout):
(wgpuComputePipelineSetLabel):

  • WebGPU/Device.h: Added.
  • WebGPU/Device.mm: Added.

(WebGPU::Device::createBindGroup):
(WebGPU::Device::createBindGroupLayout):
(WebGPU::Device::createBuffer):
(WebGPU::Device::createCommandEncoder):
(WebGPU::Device::createComputePipeline):
(WebGPU::Device::createComputePipelineAsync):
(WebGPU::Device::createPipelineLayout):
(WebGPU::Device::createQuerySet):
(WebGPU::Device::createRenderBundleEncoder):
(WebGPU::Device::createRenderPipeline):
(WebGPU::Device::createRenderPipelineAsync):
(WebGPU::Device::createSampler):
(WebGPU::Device::createShaderModule):
(WebGPU::Device::createSwapChain):
(WebGPU::Device::createTexture):
(WebGPU::Device::destroy):
(WebGPU::Device::getLimits):
(WebGPU::Device::getQueue):
(WebGPU::Device::popErrorScope):
(WebGPU::Device::pushErrorScope):
(WebGPU::Device::setDeviceLostCallback):
(WebGPU::Device::setUncapturedErrorCallback):
(wgpuDeviceRelease):
(wgpuDeviceCreateBindGroup):
(wgpuDeviceCreateBindGroupLayout):
(wgpuDeviceCreateBuffer):
(wgpuDeviceCreateCommandEncoder):
(wgpuDeviceCreateComputePipeline):
(wgpuDeviceCreateComputePipelineAsync):
(wgpuDeviceCreatePipelineLayout):
(wgpuDeviceCreateQuerySet):
(wgpuDeviceCreateRenderBundleEncoder):
(wgpuDeviceCreateRenderPipeline):
(wgpuDeviceCreateRenderPipelineAsync):
(wgpuDeviceCreateSampler):
(wgpuDeviceCreateShaderModule):
(wgpuDeviceCreateSwapChain):
(wgpuDeviceCreateTexture):
(wgpuDeviceDestroy):
(wgpuDeviceGetLimits):
(wgpuDeviceGetQueue):
(wgpuDevicePopErrorScope):
(wgpuDevicePushErrorScope):
(wgpuDeviceSetDeviceLostCallback):
(wgpuDeviceSetUncapturedErrorCallback):

  • WebGPU/ExportMacros.h:
  • WebGPU/Instance.h: Copied from Source/WebGPU/WebGPU/ShaderModule.h.
  • WebGPU/Instance.mm: Added.

(WebGPU::Instance::createSurface):
(WebGPU::Instance::processEvents):
(WebGPU::Instance::requestAdapter):
(wgpuInstanceRelease):
(wgpuCreateInstance):
(wgpuGetProcAddress):
(wgpuInstanceCreateSurface):
(wgpuInstanceProcessEvents):
(wgpuInstanceRequestAdapter):

  • WebGPU/PipelineLayout.h: Copied from Source/WebGPU/WebGPU/ShaderModule.h.
  • WebGPU/PipelineLayout.mm: Copied from Source/WebGPU/WebGPU/WebGPUObjC.mm.

(wgpuPipelineLayoutRelease):

  • WebGPU/QuerySet.h: Copied from Source/WebGPU/WebGPU/ShaderModule.h.
  • WebGPU/QuerySet.mm: Copied from Source/WebGPU/WebGPU/WebGPUObjC.mm.

(WebGPU::QuerySet::destroy):
(wgpuQuerySetRelease):
(wgpuQuerySetDestroy):

  • WebGPU/Queue.h: Copied from Source/WebGPU/WebGPU/ShaderModule.h.
  • WebGPU/Queue.mm: Added.

(WebGPU::Queue::onSubmittedWorkDone):
(WebGPU::Queue::submit):
(WebGPU::Queue::writeBuffer):
(WebGPU::Queue::writeTexture):
(wgpuQueueRelease):
(wgpuQueueOnSubmittedWorkDone):
(wgpuQueueSubmit):
(wgpuQueueWriteBuffer):
(wgpuQueueWriteTexture):

  • WebGPU/RenderBundle.h: Copied from Source/WebGPU/WebGPU/ShaderModule.h.
  • WebGPU/RenderBundle.mm: Copied from Source/WebGPU/WebGPU/WebGPUObjC.mm.

(wgpuRenderBundleRelease):

  • WebGPU/RenderBundleEncoder.h: Copied from Source/WebGPU/WebGPU/ShaderModule.h.
  • WebGPU/RenderBundleEncoder.mm: Added.

(WebGPU::RenderBundleEncoder::draw):
(WebGPU::RenderBundleEncoder::drawIndexed):
(WebGPU::RenderBundleEncoder::drawIndexedIndirect):
(WebGPU::RenderBundleEncoder::drawIndirect):
(WebGPU::RenderBundleEncoder::finish):
(WebGPU::RenderBundleEncoder::insertDebugMarker):
(WebGPU::RenderBundleEncoder::popDebugGroup):
(WebGPU::RenderBundleEncoder::pushDebugGroup):
(WebGPU::RenderBundleEncoder::setBindGroup):
(WebGPU::RenderBundleEncoder::setIndexBuffer):
(WebGPU::RenderBundleEncoder::setPipeline):
(WebGPU::RenderBundleEncoder::setVertexBuffer):
(wgpuRenderBundleEncoderRelease):
(wgpuRenderBundleEncoderDraw):
(wgpuRenderBundleEncoderDrawIndexed):
(wgpuRenderBundleEncoderDrawIndexedIndirect):
(wgpuRenderBundleEncoderDrawIndirect):
(wgpuRenderBundleEncoderFinish):
(wgpuRenderBundleEncoderInsertDebugMarker):
(wgpuRenderBundleEncoderPopDebugGroup):
(wgpuRenderBundleEncoderPushDebugGroup):
(wgpuRenderBundleEncoderSetBindGroup):
(wgpuRenderBundleEncoderSetIndexBuffer):
(wgpuRenderBundleEncoderSetPipeline):
(wgpuRenderBundleEncoderSetVertexBuffer):

  • WebGPU/RenderPassEncoder.h: Added.
  • WebGPU/RenderPassEncoder.mm: Added.

(WebGPU::RenderPassEncoder::beginOcclusionQuery):
(WebGPU::RenderPassEncoder::beginPipelineStatisticsQuery):
(WebGPU::RenderPassEncoder::draw):
(WebGPU::RenderPassEncoder::drawIndexed):
(WebGPU::RenderPassEncoder::drawIndexedIndirect):
(WebGPU::RenderPassEncoder::drawIndirect):
(WebGPU::RenderPassEncoder::endOcclusionQuery):
(WebGPU::RenderPassEncoder::endPass):
(WebGPU::RenderPassEncoder::endPipelineStatisticsQuery):
(WebGPU::RenderPassEncoder::executeBundles):
(WebGPU::RenderPassEncoder::insertDebugMarker):
(WebGPU::RenderPassEncoder::popDebugGroup):
(WebGPU::RenderPassEncoder::pushDebugGroup):
(WebGPU::RenderPassEncoder::setBindGroup):
(WebGPU::RenderPassEncoder::setBlendConstant):
(WebGPU::RenderPassEncoder::setIndexBuffer):
(WebGPU::RenderPassEncoder::setPipeline):
(WebGPU::RenderPassEncoder::setScissorRect):
(WebGPU::RenderPassEncoder::setStencilReference):
(WebGPU::RenderPassEncoder::setVertexBuffer):
(WebGPU::RenderPassEncoder::setViewport):
(WebGPU::RenderPassEncoder::writeTimestamp):
(wgpuRenderPassEncoderRelease):
(wgpuRenderPassEncoderBeginOcclusionQuery):
(wgpuRenderPassEncoderBeginPipelineStatisticsQuery):
(wgpuRenderPassEncoderDraw):
(wgpuRenderPassEncoderDrawIndexed):
(wgpuRenderPassEncoderDrawIndexedIndirect):
(wgpuRenderPassEncoderDrawIndirect):
(wgpuRenderPassEncoderEndOcclusionQuery):
(wgpuRenderPassEncoderEndPass):
(wgpuRenderPassEncoderEndPipelineStatisticsQuery):
(wgpuRenderPassEncoderExecuteBundles):
(wgpuRenderPassEncoderInsertDebugMarker):
(wgpuRenderPassEncoderPopDebugGroup):
(wgpuRenderPassEncoderPushDebugGroup):
(wgpuRenderPassEncoderSetBindGroup):
(wgpuRenderPassEncoderSetBlendConstant):
(wgpuRenderPassEncoderSetIndexBuffer):
(wgpuRenderPassEncoderSetPipeline):
(wgpuRenderPassEncoderSetScissorRect):
(wgpuRenderPassEncoderSetStencilReference):
(wgpuRenderPassEncoderSetVertexBuffer):
(wgpuRenderPassEncoderSetViewport):
(wgpuRenderPassEncoderWriteTimestamp):

  • WebGPU/RenderPipeline.h: Copied from Source/WebGPU/WebGPU/ShaderModule.h.
  • WebGPU/RenderPipeline.mm: Copied from Source/WebGPU/WebGPU/WebGPUObjC.mm.

(WebGPU::RenderPipeline::getBindGroupLayout):
(WebGPU::RenderPipeline::setLabel):
(wgpuRenderPipelineRelease):
(wgpuRenderPipelineGetBindGroupLayout):
(wgpuRenderPipelineSetLabel):

  • WebGPU/Sampler.h: Renamed from Source/WebGPU/WebGPU/WebGPUObjC.h.
  • WebGPU/Sampler.mm: Copied from Source/WebGPU/WebGPU/WebGPUObjC.mm.

(wgpuSamplerRelease):

  • WebGPU/ShaderModule.h:
  • WebGPU/ShaderModule.mm: Copied from Source/WebGPU/WebGPU/WebGPUObjC.mm.

(WebGPU::ShaderModule::setLabel):
(wgpuShaderModuleRelease):
(wgpuShaderModuleSetLabel):

  • WebGPU/Surface.h: Copied from Source/WebGPU/WebGPU/ShaderModule.h.
  • WebGPU/Surface.mm: Copied from Source/WebGPU/WebGPU/WebGPUObjC.mm.

(WebGPU::Surface::getPreferredFormat):
(wgpuSurfaceRelease):
(wgpuSurfaceGetPreferredFormat):

  • WebGPU/SwapChain.h: Copied from Source/WebGPU/WebGPU/ShaderModule.h.
  • WebGPU/SwapChain.mm: Copied from Source/WebGPU/WebGPU/WebGPUObjC.mm.

(WebGPU::SwapChain::getCurrentTextureView):
(WebGPU::SwapChain::present):
(wgpuSwapChainRelease):
(wgpuSwapChainGetCurrentTextureView):
(wgpuSwapChainPresent):

  • WebGPU/Texture.h: Copied from Source/WebGPU/WebGPU/ShaderModule.h.
  • WebGPU/Texture.mm: Copied from Source/WebGPU/WebGPU/WebGPUObjC.mm.

(WebGPU::Texture::createView):
(WebGPU::Texture::destroy):
(wgpuTextureRelease):
(wgpuTextureCreateView):
(wgpuTextureDestroy):

  • WebGPU/TextureView.h: Copied from Source/WebGPU/WebGPU/ShaderModule.h.
  • WebGPU/TextureView.mm: Renamed from Source/WebGPU/WebGPU/WebGPUObjC.mm.

(wgpuTextureViewRelease):

  • WebGPU/WebGPU.modulemap: Added.
  • WebGPU/WebGPUExt.h: Added.

Tools:

  • Scripts/webkitpy/style/checker.py:
1:06 PM Changeset in webkit [285526] by timothy_horton@apple.com
  • 16 edits in trunk/Source

Add runtime flag for momentum scrolling
https://bugs.webkit.org/show_bug.cgi?id=232898
<rdar://problem/85211338>

Reviewed by Simon Fraser.

  • Scripts/Preferences/WebPreferencesInternal.yaml:

Add the preference.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::setFrameScrollingNodeState):

  • page/scrolling/ScrollingStateFrameScrollingNode.cpp:

(WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
(WebCore::ScrollingStateFrameScrollingNode::applicableProperties const):
(WebCore::ScrollingStateFrameScrollingNode::setMomentumScrollingAnimatorEnabled):

  • page/scrolling/ScrollingStateFrameScrollingNode.h:
  • page/scrolling/ScrollingStateNode.h:
  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::commitTreeState):

  • page/scrolling/ScrollingTree.h:

(WebCore::ScrollingTree::momentumScrollingAnimatorEnabled const):
(WebCore::ScrollingTree::setMomentumScrollingAnimatorEnabled):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::momentumScrollingAnimatorEnabled const):

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

(WebCore::ScrollingTreeScrollingNodeDelegateMac::momentumScrollingAnimatorEnabled const):

  • platform/ScrollingEffectsController.h:

(WebCore::ScrollingEffectsControllerClient::momentumScrollingAnimatorEnabled const):

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:

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

12:49 PM Changeset in webkit [285525] by sbarati@apple.com
  • 13 edits
    1 add in trunk

When inlining NewSymbol in the DFG don't universally call ToString on the input
https://bugs.webkit.org/show_bug.cgi?id=232754

Reviewed by Robin Morisset.

JSTests:

  • stress/inline-new-symbol-dfg-undefined-first-arg.js: Added.

(assert):
(foo):

Source/JavaScriptCore:

When inlining Symbol(x) in the DFG, we were always calling ToString on x.
However, this is wrong spec wise. If x is undefined, the symbol should
produce a description value of undefined, but calling ToString on x was causing
us to produce a description with the string "undefined".

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGClobbersExitState.cpp:

(JSC::DFG::clobbersExitState):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGMayExit.cpp:
  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • dfg/DFGOperations.h:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewSymbol):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNewSymbol):

12:44 PM Changeset in webkit [285524] by don.olmstead@sony.com
  • 2 edits in trunk/Source/WebCore

Fix !ENABLE(ACCESSIBILITY) after r285427
https://bugs.webkit.org/show_bug.cgi?id=232893
<rdar://problem/85210424>

Reviewed by Andres Gonzalez.

In r285399 a number of AXObjectCache methods were affected by a removal of an
ENABLE(ACCESSIBILITY) guard. The definitions were pushed down to the large
!ENABLE(ACCESSIBILITY) block at the bottom of the file but inline static isn't valid
code so the compile issue was fixed in r285427. However the commits had also introduced a
linker error around AXObjectCache::accessibilityEnabled and
AXObjectCache::accessibilityEnhancedUserInterfaceEnabled.

To fix the static member variables referenced in those methods are static constexpr when
!ENABLE(ACCESSIBILITY).

  • accessibility/AXObjectCache.h:
12:44 PM Changeset in webkit [285523] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Horizontal constraint change should not purge the inline item cache.
https://bugs.webkit.org/show_bug.cgi?id=232892

Reviewed by Antti Koivisto.

Available horizontal space change does not affect the inline content itself (it only affects the geometry of said content).

  • layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp:

(WebCore::Layout::InlineInvalidation::horizontalConstraintChanged):

12:25 PM Changeset in webkit [285522] by stephan.szabo@sony.com
  • 2 edits in trunk/Tools

[Windows] Non-find based status file finding in run-jsc-stress-tests needs to release status files
https://bugs.webkit.org/show_bug.cgi?id=232851

Reviewed by Don Olmstead.

Change the reading of status files in the non-find search
to properly scope the file access to release the status
files.

  • Scripts/run-jsc-stress-tests:
12:04 PM Changeset in webkit [285521] by Devin Rousso
  • 22 edits in trunk

REGRESSION(r271735): PaymentShippingOption.selected ignored
https://bugs.webkit.org/show_bug.cgi?id=221960
<rdar://problem/73464404>

Reviewed by Tim Horton.

Source/WebCore:

Leverage new PKShippingMethods SPI to provide both the general list of PKShippingMethod
and the default selected PKShippingMethods when creating/updating a payment request.

  • Modules/applepay/ApplePayShippingMethod.idl:
  • Modules/applepay/ApplePayShippingMethod.h:

(WebCore::ApplePayShippingMethod::encode const):
(WebCore::ApplePayShippingMethod::decode):
Add new selected boolean property.

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:

(WebCore::ApplePayPaymentHandler::computeShippingMethods const):

  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::checkAndCanonicalizeDetails):

Source/WebCore/PAL:

Leverage new PKShippingMethods SPI to provide both the general list of PKShippingMethod
and the default selected PKShippingMethods when creating/updating a payment request.

  • pal/cocoa/PassKitSoftLink.h:
  • pal/cocoa/PassKitSoftLink.mm:
  • pal/spi/cocoa/PassKitSPI.h:

Source/WebKit:

Leverage new PKShippingMethods SPI to provide both the general list of PKShippingMethod
and the default selected PKShippingMethods when creating/updating a payment request.

  • Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
  • Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::toPKShippingMethods): Added.
(WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest):
Add new helper to generate the PKShippingMethods from WebCore objects.

  • Platform/cocoa/PaymentAuthorizationPresenter.mm:

(WebKit::PaymentAuthorizationPresenter::completePaymentMethodSelection):
(WebKit::PaymentAuthorizationPresenter::completeShippingContactSelection):
(WebKit::PaymentAuthorizationPresenter::completeShippingMethodSelection):
(WebKit::PaymentAuthorizationPresenter::completeCouponCodeChange):
(WebKit::toPKShippingMethods): Deleted.

  • Platform/cocoa/WKPaymentAuthorizationDelegate.mm:

(-[WKPaymentAuthorizationDelegate completePaymentMethodSelection:]):
(-[WKPaymentAuthorizationDelegate completeShippingContactSelection:]):
(-[WKPaymentAuthorizationDelegate completeShippingMethodSelection:]):
(-[WKPaymentAuthorizationDelegate completeCouponCodeChange:]):
(-[WKPaymentAuthorizationDelegate _initWithRequest:presenter:]):
(toShippingMethod):
(-[WKPaymentAuthorizationDelegate _didSelectShippingMethod:completion:]):
(-[WKPaymentAuthorizationDelegate summaryItems]): Deleted.
(-[WKPaymentAuthorizationDelegate shippingMethods]): Deleted.
Drive-by: Delete unused methods.

Source/WTF:

Leverage new PKShippingMethods SPI to provide both the general list of PKShippingMethod
and the default selected PKShippingMethods when creating/updating a payment request.

  • wtf/PlatformEnableCocoa.h:
  • wtf/PlatformHave.h:

LayoutTests:

  • http/tests/paymentrequest/payment-request-change-shipping-option.https.html:
  • http/tests/paymentrequest/payment-request-change-shipping-option.https-expected.txt:
  • http/tests/paymentrequest/updateWith-shippingOptions.https.html:
  • http/tests/paymentrequest/updateWith-shippingOptions.https-expected.txt:
11:50 AM Changeset in webkit [285520] by sihui_liu@apple.com
  • 6 edits in trunk/Source

Keep track of captured data time in SpeechRecognizer
https://bugs.webkit.org/show_bug.cgi?id=232867

Reviewed by Youenn Fablet.

Source/WebCore:

The time parameter passed to SpeechRecognizer::dataCaptured is not started from zero.

Manually tested.

  • Modules/speech/SpeechRecognizer.cpp:

(WebCore::SpeechRecognizer::SpeechRecognizer):

  • Modules/speech/SpeechRecognizer.h:
  • Modules/speech/cocoa/SpeechRecognizerCocoa.mm:

(WebCore::SpeechRecognizer::dataCaptured):

Source/WebKit:

Removed a redundant call.

  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:

(WebKit::RemoteCaptureSampleManager::RemoteAudio::setStorage):

11:42 AM Changeset in webkit [285519] by Alan Coon
  • 9 edits
    2 adds in branches/safari-612-branch

Apply patch. rdar://problem/83971417

11:42 AM Changeset in webkit [285518] by Alan Coon
  • 4 edits
    2 adds in branches/safari-612-branch

Apply patch. rdar://problem/83863266

11:42 AM Changeset in webkit [285517] by Alan Coon
  • 6 edits in branches/safari-612-branch/Source/WebCore

Apply patch. rdar://problem/83419159

11:41 AM Changeset in webkit [285516] by Alan Coon
  • 3 edits
    6 adds in branches/safari-612-branch

Apply patch. rdar://problem/84116159

11:21 AM Changeset in webkit [285515] by ysuzuki@apple.com
  • 2 edits in trunk/Source/bmalloc

Unreviewed, keep enabling mac libpas on OSS build
https://bugs.webkit.org/show_bug.cgi?id=232026

  • bmalloc/BPlatform.h:
11:10 AM Changeset in webkit [285514] by Devin Rousso
  • 2 edits in trunk/Source/WebKit

Unreviewed internal build fix after r285424
<rdar://problem/85207411>

`
WKScrollView.mm:227:35: error: incompatible pointer to integer conversion assigning to 'BOOL' (aka 'signed char') from 'UIColor * _Nullable'
`

  • UIProcess/ios/WKScrollView.mm:

(-[WKScrollView setBackgroundColor:]):

11:05 AM Changeset in webkit [285513] by commit-queue@webkit.org
  • 11 edits
    1 delete in trunk/Source/WebCore

Unreviewed, reverting r285318.
https://bugs.webkit.org/show_bug.cgi?id=232894

broke Apple internal build

Reverted changeset:

"[Cocoa] Migrate from CTFontCopyVariationAxes() to
CTFontCopyVariationAxesInternal() if possible"
https://bugs.webkit.org/show_bug.cgi?id=232690
https://commits.webkit.org/r285318

11:02 AM Changeset in webkit [285512] by ysuzuki@apple.com
  • 2 edits in trunk/Source/bmalloc

Unreviewed, disabling libpas on ARM64 (not ARM64E!) for now due to performance issue only happening on newer SDK
https://bugs.webkit.org/show_bug.cgi?id=232026

  • bmalloc/BPlatform.h:
10:55 AM Changeset in webkit [285511] by Alan Coon
  • 8 edits in branches/safari-612-branch/Source

Versioning.

WebKit-7612.3.6

10:53 AM Changeset in webkit [285510] by Alan Coon
  • 1 copy in tags/Safari-612.3.5

Tag Safari-612.3.5.

10:53 AM Changeset in webkit [285509] by sihui_liu@apple.com
  • 3 edits in trunk/Source/WebKit

Fix wrong frame count of CARingBuffer in SpeechRecognitionRemoteRealtimeMediaSource
https://bugs.webkit.org/show_bug.cgi?id=232863
<rdar://83381842>

Reviewed by Youenn Fablet.

SpeechRecognitionRealtimeMediaSourceManager::Source uses shared ring buffer to pass audio data to
SpeechRecognitionRemoteRealtimeMediaSource. We used to ask CARingBuffer in
SpeechRecognitionRealtimeMediaSourceManager::Source to allocate with m_numberOfFrames and send m_numberOfFrames
to SpeechRecognitionRemoteRealtimeMediaSource (so SpeechRecognitionRemoteRealtimeMediaSource can create a
corresponding CARingBuffer). This is wrong because CARingBuffer::allocate() rounds up frameCount to power of
two, which means m_numberOfFrames may be not the number used. We should get the actual frameCount in the
setStorage callback of SharedRingBufferStorage, and pass that value to SpeechRecognitionRemoteRealtimeMediaSource.

Manually tested.

  • UIProcess/SpeechRecognitionRemoteRealtimeMediaSource.cpp:

(WebKit::SpeechRecognitionRemoteRealtimeMediaSource::setStorage):

  • WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.cpp:

(WebKit::SpeechRecognitionRealtimeMediaSourceManager::Source::Source):
(WebKit::SpeechRecognitionRealtimeMediaSourceManager::Source::storageChanged):

10:51 AM Changeset in webkit [285508] by Alan Coon
  • 5 edits in branches/safari-612-branch/Source

Revert r285236. rdar://problem/83950623

This reverts r285470.

10:25 AM Changeset in webkit [285507] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Line spanning inline box items should be treated as opaque bidi content
https://bugs.webkit.org/show_bug.cgi?id=232887

Reviewed by Antti Koivisto.

These "made-up" line spanning inline items (e.g. <span>first line<br>second line</span> <- inline box start on the second line) are
opaque to bidi and should be treated accordingly (this is similar to what we do in setBidiLevelForOpaqueInlineItems at InlineItemsBuilder::breakAndComputeBidiLevels).

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::initialize):

10:11 AM Changeset in webkit [285506] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, suppress scope check failures on Debug JSC tests
https://bugs.webkit.org/show_bug.cgi?id=215438

  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::initializeNumberFormat):

9:55 AM Changeset in webkit [285505] by commit-queue@webkit.org
  • 6 edits
    6 adds in trunk/LayoutTests

Import css/css-sizing/aspect-ratio tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=232783

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

LayoutTests/imported/w3c:

Import based on SHA d91cc9b3a0.

  • web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-002.html:
  • web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-004.html:
  • web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-031-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-031.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-032-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-032.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-033-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-033.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/w3c-import.log:

LayoutTests:

9:51 AM Changeset in webkit [285504] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

Reduce telemetry for well-understood sandbox rules
https://bugs.webkit.org/show_bug.cgi?id=232885
<rdar://problem/84950269>

Reviewed by Per Arne Vollan.

Now that we have telemetry showing the use case for this syscall, remove the telemetry.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
9:49 AM Changeset in webkit [285503] by Chris Dumez
  • 11 edits
    11 adds in trunk

Ignore BroadcastChannel::postMessage from detached iframe / closing worker contexts
https://bugs.webkit.org/show_bug.cgi?id=232693

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Resync BroadcastChannel WPT tests from upstream to gain test coverage.

  • web-platform-tests/webmessaging/broadcastchannel/basics.any.serviceworker.html: Added.
  • web-platform-tests/webmessaging/broadcastchannel/cross-origin-expected.txt: Added.
  • web-platform-tests/webmessaging/broadcastchannel/cross-origin.html: Added.
  • web-platform-tests/webmessaging/broadcastchannel/detached-iframe-expected.txt: Added.
  • web-platform-tests/webmessaging/broadcastchannel/detached-iframe.html: Added.
  • web-platform-tests/webmessaging/broadcastchannel/ordering-expected.txt: Added.
  • web-platform-tests/webmessaging/broadcastchannel/ordering.html: Added.
  • web-platform-tests/webmessaging/broadcastchannel/resources/cross-origin.html: Added.
  • web-platform-tests/webmessaging/broadcastchannel/resources/ordering.html: Added.
  • web-platform-tests/webmessaging/broadcastchannel/resources/service-worker.js: Added.
  • web-platform-tests/webmessaging/broadcastchannel/resources/w3c-import.log:
  • web-platform-tests/webmessaging/broadcastchannel/resources/worker.js:

(handler):

  • web-platform-tests/webmessaging/broadcastchannel/service-worker.https-expected.txt: Added.
  • web-platform-tests/webmessaging/broadcastchannel/service-worker.https.html: Added.
  • web-platform-tests/webmessaging/broadcastchannel/w3c-import.log:
  • web-platform-tests/webmessaging/broadcastchannel/workers-expected.txt:
  • web-platform-tests/webmessaging/broadcastchannel/workers.html:

Source/WebCore:

Ignore BroadcastChannel::postMessage from detached iframe / closing worker contexts:

Tests: imported/w3c/web-platform-tests/webmessaging/broadcastchannel/basics.any.serviceworker.html

imported/w3c/web-platform-tests/webmessaging/broadcastchannel/cross-origin.html
imported/w3c/web-platform-tests/webmessaging/broadcastchannel/detached-iframe.html
imported/w3c/web-platform-tests/webmessaging/broadcastchannel/ordering.html
imported/w3c/web-platform-tests/webmessaging/broadcastchannel/service-worker.https.html

  • dom/BroadcastChannel.cpp:

(WebCore::BroadcastChannel::postMessage):
(WebCore::BroadcastChannel::dispatchMessage):
(WebCore::BroadcastChannel::isEligibleForMessaging const):

  • dom/BroadcastChannel.h:
8:58 AM Changeset in webkit [285502] by Razvan Caliman
  • 2 edits
    1 add in trunk/Source/WebInspectorUI

Web Inspector: Add script to update CSSDocumentation.js
https://bugs.webkit.org/show_bug.cgi?id=232433
<rdar://problem/84753008>

Reviewed by Devin Rousso.

  • Scripts/update-inspector-css-documentation: Added.

Add a script to update the contextual CSS documentation data source at
Source/WebInspectorUI/UserInterface/External/CSSDocumentation/CSSDocumentation.js
with the latest information from the upstream data source.

  • UserInterface/Controllers/CSSManager.js:

(WI.CSSManager.prototype.canonicalNameForPropertyName):

Add a comment to keep the list of accepted prefixes in sync with the one from the script.

8:40 AM Changeset in webkit [285501] by Chris Dumez
  • 10 edits in trunk

New spec: Block external protocol handler in sandboxed frames
https://bugs.webkit.org/show_bug.cgi?id=231727
<rdar://problem/84498192>

Reviewed by Brent Fulgham.

Source/WebKit:

Per the HTML specification [1][2], we should prevent sandboxed iframes from opening
external applications by navigating to a URL with a custom procotol (e.g. rdar://).

Indeed, it would be surprising if malvertisers would be able to redirect you to
an external app.

To support valid use cases, we still allow such navigations in sandboxed iframes
if any of the following is true:

  • sandboxFlags contains "allow-top-navigation-by-user-activation" and hasTransientActivation is true
  • sandboxFlags contains "allow-top-navigation"
  • sandboxFlags contains "allow-popups"

[1] https://github.com/whatwg/html/issues/2191
[2] https://html.spec.whatwg.org/#hand-off-to-external-software

  • UIProcess/WebPageProxy.cpp:

(WebKit::frameSandboxAllowsOpeningExternalCustomProtocols):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:

(TEST):

8:11 AM Changeset in webkit [285500] by Wenson Hsieh
  • 5 edits in trunk/Source/WebKit

[iOS] Add a position information bit to indicate whether the hit-tested element is a paused video
https://bugs.webkit.org/show_bug.cgi?id=232861

Reviewed by Megan Gardner.

Add InteractionInformationAtPosition::isPausedVideo, a flag that is true when the position information request
is over a paused video element (or inside the media control shadow root underneath that paused video element, in
the case where native controls are shown).

  • Shared/ios/InteractionInformationAtPosition.h:
  • Shared/ios/InteractionInformationAtPosition.mm:

(WebKit::InteractionInformationAtPosition::encode const):
(WebKit::InteractionInformationAtPosition::decode):

Also rename imageElementContext to hostImageOrVideoElementContext to clarify that it (1) may now include
element contexts for video elements, and (2) unlike the regular elementContext, this includes the image or
video element that is the host for hit-tested content in the UA shadow root of the element corresponding to
elementContext.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
(-[WKContentView imageAnalysisGestureDidBegin:]):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::videoPositionInformation):

Additionally populate the image of the position information, in the case where includeImageData is set on
the incoming request.

(WebKit::hostVideoElementIgnoringImageOverlay):
(WebKit::imagePositionInformation):
(WebKit::elementPositionInformation):
(WebKit::WebPage::positionInformation):

8:08 AM Changeset in webkit [285499] by ntim@apple.com
  • 2 edits in trunk/LayoutTests/imported/w3c

Unreviewed, reverting r285488.
https://bugs.webkit.org/show_bug.cgi?id=232884

Linked with r285486 which was also reverted.

Reverted changeset:

"Rebaseline will-change-invalid.html after r285487 & r285486"
https://commits.webkit.org/r285488

Patch by Commit Queue <commit-queue@webkit.org> on 2021-11-09

7:25 AM Changeset in webkit [285498] by Simon Fraser
  • 8 edits in trunk/LayoutTests

Convert more wheel event tests to UIHelper.mouseWheelSequence()
https://bugs.webkit.org/show_bug.cgi?id=232847

Reviewed by Wenson Hsieh.

Add an options parameter to mouseWheelSequence() so we can have a version that doens't
wait.

Some tests need to have minor position changes to default the wheel event coalescing code
in WebWheelEventCoalescer.

Change some JS style things.

  • fast/scrolling/mac/momentum-axis-locking.html:
  • fast/scrolling/mac/overflow-hidden-on-one-axis-async-overflow.html:
  • fast/scrolling/mac/overflow-hidden-on-one-axis.html:
  • fast/scrolling/mac/programmatic-scroll-overrides-rubberband.html:
  • fast/scrolling/mac/wheel-event-deltas-are-not-filtered.html:
  • resources/ui-helper.js:

(window.UIHelper.async mouseWheelSequence):

6:48 AM Changeset in webkit [285497] by Ziran Sun
  • 8 edits
    2 adds in trunk

[css-grid] update the content-sized grid width before laying out a grid item with block constraints and aspect-ratio
https://bugs.webkit.org/show_bug.cgi?id=231802

Reviewed by Javier Fernandez.
Source/WebCore:

For a grid item with an aspect-ratio, if it has block-constraints such as the relative logical height
case we consider in this CL, it should try and resolve it if possible and transfer this size into
the inline direction for the min/max content size. For the case that the grid width is content sized,
we need to update the width before laying out the grid items. Since the min-content contribution of
the grid item has changed based on the row sizes calculated in step 2 of sizing algorithm, we also
need to repeat the sizing algorithm steps to update the width of the track sizes.

  • rendering/GridLayoutFunctions.cpp:

(WebCore::GridLayoutFunctions::isAspectRatioBlockSizeDependentChild):

  • rendering/GridLayoutFunctions.h:
  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::updateGridAreaForAspectRatioItems):

  • rendering/RenderGrid.h:

LayoutTests:

Unskip the tests that are now passing and add a new test to check track size updates.

  • imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-005-expected.html: Added.
  • imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-005.html: Added.
  • TestExpectations:
  • platform/ios-wk2/TestExpectations:
6:40 AM Changeset in webkit [285496] by clopez@igalia.com
  • 5 edits in trunk/Tools

[EWS] Allow the optimization of running only the subset of failed tests on run-layout-tests-without-patch also for patches modifying the TestExpectations files
https://bugs.webkit.org/show_bug.cgi?id=231265

Reviewed by Alexey Proskuryakov.

On r274475 an optimization was applied to run-layout-tests-without-patch to only
run the subset of tests that failed with patch instead of the whole layout tests.
But this optimization had a corner case where it couldn't be applied.
It seems that we can still apply this optimization in this corner case if we pass
'--skipped=always' to run-webkit-tests so that Skipped tests are not run even if
those are specified as arguments on the command-line.

  • CISupport/ews-build/steps.py:

(RunWebKitTests.setLayoutTestCommand):
(RunWebKitTestsWithoutPatch.setLayoutTestCommand):

  • CISupport/ews-build/steps_unittest.py:
  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

(RunTest.test_ews_corner_case_failing_test):
(RunTest):
(RunTest.test_ews_corner_case_failing_directory):
(RunTest.test_ews_corner_case_skipped_test):
(RunTest.test_ews_corner_case_skipped_directory):

  • Scripts/webkitpy/port/test.py:
6:35 AM Changeset in webkit [285495] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Rendering bug with height: min-content, position: absolute, and box-sizing: border-box
https://bugs.webkit.org/show_bug.cgi?id=232816
<rdar://problem/85154265>

Reviewed by Antti Koivisto.

Source/WebCore:

After r199895, computeIntrinsicLogicalContentHeightUsing started returning the inflated height (content height + border + padding)
as content height for border-box box sizing. While some of the callers expect this inflated height, computePositionedLogicalHeightUsing
needs the actual content height. This is also similar to what we do with the width values.

Test: fast/block/out-of-flow-intrinsic-height.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computePositionedLogicalHeightUsing const):

LayoutTests:

  • fast/block/out-of-flow-intrinsic-height-expected.html: Added.
  • fast/block/out-of-flow-intrinsic-height.html: Added.
6:31 AM Changeset in webkit [285494] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Unreviewed, reverting r285436.
https://bugs.webkit.org/show_bug.cgi?id=232878

Broke WPE build

Reverted changeset:

"[WebXR] three.js demos don't work"
https://bugs.webkit.org/show_bug.cgi?id=232798
https://commits.webkit.org/r285436

5:53 AM Changeset in webkit [285493] by commit-queue@webkit.org
  • 20 edits in trunk

Unreviewed, reverting r285486.
https://bugs.webkit.org/show_bug.cgi?id=232876

Made fast/ruby/generated-before-counter-doesnt-crash.html
flaky, possibly indicating perf problem

Reverted changeset:

"[CSS Cascade Layers] Support 'revert-layer' value"
https://bugs.webkit.org/show_bug.cgi?id=232236
https://commits.webkit.org/r285486

5:08 AM Changeset in webkit [285492] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Refactor consumeWillChange() to make better use of consumeCustomIdent()
https://bugs.webkit.org/show_bug.cgi?id=232874

Reviewed by Antti Koivisto.

consumeCustomIdent() already rejects for non-ident types and reserved keywords.
Make use of that to make the function more readable.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeWillChange):

4:15 AM Changeset in webkit [285491] by Angelos Oikonomopoulos
  • 2 edits in trunk/JSTests

Unskip array-buffer-view-watchpoint-can-be-fired-in-really-add-in-dfg on ARM
https://bugs.webkit.org/show_bug.cgi?id=232811

Unreviewed gardening.

Gate the number of iterations adjustment on $memoryLimited instead of
the arch.

  • stress/array-buffer-view-watchpoint-can-be-fired-in-really-add-in-dfg.js:
4:12 AM Changeset in webkit [285490] by commit-queue@webkit.org
  • 2 edits in trunk/JSTests

Unskip deltablue-for-of.js on arm and mips
https://bugs.webkit.org/show_bug.cgi?id=227291

Unreviewed gardening.

The test is not crashing but timeouts because of the number of
iterations. So to enable testing in more archs, we reduced the
number of iterations and constraints.

Patch by Mikhail R. Gadelha <Mikhail R. Gadelha> on 2021-11-09

  • typeProfiler/deltablue-for-of.js:

(deltaBlue):

3:48 AM Changeset in webkit [285489] by Angelos Oikonomopoulos
  • 2 edits in trunk/JSTests

Unskip microbenchmarks/memcpy-typed-loop.js on arm/mips
https://bugs.webkit.org/show_bug.cgi?id=232813

Unreviewed gardening.

Can't reproduce this any more.

  • microbenchmarks/memcpy-typed-loop.js:
2:49 AM Changeset in webkit [285488] by ntim@apple.com
  • 2 edits in trunk/LayoutTests/imported/w3c

Rebaseline will-change-invalid.html after r285487 & r285486

Unreviewed test gardening

  • web-platform-tests/css/css-will-change/parsing/will-change-invalid-expected.txt:
1:31 AM Changeset in webkit [285487] by ntim@apple.com
  • 5 edits in trunk

Use isValidCustomIdentifier in consumeWillChange
https://bugs.webkit.org/show_bug.cgi?id=232868

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Edit existing WPT to be more exaustive: https://github.com/web-platform-tests/wpt/pull/31556

  • web-platform-tests/css/css-will-change/parsing/will-change-invalid.html:
  • web-platform-tests/css/css-will-change/parsing/will-change-invalid-expected.txt:

Source/WebCore:

This bit specifically implements <custom-ident>, see:
https://drafts.csswg.org/css-will-change/#will-change

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeWillChange):

1:29 AM Changeset in webkit [285486] by Antti Koivisto
  • 20 edits in trunk

[CSS Cascade Layers] Support 'revert-layer' value
https://bugs.webkit.org/show_bug.cgi?id=232236
<rdar://problem/84879369>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-cascade/revert-layer-008-expected.txt:

Source/WebCore:

'revert-layer' keyword rolls back the value computed by the cascade to the one coming from the layer below.

https://www.w3.org/TR/css-cascade-5/#revert-layer

  • css/CSSPrimitiveValue.h:
  • css/CSSValue.cpp:

(WebCore::CSSValue::isRevertLayerValue const):

  • css/CSSValue.h:
  • css/CSSValueKeywords.in:

Add a 'revert-layer' keyword.

  • css/parser/CSSParserIdioms.h:

(WebCore::isCSSWideKeyword):

Make the keyword CSS-wide.

(WebCore::isValidCustomIdentifier):

  • style/CascadeLevel.h:

(WebCore::Style::operator--):

Add decrement operator.

(WebCore::Style::allCascadeLevels): Deleted.

  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::addElementStyleProperties):
(WebCore::Style::ElementRuleCollector::transferMatchedRules):

Pass the casdade layer priority so it is available when resolving the cascade.

(WebCore::Style::ElementRuleCollector::addElementInlineStyleProperties):

Add a bit indicating if the properties came from a style attribute. This is needed for correct resolution of !important with cascade layers.

  • style/ElementRuleCollector.h:
  • style/PropertyCascade.cpp:

(WebCore::Style::PropertyCascade::PropertyCascade):

Specify cascade levels in terms of the maximum level instead of an OptionSet of levels. This makes things simpler.
Make it a member.
Provide maximum cascade layer priority when constructing rollback cascade.

(WebCore::Style::PropertyCascade::buildCascade):
(WebCore::Style::PropertyCascade::setPropertyInternal):
(WebCore::Style::PropertyCascade::addMatch):

Ignore properties with cascade level higher than the maximum.

(WebCore::Style::PropertyCascade::addImportantMatches):

Take cascade layers into accouny when sorting important matches.

(WebCore::Style::PropertyCascade::propertyCascadeForRollback const): Deleted.

Move rollback cascades to Builder.

  • style/PropertyCascade.h:

(WebCore::Style::PropertyCascade::maximumCascadeLevel const):
(WebCore::Style::PropertyCascade::maximumCascadeLayerPriority const):

  • style/StyleBuilder.cpp:

(WebCore::Style::Builder::Builder):

Specify cascade levels in terms of the maximum level instead of an OptionSet of levels.

(WebCore::Style::Builder::applyCascadeProperty):
(WebCore::Style::Builder::applyProperty):

Construct rollback cascade for 'revert-layer' case too. This is similar to 'revert'.

(WebCore::Style::Builder::ensureRollbackCascadeForRevert):
(WebCore::Style::Builder::ensureRollbackCascadeForRevertLayer):

Make the rollback cascades and store them into a HashMap.

(WebCore::Style::Builder::makeRollbackCascadeKey):

  • style/StyleBuilder.h:
  • style/StyleBuilderState.h:
  • style/StyleResolver.cpp:

(WebCore::Style::Resolver::styleForKeyframe):
(WebCore::Style::Resolver::styleForPage):
(WebCore::Style::Resolver::applyMatchedProperties):

Adopt to the new interface.

LayoutTests:

12:37 AM Changeset in webkit [285485] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk/LayoutTests

[GLIB] Update test expectations and baselines. Unreviewed test gardening.
https://bugs.webkit.org/show_bug.cgi?id=232862

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-11-09

LayoutTests/imported/w3c:

  • web-platform-tests/html/canvas/offscreen/text/2d.text.setFont.mathFont-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.worker-expected.txt: Added.

LayoutTests:

  • platform/glib/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/selection/selection-select-all-move-input-crash-expected.txt:
12:27 AM Changeset in webkit [285484] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

Stop expecting imported/w3c/web-platform-tests/css/css-pseudo/marker-animate-002.html to fail
https://bugs.webkit.org/show_bug.cgi?id=232834

Reviewed by Antti Koivisto.

12:15 AM Changeset in webkit [285483] by ntim@apple.com
  • 3 edits in trunk/Source/WebCore

Re-use isCSSWideKeyword in CSSVariableParser.cpp & CSSPropertyParser.cpp
https://bugs.webkit.org/show_bug.cgi?id=232830

Reviewed by Antti Koivisto.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::canParseTypedCustomPropertyValue):

  • css/parser/CSSVariableParser.cpp:

(WebCore::classifyVariableRange):

12:05 AM Changeset in webkit [285482] by Martin Robinson
  • 5 edits
    2 adds in trunk

A mask or isolation should set transform-style to flat
https://bugs.webkit.org/show_bug.cgi?id=232491

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Update test results showing newly passing test.

  • web-platform-tests/css/css-transforms/preserve-3d-flat-grouping-properties-expected.txt:

Source/WebCore:

Tests: transforms/preserve-3d-flat-webkit-grouping-properties-expected.txt: Added.

transforms/preserve-3d-flat-webkit-grouping-properties.html: Added.

This is covered by an existing WPT test:

imported/w3c/web-platform-tests/css/css-transforms/preserve-3d-flat-grouping-properties.html

Ensure that values of mask-image other than none, mask-border-source other than none,
and isolation: isolate all force used style of preserve-3d: flat.

  • style/StyleAdjuster.cpp:

(WebCore::Style::Adjuster::adjust const):

LayoutTests:

  • transforms/3d/preserve-3d-flat-webkit-grouping-properties-expected.txt: Added.
  • transforms/3d/preserve-3d-flat-webkit-grouping-properties.html: Added.
Note: See TracTimeline for information about the timeline view.