Timeline



Dec 25, 2021:

10:16 PM Changeset in webkit [287442] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Turn InlineContentBreaker::ContinuousContent's leading/trailing member variables to std::optional<InlineLayoutUnit>
https://bugs.webkit.org/show_bug.cgi?id=234676

Reviewed by Antti Koivisto.

While an empty (logical width = 0) ContinuousContent takes up no space, it should not be mistaken for collapsed content
(i.e when m_logicalWidth(0) == m_trailingCollapsibleWidth(0), hasCollapsibleContent() should still return false)

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::InlineContentBreaker::tryBreakingOverflowingRun const):
(WebCore::Layout::InlineContentBreaker::tryBreakingPreviousNonOverflowingRuns const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::appendToRunList): Add a dedicated function to deal with append and logicalWidth.
(WebCore::Layout::InlineContentBreaker::ContinuousContent::resetTrailingWhitespace): Turn trailing whitespace into leading if applicable.
(WebCore::Layout::InlineContentBreaker::ContinuousContent::append): Add dedicated functions for each inline item types.

  • layout/formattingContexts/inline/InlineContentBreaker.h:

(WebCore::Layout::InlineContentBreaker::ContinuousContent::leadingCollapsibleWidth const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::trailingCollapsibleWidth const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::hasCollapsibleContent const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::isFullyCollapsible const):

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineCandidate::InlineContent::appendInlineItem):

10:10 PM Changeset in webkit [287441] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[iOS] Rebaselining after r287440.

Unreviewed.

  • platform/ios/fast/borders/rtl-border-01-expected.txt: Progression. Content does not overflow the line anymore.
12:55 PM Changeset in webkit [287440] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Remove redundant InlineContentBreaker::shouldKeepEndOfLineWhitespace
https://bugs.webkit.org/show_bug.cgi?id=234668

Reviewed by Antti Koivisto.

This is in preparation for moving pre-wrap checking out of InlineContentBreaker.

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::InlineContentBreaker::shouldKeepEndOfLineWhitespace const): Deleted.

  • layout/formattingContexts/inline/InlineContentBreaker.h:
11:18 AM Changeset in webkit [287439] by commit-queue@webkit.org
  • 2 edits in trunk

Add my github username to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=231666

Patch by Sergey Rubanov <Sergey Rubanov> on 2021-12-25
Reviewed by Alexey Proskuryakov.

  • metadata/contributors.json:
10:34 AM Changeset in webkit [287438] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Fully collapsible whitespace content should always stay on the current line
https://bugs.webkit.org/show_bug.cgi?id=234667

Reviewed by Antti Koivisto.

Fully collapsible trailing whitespace content (normal/nowrap/preline) gets removed at
the trimming phase so it always "fits" the current line.
This is also in preparation for decoupling removeable and hanging trailing content.

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):

7:36 AM Changeset in webkit [287437] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] InlineContentBreaker should know about the hanging content width
https://bugs.webkit.org/show_bug.cgi?id=234662

Reviewed by Antti Koivisto.

Pass in the trailing hanging content width to InlineContentBreaker as this specific type
of content (e.g. pre-wrap whitespace) should be ignored when checking for content fit.

(Note that we already ignore it through the shouldKeepEndOfLineWhitespace() call in
InlineContentBreaker::processOverflowingContent, but this patch is in preparation for making hanging content logic
more inline with the spec. -and also removing shouldKeepEndOfLineWhitespace needs some more changes.)

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):

  • layout/formattingContexts/inline/InlineContentBreaker.h:
  • layout/formattingContexts/inline/InlineLine.h:

(WebCore::Layout::Line::hangingTrailingContentWidth const):
(WebCore::Layout::Line::hangingWhitespaceWidth const): Deleted.

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::layoutInlineContent):
(WebCore::Layout::LineBuilder::handleInlineContent):

2:13 AM Changeset in webkit [287436] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Unreviewed, reverting r285088.
https://bugs.webkit.org/show_bug.cgi?id=234680

From A/B test, we probably need to revert both, 285087 and
285088

Reverted changeset:

"Web process shouldn't crash if
ImageBuffer::ensureBackendCreated() fails"
https://bugs.webkit.org/show_bug.cgi?id=232520
https://commits.webkit.org/r285088

Dec 24, 2021:

6:22 PM Changeset in webkit [287435] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, remove -webkit-svg-shadow from CSSProperties.json

It's been unshipped since 2018, and most removed properties aren't kept in CSSProperties.json
(e.g. -webkit-border-fit, -webkit-background-composite, -webkit-margin-collapse).

There's not much point to keep it in there.

  • css/CSSProperties.json:
6:03 PM Changeset in webkit [287434] by ntim@apple.com
  • 23 edits
    3 deletes in trunk

Internally unprefix -webkit-font-kerning CSS property
https://bugs.webkit.org/show_bug.cgi?id=234673

Reviewed by Myles C. Maxfield.

Same to what was done in bug 234602 for text-emphasis CSS properties.

LayoutTests/imported/w3c:

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

Source/WebCore:

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

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

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

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::computedAttributesForElement):

LayoutTests:

  • fast/css/getComputedStyle/computed-style-expected.txt:
  • fast/css/getComputedStyle/computed-style-font-family-expected.txt:
  • fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • fast/css/getComputedStyle/resources/property-names.js:
  • platform/glib/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/glib/fast/css/getComputedStyle/computed-style-font-family-expected.txt: Removed.
  • platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/glib/svg/css/getComputedStyle-basic-expected.txt:
  • platform/ios/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/ios/fast/css/getComputedStyle/computed-style-font-family-expected.txt: Removed.
  • 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/svg/css/getComputedStyle-basic-expected.txt:
  • platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/mac/fast/css/getComputedStyle/computed-style-font-family-expected.txt: Removed.
  • platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/mac/svg/css/getComputedStyle-basic-expected.txt:
  • svg/css/getComputedStyle-basic-expected.txt:
1:59 PM Changeset in webkit [287433] by ntim@apple.com
  • 32 edits
    6 deletes in trunk

Remove non-standard -webkit-background-composite CSS property
https://bugs.webkit.org/show_bug.cgi?id=234661

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:

Allows removing the non-standard -webkit-mask-composite CSS values (which do not match the standard
mask-composite ones) more easily later on.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

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

(WebCore::consumePrefixedMaskComposite):
(WebCore::consumeMaskComposite):
(WebCore::consumeBackgroundComponent):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::consumePrefixedBackgroundComposite): Deleted.
(WebCore::consumeBackgroundComposite): Deleted.

  • rendering/RenderLayerBacking.cpp:

(WebCore::supportsDirectlyCompositedBoxDecorations):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::backgroundRepeatY const):
(WebCore::RenderStyle::backgroundComposite const): Deleted.

Source/WebInspectorUI:

  • UserInterface/Models/CSSKeywordCompletions.js:

LayoutTests:

  • compositing/background-color/background-color-composite-expected.html: Removed.
  • compositing/background-color/background-color-composite.html: Removed.
  • fast/backgrounds/bgCompositeCopy-expected.txt: Removed.
  • fast/backgrounds/bgCompositeCopy.html: Removed.
  • fast/backgrounds/composite-highlight-is-invalid-expected.txt: Removed.
  • fast/backgrounds/composite-highlight-is-invalid.html: Removed.
  • fast/backgrounds/multiple-backgrounds-computed-style-expected.txt:
  • fast/backgrounds/multiple-backgrounds-computed-style.html:
  • 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/body-stuck-with-dirty-bit-with-columns.html:
  • platform/glib/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/glib/svg/css/getComputedStyle-basic-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • 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/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/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • svg/css/getComputedStyle-basic-expected.txt:
1:39 PM Changeset in webkit [287432] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

[Win] MSVC reports "DownloadBundleWin.cpp(87): error C2362: initialization of 'magic' is skipped by 'goto exit'" with /std:c++20
https://bugs.webkit.org/show_bug.cgi?id=234504
<rdar://problem/86755997>

Reviewed by Darin Adler.

  • platform/network/win/DownloadBundleWin.cpp:

(WebCore::DownloadBundle::appendResumeData): Use fclose directly.
(WebCore::DownloadBundle::extractResumeData): Ditto.
(WebCore::DownloadBundle::fileCloser): Deleted.

1:02 PM Changeset in webkit [287431] by Simon Fraser
  • 28 edits
    2 deletes in trunk

Apply the scroll delta in the "began" wheel event
https://bugs.webkit.org/show_bug.cgi?id=234645

Reviewed by Wenson Hsieh.

Source/WebCore:

ScrollingEffectsController::handleWheelEvent() previously early returned without applying
the delta in the "Began" event, which means that scrolling started a frame later than it
should have. For snappier scrolling in Safari, we should apply this delta.

  • platform/ScrollSnapAnimatorState.cpp:

(WebCore::ScrollSnapAnimatorState::setupAnimationForState):

  • platform/mac/ScrollingEffectsController.mm:

(WebCore::ScrollingEffectsController::handleWheelEvent):

Source/WebKit:

  • Shared/WebWheelEventCoalescer.cpp:

(WebKit::WebWheelEventCoalescer::nextEventToDispatch): Fix logging typo.

LayoutTests:

Fix various test issues, and rebase tests affected by the change.

  • fast/scrolling/iframe-scrollable-after-back.html:
  • fast/scrolling/overflow-scrollable-after-back.html: Applying the delta from the "began" event caused

multiple scroll events to fire, triggering multiple navigations (previously, event coalescing would result in a single
scroll for multiple "changed" events).
Fix by using UIHelper.mouseWheelScrollAt() and logging the scroll only once.

  • fast/scrolling/latching/iframe-latch-small-deltas-expected.txt: Accumulated offset includes "began" delta.
  • fast/scrolling/latching/iframe-latch-small-deltas.html: Ditto
  • fast/scrolling/latching/latching-and-wheel-events-expected.txt: Ditto
  • fast/scrolling/latching/overflow-in-iframe-latching-expected.txt: Ditto
  • fast/scrolling/mac/momentum-animator-in-overflow.html: Remove comment.
  • fast/scrolling/mac/momentum-animator-maybegin-stops.html: Ditto
  • fast/scrolling/mac/momentum-animator.html: Ditto
  • fast/scrolling/mac/momentum-event-sequence-expected.txt: Accumulated offset includes "began" delta.
  • fast/scrolling/mac/momentum-event-sequence.html: Accumulated offset includes "began" delta.
  • fast/scrolling/mac/rubberband-overflow-in-wheel-region.html: Wheel event coalescing resulted in

unpredictable behavior, so ensure there is one.

  • platform/mac-wk1/fast/scrolling/latching/iframe-latch-small-deltas-expected.txt: Removed.
  • platform/mac-wk1/fast/scrolling/latching/latching-and-wheel-events-expected.txt: Accumulated offset includes "began" delta.
  • platform/mac-wk1/fast/scrolling/latching/overflow-in-iframe-latching-expected.txt: Ditto
  • scrollingcoordinator/mac/latching/horizontal-overflow-in-vertical-overflow-expected.txt: Ditto
  • scrollingcoordinator/mac/latching/horizontal-overflow-in-vertical-overflow.html: Ditto
  • tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt: Ditto
  • tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt: Ditto
  • tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt: Ditto
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html: Test was designed with overlay scrollbars,

allowing for some between-snapoint slow that allowed an x delta to get applied. Fix to make room for scrollbars so that
snapping is always predictable.

12:20 PM Changeset in webkit [287430] by ntim@apple.com
  • 8 edits in trunk

Unreviewed, r287356 followups and rebaselining for glib

Source/WebCore:

  • css/html.css:

(rt): unprefix usage of -webkit-text-emphasis

  • style/StyleBuilderCustom.h:

Sort per Darin Adler's comment

LayoutTests:

  • platform/glib/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/glib/svg/css/getComputedStyle-basic-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
10:55 AM Changeset in webkit [287429] by ntim@apple.com
  • 43 edits
    13 deletes in trunk

Remove non-standard -webkit-margin-collapse CSS property and longhands
https://bugs.webkit.org/show_bug.cgi?id=190788

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 MarginCollapse const): Deleted.

  • css/CSSProperties.json:
  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue const):

  • css/parser/CSSParserFastPaths.cpp:

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

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseShorthand):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::isSelfCollapsingBlock const):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::MarginInfo::MarginInfo):
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::collapseMarginsWithChildInfo):
(WebCore::RenderBlockFlow::clearFloatsIfNeeded):
(WebCore::RenderBlockFlow::marginBeforeEstimateForChild const):
(WebCore::RenderBlockFlow::estimateLogicalTopPosition):
(WebCore::RenderBlockFlow::setCollapsedBottomMargin):
(WebCore::RenderBlockFlow::handleAfterSideOfBlock):
(WebCore::RenderBlockFlow::setMustDiscardMarginBefore): Deleted.
(WebCore::RenderBlockFlow::setMustDiscardMarginAfter): Deleted.
(WebCore::RenderBlockFlow::mustDiscardMarginBefore const): Deleted.
(WebCore::RenderBlockFlow::mustDiscardMarginAfter const): Deleted.
(WebCore::RenderBlockFlow::mustDiscardMarginBeforeForChild const): Deleted.
(WebCore::RenderBlockFlow::mustDiscardMarginAfterForChild const): Deleted.
(WebCore::RenderBlockFlow::mustSeparateMarginBeforeForChild const): Deleted.
(WebCore::RenderBlockFlow::mustSeparateMarginAfterForChild const): Deleted.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
(WebCore::RenderBlockFlow::MarginInfo::setPositiveMargin):
(WebCore::RenderBlockFlow::MarginInfo::setNegativeMargin):
(WebCore::RenderBlockFlow::MarginInfo::setPositiveMarginIfLarger):
(WebCore::RenderBlockFlow::MarginInfo::setNegativeMarginIfLarger):
(WebCore::RenderBlockFlow::MarginInfo::setMargin):
(WebCore::RenderBlockFlow::MarginInfo::setCanCollapseMarginAfterWithChildren):
(WebCore::RenderBlockFlow::MarginInfo::negativeMargin const):
(WebCore::RenderBlockFlow::initMaxMarginValues):
(WebCore::RenderBlockFlow::MarginInfo::setDiscardMargin): Deleted.
(WebCore::RenderBlockFlow::MarginInfo::discardMargin const): Deleted.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::textOverflow const):
(WebCore::RenderStyle::setTextOverflow):
(WebCore::RenderStyle::initialTextOverflow):
(WebCore::RenderStyle::marginBeforeCollapse const): Deleted.
(WebCore::RenderStyle::marginAfterCollapse const): Deleted.
(WebCore::RenderStyle::setMarginBeforeCollapse): Deleted.
(WebCore::RenderStyle::setMarginAfterCollapse): Deleted.
(WebCore::RenderStyle::initialMarginBeforeCollapse): Deleted.
(WebCore::RenderStyle::initialMarginAfterCollapse): Deleted.

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

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):

Source/WebInspectorUI:

  • UserInterface/Models/CSSKeywordCompletions.js:

LayoutTests:

For fast/multicol/offset-top-left.html, reproduced the same visual result without
-webkit-border-collapse: separate. Unfortunately, offsetTop/offsetLeft aren't correct
in flipped writing mode despite correct visual results.

Filed webkit.org/b/234664 for the issue (which was pre-existing this patch).

  • fast/block/margin-collapse/webkit-margin-collapse-container-expected.html: Removed.
  • fast/block/margin-collapse/webkit-margin-collapse-container.html: Removed.
  • fast/block/margin-collapse/webkit-margin-collapse-floats-expected.html: Removed.
  • fast/block/margin-collapse/webkit-margin-collapse-floats.html: Removed.
  • fast/block/margin-collapse/webkit-margin-collapse-separate-position-expected.txt: Removed.
  • fast/block/margin-collapse/webkit-margin-collapse-separate-position.html: Removed.
  • fast/block/margin-collapse/webkit-margin-collapse-siblings-bt-expected.html: Removed.
  • fast/block/margin-collapse/webkit-margin-collapse-siblings-bt.html: Removed.
  • fast/block/margin-collapse/webkit-margin-collapse-siblings-expected.html: Removed.
  • fast/block/margin-collapse/webkit-margin-collapse-siblings.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/css/getPropertyValue-webkit-margin-collapse-expected.txt: Removed.
  • fast/css/getPropertyValue-webkit-margin-collapse.html: Removed.
  • fast/css/inherit-initial-shorthand-values-expected.txt:
  • fast/css/inherit-initial-shorthand-values.html:
  • fast/css/remove-shorthand-expected.txt:
  • fast/css/remove-shorthand.html:
  • fast/multicol/offset-top-left-expected.txt:
  • fast/multicol/offset-top-left.html:
  • fast/text/text-combine-crash.html:
  • platform/glib/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/glib/svg/css/getComputedStyle-basic-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt: Removed.
  • 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/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/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
9:06 AM Changeset in webkit [287428] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Simplify test for startOfLastParagraph in InsertListCommand::doApply
https://bugs.webkit.org/show_bug.cgi?id=234600

Patch by Frederic Wang <fwang@igalia.com> on 2021-12-24
Reviewed by Darin Adler.

Current test is !startOfLastParagraph.deepEquivalent().anchorNode()->isConnected(). It could
be replaced with the less verbose startOfLastParagraph.isOrphan() which is equivalent to
startOfLastParagraph.deepEquivalent().isOrphan() and so to the condition
startOfLastParagraph.deepEquivalent().anchorNode() &&
!startOfLastParagraph.deepEquivalent().anchorNode()->isConnected(). A difference can only
happen for a page where anchorNode() is a null pointer. In such a test case exists, then it
is already crashing with a null ptr deref anyway.

No new tests, behavior essentially unchanged.

  • editing/InsertListCommand.cpp:

(WebCore::InsertListCommand::doApply): Use startOfLastParagraph.isOrphan().

8:57 AM Changeset in webkit [287427] by Simon Fraser
  • 2 edits in trunk

Add pycache and DerivedData to the .gitignore file
https://bugs.webkit.org/show_bug.cgi?id=234656

Reviewed by Daniel Bates.

  • .gitignore:
8:46 AM Changeset in webkit [287426] by weinig@apple.com
  • 4 edits
    2 adds in trunk

On systems without CG support for alpha premultiplied gradients, the CGGradientRef path should still be used for the subset of gradients that can transformed
https://bugs.webkit.org/show_bug.cgi?id=234653

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/gradients/alpha-premultiplied-representable-by-unpremultiplied.html

Optimize gradient rendering on systems without a version of CoreGraphics that supports
alpha premultiplied gradients by using the CGGradientRef code path for the subset of
alpha premultiplied gradients that can be represented as alpha non-premultiplied gradients.

Two types of optimizations are possible for two classes of this subset:

  1. Any gradient that uses the same alpha value for all color stops can be used as is with the alpha non-premultiplied CGGradientRef.
  2. Any gradient that conforms to the rule that "any two consecutive color stops must either have one that is fully transparent or have the same alpha value for both" can be transformed into an identical alpha non-premultiplied gradient by transforming the fully transparent stops into either one or two stops. A comment in the code goes into much more detail about this.
  • platform/graphics/cg/GradientRendererCG.cpp:

(WebCore::classifyAlphaType):
(WebCore::analyzeColorStopsForEmulatedAlphaPremuliplicationOppertunity):
(WebCore::alphaTransformStopsToEmulateAlphaPremuliplication):
(WebCore::GradientRendererCG::pickStrategy const):

LayoutTests:

Add tests of gradients that can render identically with both alpha premultiplied and non-premultiplied gradients
either using the same color stop list or a transformed one.

The main test page contains the alpha premultiplied gradients (which is the default now for CSS gradients), while
the -expected.html contains the alpha non-premultiplied gradients and has alpha premultiplied interpolation explicitly
disabled via a CSSGradientPremultipliedAlphaInterpolationEnabled=false comment command.

  • fast/gradients/alpha-premultiplied-representable-by-unpremultiplied-expected.html: Added.
  • fast/gradients/alpha-premultiplied-representable-by-unpremultiplied.html: Added.
  • platform/glib/TestExpectations: Disable on non-CoreGraphics ports.
2:50 AM Changeset in webkit [287425] by Carlos Garcia Campos
  • 4 edits in trunk

[GTK][a11y] Expose live region attributes with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234637

Reviewed by Adrian Perez de Castro.

Source/WebCore:

  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::attributes const):

Tools:

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:

(WTR::AccessibilityUIElement::stringAttributeValue):
(WTR::AccessibilityUIElement::boolAttributeValue):
(WTR::AccessibilityUIElement::isAttributeSupported):

2:48 AM Changeset in webkit [287424] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GTK][a11y] Expose the right roles for math elements with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234634

Reviewed by Adrian Perez de Castro.

This is missing with ATSPI causing all a11y mathml layout tests to fail.

  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::atspiRole):
(WebCore::AccessibilityObjectAtspi::attributes const):
(WebCore::AccessibilityObjectAtspi::effectiveRole const):
(WebCore::AccessibilityObjectAtspi::effectiveRoleName const):
(WebCore::AccessibilityObjectAtspi::effectiveLocalizedRoleName const):

2:47 AM Changeset in webkit [287423] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GTK][a11y] Expose list items with pseudo marker as List instead of Group with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234633

Reviewed by Adrian Perez de Castro.

This happens because pseudo markers don't have the ListMarker role, but StaticText that we ignore.

Fixes accessibility/list-detection2.html.

  • accessibility/AccessibilityList.cpp:

(WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers): Add ATSPI ifdef too.

Dec 23, 2021:

11:47 PM Changeset in webkit [287422] by Fujii Hironori
  • 2 edits in trunk

REGRESSION(r287412)[WinCairo] error C2338: You've instantiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align > alignof(max_align_t)).
https://bugs.webkit.org/show_bug.cgi?id=234658

Unreviewed build fix.

After r287412, WinCairo Debug can't compile due to the following error.

C:\MSVS\VC\Tools\MSVC\14.28.29910\include\type_traits(1066):

error C2338: You've instantiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align > alignof(max_align_t)).
Before VS 2017 15.8, the member "type" would non-conformingly have an alignment of only alignof(max_align_t).
VS 2017 15.8 was fixed to handle this correctly, but the fix inherently changes layout and breaks binary compatibility
(*only* for uses of aligned_storage with extended alignments).
Please define either (1) _ENABLE_EXTENDED_ALIGNED_STORAGE to acknowledge that you understand this message and that you actually want a type with an extended alignment,
or (2) _DISABLE_EXTENDED_ALIGNED_STORAGE to silence this message and get the old non-conforming behavior.

  • Source/cmake/OptionsMSVC.cmake: Added _ENABLE_EXTENDED_ALIGNED_STORAGE macro.
9:58 PM Changeset in webkit [287421] by mark.lam@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

Make DeferredWorkTimer::addPendingWork() return a Ticket.
https://bugs.webkit.org/show_bug.cgi?id=234628
rdar://84260429

Reviewed by Yusuke Suzuki.

  1. Make Ticket a unique token instead of the JSObject* target object. The Ticket is now a pointer to the TicketData in the pending work list.
  1. Instead of taking a Ticket argument, DeferredWorkTimer::addPendingWork() now takes a JSObject* target argument explicitly, and returns the Ticket for the added TicketData instead.

All the relevant DeferredWorkTimer APIS already take a Ticket as an argument.
This ensures that addPendingWork() is called before we start doing work with
these APIs (especially scheduleWorkSoon()).

  1. Previously, addPendingWork() will only save one instance of TicketData for a given JSObject* key. With this patch, we'll register a new TicketData instance for every call to addPendingWork(), and return a unique Ticket for it.

This is needed because it may be possible for 2 different clients to call
addPendingWork() and scheduleWorkSoon() with the same target JSObject* but with
different sets of dependencies.

Secondly, even is the both sets of dependencies are identical, a client may
call addPendingWork() and scheduleWorkSoon() with the same JSObject* target
more than once because it intended to schedule more than 1 task to run.

Note that DeferredWorkTimer::doWork() consumes the corresponding TicketData
(i.e. removes it from the m_pendingTickets list) for each task as it is run.
To ensure that the dependencies for each task is protected, we'll either need
to ref count the TicketData for the same target object (and hold off on removing
it from the list), or we'll need to register a different TicketData instance
for each task. Ref counting can solve the second issue above, but does not
solve the first. So, this patch goes with the more generic solution to allow
each task to have its own TicketData instance (and, its own unique Ticket).

  1. Previously, if the client cancels pending work, we would remove the TicketData immediately from the m_pendingTickets list. This opens up an opportunity for the same TicketData memory to be re-allocated by another client. This, in turn, would make the Ticket token not unique and potentially allow a cancelled ticket to be reused before DeferredWorkTimer::doWork() is called.

This patch changes DeferredWorkTimer::cancelPendingWork() to only clear the
contents of the TicketData instead. TicketData::scriptExecutionOwner being
null is used as an indication that the ticket has been cancelled. Since the
TicketData itself is not "freed" yet, all TicketData will remain unique until
DeferredWorkTimer::doWork().

Consequently, DeferredWorkTimer::doWork() will now check for cancelled tickets
and remove them from the m_pendingTickets list.

  1. JSFinalizationRegistry was previously calling DeferredWorkTimer::hasPendingWork() to check if it has already scheduled a task, so as not to reschedule again until after the previously scheduled task has been run. This does not play nice with the new Ticket API, because this hasPendingWork() check needs to be done before calling addPendingWork(), and hence, the Ticket is not available yet.

Fortunately, JSFinalizationRegistry should know if it has already scheduled
a task itself. This patch adds a m_hasAlreadyScheduledWork flag to
JSFinalizationRegistry that can be used for this check instead.

  • jsc.cpp:

(JSC_DEFINE_HOST_FUNCTION):

  • runtime/DeferredWorkTimer.cpp:

(JSC::DeferredWorkTimer::TicketData::TicketData):
(JSC::DeferredWorkTimer::TicketData::vm):
(JSC::DeferredWorkTimer::TicketData::cancel):
(JSC::DeferredWorkTimer::doWork):
(JSC::DeferredWorkTimer::addPendingWork):
(JSC::DeferredWorkTimer::hasPendingWork):
(JSC::DeferredWorkTimer::hasDependancyInPendingWork):
(JSC::DeferredWorkTimer::cancelPendingWork):

  • runtime/DeferredWorkTimer.h:

(JSC::DeferredWorkTimer::TicketData::target):

  • runtime/JSFinalizationRegistry.cpp:

(JSC::JSFinalizationRegistry::finalizeUnconditionally):

  • runtime/JSFinalizationRegistry.h:
  • wasm/WasmStreamingCompiler.cpp:

(JSC::Wasm::StreamingCompiler::StreamingCompiler):
(JSC::Wasm::StreamingCompiler::~StreamingCompiler):
(JSC::Wasm::StreamingCompiler::didComplete):
(JSC::Wasm::StreamingCompiler::fail):
(JSC::Wasm::StreamingCompiler::cancel):

  • wasm/WasmStreamingCompiler.h:
  • wasm/js/JSWebAssembly.cpp:

(JSC::JSWebAssembly::webAssemblyModuleValidateAsync):
(JSC::instantiate):
(JSC::compileAndInstantiate):
(JSC::JSWebAssembly::webAssemblyModuleInstantinateAsync):

9:19 PM Changeset in webkit [287420] by Wenson Hsieh
  • 7 edits
    1 add in trunk

Modal container control classifier fails on some neutral controls that contain multiplication symbols
https://bugs.webkit.org/show_bug.cgi?id=234651

Reviewed by Tim Horton.

Source/WebKit:

Treat several ASCII symbols that resemble the letter "x" (i.e. several types of multiplication signs) as the
letter "x" when massaging the raw text content of controls in modal containers into canonical form for the text
classifier. This allows such controls to be (correctly) tagged as "neutral" controls, for the purposes of
delegating modal container policy decisions to the WebKit client.

Test: ModalContainerObservation.ClassifyMultiplySymbol

  • UIProcess/Cocoa/ModalContainerControlClassifier.mm:

(-[WKModalContainerClassifierInput initWithTokenizer:rawInput:]):
(WebKit::computePredictions):

Tools:

Add a new API test to exercise the change.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/modal-container-custom.html: Added.

Add an alternate version of modal-container.html that allows each API test to present custom markup (as
innerHTML) inside a fixed position modal container; use this test page in the new API test.

  • TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm:

(-[ModalContainerWebView loadBundlePage:andDecidePolicy:]):
(-[ModalContainerWebView evaluate:andDecidePolicy:]):
(-[ModalContainerWebView loadBundlePage:]):
(-[ModalContainerWebView _webView:decidePolicyForModalContainer:decisionHandler:]):
(-[ModalContainerWebView lastModalContainerInfo]):

Add a property to keep track of the most recent _WKModalContainerInfo we recieved via the modal container
decision handler, and use this to test for which types of controls are available, in both the new test as well
as existing tests.

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/analytics/coremldata.bin:
  • TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/coremldata.bin:

Adjust the test CoreML model to classify "x" as the neutral control type.

8:23 PM Changeset in webkit [287419] by weinig@apple.com
  • 2 edits in trunk/Source/WTF

Gradient color interpolation incorrect for colors with alpha (need to interpolate premultiplied colors)
https://bugs.webkit.org/show_bug.cgi?id=150940
<rdar://problem/25499232>

Reviewed by Simon Fraser.

Enable CSSGradientPremultipliedAlphaInterpolationEnabled by default.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
5:49 PM Changeset in webkit [287418] by sihui_liu@apple.com
  • 5 edits in trunk

Don't create LocalStorage database for read if it does not exist
https://bugs.webkit.org/show_bug.cgi?id=234569

Reviewed by Alex Christensen.

Source/WebKit:

If database does not exists when read, we can return empty or null, instead of creating an empty database.

New API test: WKWebView.LocalStorageNoRecordAfterGetItem

  • NetworkProcess/storage/SQLiteStorageArea.cpp:

(WebKit::SQLiteStorageArea::isEmpty):
(WebKit::SQLiteStorageArea::prepareDatabase):
(WebKit::SQLiteStorageArea::getItemFromDatabase):
(WebKit::SQLiteStorageArea::allItems):
(WebKit::SQLiteStorageArea::setItem):
(WebKit::SQLiteStorageArea::removeItem):
(WebKit::SQLiteStorageArea::clear):

  • NetworkProcess/storage/SQLiteStorageArea.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/LocalStorageDatabaseTracker.mm:

(-[LocalStorageUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TEST):

5:22 PM Changeset in webkit [287417] by Alan Bujtas
  • 3 edits
    2 adds in trunk

REGRESSION(Containment) nullptr deref in RenderBox::styleDidChange
https://bugs.webkit.org/show_bug.cgi?id=234647
<rdar://86841302>

Reviewed by Simon Fraser.

Source/WebCore:

Do not try to propagate the writing mode to the RenderView unless we are attached to one.

Test: fast/dynamic/document-elment-renderer-null-crash.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::styleDidChange):

LayoutTests:

  • fast/dynamic/document-elment-renderer-null-crash-expected.txt: Added.
  • fast/dynamic/document-elment-renderer-null-crash.html: Added.
3:46 PM Changeset in webkit [287416] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Update features.json for STP 134-137
https://bugs.webkit.org/show_bug.cgi?id=234650

Reviewed by Simon Fraser.

New contacts for Web Authn, dialog, inert (with their permission).
New CSS features added.

  • features.json:
3:19 PM Changeset in webkit [287415] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Update display property values in CSSProperties.json
https://bugs.webkit.org/show_bug.cgi?id=234649

Reviewed by Simon Fraser.

Removed some spec links, since they're all in the css-display-3 spec which is already linked for the property.

flow, flow-root: r276293 implemented those 2 keywords in CSSPropertyParser.cpp (consumeDisplay function).

compact: removed in r163560

Also remove duplicate values array for border-collapse.

  • css/CSSProperties.json:
3:09 PM Changeset in webkit [287414] by commit-queue@webkit.org
  • 12 edits in trunk

Check allowed network hosts list when we schedule the load in the network process
https://bugs.webkit.org/show_bug.cgi?id=234543
<rdar://83501315>

Patch by Matt Woodrow <Matt Woodrow> on 2021-12-23
Reviewed by Alex Christensen.

The check for WKWebViewConfiguration._allowedNetworkHost previously happened before the check to see if
the given ResourceRequest would directly from an archive.
This moves to the allowed network host list check to happen when we schedule the network request, and thus
allows subresources cached within an archive to load, even if their original URL would be blocked.
Source/WebCore:

New test LoadWebArchive.DisallowedNetworkHosts added.

  • loader/ResourceLoadNotifier.cpp:

(WebCore::ResourceLoadNotifier::dispatchWillSendRequest):

  • loader/ResourceLoadNotifier.h:

(WebCore::ResourceLoadNotifier::isInitialRequestIdentifier):

Source/WebKit:

We also need to check when redirecting to prevent an allowed domain from redirecting to a forbidden domain.
This also makes it so that WKWebViewConfiguration._loadsSubresources only prevents
subresource loads that would touch the network, so we can't use WKURLSchemeHandler to test it any more.
That's fine, since the two users of the SPI only load URLs from the network.

New test LoadWebArchive.DisallowedNetworkHosts added.

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):

  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::willSendRequest):

Tools:

New test LoadWebArchive.DisallowedNetworkHosts added.

  • TestWebKitAPI/Tests/mac/LoadWebArchive.mm:

(TestWebKitAPI::TEST):

2:00 PM Changeset in webkit [287413] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

Allow a necessary syscall in the WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=234641
<rdar://problem/86808395>

Reviewed by Alan Bujtas.

Telemetry and testing logs indicate that we need to allow
'SYS_memorystatus_control' in our WebContent sandbox.

We allow this in all other sandboxes, so this was likely an oversight.

  • WebProcess/com.apple.WebProcess.sb.in:
1:50 PM Changeset in webkit [287412] by beidson@apple.com
  • 39 edits
    1 copy in trunk

Add WTF::UUID class which is natively a 128-bit integer
https://bugs.webkit.org/show_bug.cgi?id=234571

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Refactor, covered by existing tests)

  • Modules/notifications/NotificationData.h:

(WebCore::NotificationData::decode):

Source/WebKit:

Notifications - which are UUID identified - are now addressed by a UUID object instead of a v4 UUID string.

  • NetworkProcess/Notifications/NetworkNotificationManager.cpp:

(WebKit::NetworkNotificationManager::cancelNotification):
(WebKit::NetworkNotificationManager::clearNotifications):
(WebKit::NetworkNotificationManager::didDestroyNotification):

  • NetworkProcess/Notifications/NetworkNotificationManager.h:
  • Scripts/webkit/messages.py:

(forward_declarations_and_headers_for_replies):
(headers_for_type):

  • Shared/Notifications/NotificationManagerMessageHandler.h:
  • Shared/Notifications/NotificationManagerMessageHandler.messages.in:
  • UIProcess/API/C/WKNotification.cpp:

(WKNotificationCopyCoreIDForTesting):

  • UIProcess/API/C/WKNotification.h:
  • UIProcess/API/C/WKNotificationManager.cpp:

(WKNotificationManagerProviderDidClickNotification_b):

  • UIProcess/API/C/WKNotificationManager.h:
  • UIProcess/Notifications/WebNotification.h:

(WebKit::WebNotification::coreNotificationID const):

  • UIProcess/Notifications/WebNotificationManagerMessageHandler.cpp:

(WebKit::WebNotificationManagerMessageHandler::cancelNotification):
(WebKit::WebNotificationManagerMessageHandler::clearNotifications):
(WebKit::WebNotificationManagerMessageHandler::didDestroyNotification):

  • UIProcess/Notifications/WebNotificationManagerMessageHandler.h:
  • UIProcess/Notifications/WebNotificationManagerProxy.cpp:

(WebKit::WebNotificationManagerProxy::cancel):
(WebKit::WebNotificationManagerProxy::didDestroyNotification):
(WebKit::pageIDsMatch):
(WebKit::pageAndNotificationIDsMatch):
(WebKit::WebNotificationManagerProxy::clearNotifications):
(WebKit::WebNotificationManagerProxy::providerDidClickNotification):
(WebKit::WebNotificationManagerProxy::providerDidCloseNotifications):

  • UIProcess/Notifications/WebNotificationManagerProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::cancelNotification):
(WebKit::WebPageProxy::clearNotifications):
(WebKit::WebPageProxy::didDestroyNotification):

  • UIProcess/WebPageProxy.h:
  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleCopyWebNotificationID):

  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::webNotificationID):

  • WebProcess/InjectedBundle/InjectedBundle.h:
  • WebProcess/Notifications/WebNotificationManager.cpp:

(WebKit::WebNotificationManager::didShowNotification):
(WebKit::WebNotificationManager::didClickNotification):
(WebKit::WebNotificationManager::didCloseNotifications):

  • WebProcess/Notifications/WebNotificationManager.h:
  • WebProcess/Notifications/WebNotificationManager.messages.in:

Source/WTF:

This patch adds a new WTF::UUID class.

For now, it is simply a wrapper around a 128-bit integer, and creating a new one primes that integer with
cryptographically random data.

It can be encoded/decoded as well as used as a HashKey.

And it will be a great utility to use as a unique object identifier for objects that logically exist
in multiple processes.

On that note, it also changes "UUIDIdentifier" to use this new UUID class instead of a v4 UUID string.

  • wtf/Identified.h:

(WTF::UUIDIdentified::UUIDIdentified):

  • wtf/UUID.cpp:

(WTF::UUID::UUID):
(WTF::UUID::toVector const):
(WTF::UUID::hash const):

  • wtf/UUID.h:

(WTF::UUID::create):
(WTF::UUID::UUID):
(WTF::UUID::operator== const):
(WTF::UUID::data const):
(WTF::UUID::isHashTableDeletedValue const):
(WTF::UUIDHash::hash):
(WTF::UUIDHash::equal):
(WTF::HashTraits<UUID>::emptyValue):
(WTF::HashTraits<UUID>::constructDeletedValue):
(WTF::HashTraits<UUID>::isDeletedValue):
(WTF::UUID::encode const):
(WTF::UUID::decode):

Tools:

Notifications - which are UUID identified - are now addressed by a UUID object instead of a v4 UUID string.

The way our C-API vends that UUID object is through a data object, so change WKTR to account for that.

  • WebKitTestRunner/DataFunctions.h: Copied from Source/WebKit/UIProcess/Notifications/WebNotificationManagerMessageHandler.h.

(WTR::dataValue):
(WTR::dataToUUID):
(WTR::uuidToData):

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::postSimulateWebNotificationClick):
(WTR::postPageMessage):

  • WebKitTestRunner/InjectedBundle/InjectedBundle.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::simulateWebNotificationClick):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):

  • WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
  • WebKitTestRunner/WebNotificationProvider.cpp:

(WTR::WebNotificationProvider::showWebNotification):
(WTR::WebNotificationProvider::closeWebNotification):
(WTR::WebNotificationProvider::removeNotificationManager):
(WTR::WebNotificationProvider::simulateWebNotificationClick):
(WTR::WebNotificationProvider::reset):

  • WebKitTestRunner/WebNotificationProvider.h:
1:35 PM Changeset in webkit [287411] by weinig@apple.com
  • 22 edits
    3 adds in trunk

Encapsulate gradient color stops into a self contained class
https://bugs.webkit.org/show_bug.cgi?id=234583

Reviewed by Simon Fraser.

Source/WebCore:

Replace most uses of Gradient::ColorStopVector with new GradientColorStops class.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:

Add new file.

  • css/CSSGradientValue.h:
  • css/CSSGradientValue.cpp:

(WebCore::CSSGradientValue::computeStops):
Replace some usage of Gradient::ColorStopVector with GradientColorStops. While here,
optimize color filter transformation to only happen when there is color filter,
removing extra unnecessary copies of Colors.

Also utilizes the GradientColorStops::Sorted type to create a GradientColorStops
object that has the isSorted bit set.

(WebCore::CSSLinearGradientValue::createGradient):
(WebCore::CSSRadialGradientValue::createGradient):
(WebCore::CSSConicGradientValue::createGradient):
The calls to setSortedColorStops is no longer needed, as the GradientColorStops
now maintains that state.

  • platform/graphics/Color.h:

(WebCore::add):
Move definition of add(Hasher&, Color) here, where it makes sense, rather than
keeping it in Gradient.

  • platform/graphics/FloatPoint.h:

(WebCore::add):
Move definition of add(Hasher&, FloatPoint) here, where it makes sense, rather than
keeping it in Gradient.

  • platform/graphics/Gradient.h:
  • platform/graphics/Gradient.cpp:

(WebCore::Gradient::create):
(WebCore::Gradient::Gradient):
(WebCore::Gradient::addColorStop):
(WebCore::Gradient::hash const):
(WebCore::Gradient::setSortedColorStops): Deleted.
(WebCore::Gradient::sortStops const): Deleted.
Replace ColorStopVector with GradientColorStops. This allows removing the m_stopsSorted
bit, as the new class maintains that, as well as removing setSortedColorStops since
you can achieve this by just creating the Gradient with a GradientColorStops that knows
it is sorted (using the GradientColorStops::Sorted helper).

  • platform/graphics/GradientColorStop.h:

(WebCore::add):
Move definition of add(Hasher&, GradientColorStop) here, where it makes sense, rather than
keeping it in Gradient.

  • platform/graphics/GradientColorStops.h: Added.

(WebCore::GradientColorStops::GradientColorStops):
(WebCore::GradientColorStops::addColorStop):
(WebCore::GradientColorStops::sort):
(WebCore::GradientColorStops::sorted const):
(WebCore::GradientColorStops::size const):
(WebCore::GradientColorStops::isEmpty const):
(WebCore::GradientColorStops::begin const):
(WebCore::GradientColorStops::end const):
(WebCore::GradientColorStops::mapColors const):
(WebCore::GradientColorStops::stops const):
(WebCore::GradientColorStops::validateIsSorted const):
(WebCore::GradientColorStops::encode const):
(WebCore::GradientColorStops::decode):
Encapsulate state and functionality of the gradient color stop list, maintaining
the sorted state, and providing a pleasent API to work with. In the future, this
will be a good place to add functions to analyze and transform the list for optimizing
what can use the gradient fast paths.

  • platform/graphics/cairo/GradientCairo.cpp:

Update to use the new names.

  • platform/graphics/cg/GradientCG.cpp:

(WebCore::Gradient::paint):
Ensure the color stops passed to the gradient renderer are sorted using the sorted()
helper, which does an inplace sort and returns a reference to itself.

  • platform/graphics/cg/GradientRendererCG.h:
  • platform/graphics/cg/GradientRendererCG.cpp:

(WebCore::GradientRendererCG::GradientRendererCG):
(WebCore::GradientRendererCG::pickStrategy const):
(WebCore::GradientRendererCG::makeGradient const):
(WebCore::GradientRendererCG::makeShading const):
Replace uses of GradientColorStopVector with GradientColorStops.

  • rendering/svg/RenderSVGResourceGradient.h:
  • rendering/svg/RenderSVGResourceGradient.cpp:

(WebCore::RenderSVGResourceGradient::stopsByApplyingColorFilter):
Add early return if there is no color filter to apply, and utilize the mapColors()
function to update the colors if there is.

  • rendering/svg/RenderSVGResourceLinearGradient.cpp:

(WebCore::RenderSVGResourceLinearGradient::buildGradient const):

  • rendering/svg/RenderSVGResourceRadialGradient.cpp:

(WebCore::RenderSVGResourceRadialGradient::buildGradient const):
Remove some extraneous type names.

  • svg/GradientAttributes.h:

(WebCore::GradientAttributes::stops const):
(WebCore::GradientAttributes::setStops):

  • svg/SVGGradientElement.cpp:

(WebCore::SVGGradientElement::buildStops):

  • svg/SVGGradientElement.h:

Replace uses of GradientColorStopVector with GradientColorStops.

Tools:

  • TestRunnerShared/PlatformGTK.cmake: Added.
  • TestRunnerShared/PlatformWPE.cmake: Added.

Keep GTK and WPE ports building by propogating glib.h header to the test runnner. Change
by Fujii Hironori.

12:56 PM Changeset in webkit [287410] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[GStreamer] MediaPlayerPrivateGStreamer mishandles failure to create WebKitTextCombiner
https://bugs.webkit.org/show_bug.cgi?id=233230

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

Gracefully fail when the subenc plugin is not available. It is optional, we should not
assert or crash if it's not found. Two warnings are logged already when it's not found.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

12:54 PM Changeset in webkit [287409] by ntim@apple.com
  • 7 edits in trunk/Source/WebInspectorUI

Web Inspector: Support conic gradients in gradient editor and autocompletion
https://bugs.webkit.org/show_bug.cgi?id=234562

Reviewed by Devin Rousso.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Controllers/CSSManager.js:
  • UserInterface/Models/Gradient.js:

(WI.Gradient.angleFromString):
(WI.Gradient.fromString):
(WI.Gradient.prototype.get angleValue):
(WI.Gradient.prototype.set angleValue):
(WI.Gradient.prototype.get angleUnits):
(WI.Gradient.prototype.set angleUnits):
(WI.Gradient.prototype._angleValueForUnits):
(WI.Gradient):
(WI.LinearGradient.fromComponents):
(WI.LinearGradient.prototype.toString):
(WI.LinearGradient):
(WI.RadialGradient):
(WI.RadialGradient.fromComponents):
(WI.RadialGradient.prototype.get angleValue):
(WI.RadialGradient.prototype.set angleValue):
(WI.RadialGradient.prototype.get angleUnits):
(WI.RadialGradient.prototype.set angleUnits):
(WI.RadialGradient.prototype.copy):
(WI.RadialGradient.prototype.toString):
(WI.ConicGradient):
(WI.ConicGradient.fromComponents):
(WI.ConicGradient.prototype.copy):
(WI.ConicGradient.prototype.toString):
(WI.LinearGradient.prototype.set angleValue): Deleted.
(WI.LinearGradient.prototype.get angleValue): Deleted.
(WI.LinearGradient.prototype.set angleUnits): Deleted.
(WI.LinearGradient.prototype.get angleUnits): Deleted.
(WI.LinearGradient.prototype._angleValueForUnits): Deleted.

  • UserInterface/Views/CodeMirrorTextMarkers.js:
  • UserInterface/Views/GradientEditor.js:

(WI.GradientEditor):
(WI.GradientEditor.prototype.set gradient):
(WI.GradientEditor.prototype._gradientTypeChanged):

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype._addGradientTokens):

12:45 PM Changeset in webkit [287408] by ntim@apple.com
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Dark mode: Make gradient editor angle input readable in dark mode
https://bugs.webkit.org/show_bug.cgi?id=234640

Reviewed by Devin Rousso.

Just use the native input styling, which is dark mode compatible by default.

  • UserInterface/Views/GradientEditor.css:

(.gradient-editor > .gradient-angle > input[type="number"]):

12:36 PM Changeset in webkit [287407] by Patrick Griffis
  • 2 edits in trunk/Tools

[Flatpak] Revert filesystem permission change in r287396
https://bugs.webkit.org/show_bug.cgi?id=234612

Reviewed by Michael Catanzaro.

This causes a regression where some important contents of
XDG_RUNTIME_DIR are overriden and causes issues like TLS failures.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox):

12:08 PM Changeset in webkit [287406] by ChangSeok Oh
  • 2 edits in trunk

Add changseok's github username.

Unreviewed.

  • metadata/contributors.json:
10:36 AM Changeset in webkit [287405] by sihui_liu@apple.com
  • 17 edits in trunk/Source

Ensure file handles used in FileSystemAccess API are closed
https://bugs.webkit.org/show_bug.cgi?id=234520

Reviewed by Darin Adler.

Source/WebCore:

WebCore::FileHandle closes file handle in its destructor. Replace FileSystem::PlatformFileHandle with
WebCore::FileHandle in FileSystemSyncAccessHandle and WorkerFileSystemStorageConnection to ensure file handle
get closed if worker thread fails to execute the callback of createSyncAccessHandle, and if
FileSystemSyncAccessHandle is destroyed.

  • Modules/filesystemaccess/FileSystemFileHandle.cpp:

(WebCore::FileSystemFileHandle::createSyncAccessHandle):

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

(WebCore::FileSystemSyncAccessHandle::create):
(WebCore::FileSystemSyncAccessHandle::FileSystemSyncAccessHandle):
(WebCore::FileSystemSyncAccessHandle::truncate):
(WebCore::FileSystemSyncAccessHandle::getSize):
(WebCore::FileSystemSyncAccessHandle::flush):
(WebCore::FileSystemSyncAccessHandle::closeInternal):
(WebCore::FileSystemSyncAccessHandle::closeFile):
(WebCore::FileSystemSyncAccessHandle::read):
(WebCore::FileSystemSyncAccessHandle::write):

  • Modules/filesystemaccess/FileSystemSyncAccessHandle.h:
  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp:

(WebCore::WorkerFileSystemStorageConnection::didCreateSyncAccessHandle):
(WebCore::WorkerFileSystemStorageConnection::createSyncAccessHandle):

  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.h:
  • platform/FileHandle.cpp:

(WebCore::FileHandle::FileHandle):
(WebCore::FileHandle::operator=):
(WebCore::FileHandle::open):
(WebCore::FileHandle::read):
(WebCore::FileHandle::write):
(WebCore::FileHandle::close):
(WebCore::FileHandle::handle const):

  • platform/FileHandle.h:

Source/WebKit:

Replace FileSystem::PlatformFileHandle with WebCore::FileHandle in SharedFileHandle to ensure file handle get
closed, if it's not released for use.

  • NetworkProcess/storage/FileSystemStorageHandle.cpp:

(WebKit::FileSystemStorageHandle::createSyncAccessHandle):

  • NetworkProcess/storage/NetworkStorageManager.cpp:

(WebKit::NetworkStorageManager::createSyncAccessHandle):

  • Platform/IPC/SharedFileHandle.cpp:

(IPC::SharedFileHandle::create):
(IPC::SharedFileHandle::close): Deleted.

  • Platform/IPC/SharedFileHandle.h:

(IPC::SharedFileHandle::release):
(IPC::SharedFileHandle::SharedFileHandle):
(IPC::SharedFileHandle::handle): Deleted.
(): Deleted.

  • Platform/IPC/cocoa/SharedFileHandleCocoa.cpp:

(IPC::SharedFileHandle::create):
(IPC::SharedFileHandle::encode const):
(IPC::SharedFileHandle::decode):

  • WebProcess/WebCoreSupport/WebFileSystemStorageConnection.cpp:

(WebKit::WebFileSystemStorageConnection::createSyncAccessHandle):

Source/WTF:

  • wtf/CrossThreadCopier.h:
9:57 AM Changeset in webkit [287404] by Wenson Hsieh
  • 15 edits
    1 copy
    6 adds in trunk

Add API testing support for modal container observation
https://bugs.webkit.org/show_bug.cgi?id=234610

Reviewed by Megan Gardner.

Source/WebCore:

Add support for new API tests for modal container observation SPI. See Tools/ChangeLog for more details.

Tests: ModalContainerObservation.HideAndAllowModalContainer

ModalContainerObservation.HideAndDisallowModalContainer
ModalContainerObservation.HideAndIgnoreModalContainer
ModalContainerObservation.ShowModalContainer

  • dom/Document.h:
  • page/ModalContainerObserver.cpp:

(WebCore::ModalContainerObserver::updateModalContainerIfNeeded):
(WebCore::ModalContainerObserver::shouldHide): Deleted.

Drive-by adjustment: make shouldHide() an inline method, and mark it const.

  • page/ModalContainerObserver.h:

(WebCore::ModalContainerObserver::overrideSearchTermForTesting):

Add a testing-only method to override the search term used for modal container observation; if set, we ignore
the search term vended by the chrome client, and instead use this override.

(WebCore::ModalContainerObserver::shouldHide const):

  • testing/Internals.cpp:

(WebCore::Internals::overrideModalContainerSearchTermForTesting):

  • testing/Internals.h:

Add an internals hook to override the modal container search term.

  • testing/Internals.idl:

Tools:

Add support for new API tests that exercise the modal container observation policy in webpage preferences, as
well as the UI delegate SPI method for deciding policies in detected modal containers.

  • TestWebKitAPI/SourcesCocoa.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/modal-container.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm:

Non-unified-source build fix (see below).

  • TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm: Added.

(-[NSBundle swizzled_URLForResource:withExtension:]):
(TestWebKitAPI::ClassifierModelSwizzler::ClassifierModelSwizzler):
(TestWebKitAPI::ClassifierModelSwizzler::~ClassifierModelSwizzler):
(-[ModalContainerWebView initWithFrame:configuration:]):
(-[ModalContainerWebView loadBundlePage:andDecidePolicy:]):
(-[ModalContainerWebView _webView:decidePolicyForModalContainer:decisionHandler:]):
(TestWebKitAPI::createModalContainerWebView):
(TestWebKitAPI::TEST):

Add API tests to exercise each of the 4 modal container policy decisions in a simple modal container. Two key
pieces are needed in order to simulate the end-to-end flow for detecting and deciding policies for modal
containers:

  1. Add internals.overrideModalContainerSearchTermForTesting(), which allows script (through the

internals testing plugin) to set ModalContainerObserver's search term.

  1. Swizzle out -[NSBundle URLForResource:withExtension:] to return the file URL to TestWebKitAPI's

TestModalContainerControls.mlmodelc, instead of the real CoreML model.

  • TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/analytics/coremldata.bin: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/coremldata.bin: Copied from Source/WebCore/page/ModalContainerObserver.h.
  • TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/metadata.json: Added.

Add a mock CoreML model that's used to simulate classifier results in WebKit::ModalContainerControlClassifier.
See above for more details.

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewThemeColor.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewUnderPageBackgroundColor.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WebProcessTerminate.mm:

More non-unified-source build fixes: hoist the definitions of redColorComponents and blueColorComponents
into the USE(CG) part of TestCocoa.h, and then import TestCocoa.h in these files. This avoids build failures
due to symbol redefinition when we add the new test file above.

  • TestWebKitAPI/cocoa/TestCocoa.h:
9:55 AM Changeset in webkit [287403] by ntim@apple.com
  • 4 edits
    2 deletes in trunk/LayoutTests

Rebaseline getComputedStyle tests for iOS after r287356

Unreviewed test gardening.

Also combine results for ios-wk2 and ios, since they are the same, except ios is stale.

  • platform/ios-wk2/fast/css/getComputedStyle/computed-style-expected.txt: Removed.
  • platform/ios-wk2/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.
  • platform/ios-wk2/svg/css/getComputedStyle-basic-expected.txt: Removed.
  • platform/ios/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/ios/svg/css/getComputedStyle-basic-expected.txt:
9:31 AM Changeset in webkit [287402] by Alan Coon
  • 1 copy in tags/Safari-613.1.12.2

Tag Safari-613.1.12.2.

9:29 AM Changeset in webkit [287401] by Alan Coon
  • 11 edits
    1 delete in branches/safari-613.1.12-branch/Source

Cherry-pick r287382. rdar://problem/86855207

Fix WebKit Build issues when using system content path
https://bugs.webkit.org/show_bug.cgi?id=234624

Reviewed by Filip Pizlo.

Source/ThirdParty/ANGLE:

Changed INSTALL_PATH on macOS builds to use a fully qualified .../WebCore.framework/Versions/A/Frameworks.
Deleted unused create-symlink-to-altroot.sh script.

  • Configurations/ANGLE-dynamic.xcconfig:
  • scripts/create-symlink-to-altroot.sh: Removed.

Source/ThirdParty/libwebrtc:

Changed INSTALL_PATH on macOS builds to use fully qualified .../WebCore.framework/Versions/A/Frameworks.

  • Configurations/libwebrtc.xcconfig:

Source/WebCore:

Covered by existing tests.

Added SYSTEM_CONTENT_PATH processing to WebCore's normal location.

  • Configurations/WebCore.xcconfig:

Source/WebKit:

Added SYSTEM_CONTENT_PATH processing to the nested frameworks path (UMBRELLA_FRAMEWORKS_DIR).

  • Configurations/BaseTarget.xcconfig:
  • Configurations/WebKit.xcconfig:

Source/WebKitLegacy/mac:

Added SYSTEM_CONTENT_PATH processing to NORMAL_PRODUCTION_FRAMEWORKS_DIR.

  • Configurations/WebKitLegacy.xcconfig:

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

9:29 AM Changeset in webkit [287400] by Alan Coon
  • 2 edits in branches/safari-613.1.12-branch/Source/WebCore

Cherry-pick r287361. rdar://problem/86855206

Fix WebCore install headers with alternate build
https://bugs.webkit.org/show_bug.cgi?id=234592

Reviewed by Filip Pizlo.

Covered by existing tests.

Fixed OUTPUT_ALTERNATE_ROOT_PATH for macOS to return an empty value since we don't need a symlink
as the WebCore framework is in a subdirectory of WebKit.framework.
Fixed typos with NORMAL_PRODUCTION_FRAMEWORKS_DIR_USE_SYSTEM_CONTENT_PATH_YES rules,
eliminating the ')'s at the end of the lines.

  • Configurations/WebCore.xcconfig:

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

9:29 AM Changeset in webkit [287399] by Alan Coon
  • 9 edits in branches/safari-613.1.12-branch/Source

Cherry-pick r287326. rdar://problem/86855216

Fix symlinks for alternate root framework locations
https://bugs.webkit.org/show_bug.cgi?id=234567

Reviewed by Filip Pizlo.

Source/ThirdParty/ANGLE:

Eliminated the creation of symlinks for ANGLE as it is under WebCore.

  • ANGLE.xcodeproj/project.pbxproj:
  • Configurations/ANGLE-dynamic.xcconfig:

Source/WebCore:

Covered by existing tests.

Moved OUTPUT_ALTERNATE_ROOT_PATH in create symlink script from outputFileListPaths to outputPaths.

  • WebCore.xcodeproj/project.pbxproj:

Source/WebGPU:

Moved OUTPUT_ALTERNATE_ROOT_PATH in create symlink script from outputFileListPaths to outputPaths.

  • WebGPU.xcodeproj/project.pbxproj:

Source/WebInspectorUI:

Moved OUTPUT_ALTERNATE_ROOT_PATH in create symlink script from outputFileListPaths to outputPaths.

  • WebInspectorUI.xcodeproj/project.pbxproj:

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

9:23 AM Changeset in webkit [287398] by Alan Coon
  • 9 edits in branches/safari-613.1.12-branch/Source

Versioning.

WebKit-7613.1.12.2

9:19 AM Changeset in webkit [287397] by Simon Fraser
  • 14 edits in trunk

Share macOS code between ScrollAnimator::handleWheelEvent() and ScrollingEffectsController::handleWheelEvent()
https://bugs.webkit.org/show_bug.cgi?id=231238

Reviewed by Wenson Hsieh.

Source/WebCore:

ScrollAnimator::handleWheelEvent() had some macOS-only code (despite having a
ScrollAnimatorMac subclass) whose purpose was unclear. It turns out the code runs in two
scenarios: for select lists, which always scroll on the main thread, and in some main thread
scrolling cases when responding to non-gesture events (i.e. those from old-style clicky
scroll wheels).

Clean this by making that code clearly specific to "stepped scrolling", via the
virtual ScrollableArea::hasSteppedScrolling(). Call it in cross-platform code in
ScrollAnimator::handleWheelEvent().

The ScrollAnimatorMac::handleWheelEvent() override now simply calls into the base class,
after doing some macOS-specific stuff for phase handling (which is related to scrollbar flashing).

rubberBandingEnabledForSystem() is no longer consulted; this never worked for threaded scrolling.
If we need it, we can bring it back. We no longer need the shouldForwardWheelEventsToParent()
and its misleading comment.

Now that stateless wheel events go through ScrollingEffectsController::handleWheelEvent(),
we have to avoid doing axis snapping for them.

css3/scroll-snap/scroll-snap-wheel-event.html reveals a behavior progression: previously
stateless, main thread scroll snap scrolls would use the code now in
handleSteppedScrolling() and a single small delta would pick the snap point in that
direction. This differed from scrolling thread scrolls, where stateless scrolls animate to
the nearest snap pointer after a timer fire. Now, this same behavior applies to main thread
stateless scrolls.

  • platform/PlatformWheelEvent.h:

(WebCore::PlatformWheelEvent::isGestureEvent const):
(WebCore::PlatformWheelEvent::isNonGestureEvent const):

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::handleWheelEvent):
(WebCore::ScrollAnimator::handleSteppedScrolling):

  • platform/ScrollAnimator.h:
  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::hasSteppedScrolling const):

  • platform/mac/ScrollAnimatorMac.h:
  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::ScrollAnimatorMac::handleWheelEvent):
(WebCore::rubberBandingEnabledForSystem): Deleted.
(WebCore::ScrollAnimatorMac::shouldForwardWheelEventsToParent const): Deleted.

  • platform/mac/ScrollingEffectsController.mm:

(WebCore::ScrollingEffectsController::handleWheelEvent):

  • rendering/RenderListBox.h:

LayoutTests:

  • css3/scroll-snap/scroll-snap-wheel-event.html: We need to scroll 3 clicks to get closer to the target snap point.
  • platform/mac-wk1/fast/scrolling/latching/latching-and-wheel-events-expected.txt: Rebase already-failing

result (because ScrollingEffectsController::handleWheelEvent() doesn't scroll on the "begin" event).

  • platform/mac-wk1/fast/scrolling/latching/overflow-in-iframe-latching-expected.txt: Ditto.
  • platform/mac-wk1/fast/scrolling/latching/scroll-snap-latching-expected.txt: Ditto.
8:53 AM Changeset in webkit [287396] by Patrick Griffis
  • 2 edits in trunk/Tools

[Flatpak] Fix a11y tests on some distros including Fedora
https://bugs.webkit.org/show_bug.cgi?id=234612

Reviewed by Michael Catanzaro.

Using --no-a11y-bus fixes a11y working in Fedora, as well
as just being the intended behavior it always had since we
granted direct org.a11y.Bus access.

  • flatpak/flatpakutils.py:

(WebkitFlatpak):
(WebkitFlatpak.run_in_sandbox):

7:07 AM Changeset in webkit [287395] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Do not try to bidi reorder empty content
https://bugs.webkit.org/show_bug.cgi?id=234623

Reviewed by Antti Koivisto.

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::buildBidiParagraph):
(WebCore::Layout::InlineItemsBuilder::breakAndComputeBidiLevels):

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::processNonBidiContent):

6:42 AM Changeset in webkit [287394] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Empty bidi inline boxes should not make the line taller
https://bugs.webkit.org/show_bug.cgi?id=234621

Reviewed by Antti Koivisto.

We perform the same check for non-bidi inline boxes (also see FIXME).

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

6:13 AM Changeset in webkit [287393] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Add support for RTL scrollable overflow
https://bugs.webkit.org/show_bug.cgi?id=234617

Reviewed by Antti Koivisto.

  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):

  • platform/graphics/FloatRect.h:

(WebCore::FloatRect::shiftMaxXEdgeBy):

12:57 AM Changeset in webkit [287392] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK][a11y] WTR: handle heading level as special case in intValue with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234603

Reviewed by Adrian Perez de Castro.

Tests expect intValue to return the heading level.

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:

(WTR::AccessibilityUIElement::intValue const):

12:57 AM Changeset in webkit [287391] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK][a11y] WTR: handle missing cases in isAttributeSettable with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234601

Reviewed by Adrian Perez de Castro.

We need to handle aria-readonly attribute and the combobox and listbox elements.

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:

(WTR::AccessibilityUIElement::isAttributeSettable):

12:56 AM Changeset in webkit [287390] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK][a11y] WTR: add missing bool and string attribute values with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234599

Reviewed by Adrian Perez de Castro.

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:

(WTR::checkElementState):
(WTR::AccessibilityUIElement::stringAttributeValue):
(WTR::AccessibilityUIElement::boolAttributeValue):

12:55 AM Changeset in webkit [287389] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK][a11y] WTR: ensure the root object is created before getting the focused element with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234597

Reviewed by Adrian Perez de Castro.

This is causing some tests to fail when executed in the same web process after another test.

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp:

(WTR::AccessibilityController::focusedElement):

12:54 AM Changeset in webkit [287388] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GTK][a11y] Test accessibility/svg-remote-element.html crashes with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234563

Reviewed by Adrian Perez de Castro.

This is because the remote svg element wrappers can't be created because the svg image page hasn't the root
object set.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::remoteSVGRootElement const): Set the root image wrapper element on the svg
image page.

12:53 AM Changeset in webkit [287387] by Carlos Garcia Campos
  • 10 edits
    2 adds in trunk

[GTK][a11y] WTR: add support for notifications when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234550

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Add private API for WTR notifications.

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::childrenChanged):
(WebCore::AccessibilityAtspi::stateChanged):
(WebCore::AccessibilityAtspi::textChanged):
(WebCore::AccessibilityAtspi::textCaretMoved):
(WebCore::AccessibilityAtspi::valueChanged):
(WebCore::AccessibilityAtspi::selectionChanged):
(WebCore::AccessibilityAtspi::loadEvent):
(WebCore::AccessibilityAtspi::addNotificationObserver):
(WebCore::AccessibilityAtspi::removeNotificationObserver):
(WebCore::AccessibilityAtspi::notifyStateChanged const):
(WebCore::AccessibilityAtspi::notifySelectionChanged const):
(WebCore::AccessibilityAtspi::notifyTextChanged const):
(WebCore::AccessibilityAtspi::notifyTextCaretMoved const):
(WebCore::AccessibilityAtspi::notifyChildrenChanged const):
(WebCore::AccessibilityAtspi::notifyValueChanged const):
(WebCore::AccessibilityAtspi::notifyLoadEvent const):

  • accessibility/atspi/AccessibilityAtspi.h:

Tools:

Add AccessibilityNotificationHandler class to handle the ATSPI notifications.

  • WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
  • WebKitTestRunner/InjectedBundle/AccessibilityController.h:
  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp:

(WTR::AccessibilityController::resetToConsistentState): Remove the global event listener if there's one active.
(WTR::AccessibilityController::addNotificationListener): Create a global event listener.
(WTR::AccessibilityController::removeNotificationListener): Remove the global event listener.

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityNotificationHandler.cpp: Added.

(WTR::AccessibilityNotificationHandler::AccessibilityNotificationHandler):
(WTR::AccessibilityNotificationHandler::~AccessibilityNotificationHandler):

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityNotificationHandler.h: Added.
  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:

(WTR::AccessibilityUIElement::addNotificationListener): Create the element event listener.
(WTR::AccessibilityUIElement::removeNotificationListener): Remove the element event listener.

  • WebKitTestRunner/PlatformGTK.cmake:
12:46 AM Changeset in webkit [287386] by commit-queue@webkit.org
  • 6 edits in trunk

[GStreamer] test fast/mediastream/get-display-media-settings.html fails
https://bugs.webkit.org/show_bug.cgi?id=233879

Patch by Philippe Normand <pnormand@igalia.com> on 2021-12-23
Reviewed by Youenn Fablet.

Source/WebCore:

Pass down hashSalt to GStreamer display mock capture source and
advertise its deviceId as supported constraint.

  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp:

(WebCore::MockDisplayCaptureSourceGStreamer::create):
(WebCore::MockDisplayCaptureSourceGStreamer::MockDisplayCaptureSourceGStreamer):
(WebCore::MockDisplayCaptureSourceGStreamer::settings):

  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.h:
  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

LayoutTests:

  • platform/glib/TestExpectations:

Dec 22, 2021:

11:14 PM Changeset in webkit [287385] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

RenderLayer WIP
https://bugs.webkit.org/show_bug.cgi?id=234154

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

The members to store absolute (static inline/block) and
relative offset are used orthogonally, so we just merge
them.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateLayerPosition):

  • rendering/RenderLayer.h:

(WebCore::RenderLayer::offsetForInFlowPosition const):
(WebCore::RenderLayer::staticInlinePosition const):
(WebCore::RenderLayer::staticBlockPosition const):
(WebCore::RenderLayer::setStaticInlinePosition):
(WebCore::RenderLayer::setStaticBlockPosition):

11:00 PM Changeset in webkit [287384] by commit-queue@webkit.org
  • 4 edits in trunk

Re-enable WebPushD.HandleInjectedPush API test
https://bugs.webkit.org/show_bug.cgi?id=234627

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

Source/WebKit:

I needed to make an entitlement check return true when using the non-internal SDK,
which can't sign private entitlements into a binary. I also needed to make the fake
TestWebKitAPI code signing identifier match the identifier that arm64 Macs actually get,
or else m_testingPushMessages would not contain the right key in Daemon::getPendingPushMessages
on arm64 Macs.

  • webpushd/PushClientConnection.mm:

(WebPushD::ClientConnection::hostAppCodeSigningIdentifier):
(WebPushD::ClientConnection::hostHasEntitlement):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
8:04 PM Changeset in webkit [287383] by ysuzuki@apple.com
  • 26 edits in trunk/Source/bmalloc

[libpas] Make pas_heap_type constant
https://bugs.webkit.org/show_bug.cgi?id=234486

Reviewed by Filip Pizlo.

Currently, pas_heap_type data is placed in DATA segment since it is not constant.
But they are actually a constant value, so we should put them in
DATA_CONST segment.

Still, we can have mutable type information if we want: we can const-cast the type
in each derived pas_heap_type's functions (and we should define these types with non
constant way). But currently, we have no such a type.

  • bmalloc/IsoHeap.h:

(bmalloc::api::IsoHeap::provideHeap):

  • bmalloc/bmalloc.cpp:

(bmalloc::api::mallocOutOfLine):

  • libpas/src/libpas/bmalloc_heap.c:
  • libpas/src/libpas/bmalloc_heap_innards.h:
  • libpas/src/libpas/bmalloc_heap_ref.h:
  • libpas/src/libpas/bmalloc_type.c:

(bmalloc_type_dump):
(bmalloc_type_as_heap_type_dump):

  • libpas/src/libpas/bmalloc_type.h:

(bmalloc_type_size):
(bmalloc_type_alignment):
(bmalloc_type_name):
(bmalloc_type_as_heap_type_get_type_size):
(bmalloc_type_as_heap_type_get_type_alignment):

  • libpas/src/libpas/iso_heap.c:

(iso_heap_ref_construct):
(iso_primitive_heap_ref_construct):

  • libpas/src/libpas/iso_heap_ref.h:
  • libpas/src/libpas/jit_heap_config.c:

(jit_type_dump):

  • libpas/src/libpas/jit_heap_config.h:

(jit_type_size):
(jit_type_alignment):

  • libpas/src/libpas/pas_heap.h:
  • libpas/src/libpas/pas_heap_config.h:
  • libpas/src/libpas/pas_heap_ref_prefix.h:
  • libpas/src/libpas/pas_large_heap.c:

(allocate_impl):
(pas_large_heap_try_shrink):

  • libpas/src/libpas/pas_simple_type.c:

(pas_simple_type_as_heap_type_dump):

  • libpas/src/libpas/pas_simple_type.h:

(pas_simple_type_get_key_data):
(pas_simple_type_create_with_key_data):
(pas_simple_type_as_heap_type_get_type_size):
(pas_simple_type_as_heap_type_get_type_alignment):

  • libpas/src/libpas/pas_try_allocate.h:

(pas_try_allocate_impl_casual_case):

  • libpas/src/libpas/pas_try_allocate_array.h:
  • libpas/src/libpas/pas_try_allocate_common.h:

(pas_try_allocate_common_impl_slow):

  • libpas/src/libpas/pas_try_allocate_intrinsic.h:
  • libpas/src/libpas/pas_try_reallocate.h:

(pas_try_reallocate_array_by_count):

  • libpas/src/test/ExpendableMemoryTests.cpp:
  • libpas/src/test/IsoHeapChaosTests.cpp:

(std::addAllTests):

  • libpas/src/test/ThingyAndUtilityHeapAllocationTests.cpp:

(std::createIsolatedHeapRef):

7:10 PM Changeset in webkit [287382] by msaboff@apple.com
  • 11 edits
    1 delete in trunk/Source

Fix WebKit Build issues when using system content path
https://bugs.webkit.org/show_bug.cgi?id=234624

Reviewed by Filip Pizlo.

Source/ThirdParty/ANGLE:

Changed INSTALL_PATH on macOS builds to use a fully qualified .../WebCore.framework/Versions/A/Frameworks.
Deleted unused create-symlink-to-altroot.sh script.

  • Configurations/ANGLE-dynamic.xcconfig:
  • scripts/create-symlink-to-altroot.sh: Removed.

Source/ThirdParty/libwebrtc:

Changed INSTALL_PATH on macOS builds to use fully qualified .../WebCore.framework/Versions/A/Frameworks.

  • Configurations/libwebrtc.xcconfig:

Source/WebCore:

Covered by existing tests.

Added SYSTEM_CONTENT_PATH processing to WebCore's normal location.

  • Configurations/WebCore.xcconfig:

Source/WebKit:

Added SYSTEM_CONTENT_PATH processing to the nested frameworks path (UMBRELLA_FRAMEWORKS_DIR).

  • Configurations/BaseTarget.xcconfig:
  • Configurations/WebKit.xcconfig:

Source/WebKitLegacy/mac:

Added SYSTEM_CONTENT_PATH processing to NORMAL_PRODUCTION_FRAMEWORKS_DIR.

  • Configurations/WebKitLegacy.xcconfig:
6:19 PM Changeset in webkit [287381] by Aditya Keerthi
  • 3 edits
    2 adds in trunk

[iOS] metromile.com <select> dropdowns open twice
https://bugs.webkit.org/show_bug.cgi?id=234573
rdar://84011144

Reviewed by Wenson Hsieh.

Source/WebKit:

metromile.com calls focus() twice on the same <select> element, when one
is tapped. Note that calling focus() on an already focused element still
sends the ElementDidFocus message to the UIProcess, to support scenarios
where the initial call to focus did not bring up an input peripheral.
One example of such a scenario is when the initial call is not a result
of user interaction, however, there are additional scenarios that are
dependent on UIProcess state. This makes it difficult to ensure that
ElementDidFocus is only called when it is time to show an input peripheral.

-[WKContentView _elementDidFocus:...] already contains some logic to
prevent showing another input peripheral for the same element. This
logic was added in r168744, checking for the same element by comparing
input types and bounding rects.

However, in between the first and second call to focus(), the page
applies additional padding to the element, changing its bounding rect.
This results in _elementDidFocus: going past the same element check
and presenting another dropdown.

In the time since r168744 was written, a more robust mechanism to check
for the same element was added – ElementContext.

To fix, update the same element check to use ElementContext, ensuring an
attempt to present a new peripheral for the same element is not made.

Test: fast/forms/ios/refocus-select-after-size-change.html

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]):

LayoutTests:

Added a layout test to verify that only one <select> dropdown is
presented when refocusing the same <select> element with a different
size. If more than one dropdown is presented, the test times out.

  • fast/forms/ios/refocus-select-after-size-change-expected.txt: Added.
  • fast/forms/ios/refocus-select-after-size-change.html: Added.
5:48 PM Changeset in webkit [287380] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Hardening: decodeArrayBuffer is missing WARN_UNUSED_RETURN
https://bugs.webkit.org/show_bug.cgi?id=234619
<rdar://problem/62755159>

Reviewed by Alex Christensen.

  • Modules/webauthn/AuthenticatorResponseData.h:

(WebCore::decodeArrayBuffer): Add WARN_UNUSED_RETURN to declaration.

5:12 PM Changeset in webkit [287379] by sbarati@apple.com
  • 16 edits
    2 moves in trunk

LLInt should loop OSR into BBQ and BBQ should loop OSR into OMG
https://bugs.webkit.org/show_bug.cgi?id=234542

Reviewed by Yusuke Suzuki.

JSTests:

  • wasm/wast-tests/harness.js:

Source/JavaScriptCore:

It's a startup perf improvement on some Wasm benchmarks I'm running to have
Wasm LLInt do loop OSR entry into BBQ instead of OMG. This improves this
benchmark by 5%. There is probably more perf to be had here. Currently,
we're just OSR entering into B3 BBQ O1. However, in the future, we should
just compile a single Air BBQ Callee that allows for OSR entry at loop
boundaries. Maybe we can model this using EntrySwitch without any real
harm to throughput.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • assembler/MacroAssemblerCodeRef.cpp:

(JSC::shouldDumpDisassemblyFor):

  • jsc.cpp:

(JSC_DEFINE_HOST_FUNCTION):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmCallee.h:

(JSC::Wasm::Callee::setOSREntryCallee): Deleted.

  • wasm/WasmCalleeGroup.h:
  • wasm/WasmCompilationMode.cpp:

(JSC::Wasm::makeString):

  • wasm/WasmCompilationMode.h:

(JSC::Wasm::isOSREntry):
(JSC::Wasm::isAnyBBQ):
(JSC::Wasm::isAnyOMG):

  • wasm/WasmOMGForOSREntryPlan.cpp: Removed.
  • wasm/WasmOMGForOSREntryPlan.h: Removed.
  • wasm/WasmOSREntryPlan.cpp: Copied from Source/JavaScriptCore/wasm/WasmOMGForOSREntryPlan.cpp.

(JSC::Wasm::OSREntryPlan::OSREntryPlan):
(JSC::Wasm::OSREntryPlan::work):
(JSC::Wasm::OMGForOSREntryPlan::OMGForOSREntryPlan): Deleted.
(JSC::Wasm::OMGForOSREntryPlan::work): Deleted.

  • wasm/WasmOSREntryPlan.h: Copied from Source/JavaScriptCore/wasm/WasmOMGForOSREntryPlan.h.
  • wasm/WasmOperations.cpp:

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

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::updateCallSitesToCallUs):

  • wasm/WasmSlowPaths.cpp:

(JSC::LLInt::WASM_SLOW_PATH_DECL):

4:49 PM Changeset in webkit [287378] by achristensen@apple.com
  • 2 edits in trunk/Tools

Disable WKInspectorExtensionDelegate.ShowAndHideTabCallbacks API test
webkit.org/b/231847

It seems to be timing out a lot everywhere.

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm:

(TEST):

3:55 PM Changeset in webkit [287377] by sihui_liu@apple.com
  • 11 edits in trunk

WebsiteDataStore::excludeDirectoryFromBackup should set attribute for existing directories
https://bugs.webkit.org/show_bug.cgi?id=234404

Reviewed by Youenn Fablet.

Source/WebKit:

createDirectoryAtURL returning false means directory cannot be created, but the cause can be that directory
already exists; so we should set exclude attribute on the directory no matter createDirectoryAtURL returns true
or false. Also, we can use existing FileSystem functions.

API test: WKWebView.LocalStorageDirectoryExcludedFromBackup

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::excludeDirectoryFromBackup): Deleted.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Source/WTF:

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::excludeFromBackup):
(WTF::FileSystemImpl::canExcludeFromBackup): Deleted.

  • wtf/FileSystem.h:
  • wtf/cocoa/FileSystemCocoa.mm:

(WTF::FileSystemImpl::excludeFromBackup):

  • wtf/mac/FileSystemMac.mm:

(WTF::FileSystem::canExcludeFromBackup): Deleted.
(WTF::FileSystem::excludeFromBackup): Deleted.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm:

(TEST):

3:40 PM Changeset in webkit [287376] by Simon Fraser
  • 9 edits in trunk

Convert css3/scroll-snap/scroll-snap-wheel-event.html to use monitorWheelEvents()
https://bugs.webkit.org/show_bug.cgi?id=234526

Reviewed by Wenson Hsieh.

Source/WebCore:

This test sends a stateless wheel event and waits for the timer and subsequent scroll snap
animation, which is already tracked by WheelEventTestMonitor, but the code had a bug where
the monitor wasn't informed if no animation was required.

  • platform/mac/ScrollingEffectsController.mm:

(WebCore::ScrollingEffectsController::statelessSnapTransitionTimerFired):

LayoutTests:

Convert the test to use a UIHelper function which makes use of WheelEventTestMonitor.

  • css3/scroll-snap/scroll-snap-wheel-event.html:
  • resources/ui-helper.js:

(window.UIHelper.async statelessMouseWheelScrollAt):

3:34 PM Changeset in webkit [287375] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Close/open nested bidi contexts for new lines after force line breaks
https://bugs.webkit.org/show_bug.cgi?id=234611

Reviewed by Antti Koivisto.

Bidi handling requires us to close all the nested bidi contexts at the end of the line (triggered by forced line breaks)
and re-open it for the content on the next line.

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::handleEnterExitBidiContext):
(WebCore::Layout::buildBidiParagraph):

3:16 PM Changeset in webkit [287374] by achristensen@apple.com
  • 9 edits in trunk

Re-enable CustomDisplayName and DefaultDisplayName API tests on Monterey
https://bugs.webkit.org/show_bug.cgi?id=234613

Reviewed by Brady Eidson.

Source/WebKit:

When we introduced setting the display name from the network process,
we didn't update the tests to get the information from the process that can access it.

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/mac/NetworkConnectionToWebProcessMac.mm:

(WebKit::NetworkConnectionToWebProcess::updateActivePages):
(WebKit::NetworkConnectionToWebProcess::getProcessDisplayName):

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::getProcessDisplayName):

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

(WebKit::WebProcess::auditTokenForSelf):
(WebKit::WebProcess::updateProcessName):
(WebKit::WebProcess::getProcessDisplayName):
(WebKit::WebProcess::updateActivePages):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/DisplayName.mm:

(TestWebKitAPI::TEST):

2:51 PM Changeset in webkit [287373] by Kocsen Chung
  • 1 copy in tags/Safari-612.4.8

Tag Safari-612.4.8.

2:32 PM Changeset in webkit [287372] by commit-queue@webkit.org
  • 6 edits in trunk/Source

Unreviewed, reverting r287364.
https://bugs.webkit.org/show_bug.cgi?id=234620

broke 3 API tests

Reverted changeset:

"Preferences that read from NSUserDefaults need to be
initialied from platformInitializeStore()"
https://bugs.webkit.org/show_bug.cgi?id=234488
https://commits.webkit.org/r287364

2:23 PM Changeset in webkit [287371] by Kate Cheney
  • 25 edits in trunk

PCM tests crashing with 'unlink' errors
https://bugs.webkit.org/show_bug.cgi?id=234565
<rdar://problem/86771766>

Reviewed by Alex Christensen.

Source/WebKit:

Close PCM and ITP databases before deleting their database files in
API testing. This adds 2 new SPIs on WKWebsiteDataStore to close the
respective databases. It also addresses the renaming FIXME for
NetworkProcess::simulatePrivateClickMeasurementSessionRestart.

No new tests. This will fix existing crashing PCM API tests.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::closeITPDatabase):
(WebKit::NetworkProcess::closePCMDatabase):
(WebKit::NetworkProcess::simulatePrivateClickMeasurementSessionRestart):
(WebKit::NetworkProcess::simulateResourceLoadStatisticsSessionRestart): Deleted.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::destroyPrivateClickMeasurementStore):
(WebKit::NetworkSession::setPrivateClickMeasurementAppBundleIDForTesting):
(WebKit::NetworkSession::recreatePrivateClickMeasurementStore): Renamed.
Renamed to be more accurate. This function only deletes the database,
then the call in the completion handler recreates it. This also makes
it more clear when we reuse it to close the database.

  • NetworkProcess/NetworkSession.h:
  • UIProcess/API/C/WKPage.cpp:

(WKPageSimulatePrivateClickMeasurementSessionRestart):
(WKPageSimulateResourceLoadStatisticsSessionRestart): Deleted.

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _closeDatabases:]):

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::simulatePrivateClickMeasurementSessionRestart):
(WebKit::WebPageProxy::simulateResourceLoadStatisticsSessionRestart): Deleted.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::closeDatabases):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:

(cleanUp):
Close the databases before removing the files.

(TEST):

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::simulatePrivateClickMeasurementSessionRestart):
(WTR::TestRunner::simulateResourceLoadStatisticsSessionRestart): Deleted.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::simulatePrivateClickMeasurementSessionRestart):
(WTR::TestController::simulateResourceLoadStatisticsSessionRestart): Deleted.

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
Rename.

LayoutTests:

  • http/tests/privateClickMeasurement/expired-ad-click-gets-removed-on-session-start.html:
  • http/tests/privateClickMeasurement/expired-attribution-report-gets-sent-on-session-start.html:
1:03 PM Changeset in webkit [287370] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Soft linebreaks have incorrect bidi paragraph positions
https://bugs.webkit.org/show_bug.cgi?id=234608

Reviewed by Antti Koivisto.

Soft linebreaks are part of the InlineTextBox content and they are appened to the bidi paragraph
together with the rest of the text content (as we append the InlineTextBox content in one block).
We need to handle their positions the same way we do with regular text content i.e. use the inline item's offset
and not the paragraphContentBuilder's length.

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::buildBidiParagraph):

11:44 AM Changeset in webkit [287369] by Kocsen Chung
  • 4 edits
    2 adds in branches/safari-612-branch

Cherry-pick r287366. rdar://problem/84379650

[iOS] Scroll view pinch zoom gesture sometimes fails to recognize in WKWebView
https://bugs.webkit.org/show_bug.cgi?id=234584
rdar://84379650

Reviewed by Simon Fraser.

Source/WebKit:

WKWebView may get into a state where the pinch zoom gesture recognizer on its scroll view sometimes fails to
transition to Changed state (and invoke its action, which sets the zoomScale of the scroll view); this happens
because the scroll view pinch gesture requires the touch start deferring gesture recognizer (TSDG) to fail, but
it's possible for TSDG to remain stuck in Possible state over the duration of a gesture after beginning a touch
over content with either passive touch event listeners, or no touch event listeners.

In the case where the TSDG is stuck in Possible state, we observe the following sequence of events (let's
suppose the user is starting a touch over a passive touch event listener on a web page):

  1. The UITouch is delivered to the web touch event gesture recognizer, which fires the action

(-_webTouchEventsRecognized:). We observe that we're over an async touch event handling region (i.e.
passive or no touch event listeners), so we immediately "lift the gesture gate" by transitioning all
deferring gesture recognizers to Failed state, (with the intent that they won't prevent native gestures
from recognizing).

  1. A UITouch is then delivered to the TSDG in the same runloop as UIKit continues to deliver the touch

event to all gestures in the NSSet of gesture recognizers on the window. Receiving the UITouch causes
TSDG (which we already set to Failed state in step (1)) to internally reset and transition back to
Possible state, underneath WebKit.

  1. TSDG is now in possible state after the gesture has begun, but we've already tried to unblock native

gestures. When performing the second touch of the pinch zoom gesture, the pinch zoom gesture fails to
commence because it's stuck waiting for TSDG to fail.

In the normal (working) scenario, step (2) happens before step (1); this ensures that TSDG is set to Failed
state and remains in Failed state over the course of the gesture, thereby preventing the bug from happening. The
order in which (1) and (2) happen is dependent on the order in which the web touch event gesture and TSDG are
iterated in UIKit's NSSet of gestures, which explains why this bug only reproduces some of the time.

This patch mitigates this by adding a mechanism to keep track of touch start deferrers that we've already
transitioned to Failed state during the course of a gesture, and uses this information to avoid adding failure
requirements to these deferring gestures that have already been "ungated". This ensures that even if the
deferring gesture resets to Possible state from underneath WebKit, we still avoid pushing out native gesture
recognition due to these deferring gestures.

As an aside, I initially attempted to avoid having TSDG transition back to Possible state altogether in this
scenario, but this doesn't seem to be avoidable (short of overriding the SPI method -_resetGestureRecognizer
and not calling the superclass, which does not seem to be supported behavior).

Test: fast/events/touch/ios/pinch-zoom-with-passive-touch-event-listeners.html

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _webTouchEventsRecognized:]): (-[WKContentView _doneDeferringTouchStart:]): (-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):

LayoutTests:

Add a test to exercise the fix. Note that this test will only fail without the fix *some* of the time, since it
depends entirely on the order in which two gestures appear in an Objective-C hash datastructure (see WebKit
ChangeLog for more details).

  • fast/events/touch/ios/pinch-zoom-with-passive-touch-event-listeners-expected.txt: Added.
  • fast/events/touch/ios/pinch-zoom-with-passive-touch-event-listeners.html: Added.

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

11:39 AM Changeset in webkit [287368] by achristensen@apple.com
  • 16 edits in trunk

Fix compiling with pickier compiler
https://bugs.webkit.org/show_bug.cgi?id=234593

Reviewed by Brady Eidson.

Source/JavaScriptCore:

  • API/tests/Regress141275.mm:

(-[JSTEvaluator initWithScript:]):

  • API/tests/testapi.mm:

(checkModuleWasRejected):

Source/WebCore:

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::_addMarkersToList):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):

  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm:

(WebCore::GraphicsContextGLANGLE::checkGPUStatus):

  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:
  • platform/graphics/coreimage/FEColorMatrixCoreImageApplier.mm:

(WebCore::FEColorMatrixCoreImageApplier::apply const):

Source/WebKit:

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

  • WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:

(WebKit::InjectedBundle::initialize):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/CreateWebArchive.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:

(TestWebKitAPI::TEST):

11:20 AM Changeset in webkit [287367] by commit-queue@webkit.org
  • 6 edits in trunk/Source

[RISCV64] Add RISCV64 support in YARR
https://bugs.webkit.org/show_bug.cgi?id=234547

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

Source/JavaScriptCore:

Add RISCV64 support to YARR. This covers providing the required register
and immediate defitinitions, as well as also enabling codepaths shared
with other 64-bit architectures.

  • assembler/MacroAssemblerRISCV64.h:

(JSC::MacroAssemblerRISCV64::load16): YARR JIT also requires a load16()
overload that loads from an ExtendedAddress.

  • yarr/YarrJIT.cpp:
  • yarr/YarrJITRegisters.h:

Source/WTF:

  • wtf/PlatformEnable.h: Also enable different YARR-related flags for RISCV64.
11:12 AM Changeset in webkit [287366] by Wenson Hsieh
  • 4 edits
    2 adds in trunk

[iOS] Scroll view pinch zoom gesture sometimes fails to recognize in WKWebView
https://bugs.webkit.org/show_bug.cgi?id=234584
rdar://84379650

Reviewed by Simon Fraser.

Source/WebKit:

WKWebView may get into a state where the pinch zoom gesture recognizer on its scroll view sometimes fails to
transition to Changed state (and invoke its action, which sets the zoomScale of the scroll view); this happens
because the scroll view pinch gesture requires the touch start deferring gesture recognizer (TSDG) to fail, but
it's possible for TSDG to remain stuck in Possible state over the duration of a gesture after beginning a touch
over content with either passive touch event listeners, or no touch event listeners.

In the case where the TSDG is stuck in Possible state, we observe the following sequence of events (let's
suppose the user is starting a touch over a passive touch event listener on a web page):

  1. The UITouch is delivered to the web touch event gesture recognizer, which fires the action

(-_webTouchEventsRecognized:). We observe that we're over an async touch event handling region (i.e.
passive or no touch event listeners), so we immediately "lift the gesture gate" by transitioning all
deferring gesture recognizers to Failed state, (with the intent that they won't prevent native gestures
from recognizing).

  1. A UITouch is then delivered to the TSDG in the same runloop as UIKit continues to deliver the touch

event to all gestures in the NSSet of gesture recognizers on the window. Receiving the UITouch causes
TSDG (which we already set to Failed state in step (1)) to internally reset and transition back to
Possible state, underneath WebKit.

  1. TSDG is now in possible state after the gesture has begun, but we've already tried to unblock native

gestures. When performing the second touch of the pinch zoom gesture, the pinch zoom gesture fails to
commence because it's stuck waiting for TSDG to fail.

In the normal (working) scenario, step (2) happens before step (1); this ensures that TSDG is set to Failed
state and remains in Failed state over the course of the gesture, thereby preventing the bug from happening. The
order in which (1) and (2) happen is dependent on the order in which the web touch event gesture and TSDG are
iterated in UIKit's NSSet of gestures, which explains why this bug only reproduces some of the time.

This patch mitigates this by adding a mechanism to keep track of touch start deferrers that we've already
transitioned to Failed state during the course of a gesture, and uses this information to avoid adding failure
requirements to these deferring gestures that have already been "ungated". This ensures that even if the
deferring gesture resets to Possible state from underneath WebKit, we still avoid pushing out native gesture
recognition due to these deferring gestures.

As an aside, I initially attempted to avoid having TSDG transition back to Possible state altogether in this
scenario, but this doesn't seem to be avoidable (short of overriding the SPI method -_resetGestureRecognizer
and not calling the superclass, which does not seem to be supported behavior).

Test: fast/events/touch/ios/pinch-zoom-with-passive-touch-event-listeners.html

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

(-[WKContentView _webTouchEventsRecognized:]):
(-[WKContentView _doneDeferringTouchStart:]):
(-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):

LayoutTests:

Add a test to exercise the fix. Note that this test will only fail without the fix *some* of the time, since it
depends entirely on the order in which two gestures appear in an Objective-C hash datastructure (see WebKit
ChangeLog for more details).

  • fast/events/touch/ios/pinch-zoom-with-passive-touch-event-listeners-expected.txt: Added.
  • fast/events/touch/ios/pinch-zoom-with-passive-touch-event-listeners.html: Added.
10:52 AM Changeset in webkit [287365] by achristensen@apple.com
  • 2 edits in trunk/Tools

Re-enable WebpagePreferences.WebsitePoliciesDuringRedirect API test on Monterey
https://bugs.webkit.org/show_bug.cgi?id=234607

Reviewed by Brady Eidson.

This is the same as r285057 where we were responding with one byte short of the ranges requested,
which used to give a playing event but since Monterey it doesn't. The fix is to respond with all
the bytes requested. If the request is for bytes 0-1, we need to respond with two bytes, for example.

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(-[TestSchemeHandler webView:startURLSchemeTask:]):
(TEST):

10:48 AM Changeset in webkit [287364] by Simon Fraser
  • 6 edits in trunk/Source

Preferences that read from NSUserDefaults need to be initialied from platformInitializeStore()
https://bugs.webkit.org/show_bug.cgi?id=234488

Reviewed by Sam Weinig.

Having the default value for a preference read from NSUserDefaults can cause issues
if the UIProcess and WebProcess values don't match. Instead, have platformInitializeStore()
explicitly add values for these keys; this is done for scrollAnimatorEnabledKey.

Source/WebKit:

  • UIProcess/Cocoa/WebPreferencesCocoa.mm:

(WebKit::WebPreferences::initializePlatformDependentPreferences):
(WebKit::WebPreferences::platformInitializeStore):

  • UIProcess/WebPreferences.cpp:

(WebKit::WebPreferences::initializePlatformDependentPreferences):

  • UIProcess/WebPreferences.h:

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml:
10:35 AM Changeset in webkit [287363] by Antti Koivisto
  • 14 edits
    2 adds in trunk

[:has() pseudo-class] :has() selector invalidation issue with toggling :checked
https://bugs.webkit.org/show_bug.cgi?id=234561

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/invalidation/has-pseudo-class-expected.txt: Added.
  • web-platform-tests/css/selectors/invalidation/has-pseudo-class.html: Added.

Source/WebCore:

Test: imported/w3c/web-platform-tests/css/selectors/invalidation/has-pseudo-class.html

Pseudo-classes need to use Style::PseudoClassChangeInvalidation to support invalidation as :has() argument.
This patch adds it for :checked.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::setChecked):

  • html/HTMLOptionElement.cpp:

(WebCore::HTMLOptionElement::HTMLOptionElement):
(WebCore::HTMLOptionElement::matchesDefaultPseudoClass const):

Use a member for :default instead of attribute test so we can do invalidation over changing it in parseAttribute.

(WebCore::HTMLOptionElement::parseAttribute):
(WebCore::HTMLOptionElement::setSelectedState):

  • html/HTMLOptionElement.h:

LayoutTests:

Results here change because we do more accurate invalidation.

  • fast/css/indirect-adjacent-style-invalidation-1-expected.txt:
  • fast/css/indirect-adjacent-style-invalidation-1.html:
  • fast/css/indirect-adjacent-style-invalidation-2-expected.txt:
  • fast/css/indirect-adjacent-style-invalidation-2.html:
  • fast/css/indirect-adjacent-style-invalidation-3-expected.txt:
  • fast/css/indirect-adjacent-style-invalidation-3.html:
  • fast/css/pseudo-indeterminate-with-radio-buttons-style-invalidation-expected.txt:
  • fast/css/pseudo-indeterminate-with-radio-buttons-style-invalidation.html:

Stop testing invalidation state for the element where :checked state changed. That is not
really the point of these tests anyway.
With accurate invalidation the result depends on plaform (iOS has :checked in UA sheet
while other platforms don't)

10:33 AM Changeset in webkit [287362] by Antti Koivisto
  • 3 edits
    2 adds in trunk

[:has() pseudo-class] :has() selector does not render on first pass?
https://bugs.webkit.org/show_bug.cgi?id=234531

Reviewed by Simon Fraser.

Source/WebCore:

With :has() identical sibling elements can have different style which breaks the current
assumptions of the style sharing optimization.

Test: fast/selectors/has-style-sharing.html

  • style/StyleSharingResolver.cpp:

(WebCore::Style::SharingResolver::resolve):

Disable style sharing in presence of :has() rules for now.

For a less heavy-handed approach we need to start testing for :has() rules similar to what is already done
for sibling and attribute rules.

LayoutTests:

Test case by Alex Riviere.

  • fast/selectors/has-style-sharing-expected.html: Added.
  • fast/selectors/has-style-sharing.html: Added.
10:24 AM Changeset in webkit [287361] by msaboff@apple.com
  • 2 edits in trunk/Source/WebCore

Fix WebCore install headers with alternate build
https://bugs.webkit.org/show_bug.cgi?id=234592

Reviewed by Filip Pizlo.

Covered by existing tests.

Fixed OUTPUT_ALTERNATE_ROOT_PATH for macOS to return an empty value since we don't need a symlink
as the WebCore framework is in a subdirectory of WebKit.framework.
Fixed typos with NORMAL_PRODUCTION_FRAMEWORKS_DIR_USE_SYSTEM_CONTENT_PATH_YES rules,
eliminating the ')'s at the end of the lines.

  • Configurations/WebCore.xcconfig:
9:59 AM Changeset in webkit [287360] by J Pascoe
  • 4 edits in trunk

[WebAuthn] Set Web Authentication experimental feature flag as default true
https://bugs.webkit.org/show_bug.cgi?id=234533
<rdar://problem/86743595>

Reviewed by Brent Fulgham.

Source/WTF:

The Web Authentication feature has been shipping for a while. Default value
for experimental feature flag should be true.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

Tools:

The Web Authentication feature has been shipping for a while. Default value for
experimental feature flag should be true.

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST):
(TestWebKitAPI::WebCore::webAuthenticationExperimentalFeature): Deleted.

9:41 AM Changeset in webkit [287359] by achristensen@apple.com
  • 2 edits in trunk/Tools

Re-enable PrivateClickMeasurement.EphemeralWithAttributedBundleIdentifier API test
https://bugs.webkit.org/show_bug.cgi?id=226548

It was fixed with r287275

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::TEST):

9:37 AM Changeset in webkit [287358] by commit-queue@webkit.org
  • 3 edits
    2 deletes in trunk

Unreviewed, reverting r285087.
https://bugs.webkit.org/show_bug.cgi?id=234605

iPad PLUM3 GPUP 10% regression

Reverted changeset:

"[GPU Process] Small ImageBuffers cause the web process to
crash"
https://bugs.webkit.org/show_bug.cgi?id=232470
https://commits.webkit.org/r285087

9:35 AM Changeset in webkit [287357] by achristensen@apple.com
  • 2 edits in trunk/Tools

Remove failing API test check added in r287342
https://bugs.webkit.org/show_bug.cgi?id=234576

I added a check that has failed on some bots. No need to add it.

  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm:

(TestWebKitAPI::TEST):

8:57 AM Changeset in webkit [287356] by ntim@apple.com
  • 22 edits in trunk

Internally unprefix -webkit-text-emphasis properties
https://bugs.webkit.org/show_bug.cgi?id=234602

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Adjust test expectations.

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:

Source/WebCore:

It's already exposed unprefixed externally, let's reflect this internally as well.

Makes it easier to remove prefixed versions later on if needed, and it's also less confusing when
going through the CSSProperties.json file.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSProperties.json:
  • css/CSSValueKeywords.in:
  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue const):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseShorthand):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::selectionEmphasisMarkColor const):

  • rendering/TextPaintStyle.cpp:

(WebCore::computeTextPaintStyle):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::unresolvedColorForProperty const):

  • style/PropertyAllowlist.cpp:

(WebCore::Style::isValidMarkerStyleProperty):

  • style/StyleBuilder.cpp:

(WebCore::Style::isValidVisitedLinkProperty):

  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyInitialTextEmphasisStyle):
(WebCore::Style::BuilderCustom::applyInheritTextEmphasisStyle):
(WebCore::Style::BuilderCustom::applyValueTextEmphasisStyle):
(WebCore::Style::BuilderCustom::applyInitialWebkitTextEmphasisStyle): Deleted.
(WebCore::Style::BuilderCustom::applyInheritWebkitTextEmphasisStyle): Deleted.
(WebCore::Style::BuilderCustom::applyValueWebkitTextEmphasisStyle): Deleted.

LayoutTests:

Adjust test expectations.

  • 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:
7:27 AM Changeset in webkit [287355] by svillar@igalia.com
  • 4 edits
    2 adds in trunk

[REGRESSION][[css-flexbox] child elements are shrunk to fit into container after r286206
https://bugs.webkit.org/show_bug.cgi?id=234361

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-flexbox/flexbox-iframe-intrinsic-size-001-expected.html: Added.
  • web-platform-tests/css/css-flexbox/flexbox-iframe-intrinsic-size-001.html: Added.
  • web-platform-tests/css/css-flexbox/w3c-import.log:

Source/WebCore:

The patch from r286206 fixed the sizing of flex items with intrinsic aspect ratios but no intrinsic sizes
as happens with many SVG images. That fix was however way too general as it was targeted at any replaced
element. The problem of generalizing it is that replaced elements as iframes do not have intrinsic aspect
ratios although they have a default size (300x150px). Constraining the new code to SVG images fixes the
regression.

Replacing is<RenderReplaced>(child) with is<RenderSVGRoot>(child) wouldn't be enough as we need to consider
the newly added LegacySVGRoot that was added as part of the SVG layout refactoring.

Test: imported/w3c/web-platform-tests/css/css-flexbox/flexbox-iframe-intrinsic-size-001.html

  • rendering/RenderFlexibleBox.cpp:

(WebCore::isSVGRootWithIntrinsicAspectRatio):
(WebCore::childHasAspectRatio):
(WebCore::RenderFlexibleBox::computeMainSizeFromAspectRatioUsing const):
(WebCore::RenderFlexibleBox::childHasComputableAspectRatio const):
(WebCore::isRenderReplacedWithIntrinsicAspectRatio): Deleted.

4:31 AM Changeset in webkit [287354] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

null ptr deref in DocumentTimeline::animate
https://bugs.webkit.org/show_bug.cgi?id=234260

Patch by Frédéric Wang <fwang@igalia.com> on 2021-12-22
Reviewed by Darin Adler.

Source/WebCore:

Test: webanimations/document-timeline-animate-crash.html

  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::animate): If the WeakPtr m_document was destroyed, throw a
TypeError exception so that the call to WebAnimation::create won't cause a null ptr deref.

LayoutTests:

Add non-regression test.

  • webanimations/document-timeline-animate-crash-expected.txt: Added.
  • webanimations/document-timeline-animate-crash.html: Added.
2:13 AM Changeset in webkit [287353] by youenn@apple.com
  • 7 edits
    4 adds in trunk

Use requester when calling updateRequestAndAddExtraFields
https://bugs.webkit.org/show_bug.cgi?id=234507
<rdar://problem/85049490>

Reviewed by Brent Fulgham.

Source/WebCore:

In case of navigation loads, the requester is the fetch request client.
As such, it should be the one used to determine whether the request is cross-origin is not.
Pass the requester to updateRequestAndAddExtraFields to do the correct computation.
Validate that some request fields are now correctly observed in service workers.

Test: http/wpt/service-workers/navigation-iframe-site.https.html

  • loader/FrameLoader.cpp:
  • loader/FrameLoader.h:
  • testing/ServiceWorkerInternals.cpp:
  • testing/ServiceWorkerInternals.h:
  • testing/ServiceWorkerInternals.idl:

LayoutTests:

  • http/wpt/service-workers/navigation-iframe-site-worker.js: Added.
  • http/wpt/service-workers/navigation-iframe-site.https-expected.txt: Added.
  • http/wpt/service-workers/navigation-iframe-site.https.html: Added.
  • http/wpt/service-workers/resources/navigation-iframe-site-frame.html: Added.
1:32 AM Changeset in webkit [287352] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[RISCV64] Fix RISCV64Assembler::ImmediateDecomposition in debug builds
https://bugs.webkit.org/show_bug.cgi?id=234594

Unreviewed, fix the RISCV64Assembler::ImmediateDecomposition constructor
to build in debug mode (fixing the assert) as well as run properly in
that mode (performing manual sign-extension on the lower 12 bits of the
IImmediate value as required for this type of immediates).

Patch by Zan Dobersek <zdobersek@igalia.com> on 2021-12-22

  • assembler/RISCV64Assembler.h:

(JSC::RISCV64Instructions::ImmediateDecomposition::ImmediateDecomposition):

1:04 AM Changeset in webkit [287351] by commit-queue@webkit.org
  • 2 edits
    4 copies
    1 delete in trunk/LayoutTests

[GTK] Update test expectations and baselines. Unreviewed test gardening.
https://bugs.webkit.org/show_bug.cgi?id=234580

Create some GTK-specific baselines where they differ from WPE.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-12-22

  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-003-expected.txt: Copied from LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-003-expected.txt.
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom-view/getBoundingClientRect-shy-expected.txt: Copied from LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/cssom-view/getBoundingClientRect-shy-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-003-expected.txt: Renamed from LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-003-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom-view/getBoundingClientRect-shy-expected.txt: Renamed from LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/cssom-view/getBoundingClientRect-shy-expected.txt.
12:55 AM Changeset in webkit [287350] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

REGRESSION(r287021): [EME][Thunder] Build broken
https://bugs.webkit.org/show_bug.cgi?id=234434

Patch by Philippe Normand <pnormand@igalia.com> on 2021-12-22
Reviewed by Xabier Rodriguez-Calvar.

Fix build, simplify a bit the parsing of message payloads.

  • platform/graphics/gstreamer/eme/CDMThunder.cpp:

(WebCore::CDMInstanceThunder::setServerCertificate):
(WebCore::ParsedResponseMessage::ParsedResponseMessage):
(WebCore::CDMInstanceSessionThunder::errorCallback):
(WebCore::CDMInstanceSessionThunder::requestLicense):
(WebCore::CDMInstanceSessionThunder::updateLicense):
(WebCore::CDMInstanceSessionThunder::loadSession):

12:44 AM Changeset in webkit [287349] by commit-queue@webkit.org
  • 4 edits in trunk

REGRESSION(r284368) [GStreamer] test imported/w3c/web-platform-tests/media-source/mediasource-video-is-visible.html fails on GTK and WPE
https://bugs.webkit.org/show_bug.cgi?id=234352

Patch by Philippe Normand <pnormand@igalia.com> on 2021-12-22
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

r284368 introduced a new behavior in the GL sink where any downstream not being a tag event
was triggering a flush in the media player, which was not originally intended.

  • platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:

(webKitGLVideoSinkSetMediaPlayerPrivate):

LayoutTests:

  • platform/glib/TestExpectations:

Dec 21, 2021:

10:36 PM Changeset in webkit [287348] by Brent Fulgham
  • 12 edits
    10 adds in trunk

Propagate app-initiated state to new ResourceRequests
https://bugs.webkit.org/show_bug.cgi?id=234015
<rdar://problem/86128638>

Reviewed by Kate Cheney.

Source/WebCore:

While reviewing logging we have found that some ResourceRequest objects
are missing the correct state for app-initiated loads. Typically, these
are cases where a new ResourceRequest is created from a URL string, losing
the context that came with the original load (or the context of the page
triggering the load).

This patch corrects a number of such cases.

Tests: http/tests/app-privacy-report/app-attribution-beacon-isappinitiated.html

http/tests/app-privacy-report/app-attribution-beacon-isnotappinitiated.html
http/tests/app-privacy-report/new-window-isappinitiated.html
http/tests/app-privacy-report/new-window-isnotappinitiated.html

  • Modules/beacon/NavigatorBeacon.cpp:

(WebCore::NavigatorBeacon::sendBeacon):

  • Modules/websockets/WebSocketChannel.cpp:

(WebCore::WebSocketChannel::connect):

  • Modules/websockets/WebSocketHandshake.cpp:

(WebCore::WebSocketHandshake::WebSocketHandshake):
(WebCore::WebSocketHandshake::clientHandshakeRequest const):

  • Modules/websockets/WebSocketHandshake.h:
  • loader/CrossOriginAccessControl.cpp:

(WebCore::createPotentialAccessControlRequest):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::willLoadMediaElementURL):
(WebCore::FrameLoader::commitProvisionalLoad):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::createWindow):

Source/WebKit:

While reviewing logging we have found that some ResourceRequest objects
are missing the correct state for app-initiated loads. Typically, these
are cases where a new ResourceRequest is created from a URL string, losing
the context that came with the original load (or the context of the page
triggering the load).

This patch corrects a number of such cases.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::createNewPage): Propagate app-initiated state to newly created page.

  • NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:

(WebKit::NetworkCache::SubresourceInfo::encode const): Correct missing serialization for
app-initiated state.
(WebKit::NetworkCache::SubresourceInfo::decode):
(WebKit::NetworkCache::SubresourceInfo::SubresourceInfo):

LayoutTests:

  • http/tests/app-privacy-report/app-attribution-beacon-isappinitiated-expected.txt: Added.
  • http/tests/app-privacy-report/app-attribution-beacon-isappinitiated.html: Added.
  • http/tests/app-privacy-report/app-attribution-beacon-isnotappinitiated-expected.txt: Added.
  • http/tests/app-privacy-report/app-attribution-beacon-isnotappinitiated.html: Added.
  • http/tests/app-privacy-report/new-window-isappinitiated.html: Added.
  • http/tests/app-privacy-report/new-window-isappinitiated-expected.txt: Added.
  • http/tests/app-privacy-report/new-window-isnotappinitiated.html: Added.
  • http/tests/app-privacy-report/new-window-isnotappinitiated-expected.txt: Added.
  • http/tests/app-privacy-report/resources/new-window-isappinitiated-win.html: Added.
  • http/tests/app-privacy-report/resources/new-window-isnotappinitiated-win.html: Added.
10:28 PM Changeset in webkit [287347] by achristensen@apple.com
  • 4 edits in trunk

Fix some API tests after r287341
https://bugs.webkit.org/show_bug.cgi?id=232857

Source/WebKit:

I found the cause of the strange failures and verified my "fix" on an Intel Mac and an Apple Silicon Mac.

  • webpushd/PushClientConnection.mm:

(WebPushD::ClientConnection::hostAppCodeSigningIdentifier):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:

(TestWebKitAPI::TEST):

9:17 PM Changeset in webkit [287346] by Patrick Angle
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Assertion Failed removing subview in ContentViewContainer.prototype._disassociateFromContentView
https://bugs.webkit.org/show_bug.cgi?id=234572

Reviewed by Devin Rousso.

r283859 accidentally removed the checks that a content view is attached before attempting to remove it, leading
to an assertion.

  • UserInterface/Views/ContentViewContainer.js:

(WI.ContentViewContainer.prototype._disassociateFromContentView):

9:15 PM Changeset in webkit [287345] by Simon Fraser
  • 5 edits
    2 adds in trunk

Fuzzy pixel data need to be computed in terms of CSS pixels
https://bugs.webkit.org/show_bug.cgi?id=232525

Reviewed by Tim Horton.

Tools:

Pixel tolerance is computed in CSS pixels, so have ImageDiff divide the total number of
differing pixels by the square of the scale factor (a single different pixel at 1x becomes 4
different pixels at 2x).

  • ImageDiff/ImageDiff.cpp:

(processImages):

  • ImageDiff/PlatformImage.cpp:

(ImageDiff::PlatformImage::isCompatible const):
(ImageDiff::PlatformImage::difference):

LayoutTests:

Add a hidpi pixel tolerance test.

  • fast/harness/image-diff/hidpi-pixel-tolerance-expected.html: Added.
  • fast/harness/image-diff/hidpi-pixel-tolerance.html: Added.
  • platform/ios-wk2/TestExpectations: Remove fast/harness/image-diff/fuzz-2-25.html.
8:52 PM Changeset in webkit [287344] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebKit

Use fileURLWithPath instead of URLWithString in WebsiteDataStore::excludeDirectoryFromBackup
https://bugs.webkit.org/show_bug.cgi?id=234582
rdar://86787798

Reviewed by Simon Fraser.

URLWithString may return nil while fileURLWithPath does not; and fileURLWithPath adds file:// to path correctly.

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::excludeDirectoryFromBackup):

8:18 PM Changeset in webkit [287343] by achristensen@apple.com
  • 7 edits in trunk

Re-enable ContextMenu API tests
https://bugs.webkit.org/show_bug.cgi?id=234585
Source/WebKit:

<rdar://59610140>

Reviewed by Tim Horton.

UIKit changed the internal driver interface to simulate events to show context menus for our tests.
This follows the change and makes our tests work again.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _registerPreview]):

Tools:

Reviewed by Tim Horton.

  • TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm:

(TEST):

  • TestWebKitAPI/cocoa/TestContextMenuDriver.h:
  • TestWebKitAPI/cocoa/TestContextMenuDriver.mm:

(+[TestContextMenuDriver prefersCancelsTouchesInView]):
(-[TestContextMenuDriver cancelsTouchesInView]):
(-[TestContextMenuDriver setCancelsTouchesInView:]):

8:17 PM Changeset in webkit [287342] by achristensen@apple.com
  • 2 edits in trunk/Tools

Enable Fullscreen.LayoutConstraints API test
https://bugs.webkit.org/show_bug.cgi?id=234576

Reviewed by Tim Horton.

Added in bug 159900 and not compiled until bug 232768, now it's giving us some useful test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm:

(TestWebKitAPI::TEST):

8:09 PM Changeset in webkit [287341] by achristensen@apple.com
  • 2 edits in trunk/Tools

Fix some API tests after r287316
https://bugs.webkit.org/show_bug.cgi?id=232857

I saw the test behavior difference on my Monterey arm64 Mac and assumed it was because it was Monterey,
but actually it's because it's an arm64 Mac. Fix the test expectations.

  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:

(TestWebKitAPI::TEST):

7:25 PM Changeset in webkit [287340] by Wenson Hsieh
  • 3 edits in trunk/Tools

REGRESSION (12/21/2021): [iOS] TestWebKitAPI.WebKit.AddAndRemoveDataDetectors is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=234574
rdar://86782559

Reviewed by Tim Horton.

This test began failing today due to DataDetectors no longer recognizing "December 21, 2021" as a valid date in
the future. Avoid this problem (at least, until the next century) by adjusting this date to be much later.

  • TestWebKitAPI/Tests/WebKitCocoa/DataDetection.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/data-detectors.html:
6:31 PM Changeset in webkit [287339] by beidson@apple.com
  • 45 edits in trunk

Make Notification identifiers be a UUID string instead of a uint64_t
https://bugs.webkit.org/show_bug.cgi?id=234534

Reviewed by Alex Christensen.
Source/WebCore:

No new tests (Refactor, covered by existing tests)

Before this patch, Notifications were tagged with an in-WebContent-process-unique identifier
and also tagged with a UIProcess-unique identifier.

There were maps between these two identifiers in WebKit, and both of them were exposed via API/SPI
(e.g. through the injected bundle), necessitating maps between them in WKTR as well.

This simplifies things by making a UUID identifier in the WebContent process that can be treated
as the One True Identifier within WebKit.

There's existing SPI clients that rely on the UIProcess-unique uin64_t identifier, so we sadly
couldn't get rid of that entirely. But this patch still puts us in a much better place.

  • Modules/notifications/Notification.cpp:

(WebCore::Notification::show):
(WebCore::Notification::close):
(WebCore::Notification::stop):
(WebCore::Notification::data const):
(WebCore::Notification::dataWithoutNotificationID const): Deleted.

  • Modules/notifications/Notification.h:
  • Modules/notifications/NotificationClient.h:

(WebCore::NotificationClient::clearNotifications): Deleted.

  • Modules/notifications/NotificationData.h:

(WebCore::NotificationData::decode):

Source/WebKit:

This is mostly changing a whole bunch of uint64_ts to Strings, but also gets rid of lots of weird
and fragile maps.

  • NetworkProcess/Notifications/NetworkNotificationManager.cpp:

(WebKit::NetworkNotificationManager::cancelNotification):
(WebKit::NetworkNotificationManager::clearNotifications):
(WebKit::NetworkNotificationManager::didDestroyNotification):

  • NetworkProcess/Notifications/NetworkNotificationManager.h:
  • Shared/Notifications/NotificationManagerMessageHandler.h:
  • Shared/Notifications/NotificationManagerMessageHandler.messages.in:
  • UIProcess/API/C/WKNotification.cpp:

(WKNotificationCopyCoreIDForTesting):

  • UIProcess/API/C/WKNotification.h:
  • UIProcess/API/C/WKNotificationManager.cpp:

(WKNotificationManagerProviderDidClickNotification_b):
(WKNotificationManagerProviderDidRemoveNotificationPolicies):
(WKNotificationManagerGetLocalIDForTesting): Deleted.

  • UIProcess/API/C/WKNotificationManager.h:
  • UIProcess/Notifications/WebNotification.cpp:

(WebKit::WebNotification::WebNotification):

  • UIProcess/Notifications/WebNotification.h:

(WebKit::WebNotification::create):
(WebKit::WebNotification::notificationID const):
(WebKit::WebNotification::coreNotificationID const):
(WebKit::WebNotification::pageIdentifier const):

  • UIProcess/Notifications/WebNotificationManagerMessageHandler.cpp:

(WebKit::WebNotificationManagerMessageHandler::cancelNotification):
(WebKit::WebNotificationManagerMessageHandler::clearNotifications):
(WebKit::WebNotificationManagerMessageHandler::didDestroyNotification):

  • UIProcess/Notifications/WebNotificationManagerMessageHandler.h:
  • UIProcess/Notifications/WebNotificationManagerProxy.cpp:

(WebKit::WebNotificationManagerProxy::show):
(WebKit::WebNotificationManagerProxy::cancel):
(WebKit::WebNotificationManagerProxy::didDestroyNotification):
(WebKit::pageIDsMatch):
(WebKit::pageAndNotificationIDsMatch):
(WebKit::WebNotificationManagerProxy::clearNotifications):
(WebKit::WebNotificationManagerProxy::providerDidShowNotification):
(WebKit::WebNotificationManagerProxy::providerDidClickNotification):
(WebKit::WebNotificationManagerProxy::providerDidCloseNotifications):
(WebKit::generateGlobalNotificationID): Deleted.
(WebKit::WebNotificationManagerProxy::notificationLocalIDForTesting): Deleted.

  • UIProcess/Notifications/WebNotificationManagerProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::cancelNotification):
(WebKit::WebPageProxy::clearNotifications):
(WebKit::WebPageProxy::didDestroyNotification):

  • UIProcess/WebPageProxy.h:
  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleCopyWebNotificationID):
(WKBundleGetWebNotificationID): Deleted.

  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::webNotificationID):

  • WebProcess/InjectedBundle/InjectedBundle.h:
  • WebProcess/Notifications/WebNotificationManager.cpp:

(WebKit::WebNotificationManager::show):
(WebKit::WebNotificationManager::cancel):
(WebKit::WebNotificationManager::didDestroyNotification):
(WebKit::WebNotificationManager::didShowNotification):
(WebKit::WebNotificationManager::didClickNotification):
(WebKit::WebNotificationManager::didCloseNotifications):
(WebKit::generateNotificationID): Deleted.
(WebKit::WebNotificationManager::notificationIDForTesting): Deleted.
(WebKit::WebNotificationManager::clearNotifications): Deleted.
(WebKit::WebNotificationManager::removeNotificationFromContextMap): Deleted.

  • WebProcess/Notifications/WebNotificationManager.h:
  • WebProcess/Notifications/WebNotificationManager.messages.in:
  • WebProcess/WebCoreSupport/WebNotificationClient.cpp:

(WebKit::WebNotificationClient::show):
(WebKit::WebNotificationClient::cancel):
(WebKit::WebNotificationClient::notificationObjectDestroyed):
(WebKit::WebNotificationClient::clearNotifications): Deleted.

  • WebProcess/WebCoreSupport/WebNotificationClient.h:

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebNotificationClient.h:
  • WebCoreSupport/WebNotificationClient.mm:

(WebNotificationClient::show):
(WebNotificationClient::cancel):
(WebNotificationClient::notificationObjectDestroyed):
(WebNotificationClient::clearNotifications): Deleted.

Source/WTF:

Add a new form of Identified that uses a UUID String as the identifier.

  • wtf/Identified.h:

(WTF::UUIDIdentified::UUIDIdentified):

Tools:

Where possible, use the String UUID identifier.
This gets rid of lots of weird maps and cleans up flaky situations that could occasionally occur.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::postSimulateWebNotificationClick):

  • WebKitTestRunner/InjectedBundle/InjectedBundle.h:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::simulateWebNotificationClick):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::simulateWebNotificationClick):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):

  • WebKitTestRunner/WebNotificationProvider.cpp:

(WTR::WebNotificationProvider::~WebNotificationProvider):
(WTR::WebNotificationProvider::showWebNotification):
(WTR::WebNotificationProvider::closeWebNotification):
(WTR::WebNotificationProvider::addNotificationManager):
(WTR::WebNotificationProvider::removeNotificationManager):
(WTR::WebNotificationProvider::simulateWebNotificationClick):
(WTR::WebNotificationProvider::reset):
(WTR::removeGlobalIDFromIDMap): Deleted.

  • WebKitTestRunner/WebNotificationProvider.h:
5:39 PM Changeset in webkit [287338] by Patrick Angle
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Assertion Failed adding event listener in CSSPropertyNameCompletions.prototype._updateValuesWithLatestCSSVariablesIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=234570

Reviewed by Devin Rousso.

Adding an event listener to listen for style changes every time we update the list of CSS variables isn't quite
correct because it means we may attempt to add the event listener multiple times. Instead, this should be done
in response to the InspectedNodeChanged event directly to avoid adding the event listener multiple time to the
same DOM node.

  • UserInterface/Models/CSSPropertyNameCompletions.js:

(WI.CSSPropertyNameCompletions.prototype._updateValuesWithLatestCSSVariablesIfNeeded):
(WI.CSSPropertyNameCompletions.prototype._handleInspectedNodeChanged):

4:14 PM Changeset in webkit [287337] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r287107. rdar://problem/85150486

Unreviewed build fix after r287077.

  • platform/network/ProtectionSpaceHash.h: (WebCore::ProtectionSpaceHash::hash):

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

4:14 PM Changeset in webkit [287336] by Russell Epstein
  • 4 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r287077. rdar://problem/85150486

http/tests/security/basic-auth-subresource.html and some other http auth tests are flaky
https://bugs.webkit.org/show_bug.cgi?id=234314
<rdar://85150486>

Reviewed by Darin Adler.

http/tests/security/basic-auth-subresource.html and some other http auth tests are flaky.

No new tests, I will be able to unskip those layout tests in internal once this lands.

  • platform/network/ProtectionSpaceBase.cpp: (WebCore::ProtectionSpaceBase::ProtectionSpaceBase): (WebCore::ProtectionSpaceBase::host const): Deleted. (WebCore::ProtectionSpaceBase::port const): Deleted. (WebCore::ProtectionSpaceBase::serverType const): Deleted. (WebCore::ProtectionSpaceBase::realm const): Deleted. (WebCore::ProtectionSpaceBase::authenticationScheme const): Deleted.
  • platform/network/ProtectionSpaceBase.h: (WebCore::ProtectionSpaceBase::host const): (WebCore::ProtectionSpaceBase::port const): (WebCore::ProtectionSpaceBase::serverType const): (WebCore::ProtectionSpaceBase::realm const): (WebCore::ProtectionSpaceBase::authenticationScheme const): Clean up / modernise the ProtectionSpaceBase class.
  • platform/network/ProtectionSpaceHash.h: (WebCore::ProtectionSpaceHash::hash):
  • Use Hasher in ProtectionSpaceHash::hash() as it is less error-prone. I believe the previous implementation was wrong because it was calling StringHasher::hashMemory(hashCodes, codeCount) instead of StringHasher::hashMemory(hashCodes, codeCount * sizeof(unsigned)). This could have resulted in inefficiencies I believe since we were not hashing the whole array memory.
  • Fix ProtectionSpace<ProtectionSpace> so that emptyValueIsZero is false instead of true. This was a bug since the ProtectionSpaceBase constructor initializes data members to non-zero values.

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

4:14 PM Changeset in webkit [287335] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-612-branch

Cherry-pick r287067. rdar://problem/86276497

Make sure to start a realtime outgoing source in case it is taken to another sender
https://bugs.webkit.org/show_bug.cgi?id=234296
<rdar://86276497>

Reviewed by Eric Carlson.

Source/WebCore:

We are asynchronously starting libwebrtc sources.
When a sender is created first and is assigned a source later, we take the source and assign it to the sender.
In that case, the source might not be started and we will not send any data.

Test: webrtc/addTransceiver-then-addTrack.html

  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:

LayoutTests:

  • webrtc/addTransceiver-then-addTrack-expected.txt: Added.
  • webrtc/addTransceiver-then-addTrack.html: Added.

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

3:59 PM Changeset in webkit [287334] by Russell Epstein
  • 8 edits in branches/safari-612-branch/Source

Versioning.

WebKit-7612.4.8

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

Fix Safari-side SafeBrowsing telemetry
https://bugs.webkit.org/show_bug.cgi?id=234439

Patch by Eliot Hsu <eliot_hsu@apple.com> on 2021-12-21
Reviewed by Alex Christensen.

Fix old (and privacy-preserving) telemetry for Safe Browsing,
which were previously reported from the Safari side.

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::showSafeBrowsingWarning):

2:40 PM Changeset in webkit [287332] by Robert Jenner
  • 2 edits in branches/safari-612-branch/Tools

Cherry-pick r285057. rdar://problem/84000764

[ Monterey iOS15 ] TestWebKitAPI.URLSchemeHandler.Ranges is a constant timeout
https://bugs.webkit.org/show_bug.cgi?id=231394

Reviewed by Jer Noble.

For some reason, AVFoundation used to play videos from custom schemes when you respond to range requests with 1 fewer byte than requested.
They stopped successfully playing videos in such circumstances, which is fine. I had accidentally done that in my test.
When I respond properly, the test starts passing again.

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

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

2:32 PM Changeset in webkit [287331] by Robert Jenner
  • 2 edits in branches/safari-612-branch/Tools

Cherry-pick r286040. rdar://problem/80476146

[ Monterey ] TestWebKitAPI.WebpagePreferences.WebsitePoliciesDuringRedirect is a constant timeout
<rdar://80476146>

Uneviewed test gardening.

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

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

2:20 PM Changeset in webkit [287330] by Robert Jenner
  • 2 edits in branches/safari-612-branch/Tools

[ Monterey ] 2 TestWebKitAPI.WebKit.DisplayName (api-tests) are constantly failing
<rdar://80353834>

Uneviewed test gardening.

Adding the disable of 2 TestWebKitAPI.WebKit.DisplayName api-tests to Safari-612-Branch.

  • TestWebKitAPI/Tests/WebKitCocoa/DisplayName.mm:

(TestWebKitAPI::TEST):

2:16 PM Changeset in webkit [287329] by Alan Bujtas
  • 5 edits in trunk

[LFC][IFC] Compute visual geometry for InlineDisplay::Line
https://bugs.webkit.org/show_bug.cgi?id=234545

Reviewed by Antti Koivisto.

Source/WebCore:

  1. Compute visual geometry for InlineDisplay::Line
  2. Use this visual geometry when constructing display boxes
  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

  • layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp:

(WebCore::Layout::InlineDisplayLineBuilder::build const):

LayoutTests:

2:07 PM Changeset in webkit [287328] by Russell Epstein
  • 1 copy in tags/Safari-612.4.7

Tag Safari-612.4.7.

1:56 PM Changeset in webkit [287327] by Darin Adler
  • 38 edits
    2 deletes in trunk/Source/WebCore

ScriptState.h/cpp is a remnant of JavaScript engine abstraction that can be removed
https://bugs.webkit.org/show_bug.cgi?id=234548

Reviewed by Yusuke Suzuki.

ScriptState.h/cpp is file left over from when we had a layer to abstract
JavaScript binding and usage in WebCore so it could work with both JavaScriptCore
and Google's V8 engine. We haven't needed that for years, and stripping away some
of the layers might help us make code more readable and perhaps even notice ways
to make it more efficient. For now, this patch removes the functions from
ScriptState.h/cpp and moves them to more suitable places, simplifying in the process.

Also begin to just call global objects "global object", and not "script state".

  • Headers.cmake: Removed ScriptState.h.
  • Modules/indexeddb/IDBObjectStore.cpp: Removed include of ScriptState.h.
  • Modules/indexeddb/IDBTransaction.cpp: Ditto.
  • Sources.txt: Removed ScriptState.cpp.
  • WebCore.xcodeproj/project.pbxproj: Removed ScriptState.h and .cpp.

Also allowed the script to sort the file.

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::mainWorldGlobalObject): Renamed the mainWorldExecState function and
moved it here from ScriptState.cpp.

  • bindings/js/JSDOMWindowCustom.h: Tweaked formatting of the header. Added the

mainWorldGlobalObject function.

  • bindings/js/JSExecState.cpp: Removed include of ScriptState.h.

(WebCore::JSExecState::didLeaveScriptContext): Call scriptExecutionContext.
(WebCore::executionContext): Renamed the scriptExecutionContextFromExecState
function and moved it here from ScriptState.cpp.

  • bindings/js/JSExecState.h: Added the executionContext function.
  • bindings/js/JSNodeCustom.cpp: Removed include of ScriptState.h, added include

of JSDOMWindowCustom.h.
(WebCore::willCreatePossiblyOrphanedTreeByRemovalSlowCase): Call mainWorldGlobalObject.

  • bindings/js/JSNodeCustom.h: Changed willCreatePossiblyOrphanedTreeByRemoval

functions to take a Node& instead of a never-null Node*.

  • bindings/js/JSWindowProxy.h: Tweaked formatting a bit.
  • bindings/js/ScriptState.cpp: Removed.
  • bindings/js/ScriptState.h: Removed.
  • bindings/js/SerializedScriptValue.cpp: Removed include of ScriptState.h.

(WebCore::wrapCryptoKey): Update for name change of executionContext function.
(WebCore::unwrapCryptoKey): Ditto.
(WebCore::CloneDeserializer::readFile): Ditto.
(WebCore::CloneDeserializer::readOffscreenCanvas): Ditto.
(WebCore::CloneDeserializer::readRTCDataChannel): Ditto.
(WebCore::CloneDeserializer::readImageBitmap): Ditto.
(WebCore::CloneDeserializer::readTerminal): Ditto.

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::removeAllChildrenWithScriptAssertion):
Pass reference to willCreatePossiblyOrphanedTreeByRemoval.
(WebCore::ContainerNode::removeNodeWithScriptAssertion): Ditto.

  • dom/Document.cpp: Removed include of ScriptState.h, added include

of JSDOMWindowCustom.h.
(WebCore::Document::didLogMessage): Use mainWorldGlobalObject.

  • dom/ScriptExecutionContext.cpp: Removed include of ScriptState.h.

(WebCore::ScriptExecutionContext::globalObject): Use the
ScriptController directly instead of through helper functions.

  • inspector/InspectorFrontendAPIDispatcher.cpp: Removed include of ScriptState.h.
  • inspector/InspectorFrontendClientLocal.cpp: Ditto.
  • inspector/InspectorFrontendHost.cpp: Removed include of ScriptState.h.

(WebCore::InspectorFrontendHost::addSelfToGlobalObjectInWorld):
Use the ScriptController directly instead of through a helper function.
(WebCore::InspectorFrontendHost::showContextMenu): Ditto.

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::frameWindowDiscardedImpl): Do
the null check here instead of in frameWindowDiscarded.

  • inspector/WebInjectedScriptManager.cpp: Removed include of ScriptState.h.

(WebCore::WebInjectedScriptManager::discardInjectedScriptsFor):
Reworked logic to use executionContext instead of domWindowFromExecState.

  • inspector/agents/InspectorCanvasAgent.cpp: Removed include of ScriptState.h.
  • inspector/agents/InspectorDOMAgent.cpp: Removed include of ScriptState.h.

(WebCore::InspectorDOMAgent::focusNode): Use std::exchange here in the
idiomatic "take and null a value" case here. Use mainWorldGlobalObject.
(WebCore::InspectorDOMAgent::buildObjectForEventListener): Use
ScriptController directly instead of through a helper function.
(WebCore::InspectorDOMAgent::resolveNode): Use mainWorldGlobalObject.

  • inspector/agents/InspectorIndexedDBAgent.cpp: Removed include of

ScriptState.h and added include of JSDOMWindowCustom.h.
(WebCore::InspectorIndexedDBAgent::requestData): Use mainWorldGlobalObject.

  • inspector/agents/InspectorNetworkAgent.cpp: Removed include of

ScriptState.h and added include of JSDOMWindowCustom.h.
(WebCore::InspectorNetworkAgent::resolveWebSocket): Use mainWorldGlobalObject.

  • inspector/agents/InspectorTimelineAgent.cpp: Removed include of ScriptState.h.

(WebCore::frame): Added. Helper function to get from a global object to a frame.
Calls executionContext and gets to the frame from there.
(WebCore::InspectorTimelineAgent::startFromConsole): Use frame.
(WebCore::InspectorTimelineAgent::breakpointActionProbe): Ditto.

  • inspector/agents/WebConsoleAgent.cpp: Removed include of ScriptState.h.

(WebCore::WebConsoleAgent::frameWindowDiscarded): Take a reference instead of
a pointer that must not be null. Use executionContext instead of
domWindowFromExecState.

  • inspector/agents/WebConsoleAgent.h: Removed unneeded includes. Removed

unneeded WTF_MAKE_NONCOPYABLE (base class is already not copyable) and
WTF_MAKE_FAST_ALLOCATED (class is an abstract base class and never allocated).
Made constructor protected. Changed the DOMWindow argument to
frameWindowDiscarded to a reference instead of a pointer that must not be null.

  • inspector/agents/page/PageAuditAgent.cpp: Removed include of

ScriptState.h and added include of JSDOMWindowCustom.h.
(WebCore::PageAuditAgent::injectedScriptForEval): Use mainWorldGlobalObject.

  • inspector/agents/page/PageDebuggerAgent.cpp: Removed include of

ScriptState.h and added include of JSDOMWindowCustom.h.
(WebCore::PageDebuggerAgent::injectedScriptForEval): Use mainWorldGlobalObject.

  • inspector/agents/page/PageNetworkAgent.cpp: Removed include of ScriptState.h.
  • inspector/agents/page/PageRuntimeAgent.cpp: Removed include of

ScriptState.h and added include of JSDOMWindowCustom.h.
(WebCore::PageRuntimeAgent::frameNavigated): Use mainWorldGlobalObject.
(WebCore::PageRuntimeAgent::injectedScriptForEval): Ditto.
(WebCore::PageRuntimeAgent::reportExecutionContextCreation): Ditto.
Also use Page::forEachFrame instead of a hand-written loop.

  • inspector/agents/worker/WorkerAuditAgent.cpp: Removed include of ScriptState.h.

(WebCore::WorkerAuditAgent::injectedScriptForEval): Use ScriptController directly
instead of through a helper function.

  • inspector/agents/worker/WorkerDebuggerAgent.cpp: Removed include of ScriptState.h.

(WebCore::WorkerDebuggerAgent::injectedScriptForEval): Use ScriptController directly
instead of through a helper function.

  • inspector/agents/worker/WorkerRuntimeAgent.cpp: Removed include of ScriptState.h.

(WebCore::WorkerRuntimeAgent::injectedScriptForEval): Use ScriptController directly
instead of through a helper function.

12:16 PM Changeset in webkit [287326] by msaboff@apple.com
  • 9 edits in trunk/Source

Fix symlinks for alternate root framework locations
https://bugs.webkit.org/show_bug.cgi?id=234567

Reviewed by Filip Pizlo.

Source/ThirdParty/ANGLE:

Eliminated the creation of symlinks for ANGLE as it is under WebCore.

  • ANGLE.xcodeproj/project.pbxproj:
  • Configurations/ANGLE-dynamic.xcconfig:

Source/WebCore:

Covered by existing tests.

Moved OUTPUT_ALTERNATE_ROOT_PATH in create symlink script from outputFileListPaths to outputPaths.

  • WebCore.xcodeproj/project.pbxproj:

Source/WebGPU:

Moved OUTPUT_ALTERNATE_ROOT_PATH in create symlink script from outputFileListPaths to outputPaths.

  • WebGPU.xcodeproj/project.pbxproj:

Source/WebInspectorUI:

Moved OUTPUT_ALTERNATE_ROOT_PATH in create symlink script from outputFileListPaths to outputPaths.

  • WebInspectorUI.xcodeproj/project.pbxproj:
11:36 AM Changeset in webkit [287325] by Antti Koivisto
  • 6 edits in trunk/Source/WebCore

REGRESSION(r286169): 0.3% Speedometer regression
https://bugs.webkit.org/show_bug.cgi?id=234549

Reviewed by Alan Bujtas.

There is some additional work in ChildChangeInvalidation even when :has is not used.
Speedemater2 Vanilla-* subtests are very heavy on DOM mutations.

  • style/ChildChangeInvalidation.cpp:

(WebCore::Style::ChildChangeInvalidation::invalidateForHasBeforeMutation):
(WebCore::Style::ChildChangeInvalidation::invalidateForHasAfterMutation):
(WebCore::Style::ChildChangeInvalidation::traverseRemovedElements):
(WebCore::Style::ChildChangeInvalidation::traverseAddedElements):
(WebCore::Style::ChildChangeInvalidation::ChildChangeInvalidation): Deleted.
(WebCore::Style::ChildChangeInvalidation::~ChildChangeInvalidation): Deleted.
(WebCore::Style::needsTraversal): Deleted.

  • style/ChildChangeInvalidation.h:

(WebCore::Style::ChildChangeInvalidation::ChildChangeInvalidation):
(WebCore::Style::ChildChangeInvalidation::~ChildChangeInvalidation):

Inline the constructor and destructor.
Compute the :has invalidation status only once.

  • style/RuleFeature.h:

(WebCore::Style::RuleFeatureSet::usesHasPseudoClass const):

  • style/StyleScope.cpp:

(WebCore::Style::Scope::resolver):
(WebCore::Style::Scope::updateActiveStyleSheets):

  • style/StyleScope.h:

(WebCore::Style::Scope::usesStyleBasedEditability const):
(WebCore::Style::Scope::usesHasPseudoClass const):

Add a Scope bit for this for faster testing.

(WebCore::Style::Scope::usesStyleBasedEditability): Deleted.

11:15 AM Changeset in webkit [287324] by weinig@apple.com
  • 7 edits in trunk/Source/WebCore

Gradient encode/decode does not validate that the serialized stops were sorted
https://bugs.webkit.org/show_bug.cgi?id=234558

Reviewed by Simon Fraser.

Stop encoding and decoding the stopsSorted bit on Gradient for serialization as
we still need to validate the stops are sorted on deserialization.

While here, optimize things a bit by allowing one to pass all the necessary
parameters to the Gradient create function, which allows us to avoid unnecessary
extra invalidation. Now that the GradientSpreadMethod can be set on construction
there is no need for its setter.

  • platform/graphics/Gradient.cpp:

(WebCore::Gradient::create):
(WebCore::Gradient::Gradient):
(WebCore::Gradient::sortStops const):
(WebCore::Gradient::setSpreadMethod): Deleted.

  • platform/graphics/Gradient.h:

(WebCore::Gradient::create):
(WebCore::Gradient::stops const):
(WebCore::Gradient::encode const):
(WebCore::Gradient::decode):

  • rendering/svg/RenderSVGResourceGradient.cpp:

(WebCore::RenderSVGResourceGradient::stopsByApplyingColorFilter):
(WebCore::RenderSVGResourceGradient::addStops): Deleted.

  • rendering/svg/RenderSVGResourceGradient.h:
  • rendering/svg/RenderSVGResourceLinearGradient.cpp:

(WebCore::RenderSVGResourceLinearGradient::buildGradient const):

  • rendering/svg/RenderSVGResourceRadialGradient.cpp:

(WebCore::RenderSVGResourceRadialGradient::buildGradient const):

10:34 AM Changeset in webkit [287323] by Simon Fraser
  • 5 edits
    9 adds in trunk

Allow a way to specify a custom pixel tolerance in a ref test
https://bugs.webkit.org/show_bug.cgi?id=149828

Reviewed by Martin Robinson.

Tools:

When determining if a ref test failed, look for <meta name=fuzzy> in the test file,
and if present, compare the actual pixel differences with the range allowed by the
fuzzy metadata. This may cause a failing reference to match, or a passing reference
(based on ImageDiff internal tolerance) to fail.

In the case of mismatch ref tests, the fuzziness is taken into account to determine
if the mismatch still occurs. If not, then the mismatch test fails.

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

(SingleTestRunner._fuzzy_tolerance_for_reference):
(SingleTestRunner._compare_output_with_reference):

LayoutTests:

Add some ref tests using <meta name=fuzzy> to test fuzzy-based passes and failures.

  • fast/harness/image-diff/fuzz-2-25-expected.html: Added.
  • fast/harness/image-diff/fuzz-2-25.html: Added.
  • fast/harness/image-diff/fuzz-2-36-over-expected-mismatch.html: Added.
  • fast/harness/image-diff/fuzz-2-36-over.html: Added.
  • fast/harness/image-diff/fuzz-2-36-under-expected-mismatch.html: Added.
  • fast/harness/image-diff/fuzz-2-36-under.html: Added.
  • fast/harness/image-diff/zero-fuzz-expected.html: Added.
  • fast/harness/image-diff/zero-fuzz.html: Added.
10:31 AM Changeset in webkit [287322] by Kate Cheney
  • 3 edits in trunk/Source/WebKit

Harden PCM and ITP databases against crashes
https://bugs.webkit.org/show_bug.cgi?id=234528
<rdar://problem/86741319>

Reviewed by Brent Fulgham.

This patch does two things. First, it specifies a column type for the
new destination token, keyID and signature columns. This was causing
the crashes in rdar://86347439 by comparing the defined CREATE TABLE query
with types to the existing query with no types. Second, it adds
hardening to the migration code to abort migration if one of the steps
fails. This will help prevent future crashes like rdar://86347439
by aborting a migration early if a failure occurs and not leaving the
db in a messy state.

No new tests. No behavior change, this will harden against flaky issues
that may cause a migration to fail part way through, like I/O errors.

  • NetworkProcess/DatabaseUtilities.cpp:

(WebKit::DatabaseUtilities::migrateDataToNewTablesIfNecessary):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp:

(WebKit::PCM::Database::addDestinationTokenColumnsIfNecessary):

10:17 AM Changeset in webkit [287321] by Wenson Hsieh
  • 31 edits
    3 copies
    1 move in trunk/Source

Add support for a UI delegate method to decide how to handle detected modal containers
https://bugs.webkit.org/show_bug.cgi?id=234440
rdar://77073735

Reviewed by Darin Adler.

Source/WebCore:

Move ModalContainerControlType.h to ModalContainerTypes.h, and add a new enum flag to represent return values in
the new UI delegate decision handler.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • loader/DocumentLoader.h:

Additionally remove the unused Allow and Disallow values of ModalContainerObservationPolicy, now that we will
always (effectively) "prompt" when detecting a modal container by calling into the client layer with the new
delegate method.

  • loader/EmptyClients.cpp:

(WebCore::EmptyChromeClient::decidePolicyForModalContainer):

  • loader/EmptyClients.h:
  • page/ChromeClient.h:

Add the new async chrome client hook, decidePolicyForModalContainer().

  • page/ModalContainerObserver.cpp:

(WebCore::ModalContainerObserver::collectClickableElementsTimerFired):

Call into the chrome client to decide how to handle the observed modal container.

(WebCore::ModalContainerObserver::revealModalContainer:

Add a helper method to reset the current m_container and invalidate its style (such that it will be displayed
after the next style update).

  • page/ModalContainerTypes.h: Renamed from Source/WebCore/page/ModalContainerControlType.h.

Also, tweak the ModalContainerControlType values so that they can be used as option flags when informing the
WebKit client about which control types are present in the modal container.

Source/WebKit:

Add support for a new UI delegate method, -_webView:decidePolicyForModalContainer:decisionHandler:, that is
invoked when a modal container has been detected and suppressed due to a WebKit client specifying the
_WKWebsiteModalContainerObservationPolicyPrompt option in webpage preferences. This new delegate method is
invoked with a new _WKModalContainerInfo object, which (for now) just encapsulates an option set of
ModalContainerControlTypes that indicates which types of modal containers are available.

  • Scripts/webkit/messages.py:

(headers_for_type):

  • SourcesCocoa.txt:
  • UIProcess/API/APIUIClient.h:

(API::UIClient::decidePolicyForModalContainer):

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

(WebKit::modalContainerObservationPolicy):
(WebKit::coreModalContainerObservationPolicy):

  • UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h:

Remove support for two unused policy flags, _WKWebsiteModalContainerObservationPolicyAllow and
_WKWebsiteModalContainerObservationPolicyDisallow. These are now obviated by the new decision handler return
values _WKModalContainerDecisionHideAndAllow and _WKModalContainerDecisionHideAndDisallow, respectively.
While this leaves us with only two policy modes (such that the policy can now be turned into a single BOOL
switch), I'm keeping the named enum flags for now, since:

  1. The existing names do a better job of describing their respective behaviors than a single BOOL flag like

modalContainerObserverShouldPrompt, or modalContainerObserverEnabled, and...

  1. We'll probably need to extend this policy set to add a new value in the near future, anyways.
  • UIProcess/API/Cocoa/_WKModalContainerInfo.h:
  • UIProcess/API/Cocoa/_WKModalContainerInfo.mm:

(-[_WKModalContainerInfo initWithTypes:]):

  • UIProcess/API/Cocoa/_WKModalContainerInfoInternal.h:
  • UIProcess/Cocoa/ModalContainerControlClassifier.mm:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::setDelegate):
(WebKit::coreModalContainerDecision):
(WebKit::UIDelegate::UIClient::decidePolicyForModalContainer):

Add plumbing for the new chrome client hook through WebChromeClient, WebPage, WebPageProxy, and finally the UI
client.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForModalContainer):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::decidePolicyForModalContainer):

  • WebProcess/WebCoreSupport/WebChromeClient.h:

Source/WebKitLegacy/mac:

See WebKit ChangeLog for more details.

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::decidePolicyForModalContainer):

Source/WebKitLegacy/win:

See WebKit ChangeLog for more details.

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebChromeClient.cpp:

(WebChromeClient::decidePolicyForModalContainer):

9:58 AM Changeset in webkit [287320] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Move enclosing line geometry computation to a dedicated function
https://bugs.webkit.org/show_bug.cgi?id=234537

Reviewed by Antti Koivisto.

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

  • layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp:

(WebCore::Layout::InlineDisplayLineBuilder::collectEnclosingLineGeometry const):
(WebCore::Layout::InlineDisplayLineBuilder::build const):
(WebCore::Layout::InlineDisplayLineBuilder::build): Deleted.

  • layout/formattingContexts/inline/display/InlineDisplayLineBuilder.h:
9:46 AM Changeset in webkit [287319] by Alan Coon
  • 1 edit in branches/safari-612-branch/Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp

Apply patch. rdar://86742929

9:17 AM Changeset in webkit [287318] by Alan Coon
  • 1 edit in branches/safari-612-branch/Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp

Apply patch. rdar://86742929

8:46 AM Changeset in webkit [287317] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Start using Display::Line geometry in InlineDisplayContentBuilder
https://bugs.webkit.org/show_bug.cgi?id=234532

Reviewed by Antti Koivisto.

This is in preparation for using Display::Line geometry for things like contentStartInVisualOrder in InlineDisplayContentBuilder.

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::build):
(WebCore::Layout::InlineDisplayContentBuilder::processNonBidiContent):
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h:
8:28 AM Changeset in webkit [287316] by achristensen@apple.com
  • 6 edits in trunk

ASSERT NOT REACHED under WebKit::Daemon::ConnectionToMachService seen with TestWebKitAPI.WebPushD.BasicCommunication and PermissionManagement
https://bugs.webkit.org/show_bug.cgi?id=232857

Reviewed by Darin Adler.

Source/WebKit:

When using the public SDK, don't code sign with an entitlements file that contains restricted entitlements,
otherwise webpushd won't launch. Also, don't compile files we aren't going to use.

  • Configurations/webpushd.xcconfig:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:

(TestWebKitAPI::TEST):

8:09 AM Changeset in webkit [287315] by J Pascoe
  • 5 edits
    1 add in trunk

[WebAuthn] Authenticator is not falling back to clientPIN after internal verification fails and is blocked.
https://bugs.webkit.org/show_bug.cgi?id=232501
<rdar://problem/84913636>

Reviewed by Darin Adler.

Whenever internal uv gets blocked, the user agent should fall back to using a pin for user verification. This
Source/WebKit:

patch starts doing that by going into the pin flow whenever the authenticator returns the pin required error
code.

Added API test for fallback.

  • UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:

(WebKit::CtapAuthenticator::makeCredential):
(WebKit::CtapAuthenticator::getAssertion):
(WebKit::CtapAuthenticator::tryRestartPin):

Tools:

adds an API test to verify this behavior.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST):

8:01 AM Changeset in webkit [287314] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Display content builder should take Display::Line
https://bugs.webkit.org/show_bug.cgi?id=234527

Reviewed by Antti Koivisto.

This is preparation for using Display::Line visual geometries when constructing Display::Boxes in InlineDisplayContentBuilder.

  • layout/formattingContexts/inline/InlineFormattingContext.cpp:

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

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::build):
(WebCore::Layout::InlineDisplayContentBuilder::processNonBidiContent):
(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):
(WebCore::Layout::InlineDisplayContentBuilder::processOverflownRunsForEllipsis):

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h:
  • layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp:

(WebCore::Layout::InlineDisplayLineBuilder::build):

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForStyle):

6:07 AM Changeset in webkit [287313] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

IPC streams should not accept 0-length stream buffers
https://bugs.webkit.org/show_bug.cgi?id=234552
<rdar://79725420>

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

Make decoding 0-length stream buffers fail. These buffers are not useful.

No new tests, tests need additional implementation, will be added
in subsequent commits.

  • Platform/IPC/StreamConnectionBuffer.cpp:

(IPC::StreamConnectionBuffer::StreamConnectionBuffer):
(IPC::StreamConnectionBuffer::decode):

5:29 AM Changeset in webkit [287312] by commit-queue@webkit.org
  • 2 edits
    1 add in trunk/Source/ThirdParty/ANGLE

[GTK] build fails with undefined symbol in ANGLE if USE_ANGLE_WEBGL is enabled.
https://bugs.webkit.org/show_bug.cgi?id=234239

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-12-21
Reviewed by Kenneth Russell.

Add a new linux.cmake file that defines angle_dma_buf_sources.
This list gets appended it into ANGLE_SOURCES in PlatformGTK.cmake.

  • linux.cmake: Added. Manual translation of src/common/linux/BUILD.gn.
  • PlatformGTK.cmake:
4:54 AM Changeset in webkit [287311] by commit-queue@webkit.org
  • 9 edits in trunk/Source/JavaScriptCore

[RISCV64] Add or enable missing CPU(RISCV64) codepaths in baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=234551

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

Sprinkle the necessary CPU(RISCV64) build guards as well as additional
RISCV64-specific codepaths encapsualted by those build guards in the
baseline JIT code. In many cases we can align with the code that ARM64
is already using.

In InlineAccess, the byte-sizes for access and replacement operations
are based on a mix of educated guessing and aggressive testing.

In baseline JIT, we can usually adopt what ARM64 already does since the
similarities are big enough.

  • bytecode/InlineAccess.h: The sizes here are based on the estimated

count of necessary instructions for access or replacement, and were
tested with the enabled crash-inducing fallback in linkCodeInline().
(JSC::InlineAccess::sizeForPropertyAccess):
(JSC::InlineAccess::sizeForPropertyReplace):
(JSC::InlineAccess::sizeForLengthAccess):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::emitLoadStructure):
(JSC::AssemblyHelpers::debugCall):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitSaveThenMaterializeTagRegisters):
(JSC::AssemblyHelpers::emitRestoreSavedTagRegisters):
(JSC::AssemblyHelpers::prologueStackPointerDelta):
(JSC::AssemblyHelpers::emitFunctionPrologue):
(JSC::AssemblyHelpers::emitFunctionEpilogueWithEmptyFrame):
(JSC::AssemblyHelpers::emitFunctionEpilogue):
(JSC::AssemblyHelpers::preserveReturnAddressAfterCall):
(JSC::AssemblyHelpers::restoreReturnAddressBeforeReturn):

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::prepareForTailCallSlow):

  • jit/CallFrameShuffler.cpp:

(JSC::CallFrameShuffler::prepareForTailCall):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::slow_op_resolve_scopeGenerator):
(JSC::JIT::slow_op_get_from_scopeGenerator):

  • jit/RegisterSet.cpp:

(JSC::RegisterSet::macroScratchRegisters):
(JSC::RegisterSet::dfgCalleeSaveRegisters):
(JSC::RegisterSet::ftlCalleeSaveRegisters):

  • jit/ThunkGenerators.cpp:

(JSC::popThunkStackPreservesAndHandleExceptionGenerator):

4:42 AM Changeset in webkit [287310] by weinig@apple.com
  • 29 edits
    1 copy
    6 adds in trunk

Add support for premultiplied alpha interpolated gradients and defaulted off option to use them for CSS Gradients
https://bugs.webkit.org/show_bug.cgi?id=234492

Reviewed by Simon Fraser.

Source/WebCore:

Tests: fast/gradients/alpha-premultiplied.html

fast/gradients/conic-gradient-alpha-unpremultiplied.html

Extracts use of CGGradientRef out of Gradient and into the new GradientRendererCG which also implements
a CGShadingRef based gradient drawing path. The GradientRendererCG picks which strategy, CGGradientRef
or CGShadingRef, based on the intepolation mode and capabilities of the underlying CoreGraphics. For
new enough CoreGraphics, both premultiplied and non-premultiplied alpha interpolation for sRGB output
are supported in the more optimizable CGGradientRef path, but on older systems we will fallback to a
a newly implemented CGShadingRef based implementation.

In addition to the platform level work in Gradient, this adds a new setting, CSSGradientPremultipliedAlphaInterpolationEnabled,
which defaults to off for now and switches what type of interpolation we use for CSS gradients. It
does not effect other gradient uses such as by canvas or SVG. Those will be enabled separately.

  • Headers.cmake:
  • PlatformAppleWin.cmake:
  • PlatformMac.cmake:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:

Add new files.

  • css/CSSGradientValue.cpp:

(WebCore::LinearGradientAdapter::normalizeStopsAndEndpointsOutsideRange):
(WebCore::RadialGradientAdapter::normalizeStopsAndEndpointsOutsideRange):
(WebCore::ConicGradientAdapter::normalizeStopsAndEndpointsOutsideRange):
(WebCore::CSSGradientValue::computeStops):
Switch to using the new interpolateColors() function from ColorInterpolation.h
which accurately takes into account the current interpolation mode. These
blends now match what the created gradient does.

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

Add support for querying CSSGradientPremultipliedAlphaInterpolationEnabled from the CSS parser.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::gradientAlphaPremultiplication):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradient):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedRadialGradient):
(WebCore::CSSPropertyParserHelpers::consumeRadialGradient):
(WebCore::CSSPropertyParserHelpers::consumeLinearGradient):
(WebCore::CSSPropertyParserHelpers::consumeConicGradient):
Depending on how CSSGradientPremultipliedAlphaInterpolationEnabled is set, use either premultiplied
or non-premultiplied interpolation for CSS gradients.

  • platform/graphics/ColorComponents.h:

(WebCore::ColorComponents::size const):
Add size() function for use by the shading strategy.

  • platform/graphics/ColorInterpolation.h:

(WebCore::preInterpolationNormalizationForComponent):
(WebCore::preInterpolationNormalization):
(WebCore::postInterpolationNormalizationForComponent):
(WebCore::postInterpolationNormalization):
(WebCore::interpolateColorComponents):
Update to use the name InterpolationMethodColorSpace consistenly for the color space part of the
interpolation method.

(WebCore::interpolateColors):
Add helper which takes and returns Color objects rather than the strongly typed color types,
automatically converting to the appropriate interpolation color space based on the provided
ColorInterpolationMethod object.

  • platform/graphics/Gradient.h:
  • platform/graphics/GradientColorStop.h: Added.

Move ColorStop and ColorStopVector defintions to new GradientColorStop file, but keep the
old nested names via using directives. This is needed to make using the ColorStopVector
from GradientRendererCG (which we also want to use in Gradient.h) possible without redeclaration.
Replace CGGradientRef member with GradientRendererCG which allows choosing between either
a CGGradientRef based implementation or CGShadingRef based one.

  • platform/graphics/cg/GradientCG.cpp:

Update to use the GradientRendererCG rathern than a CGGradientRef directly, calling into it
to do the actual draw calls.

  • platform/graphics/cg/GradientRendererCG.h: Added.
  • platform/graphics/cg/GradientRendererCG.cpp: Added.

(WebCore::GradientRendererCG::pickStrategy const):
Central function to choose which strategy to use based on system capabilities and interpolation needs.

(WebCore::GradientRendererCG::makeGradient const):
Moved from GradientCG.cpp. Removed the CGGradientCreateWithColors() path, as we can always use the
more efficient CGGradientCreateWithColorComponents() by doing the conversion to extended sRGB ourselves.
Also adds use of the kCGGradientInterpolatesPremultiplied option on supported systems to tell CoreGraphics
to use premulitplied interpolation.

(WebCore::shadingFunction):
Core function used by CGShadingRef to interpolate between color stops. Templatized to allow for optimized
versions for every ColorInterpolationColorSpace / AlphaPremultiplication pair.

(WebCore::GradientRendererCG::makeShading const):
Builds shading strategy by converting all color stops to the interpolation color space, adding stops at
0 and 1 if necessary, and creating the CGFunctionRef that the shading will own. To avoid a circular
reference, the GradientRendererCG itself is not what the CGFunctionRef retains, but rather a subobject
Data, which is a peer to the CGFunctionRef.

(WebCore::GradientRendererCG::drawLinearGradient):
(WebCore::GradientRendererCG::drawRadialGradient):
(WebCore::GradientRendererCG::drawConicGradient):
Draw the gradient or shading based on the strategy selected at construction.

Source/WebCore/PAL:

  • pal/spi/cg/CoreGraphicsSPI.h:

Add forwards for creating conic shadings and enabling premultiplied alpha interpolation for gradients.

Source/WebKitLegacy/win:

Add support for tests enabling the CSSGradientPremultipliedAlphaInterpolationEnabled preference.

  • WebPreferences.cpp:

(WebPreferences::cssGradientPremultipliedAlphaInterpolationEnabled):

  • WebPreferences.h:
  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

Add a new experimental setting to enable premultiplied alpha CSS gradients.

Tools:

  • DumpRenderTree/TestOptions.cpp:

(WTR::TestOptions::defaults):
Add default for Windows WebKitLegacy testing which still requires it.

LayoutTests:

Add and update tests for gradients with alpha now that we have support for premultiplied interpolation.
By default, the tests now enable premultiplied interpolation (since it is an experimental feature) so
to continue testing the old path, the setting must be explicitly disabled.

  • fast/gradients/alpha-premultiplied-expected.html: Added.
  • fast/gradients/alpha-premultiplied.html: Added.
  • fast/gradients/conic-gradient-alpha-expected.html:
  • fast/gradients/conic-gradient-alpha-unpremultiplied-expected.html: Added.
  • fast/gradients/conic-gradient-alpha-unpremultiplied.html: Added.
4:38 AM Changeset in webkit [287309] by ntim@apple.com
  • 4 edits in trunk

<dialog> should generate implied end tags
https://bugs.webkit.org/show_bug.cgi?id=234442

Reviewed by Antti Koivisto.

See references to dialog in: https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inbody

LayoutTests/imported/w3c:

  • web-platform-tests/html/syntax/parsing/html5lib_blocks-expected.txt:

Source/WebCore:

Test: web-platform-tests/html/syntax/parsing/html5lib_blocks-expected.txt

  • html/parser/HTMLTreeBuilder.cpp:

(WebCore::HTMLTreeBuilder::processStartTagForInBody):
<p>XXX<dialog></dialog> turns into: <p>XXX</p><dialog></dialog>

(WebCore::HTMLTreeBuilder::processEndTagForInBody):
<dialog><p>XXX</dialog> turns into: <dialog><p>XXX</p></dialog>

2:33 AM Changeset in webkit [287308] by ysuzuki@apple.com
  • 9 edits
    2 deletes in trunk/Source

[WTF] Remove RefCountedArray and use RefCountedFixedVector
https://bugs.webkit.org/show_bug.cgi?id=234484

Reviewed by Dean Jackson.

Source/WebCore:

Use RefCountedFixedVector intead. No semantic change.

  • layout/integration/InlineIteratorBoxLegacyPath.h:
  • platform/graphics/FontCascadeDescription.cpp:

(WebCore::FontCascadeDescription::FontCascadeDescription):

  • platform/graphics/FontCascadeDescription.h:

(WebCore::FontCascadeDescription::familyCount const):
(WebCore::FontCascadeDescription::familyAt const):
(WebCore::FontCascadeDescription::families const):
(WebCore::FontCascadeDescription::setOneFamily):
(WebCore::FontCascadeDescription::setFamilies):
(WebCore::FontCascadeDescription::operator== const):

Source/WTF:

Use RefCountedFixedVector<T> instead of RefCountedArray<T> and remove RefCountedArray<T>.
RefCountedFixedVector<T> is much simpler interface: it is just using Ref<> / RefPtr<>
instead of integrating ref-counting holder semantics into the class itself.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/FixedVector.h:
  • wtf/RefCountedArray.cpp: Removed.
  • wtf/RefCountedArray.h: Removed.
  • wtf/WTFAssertions.cpp:
2:16 AM Changeset in webkit [287307] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION (r287258): Flaky crash in WebCore::RTCRtpScriptTransformer::enqueueFrame
https://bugs.webkit.org/show_bug.cgi?id=234522
<rdar://problem/86736206>

Reviewed by Darin Adler.

Covered by tests no longer crashing.

  • Modules/mediastream/RTCRtpScriptTransformer.cpp:

(WebCore::RTCRtpScriptTransformer::enqueueFrame):
Add a null check in enqueueFrame since the transformer may be cleared during the time
of hopping from webrtc frame thread to worker thread.

2:06 AM Changeset in webkit [287306] by yoshiaki.jitsukawa@sony.com
  • 11 edits
    2 adds in trunk/Source/WebCore

[LCMS] Use std::unqiue_ptr to retain LCMS objects
https://bugs.webkit.org/show_bug.cgi?id=234506

Reviewed by Michael Catanzaro.

  • platform/graphics/lcms/LCMSUniquePtr.h: Added.

Add LCMSUniquePtr.h and specialize std::unique_ptr with deleters.
LCMSProfilePtr is for cmsHPROFILE with cmsCloseProfile() as the deleter.
LCMSTransformPtr is for cmsHTRANSFORM with cmsDeleteTransform() as the deleter.

  • CMakeLists.txt:

Add WebCore/platform/graphics/lcms to WebCore_PRIVATE_INCLUDE_DIRECTORIES.
Add LCMSUniquePtr.h to WebCore_PRIVATE_FRAMEWORK_HEADERS.

  • platform/graphics/PlatformDisplay.cpp:
  • platform/graphics/PlatformDisplay.h:
  • platform/graphics/x11/PlatformDisplayX11.cpp:

Use LCMSProfilePtr to retain ICC Profile.

  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
  • platform/image-decoders/jpeg/JPEGImageDecoder.h:
  • platform/image-decoders/jpegxl/JPEGXLImageDecoder.cpp:
  • platform/image-decoders/jpegxl/JPEGXLImageDecoder.h:
  • platform/image-decoders/png/PNGImageDecoder.cpp:
  • platform/image-decoders/png/PNGImageDecoder.h:

Use LCMSProfilePtr to retain color transform.
Remove the m_iccProfile class member because m_iccTransform also retains a
reference to the LCMS's profile and m_iccProfile can be removed.

12:54 AM Changeset in webkit [287305] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[RISCV64] Add missing MacroAssemblerRISCV64 floating-point rounding, comparison methods
https://bugs.webkit.org/show_bug.cgi?id=234475

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

Add missing MacroAssemblerRISCV64 methods that cover floating-point
rounding and comparison operations. Manually detecting NaN values is
possible by classifying floating-point values, and subsequently
rounding operation or different comparison conditions have to be
handled appropriately.

Single-precision and double-precision implementations can neatly be
handled in singular templated helper methods, and precision-specific
codepaths can be determined at compile-time.

  • assembler/MacroAssemblerRISCV64.h:

(JSC::MacroAssemblerRISCV64::ceilFloat):
(JSC::MacroAssemblerRISCV64::ceilDouble):
(JSC::MacroAssemblerRISCV64::floorFloat):
(JSC::MacroAssemblerRISCV64::floorDouble):
(JSC::MacroAssemblerRISCV64::roundTowardNearestIntFloat):
(JSC::MacroAssemblerRISCV64::roundTowardNearestIntDouble):
(JSC::MacroAssemblerRISCV64::roundTowardZeroFloat):
(JSC::MacroAssemblerRISCV64::roundTowardZeroDouble):
(JSC::MacroAssemblerRISCV64::compareFloat):
(JSC::MacroAssemblerRISCV64::compareDouble):
(JSC::MacroAssemblerRISCV64::roundFP):
(JSC::MacroAssemblerRISCV64::compareFP):

12:46 AM Changeset in webkit [287304] by Carlos Garcia Campos
  • 7 edits in trunk

[GTK][a11y] Implement list markers when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234485

Reviewed by Adrian Perez de Castro.

Source/WebCore:

For list item markers in ATSPI we are following the chromium approach, exposing the markers as hyperlinks, so
included in the list item text string as the object replacement character. This approach also allows to expose
image markers. Since we don't have a list marker role in ATSPI, we use either text or image roles. New methods
have been added to get the role, role name and localized role name for the cases in which there isn't a direct
match between the webcore role and the atspi role.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::stringValue const): In ATSPI we want the text with suffix.

  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::interfacesForObject): Make item markers implement hyperlink interface and
either text or image.
(WebCore::atspiRole): Assert if ListMarker role is passed since that's no longer possible.
(WebCore::AccessibilityObjectAtspi::effectiveRole const): Handle the ListMarker role as special case case.
(WebCore::AccessibilityObjectAtspi::role const): Check if there's an effective role first.
(WebCore::AccessibilityObjectAtspi::effectiveRoleName const): Handle effective role here.
(WebCore::AccessibilityObjectAtspi::roleName const): Check if there's an effective role first.
(WebCore::AccessibilityObjectAtspi::effectiveLocalizedRoleName const): Handle effective role here.
(WebCore::AccessibilityObjectAtspi::localizedRoleName const): Check if there's an effective role first.

  • accessibility/atspi/AccessibilityObjectAtspi.h:
  • accessibility/atspi/AccessibilityObjectTextAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::text const): Remove the main thread micro-optimization to avoid more
duplicated code and insert the object replacement character for list items having a marker.
(WebCore::adjustInputOffset): Helper function to adjust the input offset in case of having a list item marker.
(WebCore::adjustOutputOffset): Helper function to adjust the output offset in case of having a list item marker.
(WebCore::AccessibilityObjectAtspi::textInserted): Use adjustOutputOffset().
(WebCore::AccessibilityObjectAtspi::textDeleted): Ditto.
(WebCore::AccessibilityObjectAtspi::boundaryOffset const): Adjust offsets and handle words as special case to
always consider the list marker as a word.
(WebCore::AccessibilityObjectAtspi::offsetAtPoint const): Use adjustOutputOffset().
(WebCore::AccessibilityObjectAtspi::textAttributes const): Adjust offsets and handle list item marker as special
case to always consider the marker as an independent text run.

Tools:

Add test cases to check list item markers.

  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(testAccessibleListMarkers):
(testTextListMarkers):
(testHyperlinkBasic):
(testHypertextBasic):
(beforeAll):

12:45 AM Changeset in webkit [287303] by Carlos Garcia Campos
  • 21 edits in trunk

CSP: Include the sample in eval violation reports
https://bugs.webkit.org/show_bug.cgi?id=234390

Reviewed by Kate Cheney.

LayoutTests/imported/w3c:

Update expectations.

  • web-platform-tests/content-security-policy/securitypolicyviolation/script-sample-expected.txt:

Source/JavaScriptCore:

  • interpreter/Interpreter.cpp:

(JSC::eval): Pass the code to reportViolationForUnsafeEval().

  • runtime/DirectEvalExecutable.cpp:

(JSC::DirectEvalExecutable::create): Ditto.

  • runtime/FunctionConstructor.cpp:

(JSC::stringifyFunction): Helper function with the code to stringify function to be called also for the csp
violation report.
(JSC::constructFunction): Call stringifyFunction() to get the code for reportViolationForUnsafeEval().
(JSC::constructFunctionSkippingEvalEnabledCheck): Use stringifyFunction().

  • runtime/IndirectEvalExecutable.cpp:

(JSC::IndirectEvalExecutable::createImpl): Pass the code to reportViolationForUnsafeEval().

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::reportViolationForUnsafeEval): Add string parameter for the code sample.

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION): Pass the code to reportViolationForUnsafeEval().

Source/WebCore:

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::reportViolationForUnsafeEval): Handle the source parameter and pass it to allowEval().

  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSWorkerGlobalScopeBase.cpp:

(WebCore::JSWorkerGlobalScopeBase::reportViolationForUnsafeEval): Handle the source parameter.

  • bindings/js/JSWorkerGlobalScopeBase.h:
  • bindings/js/JSWorkletGlobalScopeBase.cpp:

(WebCore::JSWorkletGlobalScopeBase::reportViolationForUnsafeEval): Ditto.

  • bindings/js/JSWorkletGlobalScopeBase.h:
  • bindings/js/ScheduledAction.h:

(WebCore::ScheduledAction::code const): Return the code.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::setTimeout): Pass the code to allowEval().
(WebCore::DOMWindow::setInterval): Ditto.

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::allowEval const): Handle codeContent parameter and pass it to reportViolation().
(WebCore::ContentSecurityPolicy::reportViolation const): Ditto.

  • page/csp/ContentSecurityPolicy.h:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::setTimeout): Pass the code to allowEval().
(WebCore::WorkerGlobalScope::setInterval): Ditto.

12:35 AM Changeset in webkit [287302] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[RISCV64] Add basic MacroAssemblerRISCV64 branching methods
https://bugs.webkit.org/show_bug.cgi?id=234474

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

Add MacroAssemblerRISCV64 implementations for the basic branching
methods. RelationalCondition enum values are aliased to the branching
condition values in RISCV64Assembler. The makeBranch() helper method
is added that generates the final branching instruction for the given
condition and the two registers holding values for the comparison and
returns the Jump object based on the label constructed at the location
of the branching placeholder.

Branching methods essentially consist of preparing the two registers
and calling the makeBranch() method. For 8-bit and 32-bit comparisons
the compared values have to be sign-extended into the scratch registers
because the branching instructions don't operate on partial values. This
might cause friction in higher JIT levels where the use of scratch
registers is disallowed.

  • assembler/MacroAssemblerRISCV64.h:

(JSC::MacroAssemblerRISCV64::invert):
(JSC::MacroAssemblerRISCV64::branch8):
(JSC::MacroAssemblerRISCV64::branch32):
(JSC::MacroAssemblerRISCV64::branch64):
(JSC::MacroAssemblerRISCV64::branch32WithUnalignedHalfWords):
(JSC::MacroAssemblerRISCV64::makeBranch):

12:33 AM Changeset in webkit [287301] by commit-queue@webkit.org
  • 9 edits in trunk/Source/JavaScriptCore

[JSC][ARMv7] Minor code size improvements
https://bugs.webkit.org/show_bug.cgi?id=234387

Patch by Geza Lore <Geza Lore> on 2021-12-21
Reviewed by Yusuke Suzuki.

A few mew code size improvements to ARMv7/Thumb-2

  • Use ldrd/strd in mode places (via AssemblyHelpers:loadValue

and AssemblyHelpers::storeValue)

  • Use BIC immediate instruction instead of AND where appropriate
  • Use a 2-byte ADDS instead of a 4-byte CMN when possible. This

applies very often as it handles testing JSValue tags.

  • Use addressTempRegister in branch32

Overall saving of about 3.5% code size on JetStream2, according to
--dumpLinkBufferStats.

  • assembler/ARMv7Assembler.h:

(JSC::ARMv7Assembler::bic):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::and32):
(JSC::MacroAssemblerARMv7::storePair32):
(JSC::MacroAssemblerARMv7::compare32AndSetFlags):
(JSC::MacroAssemblerARMv7::branch32):

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::storePair32):

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateImpl):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::compileExit):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::storeValue):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_mov):

12:28 AM Changeset in webkit [287300] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

MSVC reports "SVGPropertyAnimator.h(94): error C2839: invalid return type 'T *' for overloaded 'operator ->'" with /std:c++20
https://bugs.webkit.org/show_bug.cgi?id=234546

Reviewed by Alex Christensen.

  • svg/properties/SVGPropertyAnimator.h:

(WebCore::SVGPropertyAnimator::computeInheritedCSSPropertyValue const):
computeCSSPropertyValue protects the first arguemnt SVGElement.
computeInheritedCSSPropertyValue doesn't need to protect "parent".
Use Element* instead of RefPtr for "parent".

Note: See TracTimeline for information about the timeline view.