Timeline



Mar 21, 2022:

10:26 PM Changeset in webkit [291604] by Said Abou-Hallawa
  • 46 edits
    2 adds in trunk

[GPU Process] Make GraphicsContextState keep track of changes till they are applied
https://bugs.webkit.org/show_bug.cgi?id=238066
rdar://90585183

Reviewed by Simon Fraser.

Source/WebCore:

A member of type GraphicsContextState::ChangeFlags will be added to
GraphicsContextState to keep track of what has changes since it was last
applied. So we can eliminate the struct GraphicsContextStateChange.

We will have to have a single member for every GraphicsContextState::Change.

  1. So we will combine the color, the pattern, the gradient and the gradient space transform in one class called 'SourceBrush'.
  1. We will combine the shadow offset, the shadow blurRadius, the shadow color and the radius mode in one struct called 'DropShadow'
  1. And we will combine the CompositeOperator and the BledMode in one struct called 'CompositeMode'.

GraphicsContextState will handle setting its members, its encoding and
decoding and its streaming to text.

Adding a transparency layer in CG sets the global alpha to 1. We need to
sync the member GraphicsContextState.alpha with the platform alpha when
we beginTransparencyLayer() and when we endTransparencyLayer().

DisplayList::Recorder will keep its stack of GraphicsContextState. The
difference between the state of GraphicsContext and the state of the
Recorder is we eagerly apply the former to the platform context but we
lazily record the changes of the later. Recorder::didUpdateState()
overrides the base class method to just merge the changes from the base
class GraphicsContext::m_state to Recorder::currentState().state.
Recorder::appendStateChangeItem() records the accumulated changes in the
currentState() since the last drawing.

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

(WebCore::BifurcatedGraphicsContext::beginTransparencyLayer):
(WebCore::BifurcatedGraphicsContext::endTransparencyLayer):
(WebCore::BifurcatedGraphicsContext::didUpdateState):

  • platform/graphics/BifurcatedGraphicsContext.h:
  • platform/graphics/DrawGlyphsRecorder.h:
  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::updateState):
(WebCore::GraphicsContext::getShadow const):
(WebCore::GraphicsContext::setStrokeColor): Deleted.
(WebCore::GraphicsContext::setShadow): Deleted.
(WebCore::GraphicsContext::clearShadow): Deleted.
(WebCore::GraphicsContext::setFillColor): Deleted.
(WebCore::GraphicsContext::setStrokePattern): Deleted.
(WebCore::GraphicsContext::setFillPattern): Deleted.
(WebCore::GraphicsContext::setStrokeGradient): Deleted.
(WebCore::GraphicsContext::setFillGradient): Deleted.
(WebCore::GraphicsContext::setCompositeOperation): Deleted.

  • platform/graphics/GraphicsContext.h:

(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::fillColor const):
(WebCore::GraphicsContext::fillGradient const):
(WebCore::GraphicsContext::fillGradientSpaceTransform const):
(WebCore::GraphicsContext::fillPattern const):
(WebCore::GraphicsContext::setFillBrush):
(WebCore::GraphicsContext::setFillColor):
(WebCore::GraphicsContext::setFillGradient):
(WebCore::GraphicsContext::setFillPattern):
(WebCore::GraphicsContext::fillRule const):
(WebCore::GraphicsContext::setFillRule):
(WebCore::GraphicsContext::strokeColor const):
(WebCore::GraphicsContext::strokeGradient const):
(WebCore::GraphicsContext::strokeGradientSpaceTransform const):
(WebCore::GraphicsContext::strokePattern const):
(WebCore::GraphicsContext::setStrokeBrush):
(WebCore::GraphicsContext::setStrokeColor):
(WebCore::GraphicsContext::setStrokeGradient):
(WebCore::GraphicsContext::setStrokePattern):
(WebCore::GraphicsContext::strokeThickness const):
(WebCore::GraphicsContext::setStrokeThickness):
(WebCore::GraphicsContext::strokeStyle const):
(WebCore::GraphicsContext::setStrokeStyle):
(WebCore::GraphicsContext::dropShadow const):
(WebCore::GraphicsContext::shadowOffset const):
(WebCore::GraphicsContext::shadowBlur const):
(WebCore::GraphicsContext::shadowColor const):
(WebCore::GraphicsContext::setDropShadow):
(WebCore::GraphicsContext::setShadow):
(WebCore::GraphicsContext::clearShadow):
(WebCore::GraphicsContext::hasVisibleShadow const):
(WebCore::GraphicsContext::hasBlurredShadow const):
(WebCore::GraphicsContext::hasShadow const):
(WebCore::GraphicsContext::compositeMode const):
(WebCore::GraphicsContext::compositeOperation const):
(WebCore::GraphicsContext::blendMode const):
(WebCore::GraphicsContext::setCompositeMode):
(WebCore::GraphicsContext::setCompositeOperation):
(WebCore::GraphicsContext::alpha const):
(WebCore::GraphicsContext::setAlpha):
(WebCore::GraphicsContext::textDrawingMode const):
(WebCore::GraphicsContext::setTextDrawingMode):
(WebCore::GraphicsContext::imageInterpolationQuality const):
(WebCore::GraphicsContext::setImageInterpolationQuality):
(WebCore::GraphicsContext::setShouldAntialias):
(WebCore::GraphicsContext::setShouldSmoothFonts):
(WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts):
(WebCore::GraphicsContext::shadowsIgnoreTransforms const):
(WebCore::GraphicsContext::setShadowsIgnoreTransforms):
(WebCore::GraphicsContext::setDrawLuminanceMask):
(WebCore::GraphicsContext::setUseDarkAppearance):
(WebCore::GraphicsContext::blendModeOperation const): Deleted.

  • platform/graphics/GraphicsContextState.cpp:

(WebCore::GraphicsContextState::GraphicsContextState):
(WebCore::GraphicsContextState::hasOnlyPrimitiveChanges const):
(WebCore::GraphicsContextState::mergeChanges):
(WebCore::GraphicsContextState::didBeginTransparencyLayer):
(WebCore::GraphicsContextState::didEndTransparencyLayer):
(WebCore::stateChangeName):
(WebCore::GraphicsContextState::dump const):
(WebCore::operator<<):
(WebCore::GraphicsContextStateChange::changesFromState const): Deleted.
(WebCore::GraphicsContextStateChange::accumulate): Deleted.
(WebCore::GraphicsContextStateChange::apply const): Deleted.
(WebCore::GraphicsContextStateChange::dump const): Deleted.

  • platform/graphics/GraphicsContextState.h:

(WebCore::GraphicsContextState::GraphicsContextState):
(WebCore::GraphicsContextState::changes const):
(WebCore::GraphicsContextState::didApplyChanges):
(WebCore::GraphicsContextState::setFillBrush):
(WebCore::GraphicsContextState::setFillColor):
(WebCore::GraphicsContextState::setFillGradient):
(WebCore::GraphicsContextState::setFillPattern):
(WebCore::GraphicsContextState::setFillRule):
(WebCore::GraphicsContextState::setStrokeBrush):
(WebCore::GraphicsContextState::setStrokeColor):
(WebCore::GraphicsContextState::setStrokeGradient):
(WebCore::GraphicsContextState::setStrokePattern):
(WebCore::GraphicsContextState::setStrokeThickness):
(WebCore::GraphicsContextState::setStrokeStyle):
(WebCore::GraphicsContextState::setCompositeMode):
(WebCore::GraphicsContextState::setDropShadow):
(WebCore::GraphicsContextState::setAlpha):
(WebCore::GraphicsContextState::setImageInterpolationQuality):
(WebCore::GraphicsContextState::setTextDrawingMode):
(WebCore::GraphicsContextState::setShouldAntialias):
(WebCore::GraphicsContextState::setShouldSmoothFonts):
(WebCore::GraphicsContextState::setShouldSubpixelQuantizeFonts):
(WebCore::GraphicsContextState::setShadowsIgnoreTransforms):
(WebCore::GraphicsContextState::setDrawLuminanceMask):
(WebCore::GraphicsContextState::setUseDarkAppearance):
(WebCore::GraphicsContextState::setProperty):
(WebCore::GraphicsContextState::encode const):
(WebCore::GraphicsContextState::decode):
(WebCore::GraphicsContextStateChange::GraphicsContextStateChange): Deleted.

  • platform/graphics/GraphicsTypes.cpp:

(WebCore::operator<<):

  • platform/graphics/GraphicsTypes.h:

(WebCore::CompositeMode::operator==):
(WebCore::CompositeMode::encode const):
(WebCore::CompositeMode::decode):
(WebCore::DropShadow::isVisible const):
(WebCore::DropShadow::isBlurred const):
(WebCore::DropShadow::hasOutsets const):
(WebCore::operator==):
(WebCore::DropShadow::encode const):
(WebCore::DropShadow::decode):

  • platform/graphics/NullGraphicsContext.h:
  • platform/graphics/ShadowBlur.cpp:

(WebCore::ShadowBlur::ShadowBlur):

  • platform/graphics/ShadowBlur.h:
  • platform/graphics/SourceBrush.cpp: Added.

(WebCore::SourceBrush::SourceBrush):
(WebCore::SourceBrush::gradientSpaceTransform const):
(WebCore::SourceBrush::gradient const):
(WebCore::SourceBrush::pattern const):
(WebCore::SourceBrush::setGradient):
(WebCore::SourceBrush::setPattern):
(WebCore::operator<<):

  • platform/graphics/SourceBrush.h: Added.

(WebCore::SourceBrush::color const):
(WebCore::SourceBrush::setColor):
(WebCore::SourceBrush::brush const):
(WebCore::SourceBrush::setGradient):
(WebCore::SourceBrush::isPrimitive const):
(WebCore::operator==):
(WebCore::SourceBrush::Brush::LogicalGradient::encode const):
(WebCore::SourceBrush::Brush::LogicalGradient::decode):
(WebCore::SourceBrush::Brush::encode const):
(WebCore::SourceBrush::Brush::decode):
(WebCore::SourceBrush::encode const):
(WebCore::SourceBrush::decode):

  • platform/graphics/cairo/CairoOperations.cpp:

(WebCore::Cairo::FillSource::FillSource):
(WebCore::Cairo::StrokeSource::StrokeSource):
(WebCore::Cairo::ShadowState::ShadowState):

  • platform/graphics/cairo/FontCairo.cpp:

(WebCore::FontCascade::drawGlyphs):

  • platform/graphics/cairo/GradientCairo.cpp:

(WebCore::Gradient::fill):

  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContextCairo::drawRect):
(WebCore::GraphicsContextCairo::drawLine):
(WebCore::GraphicsContextCairo::drawEllipse):
(WebCore::GraphicsContextCairo::fillRect):
(WebCore::GraphicsContextCairo::drawLinesForText):
(WebCore::GraphicsContextCairo::didUpdateState):
(WebCore::GraphicsContextCairo::drawGlyphs):

  • platform/graphics/cairo/GraphicsContextCairo.h:
  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::GraphicsContextCG::GraphicsContextCG):
(WebCore::GraphicsContextCG::drawNativeImage):
(WebCore::GraphicsContextCG::applyStrokePattern):
(WebCore::GraphicsContextCG::applyFillPattern):
(WebCore::calculateDrawingMode):
(WebCore::GraphicsContextCG::drawPath):
(WebCore::GraphicsContextCG::fillPath):
(WebCore::GraphicsContextCG::strokePath):
(WebCore::GraphicsContextCG::fillRect):
(WebCore::GraphicsContextCG::fillRoundedRectImpl):
(WebCore::GraphicsContextCG::fillRectWithRoundedHole):
(WebCore::GraphicsContextCG::beginTransparencyLayer):
(WebCore::applyShadowOffsetWorkaroundIfNeeded):
(WebCore::setCGShadow):
(WebCore::GraphicsContextCG::didUpdateState):
(WebCore::GraphicsContextCG::strokeRect):
(WebCore::GraphicsContextCG::fillEllipse):
(WebCore::GraphicsContextCG::strokeEllipse):

  • platform/graphics/cg/GraphicsContextCG.h:
  • platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:

(WebCore::DrawGlyphsRecorder::populateInternalState):
(WebCore::DrawGlyphsRecorder::populateInternalContext):
(WebCore::DrawGlyphsRecorder::concludeInternalContext):
(WebCore::DrawGlyphsRecorder::updateFillBrush):
(WebCore::DrawGlyphsRecorder::updateStrokeBrush):
(WebCore::DrawGlyphsRecorder::updateCTM):
(WebCore::DrawGlyphsRecorder::updateShadow):
(WebCore::DrawGlyphsRecorder::recordDrawGlyphs):
(WebCore::DrawGlyphsRecorder::updateFillColor): Deleted.
(WebCore::DrawGlyphsRecorder::updateStrokeColor): Deleted.
(WebCore::shadowIsCleared): Deleted.

  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::shouldDumpForFlags):

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::SetState::SetState):
(WebCore::DisplayList::SetState::apply):
(WebCore::DisplayList::operator<<):

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::SetState::state const):
(WebCore::DisplayList::SetState::encode const):
(WebCore::DisplayList::SetState::decode):
(WebCore::DisplayList::SetState::stateChange const): Deleted.
(WebCore::DisplayList::SetState::stateChange): Deleted.

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::appendStateChangeItem):
(WebCore::DisplayList::Recorder::appendStateChangeItemIfNecessary):
(WebCore::DisplayList::Recorder::state const):
(WebCore::DisplayList::Recorder::didUpdateState):
(WebCore::DisplayList::Recorder::save):
(WebCore::DisplayList::Recorder::restore):
(WebCore::DisplayList::Recorder::beginTransparencyLayer):
(WebCore::DisplayList::Recorder::endTransparencyLayer):
(WebCore::DisplayList::containsOnlyInlineStateChanges): Deleted.

  • platform/graphics/displaylists/DisplayListRecorder.h:

(WebCore::DisplayList::Recorder::ContextState::ContextState):
(WebCore::DisplayList::Recorder::ContextState::cloneForTransparencyLayer const):
(WebCore::DisplayList::Recorder::ContextState::cloneForSave const): Deleted.

  • platform/graphics/displaylists/DisplayListRecorderImpl.cpp:

(WebCore::DisplayList::RecorderImpl::recordSetState):

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

(WebCore::DisplayList::applySetStateItem):

  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:

(Nicosia::CairoOperationRecorder::didUpdateState):
(Nicosia::CairoOperationRecorder::fillRect):
(Nicosia::CairoOperationRecorder::fillRoundedRect):
(Nicosia::CairoOperationRecorder::drawGlyphs):
(Nicosia::CairoOperationRecorder::drawRect):
(Nicosia::CairoOperationRecorder::drawLine):
(Nicosia::CairoOperationRecorder::drawLinesForText):
(Nicosia::CairoOperationRecorder::drawEllipse):

  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
  • rendering/svg/RenderSVGPath.cpp:

(WebCore::useStrokeStyleToFill):

Source/WebKit:

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::setState):

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:

(WebKit::RemoteDisplayListRecorderProxy::recordSetState):

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

Tools:

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

(TestWebKitAPI::TEST):

LayoutTests:

  • displaylists/extent-includes-shadow-expected.txt:
  • displaylists/extent-includes-transforms-expected.txt:
  • displaylists/layer-dispay-list-expected.txt:
  • gpu-process/TestExpectations:
9:26 PM Changeset in webkit [291603] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] Change Date.parse to stop returning numbers with fractional part
https://bugs.webkit.org/show_bug.cgi?id=238050

Reviewed by Saam Barati.

JSTests:

  • stress/date-parse-timeclip.js: Added.

(shouldBe):

Source/JavaScriptCore:

Date.parse should return NaN or integer numbers[1,2]. This patch applies timeClip
to the result of Date.parse to ensure that the returned value is time value.

[1]: https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-date.parse
[2]: https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-time-values-and-time-range

  • runtime/DateConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

8:54 PM Changeset in webkit [291602] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix bug in Relationship::mergeImpl
https://bugs.webkit.org/show_bug.cgi?id=238183
<rdar://89822922>

Reviewed by Yusuke Suzuki.

  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
8:52 PM Changeset in webkit [291601] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

AirFixObviousSpills needs to consider a PreIndex and PostIndex as clobbering the Reg used for indexing
https://bugs.webkit.org/show_bug.cgi?id=238178
<rdar://87345895>

Reviewed by Mark Lam.

Inside AirFixObviousSpills, we run a basic alias analysis for StackSlots and
registers. For example, when we overwrite a register, we clear anything
it's aliased with. However, the way we were doing this was by looking at
each Arg that was Defd. However, this iteration was missing that
PostIndex/PreIndex mutate the register that feeds into the address Arg.
This patch fixes the issue by walking the instruction in such a way that
we visit all the Defs we care about, both Regs and StackSlots.

  • b3/air/AirFixObviousSpills.cpp:
8:49 PM Changeset in webkit [291600] by Tyler Wilcock
  • 12 edits
    3 copies
    1 move
    8 adds
    2 deletes in trunk

AX: AccessibilityObject::visibleCharacterRange is extremely slow when called on objects with lots of text
https://bugs.webkit.org/show_bug.cgi?id=237678

Reviewed by Andres Gonzalez.

Source/WebCore:

AccessibilityObject::visibleCharacterRange is extremely slow when
called on objects with lots of text. For example, trying to enter a
large contenteditable element with VoiceOver causes "Safari not
responding" because WebKit is so slow to return this data.

This patch fixes this in two ways. First, we optimize computation of
the end boundary point by grabbing previous line start positions in
batches and binary searching within each batch to find the correct
value.

I tried to apply this algorithm to the computation of the start
boundary, but that regressed performance for small and medium text
objects, and didn't yield any noticeable improvement for large text
objects. Keeping start boundary computation as-is while changing the
end boundary computation provided the best performance at all text
sizes.

Second, this patch caches visibleCharacterRange results, as the same
inputs to this function will always yield the same output. It's common
for this data to be requested multiple times without any change in
page state (e.g. scrolling), so caching further improves performance
by a lot.

Additional testcases added to accessibility/visible-character-range.html to
ensure behavior is correct.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::previousLineStartBoundaryPoints const): Added.
(WebCore::AccessibilityObject::lastBoundaryPointContainedInRect const): Added.
(WebCore::AccessibilityObject::boundaryPointsContainedInRect const): Added.
(WebCore::AccessibilityObject::visibleCharacterRange const):
Wraps visibleCharacterRangeInternal to handle caching.
(WebCore::AccessibilityObject::visibleCharacterRangeInternal const):
(WebCore::AccessibilityObject::previousLineStartPositionInternal const): Added.
(WebCore::AccessibilityObject::previousLineStartPosition const):
Wraps previousLineStartPositionInternal to return default
VisualPosition if it returns std::nullopt (existing callers expect this behavior)

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::lastBoundaryPointContainedInRect const): Added.

  • dom/BoundaryPoint.cpp:

(WebCore::operator<<):

  • dom/BoundaryPoint.h:

Added implementation of operator<< to make debugging boundary points easier.

LayoutTests:

Add many new visible character range testcases split across four new tests.

  • accessibility/visible-character-range-basic.html: Added.
  • accessibility/visible-character-range-height-changes.html: Added.
  • accessibility/visible-character-range-scrolling.html: Added.
  • accessibility/visible-character-range-width-changes.html: Added.
  • platform/glib/TestExpectations: Skip new tests.
  • platform/ios-simulator-wk2/TestExpectations:

Mark new tests as crashing since the old test was crashing in main.

  • platform/ios/TestExpectations: Enable new tests.
  • platform/ios/accessibility/visible-character-range-basic-expected.txt: Added.
  • platform/ios/accessibility/visible-character-range-expected.txt: Removed.
  • platform/ios/accessibility/visible-character-range-height-changes-expected.txt: Added.
  • platform/ios/accessibility/visible-character-range-scrolling-expected.txt: Added.
  • platform/ios/accessibility/visible-character-range-width-changes-expected.txt: Added.
  • platform/mac-wk1/TestExpectations: Skip new tests.
  • platform/mac/accessibility/visible-character-range-basic-expected.txt: Added.
  • platform/mac/accessibility/visible-character-range-expected.txt: Removed.
  • platform/mac/accessibility/visible-character-range-height-changes-expected.txt: Added.
  • platform/mac/accessibility/visible-character-range-scrolling-expected.txt: Added.
  • platform/mac/accessibility/visible-character-range-width-changes-expected.txt: Added.
  • platform/win/TestExpectations: Skip new tests.
  • resources/accessibility-helper.js:

(visibleRange): Added.

8:33 PM Changeset in webkit [291599] by Simon Fraser
  • 9 edits in trunk/Source/WebKit

Do all RemoteLayerBackingStore buffer swapping in one batch
https://bugs.webkit.org/show_bug.cgi?id=238161

Reviewed by Tim Horton.

Previously, RemoteLayerBackingStore buffer swapping happened per-layer in
PlatformCALayerRemote::recursiveBuildTransaction().

To prepare for a single IPC for all buffer swapping, batch all the swapping under
prepareBackingStoresForDisplay() which is called from
RemoteLayerTreeContext::buildTransaction().

RemoteLayerBackingStoreCollection tracks m_backingStoresNeedingDisplay, and
RemoteLayerBackingStore implements needsDisplay() so we only add backing stores to this hash
set that need any buffer swapping.

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::layerWillBeDisplayed):
(WebKit::RemoteLayerBackingStore::needsDisplay const):
(WebKit::RemoteLayerBackingStore::prepareToDisplay):
(WebKit::RemoteLayerBackingStore::paintContents):
(WebKit::RemoteLayerBackingStore::takePendingFlushers):

  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:

(WebKit::RemoteLayerBackingStoreCollection::backingStoreNeedsDisplay):
(WebKit::RemoteLayerBackingStoreCollection::prepareBackingStoresForDisplay):
(WebKit::RemoteLayerBackingStoreCollection::paintReachableBackingStoreContents):
(WebKit::RemoteLayerBackingStoreCollection::willFlushLayers):
(WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed):

  • Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.h:
  • Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.mm:

(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::backingStoreNeedsDisplay):
(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::prepareBackingStoreBuffers):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:

(WebKit::RemoteLayerTreeContext::buildTransaction):

8:28 PM Changeset in webkit [291598] by achristensen@apple.com
  • 3 edits in trunk/Source/WebKit

Adjust when _setPrivacyProxyFailClosedForUnreachableNonMainHosts is called
https://bugs.webkit.org/show_bug.cgi?id=237735

Reviewed by Geoff Garen.

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
(WebKit::NetworkSessionCocoa::createWebSocketTask):

8:22 PM Changeset in webkit [291597] by commit-queue@webkit.org
  • 28 edits
    1 delete in trunk

Implement CSSNumericValue.mul, div, add, sub, max, and min
https://bugs.webkit.org/show_bug.cgi?id=238153

Patch by Alex Christensen <achristensen@webkit.org> on 2022-03-21
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/arithmetic.tentative-expected.txt:

Source/WebCore:

This implements all except the derived units of multiplication and the unit checking of the others.
They are an off-by-default experimental feature right now, part of css-typed-om which is being implemented.
They are covered by wpt tests.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSCSSStyleValueCustom.cpp:

(WebCore::toJSNewlyCreated):

  • css/typedom/CSSKeywordValue.h:

(WebCore::CSSKeywordValue::value const): Deleted.
(WebCore::CSSKeywordValue::CSSKeywordValue): Deleted.

  • css/typedom/CSSNumericValue.cpp:

(WebCore::negate):
(WebCore::invert):
(WebCore::operationOnValuesOfSameUnit):
(WebCore::CSSNumericValue::prependItemsOfTypeOrThis):
(WebCore::CSSNumericValue::addInternal):
(WebCore::CSSNumericValue::add):
(WebCore::CSSNumericValue::sub):
(WebCore::CSSNumericValue::multiplyInternal):
(WebCore::CSSNumericValue::mul):
(WebCore::CSSNumericValue::div):
(WebCore::CSSNumericValue::min):
(WebCore::CSSNumericValue::max):
(WebCore::CSSNumericValue::rectifyNumberish):
(WebCore::CSSNumericValue::toSum):

  • css/typedom/CSSNumericValue.h:

(isType):

  • css/typedom/CSSStyleValue.h:

(WebCore::isCSSNumericValue):
(WebCore::isCSSMathValue):

  • css/typedom/CSSUnitValue.h:

(isType):

  • css/typedom/numeric/CSSMathInvert.cpp:

(WebCore::CSSMathInvert::CSSMathInvert):

  • css/typedom/numeric/CSSMathInvert.h:

(isType):
(WebCore::CSSMathInvert::value const): Deleted.

  • css/typedom/numeric/CSSMathMax.cpp:

(WebCore::CSSMathMax::CSSMathMax):
(WebCore::CSSMathMax::create): Deleted.

  • css/typedom/numeric/CSSMathMax.h:

(isType):

  • css/typedom/numeric/CSSMathMin.cpp:

(WebCore::CSSMathMin::CSSMathMin):
(WebCore::CSSMathMin::create): Deleted.

  • css/typedom/numeric/CSSMathMin.h:

(isType):

  • css/typedom/numeric/CSSMathNegate.cpp:

(WebCore::CSSMathNegate::CSSMathNegate):
(WebCore::CSSMathNegate::create): Deleted.

  • css/typedom/numeric/CSSMathNegate.h:

(isType):
(WebCore::CSSMathNegate::value const): Deleted.

  • css/typedom/numeric/CSSMathProduct.cpp:

(WebCore::CSSMathProduct::CSSMathProduct):
(WebCore::CSSMathProduct::create): Deleted.

  • css/typedom/numeric/CSSMathProduct.h:

(isType):

  • css/typedom/numeric/CSSMathSum.cpp:

(WebCore::CSSMathSum::CSSMathSum):
(WebCore::CSSMathSum::create): Deleted.
(WebCore::CSSMathSum::values const): Deleted.

  • css/typedom/numeric/CSSMathSum.h:

(isType):

  • css/typedom/numeric/CSSMathValue.cpp: Removed.
  • css/typedom/numeric/CSSMathValue.h:

(WebCore::CSSMathValue::getOperator const): Deleted.
(): Deleted.
(isType): Deleted.

  • css/typedom/numeric/CSSNumericArray.cpp:

(WebCore::CSSNumericArray::create):
(WebCore::CSSNumericArray::CSSNumericArray):

  • css/typedom/numeric/CSSNumericArray.h:

(WebCore::CSSNumericArray::array const):

  • css/typedom/numeric/CSSNumericType.h:
  • css/typedom/transform/CSSTransformValue.h:

(WebCore::CSSTransformValue::length const): Deleted.

7:09 PM Changeset in webkit [291596] by Russell Epstein
  • 1 edit in branches/safari-614.1.6-branch/Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h

Unreviewed logging change. rdar://90517607

6:38 PM Changeset in webkit [291595] by Matteo Flores
  • 2 edits in trunk/LayoutTests

[ iOS iPhone 12 ] fast/hidpi & fast/layers/hidpi tests are flaky text/image failing
https://bugs.webkit.org/show_bug.cgi?id=232384

Unreviewed test gardening.

  • platform/ios/TestExpectations:
6:35 PM Changeset in webkit [291594] by Oriol Brufau
  • 6 edits
    2 adds in trunk

[css-cascade] Let revert-layer roll back to preshints
https://bugs.webkit.org/show_bug.cgi?id=237532

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Add test.

  • web-platform-tests/css/css-cascade/presentational-hints-rollback-expected.txt: Added.
  • web-platform-tests/css/css-cascade/presentational-hints-rollback.html: Added.

Source/WebCore:

The patch makes presentational hints use a cascade layer priority of 0.
The priority of the lowest layer is then increased to 1.
This allows 'revert-layer' in author origin revert to the presentational
hints origin, which is between user origin and author origin.

Test: imported/w3c/web-platform-tests/css/css-cascade/presentational-hints-rollback.html

  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::addElementStyleProperties):
(WebCore::Style::ElementRuleCollector::matchAllRules):
(WebCore::Style::ElementRuleCollector::addElementInlineStyleProperties):

  • style/ElementRuleCollector.h:
  • style/RuleSetBuilder.cpp:

(WebCore::Style::RuleSetBuilder::updateCascadeLayerPriorities):

6:19 PM Changeset in webkit [291593] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebGPU

[WebGPU] maxAnisotropy > 16 is clamped, rather than illegal
https://bugs.webkit.org/show_bug.cgi?id=238063

Reviewed by Kimmo Kinnunen.

See https://github.com/gpuweb/gpuweb/issues/696#issuecomment-644343897

Let's add a maxAnisotropy value to samplers, and a maxAnisotropy limit(? query?) (likely only
ever 16 or 1), but not to validate that the former is less than the latter.

Test: api/operation/sampling/anisotropy.spec.ts

  • WebGPU/Sampler.mm:

(WebGPU::validateCreateSampler):
(WebGPU::Device::createSampler):

5:43 PM Changeset in webkit [291592] by Robert Jenner
  • 2 edits in trunk/LayoutTests

REGRESSION: [ Monterey ] imported/w3c/web-platform-tests/html/canvas/element/line-styles/2d.line.width.scaledefault.html is a constant text failure
<rdar://problem/77527575?

Unreviewed test gardening.

  • platform/mac/TestExpectations: Removing no longer needed test expectation.
5:22 PM Changeset in webkit [291591] by Aditya Keerthi
  • 2 edits in trunk/Source/WebKit

Unreviewed, address post-landing feedback on r291445

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView compareFoundRange:toRange:inDocument:]):

Subtraction to determine ordering is an anti-pattern, due to the
possibility of overflow. Use comparison operators.

5:17 PM Changeset in webkit [291590] by Russell Epstein
  • 9 edits in branches/safari-613-branch/Source

Versioning.

WebKit-7613.2.4

4:46 PM Changeset in webkit [291589] by Chris Dumez
  • 19 edits
    3 adds in trunk

LayoutTests/imported/w3c:
BroadcastChannel instances in distinct opaque origins can communicate
https://bugs.webkit.org/show_bug.cgi?id=238090
<rdar://problem/90511155>

Reviewed by Alex Christensen.

Import web-platform-tests test coverage.

  • web-platform-tests/webmessaging/broadcastchannel/opaque-origin-expected.txt: Added.
  • web-platform-tests/webmessaging/broadcastchannel/opaque-origin.html: Added.
  • web-platform-tests/webmessaging/broadcastchannel/w3c-import.log:

Source/WebCore:
BroadcastChannel instances in distinct opaque origins can communicate
https://bugs.webkit.org/show_bug.cgi?id=238090
<rdar://problem/90511155>

Reviewed by Alex Christensen.

The issue is that we would use a ClientOrigin to distinguish origins for BroadcastChannel,
which relies on SecurityOriginData internally. A unique/opaque SecurityOrigin becomes an empty
SecurityOriginData upon conversion. As a result, when comparing ClientOrigin objects from
unique SecurityOrigins, they would compare as equal.

To address the issue, I introduced a new PartitionedSecurityOrigin type which is similar
to ClientOrigin but stores SecurityOrigin objects internally, instead of SecurityOriginData
objects. PartitionedSecurityOrigin's operator==() is such that different SecurityOrigins
would not be equal but the same unique SecurityOrigin would be. I then used this new
PartitionedSecurityOrigin type as key in our HashMap on the WebProcess side instead of
ClientOrigin. This allows communication between several BroadcastChannels from the same
unique origin, while preventing communication between distinct opaque origins.

When the PartitionedSecurityOrigin contains an opaque security origin, we don't involve
the Network Process at all since the destination can only be in the same WebProcess.

Test: imported/w3c/web-platform-tests/webmessaging/broadcastchannel/opaque-origin.html

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/BroadcastChannel.cpp:

(WebCore::shouldPartitionOrigin):
(WebCore::BroadcastChannel::MainThreadBridge::registerChannel):
(WebCore::BroadcastChannel::MainThreadBridge::unregisterChannel):
(WebCore::BroadcastChannel::MainThreadBridge::postMessage):

  • dom/BroadcastChannelRegistry.h:
  • loader/EmptyClients.cpp:
  • page/PartitionedSecurityOrigin.h: Added.

(WebCore::PartitionedSecurityOrigin::PartitionedSecurityOrigin):
(WebCore::PartitionedSecurityOrigin::isHashTableDeletedValue const):
(WebCore::PartitionedSecurityOrigin::isHashTableEmptyValue const):
(WebCore::operator==):
(WTF::add):
(WTF::PartitionedSecurityOriginHash::hash):
(WTF::PartitionedSecurityOriginHash::equal):
(WTF::HashTraits<WebCore::PartitionedSecurityOrigin>::emptyValue):
(WTF::HashTraits<WebCore::PartitionedSecurityOrigin>::constructEmptyValue):
(WTF::HashTraits<WebCore::PartitionedSecurityOrigin>::isEmptyValue):
(WTF::HashTraits<WebCore::PartitionedSecurityOrigin>::peek):
(WTF::HashTraits<WebCore::PartitionedSecurityOrigin>::take):

Source/WebKit:
BroadcastChannel instances in distinct opaque origins can communicate
https://bugs.webkit.org/show_bug.cgi?id=238090
<rdar://problem/90511155>

Reviewed by Alex Christensen.

The issue is that we would use a ClientOrigin to distinguish origins for BroadcastChannel,
which relies on SecurityOriginData internally. A unique/opaque SecurityOrigin becomes an empty
SecurityOriginData upon conversion. As a result, when comparing ClientOrigin objects from
unique SecurityOrigins, they would compare as equal.

To address the issue, I introduced a new PartitionedSecurityOrigin type which is similar
to ClientOrigin but stores SecurityOrigin objects internally, instead of SecurityOriginData
objects. PartitionedSecurityOrigin's operator==() is such that different SecurityOrigins
would not be equal but the same unique SecurityOrigin would be. I then used this new
PartitionedSecurityOrigin type as key in our HashMap on the WebProcess side instead of
ClientOrigin. This allows communication between several BroadcastChannels from the same
unique origin, while preventing communication between distinct opaque origins.

When the PartitionedSecurityOrigin contains an opaque security origin, we don't involve
the Network Process at all since the destination can only be in the same WebProcess.

  • WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.cpp:

(WebKit::toClientOrigin):
(WebKit::WebBroadcastChannelRegistry::registerChannel):
(WebKit::WebBroadcastChannelRegistry::unregisterChannel):
(WebKit::WebBroadcastChannelRegistry::postMessage):
(WebKit::WebBroadcastChannelRegistry::postMessageLocally):
(WebKit::WebBroadcastChannelRegistry::postMessageToRemote):
(WebKit::WebBroadcastChannelRegistry::networkProcessCrashed):

  • WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.h:

Source/WebKitLegacy:
Dust off Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=238121

Reviewed by Yusuke Suzuki.

  • PlatformMac.cmake:
4:39 PM Changeset in webkit [291588] by Kate Cheney
  • 7 edits
    2 adds in trunk

nj.gov: Background color incorrect for 'State Vehicles' section
https://bugs.webkit.org/show_bug.cgi?id=238035
<rdar://problem/84543795>

Reviewed by Aditya Keerthi.

Source/WebCore:

Test: fast/css/non-form-control-element-drop-appearance.html

Update RenderTheme::adjustStyle to drop appearance for non-form
control elements when they are styled by the author.

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustAppearanceForElement const):
(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::isControlStyled const):

  • rendering/RenderTheme.h:
  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::borderAndBackgroundEqual const):

  • rendering/style/RenderStyle.h:

LayoutTests:

  • fast/css/non-form-control-element-drop-appearance-expected.html: Added.
  • fast/css/non-form-control-element-drop-appearance.html: Added.
  • editing/deleting/insert-in-orphaned-selection-crash.html: Added.

Now that we drop native style for non-form control elements, we need to
add height to the style to make sure this table element is selectable and
successfully tests what it needs to test.

4:36 PM Changeset in webkit [291587] by commit-queue@webkit.org
  • 4 edits in trunk

Unreviewed, reverting r291055.
https://bugs.webkit.org/show_bug.cgi?id=238145

Invalid test expectations

Reverted changeset:

"[iOS] Hard link AVPictureInPictureController"
https://bugs.webkit.org/show_bug.cgi?id=237227
https://commits.webkit.org/r291055

3:44 PM Changeset in webkit [291586] by Russell Epstein
  • 2 edits in branches/safari-614.1.7-branch/Source/WebKit

Cherry-pick r291563. rdar://problem/90448244

Sandbox: Remove telemetry in Network Process sandbox macOS
https://bugs.webkit.org/show_bug.cgi?id=238041

Patch by Adam Mazander <mazander@apple.com> on 2022-03-21
Reviewed by Brent Fulgham.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:

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

3:14 PM Changeset in webkit [291585] by Matteo Flores
  • 1 edit in trunk/LayoutTests/ChangeLog

REGRESSION(r290797-r290793): [ iOS Debug ] 4 editing/selection/* tests are constant timeouts
https://bugs.webkit.org/show_bug.cgi?id=238155

Unreviewed test gardening.

  • platform/ios/TestExpectations:
3:14 PM Changeset in webkit [291584] by Matteo Flores
  • 1 edit in trunk/LayoutTests/platform/ios/TestExpectations

Need a short description (OOPS!).
Need the bug URL (OOPS!).

Reviewed by NOBODY (OOPS!).

  • platform/ios/TestExpectations:
2:44 PM Changeset in webkit [291583] by Russell Epstein
  • 1 copy in tags/Safari-614.1.5.9.2

Tag Safari-614.1.5.9.2.

2:42 PM Changeset in webkit [291582] by Russell Epstein
  • 8 edits
    2 adds in branches/safari-614.1.7-branch/Source

Cherry-pick r291564. rdar://problem/90463946

Add an addition point for system background color
https://bugs.webkit.org/show_bug.cgi?id=238108
<rdar://problem/90463946>

Reviewed by Aditya Keerthi.

Source/WebCore:

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/ios/WebCoreUIColorExtras.h: Added.
  • platform/ios/WebCoreUIColorExtras.mm: Added. (WebCore::systemBackgroundColor): Add an addition point.
  • rendering/RenderThemeIOS.mm: (WebCore::CSSValueSystemColorInformation::function): (WebCore::cssValueSystemColorInformationList): (WebCore::systemColorFromCSSValueSystemColorInformation): Adopt it for CSS use of system background color.

Source/WebKit:

  • UIProcess/API/ios/WKWebViewIOS.mm: (scrollViewBackgroundColor): Adopt systemBackgroundColor().
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::contentViewBackgroundColor):
  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::platformUnderPageBackgroundColor const): Move the fallback to systemBackgroundColor into PageClientImpl so that it can realize the web view's trait collection.

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

2:35 PM Changeset in webkit [291581] by Russell Epstein
  • 8 edits
    2 adds in branches/safari-614.1.5.9-branch/Source

Cherry-pick r291564. rdar://problem/90463946

Add an addition point for system background color
https://bugs.webkit.org/show_bug.cgi?id=238108
<rdar://problem/90463946>

Reviewed by Aditya Keerthi.

Source/WebCore:

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/ios/WebCoreUIColorExtras.h: Added.
  • platform/ios/WebCoreUIColorExtras.mm: Added. (WebCore::systemBackgroundColor): Add an addition point.
  • rendering/RenderThemeIOS.mm: (WebCore::CSSValueSystemColorInformation::function): (WebCore::cssValueSystemColorInformationList): (WebCore::systemColorFromCSSValueSystemColorInformation): Adopt it for CSS use of system background color.

Source/WebKit:

  • UIProcess/API/ios/WKWebViewIOS.mm: (scrollViewBackgroundColor): Adopt systemBackgroundColor().
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::contentViewBackgroundColor):
  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::platformUnderPageBackgroundColor const): Move the fallback to systemBackgroundColor into PageClientImpl so that it can realize the web view's trait collection.

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

2:32 PM Changeset in webkit [291580] by Russell Epstein
  • 9 edits in branches/safari-614.1.5.9-branch/Source

Versioning.

WebKit-7614.1.5.9.2

2:23 PM Changeset in webkit [291579] by Brent Fulgham
  • 4 edits in trunk

Disable the <model> element in Captive Portal mode.
https://bugs.webkit.org/show_bug.cgi?id=238148
<rdar://90562002>

Reviewed by Chris Dumez.

Source/WebKit:

When displaying content in a captive portal, we should make sure the experimental
<model> element is unavailable.

Tests: TestWebKitAPI

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::adjustSettingsForCaptivePortal): Added. Also turn off <model> support.
(WebKit::WebPage::updatePreferences): Call new helper function.

Tools:

Update tests to check <model> element.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1:44 PM Changeset in webkit [291578] by mmaxfield@apple.com
  • 6 edits in trunk

[WebGPU] Set the WebGPU WKPreference to true in layout tests
https://bugs.webkit.org/show_bug.cgi?id=238130

Reviewed by Sam Weinig.

Tools:

WebGPU isn't ready yet to show up in any Safari menus, so rather than just marking it as an experimental feature,
this patch just enables the preference in DumpRenderTree and WebKitTestRunner.

This doesn't require a linker change, because all of the WebGPU calls are already behind HAS(WEBGPU_IMPLEMENTATION).
Therefore, the immediate behavior change of this patch is that the IDL types are exposed in layout tests, but calling
WebGPU functions in layout tests will return undefined. When we finally link WebCore with WebGPU, then these
functions will automatically start working in layout tests. Outside of layout tests, the IDL types are still not
present, and so therefore the WebGPU functions cannot be called because they are not visible from script.

  • DumpRenderTree/TestOptions.cpp:

(WTR::TestOptions::defaults):

  • WebKitTestRunner/TestOptions.cpp:

(WTR::TestOptions::defaults):

LayoutTests:

  • platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt:
12:57 PM Changeset in webkit [291577] by ysuzuki@apple.com
  • 4 edits
    1 add in trunk

[JSC] ReferenceError when using extra parens in class fields
https://bugs.webkit.org/show_bug.cgi?id=236843

Reviewed by Saam Barati.

JSTests:

  • stress/class-field-initializer-should-have-variable-scope.js: Added.

(shouldBe):
(test1.const.a.x.B):
(test1):
(test2.const.a.x.B):
(test2):
(test3.B.prototype.b):
(test3.B):
(test3):

Source/JavaScriptCore:

class field initializer should create its own used-variables set
to capture used variables separately from the other variables since
it becomes independent CodeBlock internally later. The current code
was wrong since,

  1. Incorrectly using the current set of class-scope.
  2. Incorrectly marking only the last set while parseAssignmentExpression can create a new set inside it.
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseClass):

  • parser/Parser.h:

(JSC::Scope::markLastUsedVariablesSetAsCaptured):

12:42 PM Changeset in webkit [291576] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Unreviewed test gardening after 246673@main.

  • fast/viewport/watchos/viewport-adaptations-after-navigation-expected.txt:
  • fast/viewport/watchos/viewport-with-system-minimum-layout-margins.html:
12:21 PM Changeset in webkit [291575] by mmaxfield@apple.com
  • 2 edits
    1 copy
    1 add in trunk/Tools

[WebGPU] Add a build-webgpu script
https://bugs.webkit.org/show_bug.cgi?id=238040

Reviewed by Saam Barati.

This patch adds a build-webgpu script by sharing code with the build-jsc script.
It moves almost all of the contents of the build-jsc script to a shared Perl module,
webkitperl/BuildSubproject.pm, and then has build-jsc and build-webgpu both call
into it to build the relevant projects.

  • Scripts/build-jsc:

(buildMyProject): Deleted.
(writeCongrats): Deleted.

  • Scripts/build-webgpu: Added.
  • Scripts/webkitperl/BuildSubproject.pm: Copied from Tools/Scripts/build-jsc.

(buildMyProject):
(writeCongrats):

12:16 PM Changeset in webkit [291574] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

[media-controls] scrubbing on iOS when inline does not work
https://bugs.webkit.org/show_bug.cgi?id=238138
rdar://90046770

Reviewed by Dean Jackson.

This bug is simular to bug 238136. We cannot register pointer events on window on iOS.

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

(Slider.prototype._interactionEndTarget):

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

[watchOS] Add required syscall
https://bugs.webkit.org/show_bug.cgi?id=238117
<rdar://89964344>

Reviewed by Brent Fulgham.

Add rarely used syscall on watchOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
12:00 PM Changeset in webkit [291572] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

[media-controls] tap gesture recognizer sometimes fails to recognize on iOS
https://bugs.webkit.org/show_bug.cgi?id=238136

Reviewed by Dean Jackson.

While on macOS it's fine to register pointer events handlers on the window object,
on iOS it may not be depending on the fullscreen state. However, it's always fine to
use the gesture recognizer's target on iOS, so let's default to that when touches
are supported.

  • Modules/modern-media-controls/gesture-recognizers/gesture-recognizer.js:

(GestureRecognizer.prototype.touchesBegan):
(GestureRecognizer.prototype.get _captureTarget):
(GestureRecognizer.prototype._removeTrackingListeners):

11:58 AM Changeset in webkit [291571] by mmaxfield@apple.com
  • 11 edits in trunk/Source/WebGPU

[WebGPU] Implement error reporting facilities
https://bugs.webkit.org/show_bug.cgi?id=238131

Reviewed by Kimmo Kinnunen.

This patch implements the GPUDevice.pushErrorScope() and GPUDevice.popErrorScope() functions,
according to the spec.

Now that we can report errors, we should be just about able to pass our first CTS test.

  • CommandLinePlayground/main.swift:
  • WebGPU/Buffer.mm:

(WebGPU::Buffer::mapAsync):
(WebGPU::Buffer::unmap):

  • WebGPU/CommandEncoder.h:

(WebGPU::CommandEncoder::create):

  • WebGPU/CommandEncoder.mm:

(WebGPU::Device::createCommandEncoder):
(WebGPU::CommandEncoder::CommandEncoder):
(WebGPU::CommandEncoder::copyBufferToBuffer):
(WebGPU::CommandEncoder::clearBuffer):
(WebGPU::CommandEncoder::finish):

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

(WebGPU::Device::currentErrorScope):
(WebGPU::Device::generateAValidationError):
(WebGPU::Device::validatePopErrorScope const):
(WebGPU::Device::popErrorScope):
(WebGPU::Device::pushErrorScope):
(WebGPU::Device::setUncapturedErrorCallback):

  • WebGPU/Queue.h:
  • WebGPU/Queue.mm:

(WebGPU::Queue::submit):

  • WebGPU/Sampler.h:

(WebGPU::Sampler::create):

  • WebGPU/Sampler.mm:

(WebGPU::Device::createSampler):
(WebGPU::Sampler::Sampler):

11:48 AM Changeset in webkit [291570] by Tyler Wilcock
  • 9 edits
    9 adds in trunk

AX: Include display: contents elements in the AX tree
https://bugs.webkit.org/show_bug.cgi?id=237834

Reviewed by Chris Fleizach.

Source/WebCore:

Because display: contents intentionally prevents a render object from being
generated for the element it's applied to, we don't add it to the AX tree as
part of our normal render tree walk, making these elements inaccessible.

This patch includes these elements as part of the DOM walk that
addHiddenChildren (now renamed to addNodeOnlyChildren) already does.

Also, because display: contents moves the affected element's children up a
level in the render tree, this patch also special cases:

  1. AccessibilityRenderObject::parentObject and similar methods to return their display: contents parent instead of their render tree parent
  2. AccessibilityObject::insertChild to only insert display: contents children to their display: contents parent, rather than their render tree parent

Test: accessibility/display-contents-element-roles.html, accessibility/aria-hidden-display-contents-element.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::getOrCreate):
Allow creation of AX objects from display: contents Nodes.
Also, don't create an object for a renderer that is in the process of
being destroyed (prevents display-contents-element-roles.html from crashing in ITM)

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::displayContentsParent const):
(WebCore::AccessibilityObject::insertChild):
If an object has a display: contents parent, and that parent isn't
this, return early.

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::parentObjectIfExists const):
(WebCore::AccessibilityRenderObject::parentObject const):
(WebCore::AccessibilityRenderObject::parentObjectUnignored const):
If an object has a display: contents parent, return that instead of
its render tree parent.
(WebCore::AccessibilityRenderObject::addNodeOnlyChildren):
Renamed from addHiddenChildren.
(WebCore::AccessibilityRenderObject::addChildren):
Don't clear m_subtreeDirty until after all children have been added.
Necessary to make aria-hidden-display-contents-element.html pass, as
we were clearing this too early, causing display: contents subtrees to
not be updated after aria-hidden changes.
(WebCore::AccessibilityRenderObject::addHiddenChildren):
Renamed to addNodeOnlyChildren.

  • accessibility/AccessibilityRenderObject.h:

LayoutTests:

  • accessibility/aria-hidden-display-contents-element-expected.txt: Added.
  • accessibility/aria-hidden-display-contents-element.html: Added.
  • accessibility/display-contents-element-roles-expected.txt: Added.
  • accessibility/display-contents-element-roles.html: Added.
  • platform/glib/accessibility/aria-hidden-display-contents-element-expected.txt: Added.
  • platform/glib/accessibility/display-contents-element-roles-expected.txt: Added.
  • platform/ios/TestExpectations: Enable new tests.
  • platform/ios/accessibility/aria-hidden-display-contents-element-expected.txt: Added.
  • platform/ios/accessibility/display-contents-element-roles-expected.txt: Added.
  • platform/win/TestExpectations: Skip display-contents-element-roles.html.
  • platform/win/accessibility/aria-hidden-display-contents-element-expected.txt: Added.
11:01 AM Changeset in webkit [291569] by Russell Epstein
  • 2 edits in branches/safari-614.1.7-branch/Source/WebCore

Cherry-pick r291514. rdar://problem/90500863

[iOS] Fix more build breakage from r291361
https://bugs.webkit.org/show_bug.cgi?id=238097
<rdar://problem/90505371>

Unreviewed build fix.

  • platform/ios/WebAVPlayerController.mm: Declare AVAssetTrack.

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

11:00 AM Changeset in webkit [291568] by Oriol Brufau
  • 2 edits in trunk/Source/WebCore

[css-cascade] Don't defer applying text decoration properties
https://bugs.webkit.org/show_bug.cgi?id=238126

Reviewed by Darin Adler.

shouldApplyPropertyInParseOrder() was returning true for these:

  • webkit-text-decoration
  • text-decoration-line
  • text-decoration-style
  • text-decoration-color
  • text-decoration-skip
  • text-decoration-skip-ink
  • text-underline-position
  • text-underline-offset
  • text-decoration-thickness
  • text-decoration

This was previously needed for text-decoration-line and text-decoration,
since they were implemented as longhands that shared a computed value.
But that's no longer the case, text-decoration became a shorthand in bug
237175.

AFAIK -webkit-text-decoration has always been a shorthand since it was
implemented in bug 92000, so having it in the list it's pointless,
only longhands matter. And text-decoration-skip became a shorthand in
bug 230244, so it's also pointless.

The other longhands seem unnecessary too, since they don't share a
computed style with other properties.

No test since there should be no observable change in behavior.

  • style/PropertyCascade.cpp:

(WebCore::Style::shouldApplyPropertyInParseOrder):

10:58 AM Changeset in webkit [291567] by youenn@apple.com
  • 4 edits in trunk/Source

Remove unneeded quotes in capture attribution string
https://bugs.webkit.org/show_bug.cgi?id=238132
<rdar://88794701>

Reviewed by Eric Carlson.

Source/WebCore:

  • en.lproj/Localizable.strings:

Source/WebKit:

Quotes are unneeded and made it less clear to read.

  • GPUProcess/cocoa/GPUConnectionToWebProcessCocoa.mm:

(WebKit::GPUConnectionToWebProcess::setCaptureAttributionString):

10:53 AM Changeset in webkit [291566] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Accessing WebGL content crashes in macOS Recovery OS
https://bugs.webkit.org/show_bug.cgi?id=238139

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-03-21
Reviewed by Antti Koivisto.

Add a quick fix trying to circumvent a Recovery OS crash.
Parts of this will be reverted once the true source is found.

  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm:

(WebCore::platformSupportsMetal):

10:47 AM Changeset in webkit [291565] by Russell Epstein
  • 1 copy in branches/safari-614.1.7-branch

New branch.

10:44 AM Changeset in webkit [291564] by timothy_horton@apple.com
  • 8 edits
    2 adds in trunk/Source

Add an addition point for system background color
https://bugs.webkit.org/show_bug.cgi?id=238108
<rdar://problem/90463946>

Reviewed by Aditya Keerthi.

Source/WebCore:

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/ios/WebCoreUIColorExtras.h: Added.
  • platform/ios/WebCoreUIColorExtras.mm: Added.

(WebCore::systemBackgroundColor):
Add an addition point.

  • rendering/RenderThemeIOS.mm:

(WebCore::CSSValueSystemColorInformation::function):
(WebCore::cssValueSystemColorInformationList):
(WebCore::systemColorFromCSSValueSystemColorInformation):
Adopt it for CSS use of system background color.

Source/WebKit:

  • UIProcess/API/ios/WKWebViewIOS.mm:

(scrollViewBackgroundColor):
Adopt systemBackgroundColor().

  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::contentViewBackgroundColor):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::platformUnderPageBackgroundColor const):
Move the fallback to systemBackgroundColor into PageClientImpl
so that it can realize the web view's trait collection.

10:37 AM Changeset in webkit [291563] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Sandbox: Remove telemetry in Network Process sandbox macOS
https://bugs.webkit.org/show_bug.cgi?id=238041

Patch by Adam Mazander <mazander@apple.com> on 2022-03-21
Reviewed by Brent Fulgham.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
10:20 AM Changeset in webkit [291562] by commit-queue@webkit.org
  • 18 edits in trunk/Source

Dust off Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=238121

Patch by Alex Christensen <achristensen@webkit.org> on 2022-03-21
Reviewed by Yusuke Suzuki.

Source/bmalloc:

  • PlatformMac.cmake:

Source/ThirdParty/ANGLE:

  • GLESv2.cmake:
  • Metal.cmake:

Source/ThirdParty/libwebrtc:

  • CMakeLists.txt:
  • Source/third_party/libwebm/common/vp9_level_stats.h:

Source/WebCore:

  • CMakeLists.txt:
  • PlatformMac.cmake:
  • SourcesCocoa.txt:

Source/WebCore/PAL:

  • pal/PlatformMac.cmake:

Source/WebKit:

  • PlatformMac.cmake:

Source/WebKitLegacy:

  • PlatformMac.cmake:
10:15 AM Changeset in webkit [291561] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Null check style in Editor::applyParagraphStyle
https://bugs.webkit.org/show_bug.cgi?id=238137

Patch by Rob Buis <rbuis@igalia.com> on 2022-03-21
Reviewed by Wenson Hsieh.

Null check style in Editor::applyParagraphStyle.

  • editing/Editor.cpp:

(WebCore::Editor::applyParagraphStyle):

9:57 AM Changeset in webkit [291560] by Jonathan Bedard
  • 2 edits in trunk/Tools

[Merge-Queue] Support multiple reviewers names
https://bugs.webkit.org/show_bug.cgi?id=238095
<rdar://problem/90503503>

Reviewed by Aakash Jain.

  • Tools/CISupport/ews-build/steps.py:

(ApplyPatch.start): Only apply the first reviewer name.
(ValidateCommiterAndReviewer.start): Support a list of reviewers.

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

9:29 AM Changeset in webkit [291559] by Jonathan Bedard
  • 9 edits
    3 deletes in trunk/Source

Unreviewed, reverting r291558.

Exceeded GitHub file size limit

Reverted changeset:

"Enable PGO when building for release and production"
https://bugs.webkit.org/show_bug.cgi?id=238119
https://commits.webkit.org/r291558

8:25 AM Changeset in webkit [291558] by Wenson Hsieh
  • 9 edits
    6 adds in trunk/Source

Enable PGO when building for release and production
https://bugs.webkit.org/show_bug.cgi?id=238119
rdar://90182309

Reviewed by Saam Barati.

Source/JavaScriptCore:

See WebCore/ChangeLog for more details.

  • Configurations/Base.xcconfig:
  • Configurations/JavaScriptCore.xcconfig:
  • Profiling/JavaScriptCore.profdata: Added.

Source/WebCore:

Add LLVM profiles to the WebCore, JavaScriptCore and WebKit frameworks, collected by running certain benchmarks
on ARM macOS. We then use this data for release and production builds by specifying a -fprofile-instr-use in
OTHER_CPLUSPLUSFLAGS. Across various configurations of macOS and iOS, this is an ~8% speedup on Speedometer.


| subtest | ms | ms | b / a | pValue |


| Elm-TodoMVC |101.721667 |99.571667 |0.978864 | 0.000211 (significant) |
| VueJS-TodoMVC |18.643333 |17.196667 |0.922403 | 0.000000 (significant) |
| EmberJS-TodoMVC |108.763333 |103.306667 |0.949830 | 0.000000 (significant) |
| BackboneJS-TodoMVC |37.951667 |34.693333 |0.914145 | 0.000000 (significant) |
| Preact-TodoMVC |13.586667 |12.818333 |0.943449 | 0.053277 |
| AngularJS-TodoMVC |117.130000 |110.755000 |0.945573 | 0.000000 (significant) |
| Vanilla-ES2015-TodoMVC |58.950000 |52.716667 |0.894261 | 0.000000 (significant) |
| Inferno-TodoMVC |52.660000 |49.571667 |0.941353 | 0.000000 (significant) |
| Flight-TodoMVC |51.551667 |46.230000 |0.896770 | 0.000000 (significant) |
| Angular2-TypeScript-TodoMVC |35.753333 |33.698333 |0.942523 | 0.000000 (significant) |
| VanillaJS-TodoMVC |48.400000 |42.670000 |0.881612 | 0.000000 (significant) |
| jQuery-TodoMVC |218.346667 |200.051667 |0.916211 | 0.000000 (significant) |
| EmberJS-Debug-TodoMVC |304.171667 |291.903333 |0.959666 | 0.000000 (significant) |
| React-TodoMVC |75.475000 |72.761667 |0.964050 | 0.000008 (significant) |
| React-Redux-TodoMVC |126.448333 |120.458333 |0.952629 | 0.000000 (significant) |
| Vanilla-ES2015-Babel-Webpack-TodoMVC |55.643333 |49.665000 |0.892560 | 0.000000 (significant) |


a mean = 306.08529
b mean = 330.01548
pValue = 0.0000000000
(Bigger means are better.)
1.078 times better
Results ARE significant

  • Configurations/Base.xcconfig:

For now, we additionally ignore errors that arise if profiled symbols differ from built symbols; in the future,
we'll need to implement some kind of strategy to detect when enough symbols in the profile data no longer match
symbols that appear in the built binaries, such that it might begin to negate the performance benefit from PGO.

Note that while the profile data was collected on an ARM Mac, performance tests have shown the profile data to
largely generalize well to other architectures and platforms as well (i.e. macOS x86_64 and iOS arm64e). As
such, instead of limiting this profile to ARM macOS, we can just use it everywhere (and perhaps, add platform-
or architecture-specific profile data later, if needed).

  • Configurations/WebCore.xcconfig:
  • Profiling/WebCore.profdata: Added.

Source/WebKit:

See WebCore/ChangeLog for more details.

  • Configurations/Base.xcconfig:
  • Configurations/WebKit.xcconfig:
  • Profiling/WebKit.profdata: Added.
6:17 AM Changeset in webkit [291557] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.36.0

WebKitGTK 2.36.0

6:16 AM Changeset in webkit [291556] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.36

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.36.0 release

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.36.0.
2:27 AM Changeset in webkit [291555] by Ziran Sun
  • 7 edits in trunk

[selection] HTMLTextFormControlElement::subtreeHasChanged() shouldn't be called in setRangeText
https://bugs.webkit.org/show_bug.cgi?id=237720

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update test expectations as more sub-tests are now passing.

  • web-platform-tests/html/semantics/forms/textfieldselection/selection-value-interactions-expected.txt:
  • web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText-expected.txt:

Source/WebCore:

We shouldn't call HTMLTextFormControlElement::subtreeHasChanged() in HTMLTextFormControlElement::setRangeText.
It has been removed in patch for bug 237641. This patch is to further remove unnecessary code.

This change refers and imports some of the changes in chromium CL at
https://codereview.chromium.org/1577243002

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setRangeText):

LayoutTests:

Update test expectation as the test is now passing.

  • fast/forms/setrangetext-expected.txt:
1:45 AM Changeset in webkit [291554] by Carlos Garcia Campos
  • 5 edits
    2 adds in releases/WebKitGTK/webkit-2.36

Merge r291552 - REGRESSION(r286955): Rendering Links during search: highlighting fails
https://bugs.webkit.org/show_bug.cgi?id=237816

Reviewed by Simon Fraser.

Source/WebCore:

Since r286955 the same coalesced marked text loop is used for painting the foreground text in case of text with
decorations. StyledMarkedText::coalesceAdjacentWithEqualDecorations() doesn't take into account the text style,
so when selected foreground color is different we end up painting the whole decorated text with the same
foreground color for the selected and non-selected parts.

Test: fast/text/selection-with-text-decorations.html

  • rendering/StyledMarkedText.cpp:

(WebCore::StyledMarkedText::coalesceAdjacentWithEqualDecorations): Take into account the text styles too.

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::paintForegroundAndDecorations): Do not call
StyledMarkedText::coalesceAdjacentWithEqualForeground() in case of text with decorations, since it's unused.

LayoutTests:

  • fast/text/selection-with-text-decorations-expected.html: Added.
  • fast/text/selection-with-text-decorations.html: Added.
  • platform/ios/TestExpectations:
1:45 AM Changeset in webkit [291553] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.36/Source/WebCore

Merge r291544 - REGRESSION(r289154) [GSTREAMER] webrtc/vp8-then-h264.html is crashing after SDK update to fdo 21.08 and Gstreamer 1.20
https://bugs.webkit.org/show_bug.cgi?id=237872

Patch by Philippe Normand <pnormand@igalia.com> on 2022-03-20
Reviewed by Adrian Perez de Castro.

  • platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp:

(WebCore::VP8Decoder::Create): Fix typo in decoder factory test.

1:40 AM WebKitGTK/2.36.x edited by Carlos Garcia Campos
(diff)
1:35 AM Changeset in webkit [291552] by Carlos Garcia Campos
  • 5 edits
    2 adds in trunk

REGRESSION(r286955): Rendering Links during search: highlighting fails
https://bugs.webkit.org/show_bug.cgi?id=237816

Reviewed by Simon Fraser.

Source/WebCore:

Since r286955 the same coalesced marked text loop is used for painting the foreground text in case of text with
decorations. StyledMarkedText::coalesceAdjacentWithEqualDecorations() doesn't take into account the text style,
so when selected foreground color is different we end up painting the whole decorated text with the same
foreground color for the selected and non-selected parts.

Test: fast/text/selection-with-text-decorations.html

  • rendering/StyledMarkedText.cpp:

(WebCore::StyledMarkedText::coalesceAdjacentWithEqualDecorations): Take into account the text styles too.

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::paintForegroundAndDecorations): Do not call
StyledMarkedText::coalesceAdjacentWithEqualForeground() in case of text with decorations, since it's unused.

LayoutTests:

  • fast/text/selection-with-text-decorations-expected.html: Added.
  • fast/text/selection-with-text-decorations.html: Added.
  • platform/ios/TestExpectations:
12:41 AM Changeset in webkit [291551] by Diego Pino Garcia
  • 2 edits in trunk/Tools

Unreviewed, fix Debian Stable build after r291543

  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:

(elementSize): Replace RELEASE_ASSERT_NOT_REACHED() for RELEASE_ASSERT_NOT_REACHED_UNDER_CONSTEXPR_CONTEXT().

12:14 AM Changeset in webkit [291550] by youenn@apple.com
  • 19 edits in trunk/Source

Remove use of MediaSampleAVFObjC from WebRTC pipelines
https://bugs.webkit.org/show_bug.cgi?id=237706
<rdar://problem/90425391>

Reviewed by Eric Carlson.

Source/WebCore:

Replace MediaSampleAVFObjC by VideoFrameCV when handling CVPixelBuffers.

Covered by existing tests.

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
  • platform/graphics/cv/ImageRotationSessionVT.mm:
  • platform/graphics/cv/ImageTransferSessionVT.h:
  • platform/graphics/cv/ImageTransferSessionVT.mm:
  • platform/graphics/cv/VideoFrameCV.h:
  • platform/graphics/cv/VideoFrameCV.mm:
  • platform/mediastream/RealtimeVideoSource.cpp:
  • platform/mediastream/RealtimeVideoSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:
  • platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:

Source/WebKit:

  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

Mar 20, 2022:

7:11 PM Changeset in webkit [291549] by Diego Pino Garcia
  • 3 edits in trunk/Source/WebCore

[WPE] Unreviewed, fix non-unified build after r291474 and r291508

  • css/CSSToLengthConversionData.h:
  • html/parser/AtomHTMLToken.h:
5:59 PM Changeset in webkit [291548] by Alan Bujtas
  • 31 edits
    3 moves in trunk/Source/WebCore

[IFC][Integration] Rename InlineIterator::Line to LineBox
https://bugs.webkit.org/show_bug.cgi?id=238128

Reviewed by Antti Koivisto.

  • dom/Position.cpp:

(WebCore::Position::upstream const):
(WebCore::Position::downstream const):
(WebCore::Position::rendersInDifferentPosition const):

  • editing/RenderedPosition.h:

(WebCore::RenderedPosition::lineBox const):
(WebCore::RenderedPosition::line const): Deleted.

  • editing/VisiblePosition.cpp:

(WebCore::VisiblePosition::leftVisuallyDistinctCandidate const):
(WebCore::VisiblePosition::rightVisuallyDistinctCandidate const):
(WebCore::VisiblePosition::absoluteSelectionBoundsForLine const):

  • editing/VisibleUnits.cpp:

(WebCore::startTextOrLineBreakBox):
(WebCore::endTextOrLineBreakBox):
(WebCore::logicallyPreviousBox):
(WebCore::logicallyNextBox):
(WebCore::startPositionForLine):
(WebCore::endPositionForLine):
(WebCore::absoluteLineDirectionPointToLocalPointInBlock):
(WebCore::previousLinePosition):
(WebCore::nextLinePosition):

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks const):

  • layout/integration/InlineIteratorBox.cpp:

(WebCore::InlineIterator::Box::lineBox const):
(WebCore::InlineIterator::Box::style const):
(WebCore::InlineIterator::Box::line const): Deleted.

  • layout/integration/InlineIteratorBox.h:
  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::LineBoxIterator::LineBoxIterator):
(WebCore::InlineIterator::LineBoxIterator::atEnd const):
(WebCore::InlineIterator::LineBoxIterator::traverseNext):
(WebCore::InlineIterator::LineBoxIterator::traversePrevious):
(WebCore::InlineIterator::LineBoxIterator::operator== const):
(WebCore::InlineIterator::firstLineBoxFor):
(WebCore::InlineIterator::lastLineBoxFor):
(WebCore::InlineIterator::LineBox::next const):
(WebCore::InlineIterator::LineBox::previous const):
(WebCore::InlineIterator::LineBox::firstLeafBox const):
(WebCore::InlineIterator::LineBox::lastLeafBox const):
(WebCore::InlineIterator::closestBoxForHorizontalPosition):
(WebCore::InlineIterator::LineIterator::LineIterator): Deleted.
(WebCore::InlineIterator::LineIterator::atEnd const): Deleted.
(WebCore::InlineIterator::LineIterator::traverseNext): Deleted.
(WebCore::InlineIterator::LineIterator::traversePrevious): Deleted.
(WebCore::InlineIterator::LineIterator::operator== const): Deleted.
(WebCore::InlineIterator::firstLineFor): Deleted.
(WebCore::InlineIterator::lastLineFor): Deleted.
(WebCore::InlineIterator::Line::next const): Deleted.
(WebCore::InlineIterator::Line::previous const): Deleted.
(WebCore::InlineIterator::Line::firstLeafBox const): Deleted.
(WebCore::InlineIterator::Line::lastLeafBox const): Deleted.

  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::LineBox::height const):
(WebCore::InlineIterator::LineBoxIterator::LineBoxIterator):
(WebCore::InlineIterator::LineBoxIterator::operator++):
(WebCore::InlineIterator::LineBoxIterator::operator!= const):
(WebCore::InlineIterator::LineBoxIterator::operator== const):
(WebCore::InlineIterator::LineBoxIterator::operator* const):
(WebCore::InlineIterator::LineBoxIterator::operator-> const):
(WebCore::InlineIterator::previousLineBoxContentBottomOrBorderAndPadding):
(WebCore::InlineIterator::contentStartInBlockDirection):
(WebCore::InlineIterator::LineBox::LineBox):
(WebCore::InlineIterator::LineBox::contentLogicalTop const):
(WebCore::InlineIterator::LineBox::contentLogicalBottom const):
(WebCore::InlineIterator::LineBox::contentLogicalTopAdjustedForPrecedingLineBox const):
(WebCore::InlineIterator::LineBox::contentLogicalBottomAdjustedForFollowingLineBox const):
(WebCore::InlineIterator::LineBox::top const):
(WebCore::InlineIterator::LineBox::bottom const):
(WebCore::InlineIterator::LineBox::contentLogicalLeft const):
(WebCore::InlineIterator::LineBox::contentLogicalRight const):
(WebCore::InlineIterator::LineBox::contentLogicalWidth const):
(WebCore::InlineIterator::LineBox::isHorizontal const):
(WebCore::InlineIterator::LineBox::baselineType const):
(WebCore::InlineIterator::LineBox::containingBlock const):
(WebCore::InlineIterator::LineBox::containingFragment const):
(WebCore::InlineIterator::LineBox::isFirstAfterPageBreak const):
(WebCore::InlineIterator::LineBox::isFirst const):
(WebCore::InlineIterator::Line::lineBoxHeight const): Deleted.
(WebCore::InlineIterator::LineIterator::LineIterator): Deleted.
(WebCore::InlineIterator::LineIterator::operator++): Deleted.
(WebCore::InlineIterator::LineIterator::operator bool const): Deleted.
(WebCore::InlineIterator::LineIterator::operator!= const): Deleted.
(WebCore::InlineIterator::LineIterator::operator== const): Deleted.
(WebCore::InlineIterator::LineIterator::operator* const): Deleted.
(WebCore::InlineIterator::LineIterator::operator-> const): Deleted.
(WebCore::InlineIterator::previousLineContentBottomOrBorderAndPadding): Deleted.
(WebCore::InlineIterator::Line::Line): Deleted.
(WebCore::InlineIterator::Line::contentLogicalTop const): Deleted.
(WebCore::InlineIterator::Line::contentLogicalBottom const): Deleted.
(WebCore::InlineIterator::Line::contentLogicalTopAdjustedForPrecedingLine const): Deleted.
(WebCore::InlineIterator::Line::contentLogicalBottomAdjustedForFollowingLine const): Deleted.
(WebCore::InlineIterator::Line::lineBoxTop const): Deleted.
(WebCore::InlineIterator::Line::lineBoxBottom const): Deleted.
(WebCore::InlineIterator::Line::contentLogicalLeft const): Deleted.
(WebCore::InlineIterator::Line::contentLogicalRight const): Deleted.
(WebCore::InlineIterator::Line::contentLogicalWidth const): Deleted.
(WebCore::InlineIterator::Line::isHorizontal const): Deleted.
(WebCore::InlineIterator::Line::baselineType const): Deleted.
(WebCore::InlineIterator::Line::containingBlock const): Deleted.
(WebCore::InlineIterator::Line::containingFragment const): Deleted.
(WebCore::InlineIterator::Line::isFirstAfterPageBreak const): Deleted.
(WebCore::InlineIterator::Line::isFirst const): Deleted.

  • layout/integration/InlineIteratorLineLegacyPath.h:

(WebCore::InlineIterator::LineBoxIteratorLegacyPath::LineBoxIteratorLegacyPath):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::contentLogicalTopAdjustedForPrecedingLineBox const):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::contentLogicalBottomAdjustedForFollowingLineBox const):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::top const):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::bottom const):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::operator== const):
(WebCore::InlineIterator::LineIteratorLegacyPath::LineIteratorLegacyPath): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTop const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalBottom const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTopAdjustedForPrecedingLine const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalBottomAdjustedForFollowingLine const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::lineBoxTop const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::lineBoxBottom const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalLeft const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalRight const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::isHorizontal const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::baselineType const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::containingBlock const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::containingFragment const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::isFirstAfterPageBreak const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::traverseNext): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::traversePrevious): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::operator== const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::atEnd const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::firstLeafBox const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::lastLeafBox const): Deleted.

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineBoxIteratorModernPath::LineBoxIteratorModernPath):
(WebCore::InlineIterator::LineBoxIteratorModernPath::top const):
(WebCore::InlineIterator::LineBoxIteratorModernPath::bottom const):
(WebCore::InlineIterator::LineBoxIteratorModernPath::contentLogicalTopAdjustedForPrecedingLineBox const):
(WebCore::InlineIterator::LineBoxIteratorModernPath::contentLogicalBottomAdjustedForFollowingLineBox const):
(WebCore::InlineIterator::LineBoxIteratorModernPath::operator== const):
(WebCore::InlineIterator::LineIteratorModernPath::LineIteratorModernPath): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTop const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalBottom const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::lineBoxTop const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::lineBoxBottom const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopAdjustedForPrecedingLine const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalBottomAdjustedForFollowingLine const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalLeft const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalRight const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::isHorizontal const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::baselineType const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::containingBlock const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::containingFragment const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::isFirstAfterPageBreak const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::traverseNext): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::traversePrevious): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::operator== const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::atEnd const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::firstLeafBox const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::lastLeafBox const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::setAtEnd): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::lines const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::line const): Deleted.

  • layout/integration/InlineIteratorLogicalOrderTraversal.cpp:

(WebCore::InlineIterator::makeLineLogicalOrderCache):
(WebCore::InlineIterator::updateLineLogicalOrderCacheIfNeeded):
(WebCore::InlineIterator::firstLeafOnLineInLogicalOrder):
(WebCore::InlineIterator::lastLeafOnLineInLogicalOrder):
(WebCore::InlineIterator::firstLeafOnLineInLogicalOrderWithNode):
(WebCore::InlineIterator::lastLeafOnLineInLogicalOrderWithNode):

  • layout/integration/InlineIteratorLogicalOrderTraversal.h:

(WebCore::InlineIterator::leafBoxesInLogicalOrder):

  • layout/integration/InlineIteratorTextBox.cpp:

(WebCore::InlineIterator::TextBox::selectionRect const):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::firstLineBox const):
(WebCore::LayoutIntegration::LineLayout::lastLineBox const):
(WebCore::LayoutIntegration::LineLayout::firstLine const): Deleted.
(WebCore::LayoutIntegration::LineLayout::lastLine const): Deleted.

  • layout/integration/LayoutIntegrationLineLayout.h:
  • layout/integration/LineSelection.h:

(WebCore::LineSelection::logicalTop):
(WebCore::LineSelection::logicalBottom):
(WebCore::LineSelection::logicalRect):
(WebCore::LineSelection::physicalRect):
(WebCore::LineSelection::logicalTopAdjustedForPrecedingBlock):
(WebCore::LineSelection::selectionState):

  • rendering/CaretRectComputation.cpp:

(WebCore::computeCaretRectForLinePosition):
(WebCore::computeCaretRectForText):
(WebCore::computeCaretRectForLineBreak):
(WebCore::computeCaretRectForBox):

  • rendering/InlineBoxPainter.cpp:

(WebCore::InlineBoxPainter::InlineBoxPainter):
(WebCore::InlineBoxPainter::paintMask):
(WebCore::InlineBoxPainter::paintDecorations):
(WebCore::InlineBoxPainter::style const):

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

(WebCore::RenderBlockFlow::adjustEnclosingTopForPrecedingBlock const):
(WebCore::RenderBlockFlow::inlineSelectionGaps):
(WebCore::RenderBlockFlow::containsNonZeroBidiLevel const):
(WebCore::RenderBlockFlow::findClosestTextAtAbsolutePoint):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
(WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::getLeadingCorner const):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::paintOutline):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::positionForPoint):

  • rendering/RenderText.cpp:

(WebCore::RenderText::positionForPoint):

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::TextBoxPainter):
(WebCore::TextBoxPainter::paintBackground):
(WebCore::textPosition):
(WebCore::TextBoxPainter::computePaintRect):

  • rendering/svg/SVGRootInlineBox.cpp:

(WebCore::SVGRootInlineBox::reorderValueListsToLogicalOrder):

  • style/InlineTextBoxStyle.cpp:

(WebCore::minLogicalTopForTextDecorationLine):
(WebCore::maxLogicalBottomForTextDecorationLine):
(WebCore::computeUnderlineOffset):

9:48 AM Changeset in webkit [291547] by commit-queue@webkit.org
  • 9 edits
    4 adds
    1 delete in trunk/Tools/buildstream

[Flatpak SDK] Bump to meson 0.60
https://bugs.webkit.org/show_bug.cgi?id=238112

Patch by Philippe Normand <pnormand@igalia.com> on 2022-03-20
Reviewed by Adrian Perez de Castro.

  • elements/freedesktop-sdk.bst: Update junction and include patches for Meson update and

follow-up recipe updates.

  • elements/sdk-platform.bst: Remove shared-mime-info, the same version is shipped by the upstream SDK already.
  • elements/sdk/glib.bst: Remove invalid meson options
  • elements/sdk/gst-plugins-bad.bst: Ditto.
  • elements/sdk/gst-plugins-base.bst: Ditto.
  • elements/sdk/gstreamer.bst: Ditto.
  • elements/sdk/gtk+-3.bst: Ditto.
  • elements/sdk/gtk.bst: Ditto.
  • elements/sdk/shared-mime-info.bst: Removed.
  • patches/fdo-0001-gdk-pixbuf-Remove-invalid-meson-options.patch: Added.
  • patches/fdo-0001-gst-plugins-bad-Remove-invalid-meson-option.patch: Added.
  • patches/fdo-0001-meson-Bump-to-0.60.3.patch: Added.
  • patches/fdo-0001-shared-mime-info-Backport-meson-0.60-build-fix.patch: Added.
9:37 AM Changeset in webkit [291546] by Oriol Brufau
  • 9 edits
    2 adds in trunk

Fix CSS cascade regarding logical properties
https://bugs.webkit.org/show_bug.cgi?id=236199

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Expect animation-004.html to pass.
Add new test logicalprops-with-deferred-writing-mode.html

  • web-platform-tests/css/css-logical/animation-004-expected.txt:
  • web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode-expected.txt: Added.
  • web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode.html: Added.

Source/WebCore:

The CSS cascade was trying to resolve logical properties into physical
ones too early. This failed if we still didn't know the direction or
writing-mode, e.g. because they were set to a variable or to a CSS-wide
keyword.

This patch keeps logical properties as-is during the cascade. They are
only resolved when finally applied. Also, both logical properties and
their physical equivalents are now set to apply in parse order, since
'height: 0px; block-size: 1px' and 'block-size: 1px; height: 0px' can be
different, the order matters.

Tests: imported/w3c/web-platform-tests/css/css-logical/animation-004.html

imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

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

(WebCore::CSSParser::parseValueWithVariableReferences):

  • style/PropertyCascade.cpp:

(WebCore::Style::shouldApplyPropertyInParseOrder):
(WebCore::Style::PropertyCascade::PropertyCascade):
(WebCore::Style::PropertyCascade::set):
(WebCore::Style::PropertyCascade::setDeferred):
(WebCore::Style::PropertyCascade::resolveDirectionAndWritingMode const): Deleted.
(WebCore::Style::PropertyCascade::direction const): Deleted.

  • style/PropertyCascade.h:

(WebCore::Style::PropertyCascade::areDeferredInOrder const):

  • style/StyleBuilder.cpp:

(WebCore::Style::Builder::Builder):
(WebCore::Style::Builder::applyProperty):
(WebCore::Style::directionFromStyle): Deleted.

8:52 AM WebKitGTK/2.36.x edited by Michael Catanzaro
(diff)
8:04 AM Changeset in webkit [291545] by Alan Bujtas
  • 9 edits in trunk/Source/WebCore

[IFC][Integration] Remove redundant InlineIterator::Line::contentLogicalTopAdjustedForHitTesting
https://bugs.webkit.org/show_bug.cgi?id=238107

Reviewed by Antti Koivisto.

It looks like contentLogicalTopAdjustedForHitTesting is just the combination of

  • containingBlock's border and padding before
  • LineSelection::logicalTop (which is either the line's content top or the previous line's content bottom)
  • line's content top
  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::contentStartInBlockDirection):
(WebCore::InlineIterator::Line::contentLogicalTopAdjustedForHitTesting const): Deleted.

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopAdjustedForHitTesting const): Deleted.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::positionForPoint): This seems to be missing the contentLogicalTop check.

  • rendering/RenderText.cpp:

(WebCore::RenderText::positionForPoint):

7:18 AM Changeset in webkit [291544] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

REGRESSION(r289154) [GSTREAMER] webrtc/vp8-then-h264.html is crashing after SDK update to fdo 21.08 and Gstreamer 1.20
https://bugs.webkit.org/show_bug.cgi?id=237872

Patch by Philippe Normand <pnormand@igalia.com> on 2022-03-20
Reviewed by Adrian Perez de Castro.

  • platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp:

(WebCore::VP8Decoder::Create): Fix typo in decoder factory test.

6:37 AM Changeset in webkit [291543] by Adrian Perez de Castro
  • 2 edits in trunk/Tools

Fix clang warning after r291229

Unreviewed build fix.

  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:

(elementSize): Move RELEASE_ASSERT_NOT_REACHED() out of the switch to make clang happy.

4:46 AM Changeset in webkit [291542] by Adrian Perez de Castro
  • 2 edits
    3 adds in trunk/Tools/buildstream

[Flatpak SDK] Include gi-docgen and its dependencies
https://bugs.webkit.org/show_bug.cgi?id=237681

Reviewed by Philippe Normand.

Import a build element for gi-docgen, which reuses most of the dependencies from the
Freedesktop SDK, except for the python-typogrify element, which is not available there
and this also adds an element for.

  • elements/sdk-platform.bst:
  • elements/sdk/gi-docgen.bst: Added.
  • elements/sdk/python3-smartypants.bst: Added.
  • elements/sdk/python3-typogrify.bst: Added.
4:40 AM Changeset in webkit [291541] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[WPE][GStreamer] media playback broken
https://bugs.webkit.org/show_bug.cgi?id=238110

Patch by Zan Dobersek <zdobersek@igalia.com> on 2022-03-20
Reviewed by Philippe Normand.

  • platform/graphics/gbm/GBMBufferSwapchain.cpp:

(WebCore::GBMBufferSwapchain::GBMBufferSwapchain):
Fix the assert that's hit when using eight-buffers capacity value. Just
a matter of using the more proper <= operator.

Mar 19, 2022:

9:11 PM Changeset in webkit [291540] by Chris Dumez
  • 4 edits in trunk

Vector move constructor and move assignment operator are suboptimal when the vector has an inline buffer
https://bugs.webkit.org/show_bug.cgi?id=238096

Reviewed by Darin Adler.

Source/WTF:

The move constructor (and move assignment operators) for Vector were implemented using Vector::swap(), which
is fine for vectors with out of line buffers because we're just swapping pointers. However, when the vector
has inline capacity, this is suboptimal because it is not cheap to move data from one inline buffer to another
and moving any data to the source buffer is unnecessary.

  • wtf/Vector.h:

(WTF::VectorBuffer::VectorBuffer):
(WTF::VectorBuffer::adopt):
(WTF::Malloc>::Vector):
(WTF::=):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WTF/Vector.cpp:

(TestWebKitAPI::TEST):

8:46 PM Changeset in webkit [291539] by Tyler Wilcock
  • 1 edit
    1 move in trunk/LayoutTests

Rebaseline accessibility/roles-exposed.html for Mac WK1 after https://commits.webkit.org/r291401
https://bugs.webkit.org/show_bug.cgi?id=238099

Reviewed by Chris Fleizach.

  • platform/mac-wk1/accessibility/roles-exposed-expected.txt:
8:29 PM Changeset in webkit [291538] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Optimize EventTarget::visitJSEventListeners()
https://bugs.webkit.org/show_bug.cgi?id=238116

Reviewed by Darin Adler.

This was confirmed by A/B bots to be a 1-1.5% progression on Speedometer on
iMac 20,1 (Intel).

  • dom/EventListenerMap.cpp:

(WebCore::EventListenerMap::clear):
(WebCore::EventListenerMap::replace):
(WebCore::EventListenerMap::add):
(WebCore::EventListenerMap::remove):
(WebCore::EventListenerMap::removeFirstEventListenerCreatedFromMarkup):
(WebCore::EventListenerMap::assertNoActiveIterators const): Deleted.
(WebCore::EventListenerMap::EventListenerMap): Deleted.
(WebCore::EventListenerIterator::EventListenerIterator): Deleted.
(WebCore::EventListenerIterator::~EventListenerIterator): Deleted.
(WebCore::EventListenerIterator::nextListener): Deleted.

  • dom/EventListenerMap.h:

(WebCore::EventListenerMap::visitJSEventListeners):
(): Deleted.
(WebCore::EventListenerMap::assertNoActiveIterators const): Deleted.

  • dom/EventTarget.cpp:

(WebCore::EventTarget::visitJSEventListeners): Deleted.

  • dom/EventTarget.h:

(WebCore::EventTarget::visitJSEventListeners):

8:18 PM Changeset in webkit [291537] by Oriol Brufau
  • 8 edits in trunk

[cssom] Implement border-image serialization
https://bugs.webkit.org/show_bug.cgi?id=238102

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Let the test accept some equivalent serializations.
Expect it to pass.

  • web-platform-tests/css/css-backgrounds/parsing/border-image-valid-expected.txt:
  • web-platform-tests/css/css-backgrounds/parsing/border-image-valid.html:

Source/WebCore:

Add logic for serializing border-image at specified-value time.

Tests: fast/css/parse-border-image-repeat-null-crash.html

imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-image-valid.html

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue const):
(WebCore::StyleProperties::borderImagePropertyValue const):
(WebCore::StyleProperties::asText const):

  • css/StyleProperties.h:

LayoutTests:

Expect cssText to serialize border-image instead of longhands.

  • fast/css/parse-border-image-repeat-null-crash-expected.txt:
7:18 PM Changeset in webkit [291536] by Oriol Brufau
  • 9 edits
    2 adds in trunk

Fix hasExplicitlySetBorderRadius flag
https://bugs.webkit.org/show_bug.cgi?id=238062

Reviewed by Darin Adler.

Source/WebCore:

The four border-*-radius longhands were sharing the same flag, so the
behavior was broken when setting longhands individually.

This patch splits the flag into 4 different ones, one for each longhand.
Also makes sure to set it properly when a longhand is set to 'initial'.

It's ugly to have all this boilerplate code for the flags, but
https://webkit.org/b/212506 will make it automatically generated.

Test: fast/css/appearance-apple-pay-button-border-radius-longhands.html

  • css/CSSProperties.json:
  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::RenderStyle):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::hasExplicitlySetBorderBottomLeftRadius const):
(WebCore::RenderStyle::hasExplicitlySetBorderBottomRightRadius const):
(WebCore::RenderStyle::hasExplicitlySetBorderTopLeftRadius const):
(WebCore::RenderStyle::hasExplicitlySetBorderTopRightRadius const):
(WebCore::RenderStyle::hasExplicitlySetBorderRadius const):
(WebCore::RenderStyle::setHasExplicitlySetBorderBottomLeftRadius):
(WebCore::RenderStyle::setHasExplicitlySetBorderBottomRightRadius):
(WebCore::RenderStyle::setHasExplicitlySetBorderTopLeftRadius):
(WebCore::RenderStyle::setHasExplicitlySetBorderTopRightRadius):
(WebCore::RenderStyle::NonInheritedFlags::operator== const):
(WebCore::RenderStyle::NonInheritedFlags::copyNonInheritedFrom):
(WebCore::RenderStyle::setHasExplicitlySetBorderRadius): Deleted.

  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyInitialBorderBottomLeftRadius):
(WebCore::Style::BuilderCustom::applyInheritBorderBottomLeftRadius):
(WebCore::Style::BuilderCustom::applyValueBorderBottomLeftRadius):
(WebCore::Style::BuilderCustom::applyInitialBorderBottomRightRadius):
(WebCore::Style::BuilderCustom::applyInheritBorderBottomRightRadius):
(WebCore::Style::BuilderCustom::applyValueBorderBottomRightRadius):
(WebCore::Style::BuilderCustom::applyInitialBorderTopLeftRadius):
(WebCore::Style::BuilderCustom::applyInheritBorderTopLeftRadius):
(WebCore::Style::BuilderCustom::applyValueBorderTopLeftRadius):
(WebCore::Style::BuilderCustom::applyInitialBorderTopRightRadius):
(WebCore::Style::BuilderCustom::applyInheritBorderTopRightRadius):
(WebCore::Style::BuilderCustom::applyValueBorderTopRightRadius):

LayoutTests:

Add test, skip it except in iOS and Mac.

  • TestExpectations:
  • fast/css/appearance-apple-pay-button-border-radius-longhands-expected.html: Added.
  • fast/css/appearance-apple-pay-button-border-radius-longhands.html: Added.
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
5:45 PM Changeset in webkit [291535] by Alan Bujtas
  • 10 edits in trunk/Source/WebCore

[IFC][Integration] InlineIterator::Line functions should all return float values
https://bugs.webkit.org/show_bug.cgi?id=238106

Reviewed by Antti Koivisto.

Display structures are supposed to be all float based.

  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::Line::lineBoxHeight const):
(WebCore::InlineIterator::contentStartInBlockDirection):
(WebCore::InlineIterator::Line::contentLogicalTop const):
(WebCore::InlineIterator::Line::contentLogicalBottom const):
(WebCore::InlineIterator::Line::contentLogicalTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::Line::contentLogicalTopAdjustedForHitTesting const):
(WebCore::InlineIterator::Line::contentLogicalBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::Line::lineBoxTop const):
(WebCore::InlineIterator::Line::lineBoxBottom const):

  • layout/integration/InlineIteratorLineLegacyPath.h:

(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTop const):
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalBottom const):
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTopAdjustedForHitTesting const):
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::LineIteratorLegacyPath::lineBoxTop const):
(WebCore::InlineIterator::LineIteratorLegacyPath::lineBoxBottom const):

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTop const):
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalBottom const):
(WebCore::InlineIterator::LineIteratorModernPath::lineBoxTop const):
(WebCore::InlineIterator::LineIteratorModernPath::lineBoxBottom const):
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopAdjustedForHitTesting const):
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalBottomAdjustedForFollowingLine const):

  • layout/integration/LineSelection.h:

(WebCore::LineSelection::logicalTop):
(WebCore::LineSelection::logicalBottom):
(WebCore::LineSelection::logicalRect):
(WebCore::LineSelection::physicalRect):
(WebCore::LineSelection::logicalTopAdjustedForPrecedingBlock):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::adjustEnclosingTopForPrecedingBlock const):
(WebCore::RenderBlockFlow::inlineSelectionGaps):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
(WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::paintOutline):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::positionForPoint):

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::paintBackground):

4:22 PM Changeset in webkit [291534] by mmaxfield@apple.com
  • 3 edits in trunk/LayoutTests

Make fast/text/emoji-num-glyphs.html more robust
https://bugs.webkit.org/show_bug.cgi?id=238120
<rdar://problem/88842010>

Unreviewed test gardening.

  • fast/text/emoji-num-glyphs-expected.txt:
  • fast/text/emoji-num-glyphs.html:
1:30 PM Changeset in webkit [291533] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[IFC][Integration] Remove redundant InlineIterator::Line::closestBoxForPoint function
https://bugs.webkit.org/show_bug.cgi?id=238103

Reviewed by Antti Koivisto.

  1. Rename closestBoxForLogicalLeftPosition to closestBoxForHorizontalPosition and move it off of the Line class.
  2. Replace InlineIterator::Line::closestBoxForPoint calls with closestBoxForHorizontalPosition.
  3. Tidy up Line class.
  • editing/VisibleUnits.cpp:

(WebCore::previousLinePosition):
(WebCore::nextLinePosition):

  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::closestBoxForHorizontalPosition):
(WebCore::InlineIterator::Line::closestBoxForPoint const): Deleted.
(WebCore::InlineIterator::Line::closestBoxForLogicalLeftPosition const): Deleted.

  • layout/integration/InlineIteratorLine.h:
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::findClosestTextAtAbsolutePoint):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):

1:24 PM Changeset in webkit [291532] by Alan Bujtas
  • 9 edits in trunk/Source/WebCore

[IFC][Integration] Rename InlineIterator::Line::blockDirectionPointInLine to contentStartInBlockDirection
https://bugs.webkit.org/show_bug.cgi?id=238101

Reviewed by Antti Koivisto.

blockDirectionPointInLine returns the position (vertical or horizontal, depending on the writing mode) where the content
starts (which for flipped writing mode is the bottom of the line).
Let's also move this function out of the Line class and have it as a standalone helper function (and move/rename some private Line
functions to public).

  • editing/VisibleUnits.cpp:

(WebCore::absoluteLineDirectionPointToLocalPointInBlock):

  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::Line::blockDirectionPointInLine const): Deleted.

  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::contentStartInBlockDirection):
(WebCore::InlineIterator::Line::contentLogicalTopAdjustedForHitTesting const):
(WebCore::InlineIterator::Line::contentLogicalTopForHitTesting const): Deleted.

  • layout/integration/InlineIteratorLineLegacyPath.h:

(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTopAdjustedForHitTesting const):
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTopForHitTesting const): Deleted.

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopAdjustedForHitTesting const):
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopForHitTesting const): Deleted.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::positionForPoint):

  • rendering/RenderText.cpp:

(WebCore::RenderText::positionForPoint):

1:05 PM Changeset in webkit [291531] by Alan Bujtas
  • 9 edits in trunk/Source/WebCore

[IFC][Integration] Use a more descriptive name for InlineIterator::Line::enclosing* functions
https://bugs.webkit.org/show_bug.cgi?id=238094

Reviewed by Antti Koivisto.

Enlcosing essentially means content logical top/bottom here.

  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::Line::blockDirectionPointInLine const):

  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::Line::contentLogicalTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::Line::contentLogicalTopForHitTesting const):
(WebCore::InlineIterator::Line::contentLogicalBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::Line::enclosingTopAdjustedForPrecedingLine const): Deleted.
(WebCore::InlineIterator::Line::enclosingTopForHitTesting const): Deleted.
(WebCore::InlineIterator::Line::enclosingBottomAdjustedForFollowingLine const): Deleted.

  • layout/integration/InlineIteratorLineLegacyPath.h:

(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTopForHitTesting const):
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::LineIteratorLegacyPath::enclosingTopAdjustedForPrecedingLine const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::enclosingTopForHitTesting const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::enclosingBottomAdjustedForFollowingLine const): Deleted.

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopForHitTesting const):
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::LineIteratorModernPath::enclosingTopAdjustedForPrecedingLine const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::enclosingTopForHitTesting const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::enclosingBottomAdjustedForFollowingLine const): Deleted.

  • layout/integration/LineSelection.h:

(WebCore::LineSelection::logicalTop):
(WebCore::LineSelection::logicalBottom):
(WebCore::LineSelection::logicalRect):
(WebCore::LineSelection::logicalTopAdjustedForPrecedingBlock):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::positionForPoint):

  • rendering/RenderText.cpp:

(WebCore::RenderText::positionForPoint):

12:17 PM Changeset in webkit [291530] by Alan Bujtas
  • 10 edits in trunk/Source/WebCore

[IFC][Integration] Rename InlineIterator::Line:top/bottom to contentLogicalTop/contentLogicalBottom
https://bugs.webkit.org/show_bug.cgi?id=238085

Reviewed by Antti Koivisto.

  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::Line::contentLogicalTop const):
(WebCore::InlineIterator::Line::contentLogicalBottom const):
(WebCore::InlineIterator::Line::top const): Deleted.
(WebCore::InlineIterator::Line::bottom const): Deleted.

  • layout/integration/InlineIteratorLineLegacyPath.h:

(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTop const):
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalBottom const):
(WebCore::InlineIterator::LineIteratorLegacyPath::top const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::bottom const): Deleted.

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTop const):
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalBottom const):
(WebCore::InlineIterator::LineIteratorModernPath::enclosingTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::LineIteratorModernPath::enclosingBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::LineIteratorModernPath::top const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::bottom const): Deleted.

11:21 AM Changeset in webkit [291529] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[IFC][Integration] InlineIterator::Line::enclosingBottom should read enclosingBottomAdjustedForFollowingLine
https://bugs.webkit.org/show_bug.cgi?id=238084

Reviewed by Antti Koivisto.

  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::Line::enclosingBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::Line::enclosingBottom const): Deleted.

  • layout/integration/InlineIteratorLineLegacyPath.h:

(WebCore::InlineIterator::LineIteratorLegacyPath::enclosingBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::LineIteratorLegacyPath::enclosingBottom const): Deleted.

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::enclosingBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::LineIteratorModernPath::enclosingBottom const): Deleted.

8:39 AM Changeset in webkit [291528] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[IFC][Integration] Move selection specific code from InlineIterator::Line to LineSelection
https://bugs.webkit.org/show_bug.cgi?id=238083

Reviewed by Antti Koivisto.

  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::Line::enclosingTopAdjustedForPrecedingBlock const): Deleted.
(WebCore::InlineIterator::Line::selectionState const): Deleted.

  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::Line::enclosingLogicalRect const): Deleted.
(WebCore::InlineIterator::Line::enclosingPhysicalRect const): Deleted.

  • layout/integration/LineSelection.h:

(WebCore::LineSelection::logicalRect):
(WebCore::LineSelection::physicalRect):
(WebCore::LineSelection::logicalTopAdjustedForPrecedingBlock):
(WebCore::LineSelection::selectionState):

6:23 AM Changeset in webkit [291527] by graouts@webkit.org
  • 5 edits
    4 adds in trunk

Dialog element only animates once
https://bugs.webkit.org/show_bug.cgi?id=236274
rdar://88857731

Reviewed by Dean Jackson, Tim Nguyen and Antti Koivisto.

LayoutTests/imported/w3c:

Import relevant WPT tests that had already been upstreamed in a previous, reverted
version of this patch.

  • web-platform-tests/css/css-animations/dialog-animation-expected.txt: Added.
  • web-platform-tests/css/css-animations/dialog-animation.html: Added.
  • web-platform-tests/css/css-animations/dialog-backdrop-animation-expected.txt: Added.
  • web-platform-tests/css/css-animations/dialog-backdrop-animation.html: Added.
  • web-platform-tests/css/css-animations/support/testcommon.js:

(addElement):
(addDiv):

Source/WebCore:

Two issues related to CSS Animation surfaced in this bug which animates both <dialog>
and its ::backdrop as the dialog is open and eventually re-opened.

The first issue was that we didn't clear all CSS Animations state when a <dialog> was
closed and its style was set to display: none. We now call setAnimationsCreatedByMarkup
to correctly clear such state both when we identify a Styleable is newly getting
display: none. We do the same when cancelDeclarativeAnimations() is called, but also
call setCSSAnimationList() on the associated effect stack since that wasn't done either.
Now both functions do similar cleanup.

This allows us to remove removeCSSAnimationCreatedByMarkup() which did a fair bit of work
to clear CSS Animation state per-animation when we only ever used that function for
_all_ animations.

The second issue was that we never called cancelDeclarativeAnimations() for ::backdrop.
We now do that inside of Element::removeFromTopLayer() at a point where the code in
Styleable::fromRenderer() will still work as the element will still be contained in
Document::topLayerElements().

Finally, we need to be sure that calling Element::setAnimationsCreatedByMarkup() with an
empty list doesn't end up creating an ElementAnimationRareData object if there was no
pre-existing object and the list of animations are empty.

Tests: imported/w3c/web-platform-tests/css/css-animations/dialog-animation.html

imported/w3c/web-platform-tests/css/css-animations/dialog-backdrop-animation.html

  • dom/Element.cpp:

(WebCore::Element::removeFromTopLayer):
(WebCore::Element::setAnimationsCreatedByMarkup):

  • style/Styleable.cpp:

(WebCore::Styleable::cancelDeclarativeAnimations const):
(WebCore::Styleable::updateCSSAnimations const):
(WebCore::removeCSSAnimationCreatedByMarkup): Deleted.

4:41 AM Changeset in webkit [291526] by graouts@webkit.org
  • 3 edits
    2 adds in trunk

REGRESSION (r285529): Flash of missing text when content on https://ahumanfuture.co animates
https://bugs.webkit.org/show_bug.cgi?id=237972
rdar://90385586

Reviewed by Simon Fraser.

Source/WebCore:

Accelerated animations are added to a CALayer in two different ways.

Transform-related animations are added in a CAAnimationGroup so that we can have control of the
way they interact with each other. We added this system when we added support for individual CSS
transform properties on top of the existing "transform" property. All CAAnimationGroup animations
are timed to start at 1s and thus we subtract that same 1s value from all animations contained
within such groups.

All other animations, such as "opacity" animations, are added as simple leaf animations and their
begin time is not subject to that 1s subtraction.

In r285529, when we introduced leaf animations for transform properties other than transform-related
properties, we took an unfortunate approach to deal with that 1s subtraction. We would *always* subtract
1s for all animations, and for leaf animation add that 1s back when we added them in the
addLeafAnimation() lambda.

However, we *did not* check whether that animation was newly started or if we were merely adding it
again. This meant that every time GraphicsLayerCA::updateAnimations() was called, any leaf animation
would have 1s added to their begin time.

So, if for instance a page ran on a given element a "scale" animation for 1s and an "opacity" animation
for 2s, when the "scale" animation would complete, GraphicsLayerCA::updateAnimations() would be called
to remove that animation, and add 1s to the "opacity" animation begin time.

We now set the begin time, if not already set, in two places: in the addLeafAnimation() lambda for
leaf animations, and in the addAnimationsForProperty() lambda for animations added to groups. We
only ever set the begin time if not already set during a previous update and only subtract the
parent group begin time for animations contained within a group.

Additionally, this means we set the begin times when we iterate over remaining animations after culling
finished animations. As such, we no longer need to iterate over *all* known animations to set their
begin time if needed prior to adding them.

Test: webanimations/accelerated-animation-opacity-animation-begin-time-after-scale-animation-ends.html

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::updateAnimations):

LayoutTests:

Add a new test which would fail prior to the source change. In this test we start two animations: a "scale"
animation which lasts for 100ms, and an "opacity" animation which lasts much longer but only visually updates
for the duration of the "scale" animation. When the "scale" animation completes, we stop the test and ensure
that the reference test shows that the "opacity" animation is at the state it should be in at at that time,
and was not rewound due to the bug being fixed.

  • webanimations/accelerated-animation-opacity-animation-begin-time-after-scale-animation-ends-expected.html: Added.
  • webanimations/accelerated-animation-opacity-animation-begin-time-after-scale-animation-ends.html: Added.
3:36 AM Changeset in webkit [291525] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

Unreviewed, WPE clang build fix after r291343.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::pushDMABufToCompositor):

2:12 AM Changeset in webkit [291524] by Antti Koivisto
  • 6 edits in trunk

[CSS Container Queries] Add Typed OM support for container units
https://bugs.webkit.org/show_bug.cgi?id=238078

Reviewed by Alan Bujtas.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/container-queries/container-units-typed-om-expected.txt:

Source/WebCore:

For completeness, Typed OM is not enabled or fully implemented yet.

  • css/DOMCSSNamespace+CSSNumericFactory.idl:
  • css/typedom/CSSNumericFactory.h:
  • css/typedom/CSSStyleValueFactory.cpp:

(WebCore::CSSStyleValueFactory::reifyValue):

1:49 AM Changeset in webkit [291523] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[IFC][Integration] Move enclosingHeightAdjustedForPrecedingBlock off of InlineIterator::Line
https://bugs.webkit.org/show_bug.cgi?id=238081

Reviewed by Antti Koivisto.

This function is way too specific to be on InlineIterator::Line (and has only one callsite).

  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::Line::enclosingHeightAdjustedForPrecedingBlock const): Deleted.

  • layout/integration/LineSelection.h:

(WebCore::LineSelection::logicalTopAdjustedForPrecedingBlock):
(WebCore::LineSelection::logicalHeightAdjustedForPrecedingBlock): Deleted.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::inlineSelectionGaps):

1:14 AM Changeset in webkit [291522] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Fix the build (hopefully)

  • Shared/Cocoa/ArgumentCodersCocoa.mm:

Mar 18, 2022:

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

[JSC] Further reduce # of registers used in RegExpTestInline
https://bugs.webkit.org/show_bug.cgi?id=238105

Reviewed by Saam Barati.

This patch further reduces # of registers used in RegExpTestInline.
After flushRegisters(), we can use baseGPR for any purpose.
We also remove x64 hack since we have enough registers for x64 even
if we use one callee-save register in unlinked DFG.

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compileRegExpTestInline):

8:30 PM Changeset in webkit [291520] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Fix typo from r291295
https://bugs.webkit.org/show_bug.cgi?id=238087

Patch by Joseph Griego <jgriego@igalia.com> on 2022-03-18
Reviewed by Chris Dumez.

No new tests (changes only comments)

  • bindings/scripts/CodeGeneratorJS.pm:

(IsAlwaysExposedOnInterface):

8:25 PM Changeset in webkit [291519] by Patrick Angle
  • 2 edits in trunk/Source/WebCore

Web Inspector: console.screenshot has extra transparent pixels at bottom of screenshot on platforms with viewports that are obscured by browser chrome
https://bugs.webkit.org/show_bug.cgi?id=238060

Reviewed by Devin Rousso.

ScrollView::sizeForVisibleRect includes partially-visible portions of the viewport, including in Safari's case
the part of the viewport under the semi-translucent title bar. Because we force an origin of zero, this meant
that we were overshooting the bottom of the viewport by the height of this area when taking a snapshot for
console.screenshot(). Instead, we should use unobscured viewport rectangle and provide coordinates in
document-space, not view-space to WebCore::snapshotFrameRect.

  • page/PageConsoleClient.cpp:

(WebCore::PageConsoleClient::screenshot):

7:00 PM Changeset in webkit [291518] by mmaxfield@apple.com
  • 7 edits in trunk

[Cocoa] Teach WebKit how to serialize CGColors
https://bugs.webkit.org/show_bug.cgi?id=238069
<rdar://problem/90124325>

Reviewed by Dean Jackson and Tim Horton.

Source/WebKit:

We have 2 ways of serializing Cocoa objects: NS type handling in ArgumentCodersCocoa.mm,
and CF type handling in ArgumentCodersCF.mm. CGColors are CF types, so this patch adds
direct support in ArgumentCodersCF to serialize them, by round-tripping them through
WebCore::Colors. However, NS containers (like font descriptor attribute dictionaries)
can contain CGColors, so this patch also teaches ArgumentCodersCocoa that there may be
CF types inside NS containers. If one is present, ArgumentCodersCocoa has to call into
ArgumentCodersCF to serialize it.

This patch doesn't add support for the reverse path, where an NS object is contained
within a CF container. I intentionally omitted implementing this because I wasn't sure
if it would be a layering violation; ArgumentCodersCococa.mm already #includes
ArgumentCodersCF.h, but ArgumentCodersCF.mm doesn't #include ArgumentCodersCocoa.h.
This path isn't actually necessary to solve my problem at hand, so someone else can
add support if necessary in the future. I also added a comment at the site where the
code would fail, describing what the problem is and a potential workaround.

This patch also adds support for our NSSecureCoding implementation for CGColors. This
is necessary because sometimes we want to serialize things like NSAttributedStrings,
which we don't have direct support for, so we use NSSecureCoding to serialize them
instead. NSAttributedStrings can contain fonts whose descriptor dictionaries contain
CGColors, so this path needs to work with CGColors too. Support is implemented using
NSKeyedArchiverDelegate and NSKeyedUnarchiverDelegate.

Test: IPCTestingAPI.CGColorInNSSecureCoding

The non-NSSecureCoding parts of this patch are tested by our regular LayoutTests
when DOM GPU Process rendering is enabled.

  • Shared/Cocoa/ArgumentCodersCocoa.mm:

(-[WKSecureCodingArchivingDelegate archiver:willEncodeObject:]):
(-[WKSecureCodingArchivingDelegate unarchiver:didDecodeObject:]):
(-[WKSecureCodingCGColorWrapper wrappedColor]):
(+[WKSecureCodingCGColorWrapper supportsSecureCoding]):
(-[WKSecureCodingCGColorWrapper encodeWithCoder:]):
(-[WKSecureCodingCGColorWrapper initWithCoder:]):
(-[WKSecureCodingCGColorWrapper initWithCGColor:]):
(IPC::typeFromObject):
(IPC::decodeSecureCodingInternal):
(IPC::encodeCFInternal):
(IPC::decodeCFInternal):
(IPC::encodeObject):
(IPC::decodeObject):

  • Shared/cf/ArgumentCodersCF.cpp:

(IPC::typeFromCFTypeRef):
(IPC::ArgumentCoder<CFTypeRef>::encode):
(IPC::ArgumentCoder<RetainPtr<CFTypeRef>>::decode):
(IPC::ArgumentCoder<CGColorRef>::encode):
(IPC::ArgumentCoder<RetainPtr<CGColorRef>>::decode):

  • Shared/cf/ArgumentCodersCF.h:

Tools:

  • Scripts/webkitpy/style/checkers/cpp.py:
  • TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
6:03 PM Changeset in webkit [291517] by Devin Rousso
  • 21 edits
    8 adds in trunk

Web Inspector: REGRESSION(?): Emulate User Gesture doesn't work
https://bugs.webkit.org/show_bug.cgi?id=232584
<rdar://problem/84899576>

Reviewed by Patrick Angle.

Source/JavaScriptCore:

  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::evaluateOnCallFrame):

  • inspector/agents/InspectorRuntimeAgent.h:
  • inspector/agents/InspectorRuntimeAgent.cpp:

(Inspector::InspectorRuntimeAgent::evaluate):
(Inspector::InspectorRuntimeAgent::callFunctionOn):
Create overloads for these (protocol) methods so that we can avoid having to fetch the same
InjectedScript more than once (i.e. if the subclass fetches the InjectedScript and then
called into the baseclass, which also fetches the same InjectedScript).

  • debugger/Debugger.h:

(JSC::Debugger::Client::debuggerWillEvaluate):
(JSC::Debugger::Client::debuggerDidEvaluate):

  • debugger/Debugger.cpp:

(JSC::Debugger::evaluateBreakpointActions):
Pass along the current JSGlobalObject to eventually derive a relevant WebCore::Document.

Source/WebCore:

Recently some new web APIs have gone a step further by using a new way to detect one-time
user interaction called [transient activation](https://html.spec.whatwg.org/multipage/interaction.html#transient-activation).
In order to support invoking these APIs from Web Inspector, UserGestureEmulationScope
needs to be adjusted to support marking the context as having recently been interacted with,
which turns out to just involve plumbing a Document through to the UserGestureIndicator,
as the rest has already been implemented.

Tests: inspector/debugger/breakpoint-action-emulateUserGesture-hasTransientActiviation.html

inspector/debugger/evaluateOnCallFrame-emulateUserGesture-hasTransientActivation.html
inspector/runtime/callFunctionOn-emulateUserGesture-hasTransientActivation.html
inspector/runtime/evaluate-emulateUserGesture-hasTransientActivation.html

  • inspector/agents/page/PageDebuggerAgent.h:
  • inspector/agents/page/PageDebuggerAgent.cpp:

(WebCore::PageDebuggerAgent::evaluateOnCallFrame):
(WebCore::PageDebuggerAgent::debuggerWillEvaluate):
(WebCore::PageDebuggerAgent::debuggerDidEvaluate):

  • inspector/agents/page/PageRuntimeAgent.cpp:

(WebCore::PageRuntimeAgent::evaluate):
(WebCore::PageRuntimeAgent::callFunctionOn):

  • inspector/agents/page/UserGestureEmulationScope.h:
  • inspector/agents/page/UserGestureEmulationScope.cpp:

(WebCore::UserGestureEmulationScope::UserGestureEmulationScope):
Derive a Document from the JSGlobalObject of the relevant InjectedScript.

  • inspector/InspectorFrontendClientLocal.cpp:

(WebCore::InspectorFrontendClientLocal::openURLExternally):

  • inspector/InspectorFrontendHost.cpp:

(WebCore::FrontendMenuProvider::contextMenuItemSelected):

  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::navigate):
Drive-by: Pass the relevant Document to the UserGestureIndicator just in case the Web

Inspector frontend needs it.

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

(WebCore::Internals::hasTransientActivation): Added.
Expose DOMWindow::hasTransientActivation to tests.

LayoutTests:

  • inspector/debugger/breakpoint-action-emulateUserGesture-hasTransientActiviation.html: Added.
  • inspector/debugger/breakpoint-action-emulateUserGesture-hasTransientActiviation-expected.txt: Added.
  • inspector/debugger/evaluateOnCallFrame-emulateUserGesture-hasTransientActivation.html: Added.
  • inspector/debugger/evaluateOnCallFrame-emulateUserGesture-hasTransientActivation-expected.txt: Added.
  • inspector/runtime/callFunctionOn-emulateUserGesture-hasTransientActivation.html: Added.
  • inspector/runtime/callFunctionOn-emulateUserGesture-hasTransientActivation-expected.txt: Added.
  • inspector/runtime/evaluate-emulateUserGesture-hasTransientActivation.html: Added.
  • inspector/runtime/evaluate-emulateUserGesture-hasTransientActivation-expected.txt: Added.
5:59 PM Changeset in webkit [291516] by Nikos Mouchtaris
  • 4 edits in trunk/Source/WebCore

Calc() cleanup
https://bugs.webkit.org/show_bug.cgi?id=237982

Reviewed by Simon Fraser.

Small cleanup of CSSCalcExpressionNodeParser and CSSCalcOperationNode needed after
adding more math functions.

  • css/calc/CSSCalcExpressionNodeParser.cpp:

(WebCore::CSSCalcExpressionNodeParser::parseCalcFunction):

  • css/calc/CSSCalcOperationNode.cpp:

(WebCore::determineCategory):
(WebCore::CSSCalcOperationNode::simplifyNode):

  • css/calc/CSSCalcOperationNode.h:
5:55 PM Changeset in webkit [291515] by ysuzuki@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Reduce # of registers used in RegExpTestInline to allow using unlinked DFG in x64
https://bugs.webkit.org/show_bug.cgi?id=238092

Reviewed by Michael Saboff.

This patch reduces # of registers used in RegExpTestInline implementation to make it work
well for x64 unlinked DFG since it can reduce # of registers to use one callee-save register
for constants buffer.

We also add YarrJITRegisters::validate to ensure that used registers meet the invariants in YarrJIT.

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compileRegExpTestInline):

  • yarr/YarrJIT.cpp:

(JSC::Yarr::jitCompileInlinedTest):

  • yarr/YarrJITRegisters.h:

(JSC::Yarr::YarrJITRegisters::validate):
(JSC::Yarr::YarrJITRegisters::YarrJITRegisters): Deleted.

5:46 PM Changeset in webkit [291514] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[iOS] Fix more build breakage from r291361
https://bugs.webkit.org/show_bug.cgi?id=238097
<rdar://problem/90505371>

Unreviewed build fix.

  • platform/ios/WebAVPlayerController.mm: Declare AVAssetTrack.
5:43 PM Changeset in webkit [291513] by commit-queue@webkit.org
  • 4 edits
    5 deletes in trunk

Unreviewed, reverting r291476.
https://bugs.webkit.org/show_bug.cgi?id=238098

Caused Gtk js/weakref-finalizationregistry.html failure

Reverted changeset:

"Remove the 1ms minimum for setTimeout"
https://bugs.webkit.org/show_bug.cgi?id=221124
https://commits.webkit.org/r291476

5:40 PM Changeset in webkit [291512] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[IFC][Integration] InlineIterator::Line::enclosingTop is really an enclosingTopAdjustedForPrecedingLine
https://bugs.webkit.org/show_bug.cgi?id=238079

Reviewed by Antti Koivisto.

This is used for selection and hittesting.

  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::Line::enclosingTopAdjustedForPrecedingBlock const):

  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::Line::enclosingTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::Line::enclosingLogicalRect const):
(WebCore::InlineIterator::Line::enclosingTop const): Deleted.

  • layout/integration/InlineIteratorLineLegacyPath.h:

(WebCore::InlineIterator::LineIteratorLegacyPath::enclosingTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::LineIteratorLegacyPath::enclosingTop const): Deleted.

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::enclosingTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::LineIteratorModernPath::enclosingTopForHitTesting const):
(WebCore::InlineIterator::LineIteratorModernPath::enclosingTop const): Deleted.

  • layout/integration/LineSelection.h:

(WebCore::LineSelection::logicalTop):

5:31 PM Changeset in webkit [291511] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebKit

Update preference location used for CaptivePortal testing.
https://bugs.webkit.org/show_bug.cgi?id=237970
<rdar://problem/88897735>

Patch by Gavin Phillips <gavin.p@apple.com> on 2022-03-18
Reviewed by Brent Fulgham.

Update the location of the setting used to determine whether we should ignore CaptivePortal requests for testing
as well as group the various iterations of preference checking into a single location.

  • UIProcess/API/Cocoa/_WKSystemPreferences.mm:

(+[_WKSystemPreferences isCaptivePortalModeEnabled]):
(+[_WKSystemPreferences setCaptivePortalModeEnabled:]):
(+[_WKSystemPreferences isCaptivePortalModeIgnored:]):
(+[_WKSystemPreferences setCaptivePortalModeIgnored:ignore:]):

  • UIProcess/API/Cocoa/_WKSystemPreferencesInternal.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::isCaptivePortalModeEnabledBySystemIgnoringCaching):

5:30 PM Changeset in webkit [291510] by Russell Epstein
  • 1 copy in tags/Safari-614.1.5.15

Tag Safari-614.1.5.15.

5:26 PM Changeset in webkit [291509] by Cameron McCormack
  • 12 edits in trunk/LayoutTests/imported/w3c

Update Display P3 canvas drawImage(video) tests to avoid edge case bugs
https://bugs.webkit.org/show_bug.cgi?id=237286

Reviewed by Jer Noble.

This test is intermittently failing, due to the odd single frame
videos causing issues and loadeddata not being guaranteed to mean the
video is ready for drawing. Update the tests to work around these.

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

Use requestVideoFrameCallback if available, since that should be
better than loadeddata to guarantee the pixel data is available. Also
play the videos that are inserted, to avoid issues with the video
frame callback being called a bit late.

  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3.js:

Fix the command line in the comment that's used to generate the test
videos.

  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-222000000.mp4:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-222000000.webm:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-3FF000000.mp4:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-3FF000000.webm:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.mp4:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.webm:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0100.mp4:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0100.webm:

Change these videos from being a single frame long to 10s long.

5:19 PM Changeset in webkit [291508] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Optimize AtomHTMLToken::initializeAttributes()
https://bugs.webkit.org/show_bug.cgi?id=238074

Reviewed by Geoffrey Garen.

Use a HashSet to find duplicate attributes instead of doing a linear search.
This is a confirmed 1.2% progression on Speedometer on iMac20,1 via A/B bots.

  • html/parser/AtomHTMLToken.h:

(WebCore::AtomHTMLToken::initializeAttributes):

5:00 PM Changeset in webkit [291507] by Russell Epstein
  • 9 edits in branches/safari-614.1.5-branch/Source

Versioning.

WebKit-7614.1.5.15

4:51 PM Changeset in webkit [291506] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[macOS arm64] webrtc/vp9-profile2.html is consistently timing out
https://bugs.webkit.org/show_bug.cgi?id=238104

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:20 PM Changeset in webkit [291505] by Alan Coon
  • 1 copy in tags/Safari-614.1.6.1

Tag Safari-614.1.6.1.

4:20 PM Changeset in webkit [291504] by Alan Coon
  • 1 delete in tags/Safari-614.1.6.1

Delete tag.

4:18 PM Changeset in webkit [291503] by Alan Coon
  • 9 edits in branches/safari-614.1.6-branch/Source

Versioning.

WebKit-7614.1.6.1

4:13 PM Changeset in webkit [291502] by Alan Coon
  • 1 copy in tags/Safari-614.1.6.1

Tag Safari-614.1.6.1.

4:11 PM Changeset in webkit [291501] by Jonathan Bedard
  • 11 edits in trunk/Source

[iOS 15.4] Fix unused variables
https://bugs.webkit.org/show_bug.cgi?id=238089
<rdar://problem/90498642 >

Reviewed by Alexey Proskuryakov and Chris Dumez.

  • Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess): Declare isSafari as unused for Mac and Catalyst.

  • Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:

(-[WKScrollingNodeScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
Remove canPanX and canPanY, since they are unused.

  • Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant _createSheetWithElementActions:defaultTitle:showLinkTitle:]): Remove titleIsURL.

  • Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::addMessageToConsole): Declare respondsToNewSelector as unused on iOS family.

  • Source/WebCore/accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::visiblePositionForPoint const): frameView is only used on Mac.

  • Source/WebCore/editing/cocoa/HTMLConverter.mm:

(HTMLConverter::_addAttachmentForElement): Declare ignoreOrientation as unused on iOS family.

  • Source/WebCore/platform/audio/ios/AudioOutputUnitAdaptorIOS.cpp:

(WebCore::AudioOutputUnitAdaptor::configure): Assert that result is unused.

  • Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp:

(WebCore::FontCascade::drawGlyphs): Declare shouldSmoothFonts as unused on iOS family.

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

3:47 PM Changeset in webkit [291500] by Antti Koivisto
  • 8 edits in trunk

[CSS Container Queries] Ensure container style changes are propagated to descendants
https://bugs.webkit.org/show_bug.cgi?id=238072

Reviewed by Alan Bujtas.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/container-queries/container-name-invalidation-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-type-invalidation-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-units-selection-expected.txt:

Source/WebCore:

  • style/StyleChange.cpp:

(WebCore::Style::determineChange):

Ensure we recompute the descendants when container properties change.

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolveComposedTree):
(WebCore::Style::TreeResolver::updateQueryContainer):

We need to ensure layout is up-to-date also when a query container stops being one.
Remove the unused m_resolvedQueryContainers maps.

  • style/StyleTreeResolver.h:
3:12 PM Changeset in webkit [291499] by pvollan@apple.com
  • 30 edits
    5 copies in trunk

Fix test failures when enabling content filtering in the Network process
https://bugs.webkit.org/show_bug.cgi?id=237217

Reviewed by Brent Fulgham.

Source/WebCore:

This patch addresses test failures when enabling content filtering in the Network process.
When content filtering is running in the Network process, we need to send the mock content
filter and settings to the Network process to support testing. The mock content filter is
moved from the WebCore test support library target to the WebCore framework, since WebKit
now also will reference the mock content filter when sending it to the Network process.
Previously a compile time guard was used to disable the content filtering code in the
document loader. However, we still need to support content filtering in the document
loader for WK1, so this patch changes that to use a runtime check instead. The rest of
this patch addresses test failures seen when running the layout and API tests. This patch
does not enable the feature.

No new tests, covered by existing tests.

  • WebCore.xcodeproj/project.pbxproj:
  • loader/ContentFilter.cpp:

(WebCore::ContentFilter::startFilteringMainResource):
(WebCore::ContentFilter::continueAfterDataReceived):
(WebCore::ContentFilter::continueAfterNotifyFinished):
(WebCore::ContentFilter::deliverResourceData):
(WebCore::ContentFilter::url):
(WebCore::ContentFilter::continueAfterSubstituteDataRequest):

  • loader/ContentFilter.h:

(WebCore::ContentFilter::setBlockedError):

  • loader/ContentFilterClient.h:
  • loader/DocumentLoader.cpp:

(WebCore::contentFilterInDocumentLoader):
(WebCore::DocumentLoader::notifyFinished):
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::responseReceived):
(WebCore::DocumentLoader::dataReceived):
(WebCore::DocumentLoader::detachFromFrame):
(WebCore::DocumentLoader::startLoadingMainResource):
(WebCore::DocumentLoader::clearMainResource):
(WebCore::DocumentLoader::becomeMainResourceClient):
(WebCore::DocumentLoader::dataReceivedThroughContentFilter):
(WebCore::DocumentLoader::contentFilterWillHandleProvisionalLoadFailure):
(WebCore::DocumentLoader::contentFilterHandleProvisionalLoadFailure):

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::setBlockedPageURL):
(WebCore::DocumentLoader::setSubstituteDataFromContentFilter):

  • loader/PolicyChecker.cpp:

(WebCore::FrameLoader::PolicyChecker::checkNavigationPolicy):

  • platform/ContentFilterUnblockHandler.h:
  • platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:

(WebCore::ContentFilterUnblockHandler::encode const):
(WebCore::ContentFilterUnblockHandler::decode):
(WebCore::ContentFilterUnblockHandler::canHandleRequest const):
(WebCore::ContentFilterUnblockHandler::requestUnblockAsync const):
(WebCore::ContentFilterUnblockHandler::setUnblockedAfterRequest):

  • testing/MockContentFilterManager.cpp: Added.

(WebCore::MockContentFilterManager::singleton):
(WebCore::MockContentFilterManager::setClient):
(WebCore::MockContentFilterManager::notifySettingsChanged const):

  • testing/MockContentFilterManager.h: Added.
  • testing/MockContentFilterSettings.cpp:

(WebCore::MockContentFilterSettings::reset):
(WebCore::MockContentFilterSettings::setEnabled):
(WebCore::MockContentFilterSettings::setBlockedString):
(WebCore::MockContentFilterSettings::setDecisionPoint):
(WebCore::MockContentFilterSettings::setDecision):
(WebCore::MockContentFilterSettings::setUnblockRequestDecision):
(WebCore::MockContentFilterSettings::setModifiedRequestURL):

  • testing/MockContentFilterSettings.h:

(WebCore::MockContentFilterSettings::encode const):
(WebCore::MockContentFilterSettings::decode):
(WebCore::MockContentFilterSettings::setBlockedString): Deleted.
(WebCore::MockContentFilterSettings::setDecisionPoint): Deleted.
(WebCore::MockContentFilterSettings::setDecision): Deleted.
(WebCore::MockContentFilterSettings::setUnblockRequestDecision): Deleted.
(WebCore::MockContentFilterSettings::setModifiedRequestURL): Deleted.

  • testing/MockContentFilterSettingsClient.h: Added.

(WebCore::MockContentFilterSettingsClient::~MockContentFilterSettingsClient):

Source/WebKit:

Add a WebMockContentFilterManager in the WebContent process, which will be notified
when mock content filter settings are changed from JavaScript, and then send the new
settings to the Network process and install the mock content filter. The other
changes are addressing layout and API test failures.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::installMockContentFilter):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::startContentFiltering):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::willSendRedirectedRequestInternal):
(WebKit::NetworkResourceLoader::contentFilterDidBlock):
(WebKit::NetworkResourceLoader::cancelMainResourceLoadForContentFilter):
(WebKit::NetworkResourceLoader::handleProvisionalLoadFailureFromContentFilter):

  • NetworkProcess/NetworkResourceLoader.h:
  • Shared/WebCoreArgumentCoders.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/WebMockContentFilterManager.cpp: Added.

(WebKit::WebMockContentFilterManager::singleton):
(WebKit::WebMockContentFilterManager::startObservingSettings):
(WebKit::WebMockContentFilterManager::mockContentFilterSettingsChanged):

  • WebProcess/Network/WebMockContentFilterManager.h: Added.
  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::contentFilterDidBlockLoad):
(WebKit::WebResourceLoader::cancelMainResourceLoadForContentFilter):
(WebKit::WebResourceLoader::handleProvisionalLoadFailureFromContentFilter): Deleted.

  • WebProcess/Network/WebResourceLoader.h:
  • WebProcess/Network/WebResourceLoader.messages.in:
  • WebProcess/WebProcess.cpp:

Tools:

TestWebKitAPI needs to link with WebCore now that the mock content filter is compiled into WebCore.
Adjust test expectations, since the content filters are not expected to be loaded in the WebContent
process anymore.

  • TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
  • TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig:
  • TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/ContentFilteringPlugIn.mm:
  • TestWebKitAPI/Tests/mac/ContentFiltering.mm:
3:09 PM Changeset in webkit [291498] by mmaxfield@apple.com
  • 47 edits in trunk/Source/WebGPU

[WebGPU] Add #pragma marks to strategic places
https://bugs.webkit.org/show_bug.cgi?id=238065

Reviewed by Alexey Proskuryakov.

They help a little bit with Xcode navigation.

  • WebGPU/Adapter.h:
  • WebGPU/Adapter.mm:
  • WebGPU/BindGroup.h:
  • WebGPU/BindGroup.mm:
  • WebGPU/BindGroupLayout.h:
  • WebGPU/BindGroupLayout.mm:
  • WebGPU/Buffer.h:
  • WebGPU/Buffer.mm:
  • WebGPU/CommandBuffer.h:
  • WebGPU/CommandBuffer.mm:
  • WebGPU/CommandEncoder.h:
  • WebGPU/CommandEncoder.mm:
  • WebGPU/ComputePassEncoder.h:
  • WebGPU/ComputePassEncoder.mm:
  • WebGPU/ComputePipeline.h:
  • WebGPU/ComputePipeline.mm:
  • WebGPU/Device.h:
  • WebGPU/Device.mm:
  • WebGPU/Instance.h:
  • WebGPU/Instance.mm:
  • WebGPU/PipelineLayout.h:
  • WebGPU/PipelineLayout.mm:
  • WebGPU/QuerySet.h:
  • WebGPU/QuerySet.mm:
  • WebGPU/Queue.h:
  • WebGPU/Queue.mm:
  • WebGPU/RenderBundle.h:
  • WebGPU/RenderBundle.mm:
  • WebGPU/RenderBundleEncoder.h:
  • WebGPU/RenderBundleEncoder.mm:
  • WebGPU/RenderPassEncoder.h:
  • WebGPU/RenderPassEncoder.mm:
  • WebGPU/RenderPipeline.h:
  • WebGPU/RenderPipeline.mm:
  • WebGPU/Sampler.h:
  • WebGPU/Sampler.mm:
  • WebGPU/ShaderModule.h:
  • WebGPU/ShaderModule.mm:
  • WebGPU/Surface.h:
  • WebGPU/Surface.mm:
  • WebGPU/SwapChain.h:
  • WebGPU/SwapChain.mm:
  • WebGPU/Texture.h:
  • WebGPU/Texture.mm:
  • WebGPU/TextureView.h:
  • WebGPU/TextureView.mm:
2:59 PM Changeset in webkit [291497] by Nikos Mouchtaris
  • 5 edits
    2 adds in trunk

Allow history swipe in scroller with overscroll-behavior
https://bugs.webkit.org/show_bug.cgi?id=235851

Reviewed by Simon Fraser.

Source/WebCore:

Re-add code to allow history swipe. Does so by returning unhandled if a horizontal
swipe is used. Also add test to make sure history swipes are allowed in scrolling nodes
with overscroll-behavior.

Test: scrollingcoordinator/mac/latching/horizontal-overflow-back-swipe-overscroll-behavior.html

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::handleWheelEventWithNode):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::shouldRubberBand const):
(WebCore::ScrollingTreeScrollingNode::computeScrollPropagation const):
(WebCore::ScrollingTreeScrollingNode::shouldBlockScrollPropagation const): Deleted.

  • page/scrolling/ScrollingTreeScrollingNode.h:

LayoutTests:

  • scrollingcoordinator/mac/latching/horizontal-overflow-back-swipe-overscroll-behavior-expected.txt: Added.
  • scrollingcoordinator/mac/latching/horizontal-overflow-back-swipe-overscroll-behavior.html: Added.
2:53 PM Changeset in webkit [291496] by Chris Dumez
  • 5 edits in trunk/Source

Avoid calls to [CLLocationManager authorizationStatus] & [CLLocationManager locationServicesEnabled]
https://bugs.webkit.org/show_bug.cgi?id=237933
<rdar://89931043>

Reviewed by Geoffrey Garen.

Source/WebCore:

Avoid calls to [CLLocationManager authorizationStatus] & [CLLocationManager locationServicesEnabled]
for performance reasons since those are synchronous, potentially slow and called on the UIProcess
main thread.

Instead, rely on the fact that the locationManagerDidChangeAuthorization always gets called
asynchronously right after constructing the CLLocationManager with the actual authorization.
This simplifies our logic a bit too.

We now only call [CLLocationManager requestWhenInUseAuthorization] when locationManagerDidChangeAuthorization
gets called with kCLAuthorizationStatusNotDetermined asynchronously after construction.
If locationManagerDidChangeAuthorization gets called with an authorized enum value, we
call [CLLocationManager startUpdatingLocation] then (if the client is interested in locations, and not
merely in the authorization).

  • platform/cocoa/CoreLocationGeolocationProvider.h:
  • platform/cocoa/CoreLocationGeolocationProvider.mm:

(-[WebCLLocationManager initWithWebsiteIdentifier:client:mode:]):
(-[WebCLLocationManager locationManagerDidChangeAuthorization:]):
(WebCore::CoreLocationGeolocationProvider::CoreLocationGeolocationProvider):
(isAuthorizationGranted): Deleted.
(-[WebCLLocationManager initWithWebsiteIdentifier:client:]): Deleted.
(-[WebCLLocationManager start]): Deleted.
(-[WebCLLocationManager requestGeolocationAuthorization]): Deleted.
(WebCore::CoreLocationGeolocationProvider::start): Deleted.
(WebCore::CoreLocationGeolocationProvider::stop): Deleted.

Source/WebKit:

Minor changes to reflect API changes for our CoreLocation location manager.

  • UIProcess/WebGeolocationManagerProxy.cpp:

(WebKit::WebGeolocationManagerProxy::providerStartUpdating):
(WebKit::WebGeolocationManagerProxy::providerStopUpdating):

1:09 PM Changeset in webkit [291495] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Avoid extra pointer dereference in EventListenerMap::m_entries
https://bugs.webkit.org/show_bug.cgi?id=238075

Reviewed by Geoffrey Garen.

This is a confirmed 0.5-0.8% progression on Speedometer according to A/B
bots.

  • dom/EventListenerMap.cpp:

(WebCore::EventListenerMap::clear):
(WebCore::EventListenerMap::add):
(WebCore::EventListenerMap::remove):
(WebCore::EventListenerMap::find):
(WebCore::EventListenerMap::removeFirstEventListenerCreatedFromMarkup):
(WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget):
(WebCore::EventListenerIterator::nextListener):
(WebCore::EventListenerMap::find const): Deleted.

  • dom/EventListenerMap.h:

(WebCore::EventListenerMap::find const):

12:42 PM Changeset in webkit [291494] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Keep a strong reference to session in [WebCoreNSURLSessionDataTask _restart]
https://bugs.webkit.org/show_bug.cgi?id=238061
<rdar://88242622>

Patch by Alex Christensen <achristensen@webkit.org> on 2022-03-18
Reviewed by Eric Carlson.

_session is a WeakObjCPtr<WebCoreNSURLSession> and since we're not using ARC self.session
returns a raw pointer to an object that may be deallocated and null out its loader on a different thread.
To prevent null crashes, keep a strong reference to the session when using it.

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSession dealloc]):
(-[WebCoreNSURLSessionDataTask _restart]):

12:36 PM Changeset in webkit [291493] by Simon Fraser
  • 3 edits
    3 adds in trunk

REGRESSION (r290628): Scrubber makes a visual trail when scrubbing on tv.youtube.com
https://bugs.webkit.org/show_bug.cgi?id=238047
<rdar://problem/90451319>

Reviewed by Alan Bujtas.

Source/WebCore:

In r290628 I added a call to clearRepaintRects() when changing the backing sharing
target layer for a RenderLayer. However, for a layer using backing sharing, this
gets called twice during a normal compositing update, which has the effect of
clearing the cached repaint rects so that a layer repaint always computes new rects.
Thus, if a layer moved, we'd fail to repaint the old rect.

RenderLayerBacking::setBackingSharingLayers() already has logic to update repaint
rects when state changes, so we don't need this clearing.

Test: compositing/repaint/move-backing-sharing-layer.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::setBackingProviderLayer):

LayoutTests:

  • compositing/repaint/move-backing-sharing-layer-expected.txt: Added.
  • compositing/repaint/move-backing-sharing-layer.html: Added.
12:19 PM Changeset in webkit [291492] by Ben Nham
  • 18 edits in trunk

Remove push subscriptions when associated service worker registrations are removed
https://bugs.webkit.org/show_bug.cgi?id=237983

Reviewed by Youenn Fablet.

Source/WebKit:

When a ServiceWorkerRegistration is removed, we also need to remove its associated
PushSubscription. This can occur when:

  1. The application calls ServiceWorkerRegistration.unregister. This is implemented by having resolveUnregistrationJobInClient call unsubscribeFromPushService in webpushd. The identifier passed to unsubscribeFromPushService is now optional; if the identifier is not present, then we delete whatever PushSubscription is associated with the given scope URL.
  1. The user clears website data for a particular origin. This is implemented by having deleteWebsiteDataForOrigins invoke removePushSubscriptionsForOrigin in webpushd.
  1. The user clears all website data. This is implemented by having deleteWebsiteData invoke removeAllPushSubscriptions in webpushd.

Covered by new API tests.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::hasPushSubscriptionForTesting):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/Notifications/NetworkNotificationManager.cpp:

(WebKit::NetworkNotificationManager::unsubscribeFromPushService):
(WebKit::NetworkNotificationManager::removeAllPushSubscriptions):
(WebKit::NetworkNotificationManager::removePushSubscriptionsForOrigin):

  • NetworkProcess/Notifications/NetworkNotificationManager.h:
  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::resolveUnregistrationJobInClient):

  • Shared/WebPushDaemonConstants.h:

(WebKit::WebPushD::messageTypeSendsReply):

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _scopeURL:hasPushSubscriptionForTesting:]):

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::hasPushSubscriptionForTesting):

  • UIProcess/Network/NetworkProcessProxy.h:
  • webpushd/PushService.h:
  • webpushd/PushService.mm:

(WebPushD::UnsubscribeRequest::UnsubscribeRequest):
(WebPushD::UnsubscribeRequest::startInternal):
(WebPushD::PushService::unsubscribe):
(WebPushD::PushService::incrementSilentPushCount):
(WebPushD::PushService::removeRecordsForBundleIdentifier):
(WebPushD::PushService::removeRecordsForBundleIdentifierAndOrigin):
(WebPushD::PushService::removeRecordsImpl):

  • webpushd/WebPushDaemon.h:
  • webpushd/WebPushDaemon.mm:

(WebPushD::MessageInfo::removeAllPushSubscriptions::encodeReply):
(WebPushD::MessageInfo::removePushSubscriptionsForOrigin::encodeReply):
(WebPushD::Daemon::decodeAndHandleMessage):
(WebPushD::Daemon::unsubscribeFromPushService):
(WebPushD::Daemon::removeAllPushSubscriptions):
(WebPushD::Daemon::removePushSubscriptionsForOrigin):

Tools:

Add new tests to make sure that we delete push subscriptions when unregistering a service
worker or deleting website data.

  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
12:11 PM Changeset in webkit [291491] by J Pascoe
  • 4 edits in trunk

Trigger PDF download in captive portal mode instead of using PDF viewer
https://bugs.webkit.org/show_bug.cgi?id=237245
rdar://problem/89525531

Reviewed by Chris Dumez.

Source/WebKit:

This is a stopgap solution since PDF.js needs more cycles to polish.

Added API test WKDownload.CaptivePortalPDF.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForResponseShared):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Tools:

Add API test for captive portal pdf behavior.

  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm:

(tempPDFThatDoesNotExist):

11:48 AM Changeset in webkit [291490] by Jonathan Bedard
  • 7 edits in trunk/Tools

[git-webkit] Make radar conditional on authentication
https://bugs.webkit.org/show_bug.cgi?id=238051
<rdar://problem/90384655>

Reviewed by Aakash Jain.

  • Tools/Scripts/libraries/webkitbugspy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py:

(Tracker.init): Only instantiate client with valid authentication.
(Tracker.authentication): Catch exceptions from failed authentication.

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

(Scm.init): Only instantiate Radar as a tracker with valid authentication.

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

11:06 AM Changeset in webkit [291489] by Russell Epstein
  • 3 edits in branches/safari-614.1.6-branch/Source/WebKit

Cherry-pick r291437. rdar://problem/90445115

Unreviewed, reverting r290835.
https://bugs.webkit.org/show_bug.cgi?id=238044

Disruptive change

Reverted changeset:

"[iOS] Hard link AVPictureInPictureController"
https://bugs.webkit.org/show_bug.cgi?id=237227
https://commits.webkit.org/r290835

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

11:06 AM Changeset in webkit [291488] by Russell Epstein
  • 3 edits in branches/safari-614.1.6-branch/Source/WebKit

Cherry-pick r291429. rdar://problem/90445115

Unreviewed, reverting r291352.
https://bugs.webkit.org/show_bug.cgi?id=238039

Disruptive change

Reverted changeset:

"Incorrect header name used in has_include"
https://bugs.webkit.org/show_bug.cgi?id=237914
https://commits.webkit.org/r291352

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

9:45 AM Changeset in webkit [291487] by eocanha@igalia.com
  • 2 edits in trunk/Source/WebCore

[GStreamer] Add stop position to the range request
https://bugs.webkit.org/show_bug.cgi?id=238028

Reviewed by Philippe Normand.

Currently, the range requests performed by WebKitWebSourceGStreamer indicate a range
start position but not a range stop one, even though it's set in the internal
members->stopPosition attribute.

This may not be a problem when WebKitWebSrc is used as a source for the whole video,
but certainly is when it's used as an embedded source inside adaptive demux
(replacing SoupHttpSrc). It causes decoding errors in some MPEG-DASH streams.
See: https://github.com/WebPlatformForEmbedded/WPEWebKit/issues/813

This patch is authored by Eugene Mutavchi <Ievgen_Mutavchi@comcast.com>
See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/814

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: Apply stopPosition to the range request when it's valid.
8:39 AM Changeset in webkit [291486] by Patrick Griffis
  • 2 edits in trunk/Tools

[Flatpak] Pass extra webkit-flatpak args to sub-command
https://bugs.webkit.org/show_bug.cgi?id=238027

Reviewed by Carlos Garcia Campos.

This adds the abillity to run something like:

webkit-flatpak --command=echo -- --help

Where our script doesn't parse anything after -- and it gets passed to the subcommand.

  • flatpak/flatpakutils.py:

(extract_extra_command_args):
(WebkitFlatpak.load_from_args):
(WebkitFlatpak.setup_dev_env):

8:08 AM Changeset in webkit [291485] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION(r290356-r290351?): [ iOS EWS ] 3 imported/w3c/web-platform-tests/service-workers/service-worker/* tests are constant text failures.
https://bugs.webkit.org/show_bug.cgi?id=237160
<rdar://problem/89440067>

Reviewed by Chris Dumez.

When we try reusing a resource in the MemoryCache that was provided by a service worker, we might need to revalidate it.
In that case, we might add revalidation headers that will show up in service workers fetch event request.
To prevent this, we reload instead of revalidating at document level.
The service worker will then be able to revalidate itself the resource since it is probably in its memory cache.

Covered by test that is no longer flaky.

  • loader/cache/CachedResourceLoader.cpp:
7:31 AM Changeset in webkit [291484] by commit-queue@webkit.org
  • 4 edits in trunk

[GStreamer] Migrate gst-full support to 1.20
https://bugs.webkit.org/show_bug.cgi?id=237772

Patch by Philippe Normand <pnormand@igalia.com> on 2022-03-18
Reviewed by Xabier Rodriguez-Calvar.

.:

  • Source/cmake/GStreamerChecks.cmake:

Source/WebCore:

  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::registerWebKitGStreamerElements): GStreamer 1.20 no longer requires manual
initialization of gst-full. It is done during the gst_init().

7:27 AM Changeset in webkit [291483] by commit-queue@webkit.org
  • 34 edits
    50 adds in trunk

[GStreamer] Initial import of the GstWebRTC backend
https://bugs.webkit.org/show_bug.cgi?id=236540

Patch by Philippe Normand <pnormand@igalia.com> on 2022-03-18
Reviewed by Carlos Garcia Campos and Xabier Rodriguez-Calvar.

.:

Enable GstWebRTC by default if a recent-enough (>= 1.20) version is available.

  • Source/cmake/FindGStreamer.cmake:
  • Source/cmake/GStreamerChecks.cmake:
  • Source/cmake/GStreamerDefinitions.cmake:
  • Source/cmake/GStreamerDependencies.cmake:

Source/WebCore:

Initial GstWebRTC backend. A lot of features unimplemented still, but we will incrementally
improve the layout test coverage in follow-up patches. Most notable short-comings currently:

  • DataChannel support is incomplete (bug 235879)
  • Network traffic not routed through Network process yet
  • Stats support incomplete
  • DTMF support unimplemented
  • ICE restarts not supported yet
  • Re-negotiation unlikely to work
  • Simulcast not handled yet
  • Balanced bundle not supported
  • RTX and FEC un-tested, but shouldn't be hard to fix
  • Modules/mediastream/MediaDevices.cpp:
  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::PeerConnectionBackend::generateCertificate):

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::create):

  • Modules/mediastream/gstreamer/GStreamerDataChannelHandler.cpp: Added.

(WebCore::GStreamerDataChannelHandler::fromRTCDataChannelInit):
(WebCore::GStreamerDataChannelHandler::channelEvent):
(WebCore::GStreamerDataChannelHandler::GStreamerDataChannelHandler):
(WebCore::GStreamerDataChannelHandler::~GStreamerDataChannelHandler):
(WebCore::GStreamerDataChannelHandler::setClient):
(WebCore::GStreamerDataChannelHandler::sendStringData):
(WebCore::GStreamerDataChannelHandler::sendRawData):
(WebCore::GStreamerDataChannelHandler::close):
(WebCore::GStreamerDataChannelHandler::checkState):
(WebCore::GStreamerDataChannelHandler::readyStateChanged):
(WebCore::GStreamerDataChannelHandler::onMessageData):
(WebCore::GStreamerDataChannelHandler::onMessageString):
(WebCore::GStreamerDataChannelHandler::onError):
(WebCore::GStreamerDataChannelHandler::onBufferedAmountLow):
(WebCore::GStreamerDataChannelHandler::postTask):

  • Modules/mediastream/gstreamer/GStreamerDataChannelHandler.h: Added.
  • Modules/mediastream/gstreamer/GStreamerDtlsTransportBackend.cpp: Added.

(WebCore::GStreamerDtlsTransportBackend::GStreamerDtlsTransportBackend):
(WebCore::GStreamerDtlsTransportBackend::~GStreamerDtlsTransportBackend):
(WebCore::GStreamerDtlsTransportBackend::iceTransportBackend):
(WebCore::GStreamerDtlsTransportBackend::registerClient):
(WebCore::GStreamerDtlsTransportBackend::unregisterClient):
(WebCore::GStreamerDtlsTransportBackend::stateChanged):

  • Modules/mediastream/gstreamer/GStreamerDtlsTransportBackend.h: Added.
  • Modules/mediastream/gstreamer/GStreamerIceTransportBackend.cpp: Added.

(WebCore::GStreamerIceTransportBackend::GStreamerIceTransportBackend):
(WebCore::GStreamerIceTransportBackend::~GStreamerIceTransportBackend):
(WebCore::GStreamerIceTransportBackend::iceTransportChanged):
(WebCore::GStreamerIceTransportBackend::registerClient):
(WebCore::GStreamerIceTransportBackend::unregisterClient):
(WebCore::GStreamerIceTransportBackend::stateChanged):
(WebCore::GStreamerIceTransportBackend::gatheringStateChanged):

  • Modules/mediastream/gstreamer/GStreamerIceTransportBackend.h: Added.
  • Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp: Added.

(WebCore::GStreamerMediaEndpoint::GStreamerMediaEndpoint):
(WebCore::GStreamerMediaEndpoint::initializePipeline):
(WebCore::GStreamerMediaEndpoint::~GStreamerMediaEndpoint):
(WebCore::GStreamerMediaEndpoint::teardownPipeline):
(WebCore::GStreamerMediaEndpoint::handleMessage):
(WebCore::GStreamerMediaEndpoint::disposeElementChain):
(WebCore::GStreamerMediaEndpoint::setConfiguration):
(WebCore::GStreamerMediaEndpoint::restartIce):
(WebCore::fetchDescription):
(WebCore::fetchSignalingState):
(WebCore::descriptionsFromWebRTCBin):
(WebCore::GStreamerMediaEndpoint::doSetLocalDescription):
(WebCore::GStreamerMediaEndpoint::setRemoteDescriptionSucceeded):
(WebCore::GStreamerMediaEndpoint::doSetRemoteDescription):
(WebCore::SetDescriptionCallData::SetDescriptionCallData):
(WebCore::GStreamerMediaEndpoint::setDescription):
(WebCore::GStreamerMediaEndpoint::storeRemoteMLineInfo):
(WebCore::GStreamerMediaEndpoint::configureAndLinkSource):
(WebCore::GStreamerMediaEndpoint::requestPad):
(WebCore::GStreamerMediaEndpoint::addTrack):
(WebCore::GStreamerMediaEndpoint::removeTrack):
(WebCore::GStreamerMediaEndpoint::doCreateOffer):
(WebCore::GStreamerMediaEndpoint::doCreateAnswer):
(WebCore::GStreamerMediaEndpoint::initiate):
(WebCore::GStreamerMediaEndpoint::getStats):
(WebCore::GStreamerMediaEndpoint::mediaStreamFromRTCStream):
(WebCore::GStreamerMediaEndpoint::addRemoteStream):
(WebCore::GStreamerMediaEndpoint::removeRemoteStream):
(WebCore::GStreamerMediaEndpoint::createTransceiverBackends):
(WebCore::GStreamerMediaEndpoint::addTransceiver):
(WebCore::GStreamerMediaEndpoint::createSourceForTrack):
(WebCore::GStreamerMediaEndpoint::setSenderSourceFromTrack):
(WebCore::GStreamerMediaEndpoint::transceiverBackendFromSender):
(WebCore::GStreamerMediaEndpoint::addIceCandidate):
(WebCore::GStreamerMediaEndpoint::createDataChannel):
(WebCore::GStreamerMediaEndpoint::onDataChannel):
(WebCore::GStreamerMediaEndpoint::close):
(WebCore::GStreamerMediaEndpoint::stop):
(WebCore::GStreamerMediaEndpoint::suspend):
(WebCore::GStreamerMediaEndpoint::resume):
(WebCore::GStreamerMediaEndpoint::onNegotiationNeeded):
(WebCore::GStreamerMediaEndpoint::onIceConnectionChange):
(WebCore::GStreamerMediaEndpoint::onIceGatheringChange):
(WebCore::GStreamerMediaEndpoint::onIceCandidate):
(WebCore::GStreamerMediaEndpoint::createSessionDescriptionSucceeded):
(WebCore::GStreamerMediaEndpoint::createSessionDescriptionFailed):
(WebCore::GStreamerMediaEndpoint::collectTransceivers):
(WebCore::GStreamerMediaEndpoint::gatherStatsForLogging):
(WebCore::RTCStatsLogger::RTCStatsLogger):
(WebCore::RTCStatsLogger::toJSONString const):
(WebCore::GStreamerMediaEndpoint::processStats):
(WebCore::GStreamerMediaEndpoint::onStatsDelivered):
(WebCore::GStreamerMediaEndpoint::startLoggingStats):
(WebCore::GStreamerMediaEndpoint::stopLoggingStats):
(WebCore::GStreamerMediaEndpoint::logChannel const):
(WebCore::GStreamerMediaEndpoint::statsLogInterval const):
(WebCore::GStreamerMediaEndpoint::gatherDecoderImplementationName):
(WTF::LogArgument<WebCore::RTCStatsLogger>::toString):

  • Modules/mediastream/gstreamer/GStreamerMediaEndpoint.h: Added.

(WebCore::GStreamerMediaEndpoint::create):
(WebCore::GStreamerMediaEndpoint::isStopped const):
(WebCore::GStreamerMediaEndpoint::isNegotiationNeeded const):
(WebCore::GStreamerMediaEndpoint::pipeline const):

  • Modules/mediastream/gstreamer/GStreamerPeerConnectionBackend.cpp: Added.

(WebCore::createGStreamerPeerConnectionBackend):
(WebCore::PeerConnectionBackend::receiverCapabilities):
(WebCore::PeerConnectionBackend::senderCapabilities):
(WebCore::GStreamerPeerConnectionBackend::GStreamerPeerConnectionBackend):
(WebCore::GStreamerPeerConnectionBackend::suspend):
(WebCore::GStreamerPeerConnectionBackend::resume):
(WebCore::GStreamerPeerConnectionBackend::restartIce):
(WebCore::GStreamerPeerConnectionBackend::setConfiguration):
(WebCore::GStreamerPeerConnectionBackend::getStats):
(WebCore::backendFromRTPSender):
(WebCore::GStreamerPeerConnectionBackend::doSetLocalDescription):
(WebCore::GStreamerPeerConnectionBackend::doSetRemoteDescription):
(WebCore::GStreamerPeerConnectionBackend::doCreateOffer):
(WebCore::GStreamerPeerConnectionBackend::doCreateAnswer):
(WebCore::GStreamerPeerConnectionBackend::close):
(WebCore::GStreamerPeerConnectionBackend::doStop):
(WebCore::GStreamerPeerConnectionBackend::doAddIceCandidate):
(WebCore::GStreamerPeerConnectionBackend::createReceiver):
(WebCore::GStreamerPeerConnectionBackend::createDataChannelHandler):
(WebCore::findExistingSender):
(WebCore::GStreamerPeerConnectionBackend::addTrack):
(WebCore::GStreamerPeerConnectionBackend::addTransceiverFromTrackOrKind):
(WebCore::GStreamerPeerConnectionBackend::addTransceiver):
(WebCore::GStreamerPeerConnectionBackend::setSenderSourceFromTrack):
(WebCore::backendFromRTPTransceiver):
(WebCore::GStreamerPeerConnectionBackend::existingTransceiver):
(WebCore::GStreamerPeerConnectionBackend::newRemoteTransceiver):
(WebCore::GStreamerPeerConnectionBackend::collectTransceivers):
(WebCore::GStreamerPeerConnectionBackend::removeTrack):
(WebCore::GStreamerPeerConnectionBackend::applyRotationForOutgoingVideoSources):
(WebCore::GStreamerPeerConnectionBackend::gatherDecoderImplementationName):
(WebCore::GStreamerPeerConnectionBackend::isNegotiationNeeded const):

  • Modules/mediastream/gstreamer/GStreamerPeerConnectionBackend.h: Added.
  • Modules/mediastream/gstreamer/GStreamerRtpReceiverBackend.cpp: Added.

(WebCore::GStreamerRtpReceiverBackend::getParameters):
(WebCore::GStreamerRtpReceiverBackend::getContributingSources const):
(WebCore::GStreamerRtpReceiverBackend::getSynchronizationSources const):
(WebCore::GStreamerRtpReceiverBackend::createSource):
(WebCore::GStreamerRtpReceiverBackend::rtcRtpTransformBackend):
(WebCore::GStreamerRtpReceiverBackend::dtlsTransportBackend):

  • Modules/mediastream/gstreamer/GStreamerRtpReceiverBackend.h: Added.
  • Modules/mediastream/gstreamer/GStreamerRtpReceiverTransformBackend.cpp: Added.

(WebCore::mediaTypeFromReceiver):
(WebCore::GStreamerRtpReceiverTransformBackend::GStreamerRtpReceiverTransformBackend):
(WebCore::GStreamerRtpReceiverTransformBackend::~GStreamerRtpReceiverTransformBackend):
(WebCore::GStreamerRtpReceiverTransformBackend::setTransformableFrameCallback):
(WebCore::GStreamerRtpReceiverTransformBackend::requestKeyFrame):

  • Modules/mediastream/gstreamer/GStreamerRtpReceiverTransformBackend.h: Added.
  • Modules/mediastream/gstreamer/GStreamerRtpSenderBackend.cpp: Added.

(WebCore::updateTrackSource):
(WebCore::GStreamerRtpSenderBackend::startSource):
(WebCore::GStreamerRtpSenderBackend::stopSource):
(WebCore::GStreamerRtpSenderBackend::replaceTrack):
(WebCore::GStreamerRtpSenderBackend::getParameters const):
(WebCore::GStreamerRtpSenderBackend::setParameters):
(WebCore::GStreamerRtpSenderBackend::createDTMFBackend):
(WebCore::GStreamerRtpSenderBackend::rtcRtpTransformBackend):
(WebCore::GStreamerRtpSenderBackend::setMediaStreamIds):
(WebCore::GStreamerRtpSenderBackend::dtlsTransportBackend):

  • Modules/mediastream/gstreamer/GStreamerRtpSenderBackend.h: Added.
  • Modules/mediastream/gstreamer/GStreamerRtpSenderTransformBackend.cpp: Added.

(WebCore::mediaTypeFromSender):
(WebCore::GStreamerRtpSenderTransformBackend::GStreamerRtpSenderTransformBackend):
(WebCore::GStreamerRtpSenderTransformBackend::~GStreamerRtpSenderTransformBackend):
(WebCore::GStreamerRtpSenderTransformBackend::setTransformableFrameCallback):
(WebCore::GStreamerRtpSenderTransformBackend::requestKeyFrame):

  • Modules/mediastream/gstreamer/GStreamerRtpSenderTransformBackend.h: Added.
  • Modules/mediastream/gstreamer/GStreamerRtpTransceiverBackend.cpp: Added.

(WebCore::GStreamerRtpTransceiverBackend::GStreamerRtpTransceiverBackend):
(WebCore::GStreamerRtpTransceiverBackend::createReceiverBackend):
(WebCore::GStreamerRtpTransceiverBackend::createSenderBackend):
(WebCore::GStreamerRtpTransceiverBackend::direction const):
(WebCore::GStreamerRtpTransceiverBackend::currentDirection const):
(WebCore::GStreamerRtpTransceiverBackend::setDirection):
(WebCore::GStreamerRtpTransceiverBackend::mid):
(WebCore::GStreamerRtpTransceiverBackend::stop):
(WebCore::GStreamerRtpTransceiverBackend::stopped const):
(WebCore::GStreamerRtpTransceiverBackend::setCodecPreferences):

  • Modules/mediastream/gstreamer/GStreamerRtpTransceiverBackend.h: Added.
  • Modules/mediastream/gstreamer/GStreamerRtpTransformBackend.cpp: Added.

(WebCore::GStreamerRtpTransformBackend::setInputCallback):
(WebCore::GStreamerRtpTransformBackend::clearTransformableFrameCallback):
(WebCore::GStreamerRtpTransformBackend::processTransformedFrame):

  • Modules/mediastream/gstreamer/GStreamerRtpTransformBackend.h: Added.

(WebCore::GStreamerRtpTransformBackend::GStreamerRtpTransformBackend):

  • Modules/mediastream/gstreamer/GStreamerSctpTransportBackend.cpp: Added.

(WebCore::toRTCSctpTransportState):
(WebCore::GStreamerSctpTransportBackend::GStreamerSctpTransportBackend):
(WebCore::GStreamerSctpTransportBackend::~GStreamerSctpTransportBackend):
(WebCore::GStreamerSctpTransportBackend::dtlsTransportBackend):
(WebCore::GStreamerSctpTransportBackend::registerClient):
(WebCore::GStreamerSctpTransportBackend::unregisterClient):
(WebCore::GStreamerSctpTransportBackend::stateChanged):

  • Modules/mediastream/gstreamer/GStreamerSctpTransportBackend.h: Added.
  • Modules/mediastream/gstreamer/GStreamerStatsCollector.cpp: Added.

(WebCore::fillRTCStats):
(WebCore::fillRTCRTPStreamStats):
(WebCore::fillRTCCodecStats):
(WebCore::fillInboundRTPStreamStats):
(WebCore::fillOutboundRTPStreamStats):
(WebCore::fillRTCPeerConnectionStats):
(WebCore::fillRTCTransportStats):
(WebCore::fillReportCallback):
(WebCore::CallbackHolder::CallbackHolder):
(WebCore::GStreamerStatsCollector::getStats):

  • Modules/mediastream/gstreamer/GStreamerStatsCollector.h: Added.

(WebCore::GStreamerStatsCollector::create):
(WebCore::GStreamerStatsCollector::setElement):

  • Modules/mediastream/gstreamer/GStreamerWebRTCUtils.cpp: Added.

(WebCore::toRTCIceComponent):
(WebCore::toRTCIceProtocol):
(WebCore::toRTCIceTcpCandidateType):
(WebCore::toRTCIceCandidateType):
(WebCore::toRTCError):
(WebCore::toWebRTCBitRatePriority):
(WebCore::fromRTCEncodingParameters):
(WebCore::fromWebRTCBitRatePriority):
(WebCore::toRTCEncodingParameters):
(WebCore::toRTCRtpSendParameters):
(WebCore::ensureDebugCategoryInitialized):
(WebCore::parseIceCandidateSDP):
(WebCore::x509Serialize):
(WebCore::privateKeySerialize):
(WebCore::generateCertificate):
(WebCore::sdpMediaHasAttributeKey):

  • Modules/mediastream/gstreamer/GStreamerWebRTCUtils.h: Added.

(WebCore::toRTCRtpTransceiverDirection):
(WebCore::fromRTCRtpTransceiverDirection):
(WebCore::toSessionDescriptionType):
(WebCore::fromSessionDescriptionType):
(WebCore::toSignalingState):
(WebCore::toRTCIceConnectionState):
(WebCore::toRTCDtlsTransportState):
(WebCore::toRTCIceTransportState):
(WebCore::toRTCIceGatheringState):
(WebCore::bundlePolicyFromConfiguration):
(WebCore::iceTransportPolicyFromConfiguration):
(WebCore::toRTCErrorDetailType):

  • platform/GStreamer.cmake:
  • platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:

(WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
(WebCore::AudioSourceProviderGStreamer::~AudioSourceProviderGStreamer):
(WebCore::AudioSourceProviderGStreamer::handleNewDeinterleavePad):

  • platform/audio/gstreamer/GStreamerAudioStreamDescription.h:
  • platform/graphics/gstreamer/GRefPtrGStreamer.cpp:

(WTF::adoptGRef):
(WTF::refGPtr<GstWebRTCRTPReceiver>):
(WTF::derefGPtr<GstWebRTCRTPReceiver>):
(WTF::refGPtr<GstWebRTCRTPSender>):
(WTF::derefGPtr<GstWebRTCRTPSender>):
(WTF::refGPtr<GstWebRTCRTPTransceiver>):
(WTF::derefGPtr<GstWebRTCRTPTransceiver>):
(WTF::refGPtr<GstWebRTCDataChannel>):
(WTF::derefGPtr<GstWebRTCDataChannel>):
(WTF::refGPtr<GstWebRTCDTLSTransport>):
(WTF::derefGPtr<GstWebRTCDTLSTransport>):
(WTF::refGPtr<GstWebRTCICETransport>):
(WTF::derefGPtr<GstWebRTCICETransport>):

  • platform/graphics/gstreamer/GRefPtrGStreamer.h:
  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::capsMediaType):

  • platform/graphics/gstreamer/GUniquePtrGStreamer.h:
  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::createAudioSourceProvider):

  • platform/mediastream/gstreamer/GStreamerAudioCapturer.cpp:

(WebCore::GStreamerAudioCapturer::GStreamerAudioCapturer):
(WebCore::GStreamerAudioCapturer::createConverter):

  • platform/mediastream/gstreamer/GStreamerCapturer.cpp:

(WebCore::GStreamerCapturer::createSource):

  • platform/mediastream/gstreamer/GStreamerDTMFSenderBackend.cpp: Added.

(WebCore::GStreamerDTMFSenderBackend::GStreamerDTMFSenderBackend):
(WebCore::GStreamerDTMFSenderBackend::~GStreamerDTMFSenderBackend):
(WebCore::GStreamerDTMFSenderBackend::canInsertDTMF):
(WebCore::GStreamerDTMFSenderBackend::playTone):
(WebCore::GStreamerDTMFSenderBackend::tones const):
(WebCore::GStreamerDTMFSenderBackend::duration const):
(WebCore::GStreamerDTMFSenderBackend::interToneGap const):
(WebCore::GStreamerDTMFSenderBackend::onTonePlayed):

  • platform/mediastream/gstreamer/GStreamerDTMFSenderBackend.h: Added.
  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:

(webkitMediaStreamSrcAddTrack):

  • platform/mediastream/gstreamer/GStreamerVideoEncoder.cpp:

(webkit_webrtc_video_encoder_class_init):

  • platform/mediastream/gstreamer/RealtimeIncomingAudioSourceGStreamer.cpp: Added.

(WebCore::RealtimeIncomingAudioSourceGStreamer::RealtimeIncomingAudioSourceGStreamer):
(WebCore::RealtimeIncomingAudioSourceGStreamer::~RealtimeIncomingAudioSourceGStreamer):
(WebCore::RealtimeIncomingAudioSourceGStreamer::startProducingData):
(WebCore::RealtimeIncomingAudioSourceGStreamer::stopProducingData):
(WebCore::RealtimeIncomingAudioSourceGStreamer::capabilities):
(WebCore::RealtimeIncomingAudioSourceGStreamer::settings):
(WebCore::RealtimeIncomingAudioSourceGStreamer::dispatchSample):

  • platform/mediastream/gstreamer/RealtimeIncomingAudioSourceGStreamer.h: Added.

(WebCore::RealtimeIncomingAudioSourceGStreamer::create):
(isType):

  • platform/mediastream/gstreamer/RealtimeIncomingSourceGStreamer.cpp: Added.

(WebCore::RealtimeIncomingSourceGStreamer::RealtimeIncomingSourceGStreamer):
(WebCore::RealtimeIncomingSourceGStreamer::lockValve const):
(WebCore::RealtimeIncomingSourceGStreamer::releaseValve const):
(WebCore::RealtimeIncomingSourceGStreamer::registerClient):

  • platform/mediastream/gstreamer/RealtimeIncomingSourceGStreamer.h: Added.

(WebCore::RealtimeIncomingSourceGStreamer::bin):
(WebCore::RealtimeIncomingSourceGStreamer::dispatchSample):

  • platform/mediastream/gstreamer/RealtimeIncomingVideoSourceGStreamer.cpp: Added.

(WebCore::RealtimeIncomingVideoSourceGStreamer::RealtimeIncomingVideoSourceGStreamer):
(WebCore::RealtimeIncomingVideoSourceGStreamer::startProducingData):
(WebCore::RealtimeIncomingVideoSourceGStreamer::stopProducingData):
(WebCore::RealtimeIncomingVideoSourceGStreamer::capabilities):
(WebCore::RealtimeIncomingVideoSourceGStreamer::settings):
(WebCore::RealtimeIncomingVideoSourceGStreamer::settingsDidChange):
(WebCore::RealtimeIncomingVideoSourceGStreamer::dispatchSample):

  • platform/mediastream/gstreamer/RealtimeIncomingVideoSourceGStreamer.h: Added.

(WebCore::RealtimeIncomingVideoSourceGStreamer::create):
(isType):

  • platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceGStreamer.cpp: Added.

(WebCore::RealtimeOutgoingAudioSourceGStreamer::RealtimeOutgoingAudioSourceGStreamer):
(WebCore::RealtimeOutgoingAudioSourceGStreamer::setPayloadType):

  • platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceGStreamer.h: Added.
  • platform/mediastream/gstreamer/RealtimeOutgoingMediaSourceGStreamer.cpp: Added.

(WebCore::RealtimeOutgoingMediaSourceGStreamer::RealtimeOutgoingMediaSourceGStreamer):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::~RealtimeOutgoingMediaSourceGStreamer):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::setSource):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::start):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::stop):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::sourceMutedChanged):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::sourceEnabledChanged):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::initializeFromTrack):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::link):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::setSinkPad):

  • platform/mediastream/gstreamer/RealtimeOutgoingMediaSourceGStreamer.h: Added.

(WebCore::RealtimeOutgoingMediaSourceGStreamer::source const):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::allowedCaps const):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::pad const):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::sender const):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::bin const):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::setPayloadType):

  • platform/mediastream/gstreamer/RealtimeOutgoingVideoSourceGStreamer.cpp: Added.

(WebCore::RealtimeOutgoingVideoSourceGStreamer::RealtimeOutgoingVideoSourceGStreamer):
(WebCore::RealtimeOutgoingVideoSourceGStreamer::setPayloadType):

  • platform/mediastream/gstreamer/RealtimeOutgoingVideoSourceGStreamer.h: Added.
  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setWebRTCH265Support):
(WebCore::Internals::setWebRTCVP9Support):
(WebCore::Internals::setWebRTCVP9VTBSupport):
(WebCore::Internals::setEnableWebRTCEncryption):
(WebCore::Internals::setUseDTLS10):

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml: Unconditionally enable WebRTC when GstWebRTC is

enabled. We don't have a runtime Provider yet.

  • Scripts/Preferences/WebPreferencesExperimental.yaml: Disable encoded transforms unless libwebrtc is enabled.
  • wtf/glib/GRefPtr.cpp: Add GArray handling.

(WTF::refGPtr):
(WTF::derefGPtr):

  • wtf/glib/GRefPtr.h:

Tools:

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox): Allow libnice debug log environment variable in runtime sandbox.

LayoutTests:

  • platform/glib/TestExpectations: Flag most WebRTC as failing. During this first development

cycle I focused mostly on fixing crashes and only fixed a few failures. The remaining ones
will be adressed in follow-up patches.

  • platform/glib/fast/mediastream/RTCPeerConnection-localDescription-expected.txt: Added.
  • platform/glib/fast/mediastream/RTCPeerConnection-remoteDescription-expected.txt: Added.
  • platform/glib/fast/mediastream/RTCPeerConnection-setRemoteDescription-offer-expected.txt: Added.
  • platform/glib/fast/mediastream/RTCPeerConnection-stable-expected.txt: Added.
7:19 AM Changeset in webkit [291482] by Carlos Garcia Campos
  • 5 edits
    1 add in trunk

[GLIB] Make it possible to call GRefPtr::outPtr() multiple times wihtout an explicit clear
https://bugs.webkit.org/show_bug.cgi?id=238070

Reviewed by Adrian Perez de Castro.

Source/WTF:

Clear the GRefPtr before returning the value in outPtr(), similar to what GUniqueOutPtr does, since it's easy to
forget to explicitly call clear from the callers.

  • wtf/glib/GRefPtr.h:

(WTF::GRefPtr::outPtr):

Tools:

Add a unit tests for GRefPtr.

  • TestWebKitAPI/PlatformGTK.cmake:
  • TestWebKitAPI/PlatformWPE.cmake:
  • TestWebKitAPI/Tests/WTF/glib/GRefPtr.cpp: Added.

(TestWebKitAPI::GWeakPtr::GWeakPtr):
(TestWebKitAPI::GWeakPtr::~GWeakPtr):
(TestWebKitAPI::GWeakPtr::set):
(TestWebKitAPI::TEST):

6:49 AM Changeset in webkit [291481] by Alan Bujtas
  • 17 edits in trunk/Source/WebCore

[IFC][Integration] Rename InlineIterator::Line::closestRun* to closestBoxFor*
https://bugs.webkit.org/show_bug.cgi?id=238064

Reviewed by Antti Koivisto.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::localCaretRectForCharacterOffset):

  • dom/Position.cpp:

(WebCore::Position::upstream const):
(WebCore::Position::downstream const):
(WebCore::Position::rendersInDifferentPosition const):
(WebCore::Position::inlineBoxAndOffset const):
(WebCore::searchAheadForBetterMatch):
(WebCore::Position::inlineRunAndOffset const): Deleted.

  • dom/Position.h:
  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::directionOfSelection):

  • editing/InlineRunAndOffset.h:
  • editing/RenderedPosition.cpp:

(WebCore::RenderedPosition::RenderedPosition):
(WebCore::RenderedPosition::previousLeafOnLine const):
(WebCore::RenderedPosition::nextLeafOnLine const):
(WebCore::RenderedPosition::isEquivalent const):
(WebCore::RenderedPosition::bidiLevelOnLeft const):
(WebCore::RenderedPosition::bidiLevelOnRight const):
(WebCore::RenderedPosition::leftBoundaryOfBidiRun):
(WebCore::RenderedPosition::rightBoundaryOfBidiRun):
(WebCore::RenderedPosition::atLeftBoundaryOfBidiRun const):
(WebCore::RenderedPosition::atRightBoundaryOfBidiRun const):
(WebCore::RenderedPosition::absoluteRect const):

  • editing/RenderedPosition.h:

(WebCore::RenderedPosition::line const):
(WebCore::RenderedPosition::atLeftmostOffsetInBox const):
(WebCore::RenderedPosition::atRightmostOffsetInBox const):

  • editing/VisiblePosition.cpp:

(WebCore::VisiblePosition::leftVisuallyDistinctCandidate const):
(WebCore::VisiblePosition::rightVisuallyDistinctCandidate const):
(WebCore::VisiblePosition::inlineBoxAndOffset const):
(WebCore::VisiblePosition::localCaretRect const):
(WebCore::VisiblePosition::absoluteSelectionBoundsForLine const):
(WebCore::VisiblePosition::inlineRunAndOffset const): Deleted.

  • editing/VisiblePosition.h:
  • editing/VisibleUnits.cpp:

(WebCore::isTextOrLineBreakBox):
(WebCore::previousTextOrLineBreakBox):
(WebCore::nextTextOrLineBreakBox):
(WebCore::startTextOrLineBreakBox):
(WebCore::endTextOrLineBreakBox):
(WebCore::logicallyPreviousBox):
(WebCore::logicallyNextBox):
(WebCore::wordBreakIteratorForMinOffsetBoundary):
(WebCore::wordBreakIteratorForMaxOffsetBoundary):
(WebCore::visualWordPosition):
(WebCore::startPositionForLine):
(WebCore::endPositionForLine):
(WebCore::previousLinePosition):
(WebCore::nextLinePosition):
(WebCore::isTextOrLineBreakRun): Deleted.
(WebCore::previousTextOrLineBreakRun): Deleted.
(WebCore::nextTextOrLineBreakRun): Deleted.
(WebCore::startTextOrLineBreakRun): Deleted.
(WebCore::endTextOrLineBreakRun): Deleted.
(WebCore::logicallyPreviousRun): Deleted.
(WebCore::logicallyNextRun): Deleted.

  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::Line::closestBoxForPoint const):
(WebCore::InlineIterator::Line::closestBoxForLogicalLeftPosition const):
(WebCore::InlineIterator::Line::closestRunForPoint const): Deleted.
(WebCore::InlineIterator::Line::closestRunForLogicalLeftPosition const): Deleted.

  • layout/integration/InlineIteratorLine.h:
  • rendering/CaretRectComputation.cpp:

(WebCore::computeCaretRectForText):
(WebCore::computeCaretRectForLineBreak):
(WebCore::computeCaretRectForSVGInlineText):
(WebCore::computeCaretRectForBox):
(WebCore::computeCaretRectForBlock):
(WebCore::computeLocalCaretRect):

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

(WebCore::positionForRun):
(WebCore::RenderBlockFlow::findClosestTextAtAbsolutePoint):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):

  • rendering/RenderObject.h:
6:30 AM Changeset in webkit [291480] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

[Linux] GBMDevice as a thread-specific object is problematic
https://bugs.webkit.org/show_bug.cgi?id=237758
<rdar://problem/90476889>

Patch by Zan Dobersek <zdobersek@igalia.com> on 2022-03-18
Reviewed by Alejandro G. Castro.

Per-thread GBMDevice instances (and the internal gbm_device objects) can
end up causing trouble if the gbm_bo objects spawned from it are moved
across threads and used after the originating thread (and that thread's
GBMDevice instance) is destroyed. This can happen with a GStreamer
pipeline where repeated playback is possibly moved across different
threads.

The original intention was to preemptively avoid any thread-safety
issues in the libgbm implementations but we haven't seen any yet. That
might change down the line once we adapt against implementations from
different vendors, at which point the most sensible solution would be
to deploy a specific thread on which all libgbm operations would be
handled.

  • platform/graphics/gbm/GBMBufferSwapchain.cpp:

(WebCore::GBMBufferSwapchain::getBuffer):

  • platform/graphics/gbm/GBMDevice.cpp:

(WebCore::GBMDevice::singleton):
(WebCore::GBMDevice::GBMDevice):
(WebCore::GBMDevice::~GBMDevice):
(WebCore::threadSpecificDevice): Deleted.
(WebCore::GBMDevice::get): Deleted.

  • platform/graphics/gbm/GBMDevice.h:
  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:

(WebCore::GraphicsContextGLTextureMapper::platformInitialize):
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::reset):

5:59 AM Changeset in webkit [291479] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.36/Source/WebKit

Merge r291475 - [WPE][GTK] Fix a crash after r290360
https://bugs.webkit.org/show_bug.cgi?id=237917

Reviewed by Youenn Fablet.

When AuxiliaryProcess::shutDown is called for the WebProcess there might be pages not closed yet, for example
when swapping process on navigation, the close message is sent to the page after the shutdown. In the case of
GTK and WPE ports the pages are closed before stopping the run loop to ensure associated resources (like GPU
resources) are released. Closing the last page makes the process termination allowed, which ends up calling
AuxiliaryProcess::terminate again. Also, when the shutdown message is received we don't want to ask again the UI
process whether the process can be terminated, since the UI process asked it.

  • Shared/AuxiliaryProcess.cpp:

(WebKit::AuxiliaryProcess::enableTermination): Return early if m_isInShutDown is true.
(WebKit::AuxiliaryProcess::shutDown): Set m_isInShutDown for the scope.

  • Shared/AuxiliaryProcess.h:
5:59 AM Changeset in webkit [291478] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.36/Source/WebKit

Merge r291472 - Remove AuxiliaryProcess termination timeout
https://bugs.webkit.org/show_bug.cgi?id=238012

Reviewed by Chris Dumez.

It was only used by the plugin process, now it's always set to 0 for all processes, so it's useless.

  • Shared/AuxiliaryProcess.cpp:

(WebKit::AuxiliaryProcess::AuxiliaryProcess):
(WebKit::AuxiliaryProcess::disableTermination):
(WebKit::AuxiliaryProcess::enableTermination):
(WebKit::AuxiliaryProcess::terminationTimerFired): Deleted.

  • Shared/AuxiliaryProcess.h:

(WebKit::AuxiliaryProcess::setTerminationTimeout): Deleted.

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::initializeNewWebProcess):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

5:18 AM Changeset in webkit [291477] by commit-queue@webkit.org
  • 21 edits in trunk

Recycling a webgl context when it has been lost and restored causes a crash
https://bugs.webkit.org/show_bug.cgi?id=238024

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-03-18
Reviewed by Geoffrey Garen.

Source/WebCore:

Simulated context lost makes WebGLRenderingContextBase::m_context = nullptr
Real context lost preserves WebGLRenderingContextBase::m_context.

WebGLRenderingContextBase::maybeRestoreContext() used m_context.

The intention was that simulated context lost never invokes maybeRestoreContext()
as the timer to run maybeRestoreContext() is started only on real context lost.

However, it is possible to invoke simulated context lost after a real context lost,
but before the timer triggers maybeRestoreContext().

The sequence would be:

  1. Lose the context somehow
  2. Wait for webglcontextlost, use event.preventDefault() to request a restore.
  3. Before restore happens, lose the context via simulated context lost. This can be done by creating many contexts or via the WEBGL_lose_context.loseContext().
  4. maybeRestoreContext() would query m_context->getGraphicsResetStatusARB() for console log reasons, trying to explain to the developer why the context was lost. In case simulated context lost set the m_context == nullptr, this would crash.

getGraphicsResetStatusARB() has likely not been accurate for any platform ever.
For ANGLE, it is unimplemented and cannot pinpoint which context caused the context lost.
Just remove getGraphicsResetStatusARB() use from maybeRestoreContext(), this prevents
the crash. Remove it also from WebKit use altogether, it is never used for anything.

Adds the case to webgl/max-active-contexts-webglcontextlost-prevent-default.html

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::loseContextImpl):
(WebCore::WebGLRenderingContextBase::maybeRestoreContext):

  • loader/FrameLoaderClient.h:
  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:
  • platform/graphics/angle/GraphicsContextGLANGLE.h:
  • platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp:
  • platform/graphics/opengl/ExtensionsGLOpenGLCommon.h:
  • platform/graphics/opengl/ExtensionsGLOpenGLES.cpp:
  • platform/graphics/opengl/ExtensionsGLOpenGLES.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:
  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:

Source/WebKit:

Remove GraphicsContextGL::getGraphicsResetStatusARB(), it's unused now.

  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:

(getActiveUniformBlockiv):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToCanvas):
(WebKit::RemoteGraphicsContextGLProxy::paintCompositedResultsToCanvas):
(WebKit::RemoteGraphicsContextGLProxy::markContextLost):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:

LayoutTests:

Creating excessive amount of contexts will lose the oldest context via
"simulated context lost" logic, making the contexts non-restorable.

Previously the test tried to test that requesting a restore on a context that
had simulated context lost would not restore. However, the test was invalid,
as it asserted that the context is still lost immediately after preventDefault():

event.preventDefault();
if (!contexts[0].isContextLost())

document.getElementById("result").textContent = "FAIL";

This is not correct, as the preventDefault() only informs the browser
that the context should be restored. The restore happens asynchronously.

Fix the test logic and add extra cases. Make the logic as such:

  1. Lose the context in some way
  2. Wait for context lost event, request restore
  3. Optionally do something that would trigger another way of losing the context
  4. Run assertions about context being still expectedly lost

The failures in the test expectation:
FAIL getError expected: INVALID_OPERATION. Was NO_ERROR :
FAIL getError expected: CONTEXT_LOST_WEBGL. Was NO_ERROR :
bug 236965

FAIL Expected restore be ignored, but it was not.
bug 238034

  • webgl/max-active-contexts-webglcontextlost-prevent-default.html:
4:58 AM Changeset in webkit [291476] by Cameron McCormack
  • 3 edits
    5 adds in trunk

Remove the 1ms minimum for setTimeout
https://bugs.webkit.org/show_bug.cgi?id=221124
<rdar://problem/73852354>

Reviewed by Sam Weinig.

The HTML spec makes no mention of a 1ms minimum for timers. Removing
the 1ms minimum for setTimeout results in a 0.7-2.1% improvement on
Speedometer, depending on platform and hardware.

The WPT added here demonstrates how this change can affect pages: if a
page schedules a 1ms and then a 0ms timeout in the same turn of the
event loop, then with this patch they will now be fired in the reverse
order. Firefox and Chrome do not impose a 1ms minimum, which reduces
the risk of this being a problem.

Not addressing the setTimeout 1ms minimum here, which should likely also
be removed.

While we're here, settle on "one shot" rather rather than "single
shot" as the term for timers that fire once.

Tests: imported/w3c/web-platform-tests/html/webappapis/timers/zero-settimeout.any.html

imported/w3c/web-platform-tests/html/webappapis/timers/zero-settimeout.any.worker.html

  • page/DOMTimer.h:
  • page/DOMTimer.cpp:

(WebCore::DOMTimer::DOMTimer): We must pass oneShot into
intervalClampedToMinimum, since the way isOneShot determines whether
we are a one shot timer is by checking repeatInterval, which is only
set once startRepeating is called.
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::fired):
(WebCore::DOMTimer::updateTimerIntervalIfNecessary):
(WebCore::DOMTimer::isOneShot const):
(WebCore::DOMTimer::intervalClampedToMinimum const):

2:51 AM Changeset in webkit [291475] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit

[WPE][GTK] Fix a crash after r290360
https://bugs.webkit.org/show_bug.cgi?id=237917

Reviewed by Youenn Fablet.

When AuxiliaryProcess::shutDown is called for the WebProcess there might be pages not closed yet, for example
when swapping process on navigation, the close message is sent to the page after the shutdown. In the case of
GTK and WPE ports the pages are closed before stopping the run loop to ensure associated resources (like GPU
resources) are released. Closing the last page makes the process termination allowed, which ends up calling
AuxiliaryProcess::terminate again. Also, when the shutdown message is received we don't want to ask again the UI
process whether the process can be terminated, since the UI process asked it.

  • Shared/AuxiliaryProcess.cpp:

(WebKit::AuxiliaryProcess::enableTermination): Return early if m_isInShutDown is true.
(WebKit::AuxiliaryProcess::shutDown): Set m_isInShutDown for the scope.

  • Shared/AuxiliaryProcess.h:
2:01 AM Changeset in webkit [291474] by Antti Koivisto
  • 22 edits in trunk

[CSS Container Queries] Basic support for container units
https://bugs.webkit.org/show_bug.cgi?id=238021

Reviewed by Antoine Quint.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/container-queries/container-units-animation-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-units-basic-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-units-computational-independence-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-units-invalidation-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-units-selection-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-units-small-viewport-fallback-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-units-typed-om-expected.txt:

Source/WebCore:

Container Relative Lengths: the cqw, cqh, cqi, cqb, cqmin, cqmax units
https://drafts.csswg.org/css-contain-3/#container-lengths

  • css/CSSPrimitiveValue.cpp:

(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::isStringType):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):

Resolve container units by resolving the query container and computing the value against it.

(WebCore::CSSPrimitiveValue::unitTypeString):
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
(WebCore::CSSPrimitiveValue::equals const):

  • css/CSSPrimitiveValue.h:

(WebCore::CSSPrimitiveValue::isLength):

  • css/CSSToLengthConversionData.cpp:

(WebCore::CSSToLengthConversionData::CSSToLengthConversionData):

  • css/CSSToLengthConversionData.h:

(WebCore::CSSToLengthConversionData::element const):

  • css/CSSUnits.cpp:

(WebCore::unitCategory):
(WebCore::operator<<):

  • css/CSSUnits.h:
  • css/ContainerQuery.h:
  • css/calc/CSSCalcCategoryMapping.cpp:

(WebCore::calcUnitCategory):
(WebCore::calculationCategoryForCombination):
(WebCore::hasDoubleValue):

  • css/parser/CSSParserToken.cpp:

(WebCore::cssPrimitiveValueUnitFromTrie):

Parsing support.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::LengthRawKnownTokenTypeDimensionConsumer::consume):

  • style/ContainerQueryEvaluator.cpp:

(WebCore::Style::ContainerQueryEvaluator::selectContainer const):
(WebCore::Style::ContainerQueryEvaluator::selectContainer):

Factor container selection into static function that can be used from the unit resolution code.

  • style/ContainerQueryEvaluator.h:
  • style/SelectorMatchingState.h:
1:35 AM Changeset in webkit [291473] by Carlos Garcia Campos
  • 22 edits in trunk

Add a public build option for PDF.js
https://bugs.webkit.org/show_bug.cgi?id=238023

Reviewed by Michael Catanzaro.

.:

PDF.js increases the binary size of the library quite a bit, so embedders might want to disable it if they know
they don't need PDF support at all.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:
  • Source/cmake/WebKitFeatures.cmake:

Source/WebCore:

  • dom/DOMImplementation.cpp:

(WebCore::DOMImplementation::createDocument):

  • html/PDFDocument.cpp:
  • html/PDFDocument.h:
  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::isPDFJSResourceLoad const):

  • page/SecurityOrigin.cpp:

(WebCore::shouldTreatAsUniqueOrigin):

  • platform/LegacySchemeRegistry.cpp:

(WebCore::builtinSecureSchemes):

Source/WebKit:

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):

  • WebProcess/Network/WebLoaderStrategy.h:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::objectContentType):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):
(WebKit::WebPage::canShowMIMEType const):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::shouldUsePDFPlugin const):

Source/WTF:

  • Scripts/Preferences/WebPreferencesInternal.yaml:
  • wtf/PlatformEnable.h:
1:32 AM Changeset in webkit [291472] by Carlos Garcia Campos
  • 7 edits in trunk/Source/WebKit

Remove AuxiliaryProcess termination timeout
https://bugs.webkit.org/show_bug.cgi?id=238012

Reviewed by Chris Dumez.

It was only used by the plugin process, now it's always set to 0 for all processes, so it's useless.

  • Shared/AuxiliaryProcess.cpp:

(WebKit::AuxiliaryProcess::AuxiliaryProcess):
(WebKit::AuxiliaryProcess::disableTermination):
(WebKit::AuxiliaryProcess::enableTermination):
(WebKit::AuxiliaryProcess::terminationTimerFired): Deleted.

  • Shared/AuxiliaryProcess.h:

(WebKit::AuxiliaryProcess::setTerminationTimeout): Deleted.

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::initializeNewWebProcess):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

1:30 AM Changeset in webkit [291471] by Carlos Garcia Campos
  • 4 edits in trunk

[ATSPI] accessibility/dropdown-value.html is timing out since added in 248145@main
https://bugs.webkit.org/show_bug.cgi?id=237803
<rdar://problem/90193311>

Reviewed by Andres Gonzalez.

Tools:

The test expects the combo box to expose the selected element name as the string value.

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:

(WTR::AccessibilityUIElement::stringValue): Handle combo boxes as special case and return the selected element
name.

LayoutTests:

  • platform/gtk/TestExpectations: Unskip the test.
1:10 AM Changeset in webkit [291470] by Diego Pino Garcia
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix non-unified build after r291467

  • workers/service/context/ServiceWorkerInspectorProxy.cpp:
12:52 AM Changeset in webkit [291469] by graouts@webkit.org
  • 2 edits
    6 adds in trunk/LayoutTests

REGRESSION(r291129-r291128): [WK1 EWS] 3 imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/* tests are a constant text failure
https://bugs.webkit.org/show_bug.cgi?id=238054
<rdar://problem/90458721>

Unreviewed test gardening.

The scroll-behavior property is not enabled on WK1 so we must have specific test expectations for these tests.

  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk1/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt: Added.
12:35 AM Changeset in webkit [291468] by youenn@apple.com
  • 20 edits in trunk/Source

Remove MediaSample usage from canvas capture code
https://bugs.webkit.org/show_bug.cgi?id=238015

Reviewed by Eric Carlson.

Source/WebCore:

Refactoring to use VideoFrame as interface/wrapper around video frames instead of the more generic MediaSample.
Coverd by existing tests.

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:

(WebCore::CanvasCaptureMediaStreamTrack::Source::captureCanvas):

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::toVideoFrame):
(WebCore::HTMLCanvasElement::toMediaSample): Deleted.

  • html/HTMLCanvasElement.h:
  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::paintCompositedResultsToVideoFrame):
(WebCore::WebGLRenderingContextBase::paintCompositedResultsToMediaSample): Deleted.

  • html/canvas/WebGLRenderingContextBase.h:
  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.h:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm:

(WebCore::GraphicsContextGLCocoa::paintCompositedResultsToVideoFrame):
(WebCore::GraphicsContextGLCocoa::paintCompositedResultsToMediaSample): Deleted.

  • platform/graphics/cv/VideoFrameCV.h:
  • platform/graphics/cv/VideoFrameCV.mm:

(WebCore::VideoFrameCV::createFromPixelBuffer):

Source/WebKit:

  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::paintCompositedResultsToVideoFrame):
(WebKit::RemoteGraphicsContextGL::paintCompositedResultsToMediaSample): Deleted.

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::paintCompositedResultsToVideoFrame):
(WebKit::RemoteGraphicsContextGLProxy::paintCompositedResultsToMediaSample): Deleted.

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
12:33 AM Changeset in webkit [291467] by youenn@apple.com
  • 19 edits in trunk

Keep service workers alive when they are inspected even though they should be terminated
https://bugs.webkit.org/show_bug.cgi?id=237827
<rdar://88313935>

Reviewed by Alex Christensen.

Source/WebCore:

Store in SWServerWorker whether a worker is inspected or is processing push events.
In that case, we delay termination of workers until it is no longer inspected or no longer processing push events.
Two code paths are happening:

  1. A service worker was triggered with service worker clients, and all service worker clients are removed. At that point, we were previously terminating service workers after a delay. Instead, we now only terminate workers that are no longer inspected or no longer processing push events. We reschedule the timer to continue trying removing the context connection.
  2. A service worker is not stopped by removal of service worker clients. In that case, we need to terminate the service workers when inspected and/or push counter gets back to regular (not inspected, no push counter). When terminating such a service worker, we try removing the context connection as well.

To make sure SWServerWorker knows whether inspectable or not, we add connection support to transmit whether inspected from WebProcess.
ServiceWorkerInspectorProxy is responsible to update the inspectable value.
Introduce internals API to set inspected state of a service worker.

Covered by new API tests.

  • testing/ServiceWorkerInternals.cpp:
  • testing/ServiceWorkerInternals.h:
  • testing/ServiceWorkerInternals.idl:
  • workers/service/context/SWContextManager.cpp:
  • workers/service/context/SWContextManager.h:
  • workers/service/context/ServiceWorkerInspectorProxy.cpp:
  • workers/service/server/SWServer.cpp:
  • workers/service/server/SWServer.h:
  • workers/service/server/SWServerToContextConnection.cpp:
  • workers/service/server/SWServerToContextConnection.h:
  • workers/service/server/SWServerWorker.cpp:
  • workers/service/server/SWServerWorker.h:

Source/WebKit:

  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
  • WebProcess/Storage/WebSWContextManagerConnection.cpp:
  • WebProcess/Storage/WebSWContextManagerConnection.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm:

Mar 17, 2022:

9:23 PM Changeset in webkit [291466] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r287753): Settings: checkboxes are smaller and no longer vertically align with related text
https://bugs.webkit.org/show_bug.cgi?id=237745
<rdar://problem/90129658>

Reviewed by Devin Rousso.

After r287753, font-size no longer affects the size of the checkboxes.
Use width and height to make the checkbox the expected size.

  • UserInterface/Views/SettingsTabContentView.css:

(.content-view.tab.settings > .settings-view > .container > .editor-group > .setting-editor input[type="checkbox"]):

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

Call doDailyActivityInManager on main thread in adattributiond
https://bugs.webkit.org/show_bug.cgi?id=238059
<rdar://90335028>

Patch by Alex Christensen <achristensen@webkit.org> on 2022-03-17
Reviewed by Tim Horton.

It turns out that xpc activities don't happen on the main thread.
Everything else in adattributiond happens on the main thread (except database operations)
and to be thread safe this also needs to happen on the main thread.

  • Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonEntryPoint.mm:

(WebKit::registerScheduledActivityHandler):

7:33 PM Changeset in webkit [291464] by Matt Woodrow
  • 5 edits
    2 adds in trunk

Subgrid items should always be stretched.
https://bugs.webkit.org/show_bug.cgi?id=237628

Reviewed by Alan Bujtas.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-grid/subgrid/subgrid-stretch-expected.html: Added.
  • web-platform-tests/css/css-grid/subgrid/subgrid-stretch.html: Added.

Added new WPT test covering various width/height and alignement contraints that should be
ignored since subgrids are always stretched.

Source/WebCore:

Fixes https://drafts.csswg.org/css-grid-2/#subgrid-box-alignment

Test: imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-stretch.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeLogicalWidthInFragment const):
(WebCore::RenderBox::hasStretchedLogicalHeight const):
(WebCore::RenderBox::hasStretchedLogicalWidth const):

  • rendering/RenderBox.h:

Makes computeLogicalWidthInFragment use the override logical width for grid items
if it's been set, as we already do for height. We don't early return, so that margins
still get computed relative to this width.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::layoutGridItems):
(WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching const):
(WebCore::RenderGrid::alignSelfForChild const):
(WebCore::RenderGrid::justifySelfForChild const):
(WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
(WebCore::RenderGrid::applySubgridStretchAlignmentToChildIfNeeded):

  • rendering/RenderGrid.h:

Sets the required override width/height size on subgrid items so that they get
stretched.

7:30 PM Changeset in webkit [291463] by Alan Bujtas
  • 12 edits
    1 add in trunk/Source/WebCore

[IFC][Integration] Introduce LineSelection
https://bugs.webkit.org/show_bug.cgi?id=237997

Reviewed by Antti Koivisto.

Use LineSelection to retrieve line based selection information.
This is in preparation for removing selection/hittesting related functions from InlineIterator::Line.

  • WebCore.xcodeproj/project.pbxproj:
  • editing/VisiblePosition.cpp:

(WebCore::VisiblePosition::absoluteSelectionBoundsForLine const):

  • layout/integration/InlineIteratorLine.h:
  • layout/integration/InlineIteratorTextBox.cpp:

(WebCore::InlineIterator::TextBox::selectionRect const):

  • layout/integration/LineSelection.h: Added.

(WebCore::LineSelection::logicalTop):
(WebCore::LineSelection::logicalBottom):
(WebCore::LineSelection::logicalRect):
(WebCore::LineSelection::physicalRect):
(WebCore::LineSelection::logicalTopAdjustedForPrecedingBlock):
(WebCore::LineSelection::logicalHeightAdjustedForPrecedingBlock):
(WebCore::LineSelection::selectionState):

  • rendering/CaretRectComputation.cpp:

(WebCore::computeCaretRectForLinePosition):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::adjustEnclosingTopForPrecedingBlock const):
(WebCore::RenderBlockFlow::inlineSelectionGaps):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::collectSelectionGeometries):

  • rendering/RenderLineBreak.cpp:

(WebCore::RenderLineBreak::collectSelectionGeometries):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::positionForPoint):

  • rendering/RenderText.cpp:

(WebCore::RenderText::positionForPoint):

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::paintBackground):

6:39 PM Changeset in webkit [291462] by Kocsen Chung
  • 1 copy in tags/Safari-614.1.6

Tag Safari-614.1.6.

6:39 PM Changeset in webkit [291461] by Kocsen Chung
  • 1 delete in tags/Safari-614.1.6

Delete tag.

6:26 PM Changeset in webkit [291460] by Russell Epstein
  • 6 edits in branches/safari-614.1.6-branch/Source

Cherry-pick r291455. rdar://problem/90449608

libANGLE-shared.dylib, libwebrtc.dylib & WebGPU install names are prefixed with the system content path
https://bugs.webkit.org/show_bug.cgi?id=238058

Reviewed by Mark Lam.

Source/ThirdParty/ANGLE:

We need to create a default value for DYLIB_INSTALL_NAME_BASE for iOS builds.
We want to allow executables to use the framework via the symlink from the old location.

  • Configurations/ANGLE-dynamic.xcconfig:

Source/ThirdParty/libwebrtc:

We need to create a default value for DYLIB_INSTALL_NAME_BASE for iOS builds.
We want to allow executables to use the framework via the symlink from the old location.

  • Configurations/libwebrtc.xcconfig:

Source/WebGPU:

We need to set DYLIB_INSTALL_NAME_BASE for WK_USE_ALTERNATE_FRAMEWORKS_DIR installs without the
system content path prefix.
We want to allow executables to use the framework via the symlink from the old location.

  • Configurations/WebGPU.xcconfig:

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

6:19 PM Changeset in webkit [291459] by Russell Epstein
  • 1 copy in tags/Safari-614.1.5.14

Tag Safari-614.1.5.14.

6:18 PM Changeset in webkit [291458] by Russell Epstein
  • 6 edits in branches/safari-614.1.5-branch/Source

Cherry-pick r291455. rdar://problem/90449608

libANGLE-shared.dylib, libwebrtc.dylib & WebGPU install names are prefixed with the system content path
https://bugs.webkit.org/show_bug.cgi?id=238058

Reviewed by Mark Lam.

Source/ThirdParty/ANGLE:

We need to create a default value for DYLIB_INSTALL_NAME_BASE for iOS builds.
We want to allow executables to use the framework via the symlink from the old location.

  • Configurations/ANGLE-dynamic.xcconfig:

Source/ThirdParty/libwebrtc:

We need to create a default value for DYLIB_INSTALL_NAME_BASE for iOS builds.
We want to allow executables to use the framework via the symlink from the old location.

  • Configurations/libwebrtc.xcconfig:

Source/WebGPU:

We need to set DYLIB_INSTALL_NAME_BASE for WK_USE_ALTERNATE_FRAMEWORKS_DIR installs without the
system content path prefix.
We want to allow executables to use the framework via the symlink from the old location.

  • Configurations/WebGPU.xcconfig:

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

6:15 PM Changeset in webkit [291457] by Russell Epstein
  • 9 edits in branches/safari-614.1.5-branch/Source

Versioning.

WebKit-7614.1.5.14

5:48 PM Changeset in webkit [291456] by keith_miller@apple.com
  • 2 edits in trunk/Source/WTF

tryReserveUncommittedAligned should round up to alignment not bytes requested
https://bugs.webkit.org/show_bug.cgi?id=238052

Reviewed by Yusuke Suzuki.

  • wtf/posix/OSAllocatorPOSIX.cpp:

(WTF::OSAllocator::tryReserveUncommittedAligned):

5:46 PM Changeset in webkit [291455] by msaboff@apple.com
  • 6 edits in trunk/Source

libANGLE-shared.dylib, libwebrtc.dylib & WebGPU install names are prefixed with the system content path
https://bugs.webkit.org/show_bug.cgi?id=238058

Reviewed by Mark Lam.

Source/ThirdParty/ANGLE:

We need to create a default value for DYLIB_INSTALL_NAME_BASE for iOS builds.
We want to allow executables to use the framework via the symlink from the old location.

  • Configurations/ANGLE-dynamic.xcconfig:

Source/ThirdParty/libwebrtc:

We need to create a default value for DYLIB_INSTALL_NAME_BASE for iOS builds.
We want to allow executables to use the framework via the symlink from the old location.

  • Configurations/libwebrtc.xcconfig:

Source/WebGPU:

We need to set DYLIB_INSTALL_NAME_BASE for WK_USE_ALTERNATE_FRAMEWORKS_DIR installs without the
system content path prefix.
We want to allow executables to use the framework via the symlink from the old location.

  • Configurations/WebGPU.xcconfig:
5:18 PM Changeset in webkit [291454] by Jonathan Bedard
  • 2 edits in trunk/Tools

configure-xcode-for-embedded-development fails with Xcode 13.3
https://bugs.webkit.org/show_bug.cgi?id=237994
<rdar://problem/90455614>

Reviewed by Ryan Haddad.

  • Tools/Scripts/configure-xcode-for-embedded-development: Handle different xcspec locations in XCode 13.3.

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

5:14 PM Changeset in webkit [291453] by Kocsen Chung
  • 1 copy in tags/Safari-614.1.6

Tag Safari-614.1.6.

5:10 PM Changeset in webkit [291452] by Matteo Flores
  • 2 edits in trunk/LayoutTests

REGRESSION(r291129-r291128): [WK1 EWS] 3 imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/* tests are a constant text failure
https://bugs.webkit.org/show_bug.cgi?id=238054

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
5:08 PM Changeset in webkit [291451] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

[Apple Pay] REGRESSION(r283431): HAVE_PASSKIT_PAYMENT_METHOD_BILLING_ADDRESS was removed without also removing where it was used
https://bugs.webkit.org/show_bug.cgi?id=238056
<rdar://problem/89940620>

Reviewed by Tim Horton.

  • Modules/applepay/cocoa/PaymentMethodCocoa.mm:

(WebCore::convert):

4:48 PM Changeset in webkit [291450] by mmaxfield@apple.com
  • 5 edits in trunk/LayoutTests

Make Emoji gender tests more robust
https://bugs.webkit.org/show_bug.cgi?id=238057
<rdar://problem/88842010>

Unreviewed.

U+26F9 PERSON WITH BALL might have a non-emoji glyph, so we can't expect it to
always render in its emoji form without a variation selector.

  • fast/text/emoji-gender-2-3-expected.html:
  • fast/text/emoji-gender-2-3.html:
  • fast/text/emoji-gender-fe0f-3-expected.html:
  • fast/text/emoji-gender-fe0f-3.html:
4:41 PM Changeset in webkit [291449] by mmaxfield@apple.com
  • 2 edits in trunk/LayoutTests

Make fast/text/emoji-num-glyphs.html more robust
https://bugs.webkit.org/show_bug.cgi?id=238055
<rdar://problem/88842010>

Unreviewed.

U+26F9 PERSON WITH BALL might have a non-emoji glyph. If it has one, and the OS prefers it over the
emoji glyph, then this test will fail. The solution is to use the emoji-style variation selector
to specifically request the emoji form.

  • fast/text/emoji-num-glyphs.html:
4:34 PM Changeset in webkit [291448] by keith_miller@apple.com
  • 4 edits in trunk/Source

Fix crash in Bleacher Report due to bad JSObjectRef passed to API
https://bugs.webkit.org/show_bug.cgi?id=238048
<rdar://88766464>

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

Prior to the StructureID overhaul the JSObjectGetArrayBufferByteLength would
automatically check if the JSObjectRef passed to that function was null before
short circuiting to the non-typed array return value, 0. While technically valid
since derefencing null is UB, this meant the Clang was covering up this crash.
To fix this I'm adding an app specific workaround for the time being so Bleacher
Report can fix their code to no longer pass this nullptr.

  • API/JSTypedArray.cpp:

(isBleecherReport):
(JSObjectGetArrayBufferByteLength):

Source/WTF:

  • wtf/cocoa/RuntimeApplicationChecksCocoa.h:
3:55 PM Changeset in webkit [291447] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebGPU

[WebGPU] Fix the 32-bit build
https://bugs.webkit.org/show_bug.cgi?id=238053

Unreviewed.

  • WebGPU/Buffer.mm:

(WebGPU::Buffer::getMappedRange):
(WebGPU::Buffer::mapAsync):

3:07 PM Changeset in webkit [291446] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Microsoft Teams fails to launch from Safari
https://bugs.webkit.org/show_bug.cgi?id=238045
<rdar://90434296>

Reviewed by Geoffrey Garen.

Extend MS Teams quirk to teams.microsoft.com, not just teams.live.com.

  • page/Quirks.cpp:

(WebCore::Quirks::shouldAllowNavigationToCustomProtocolWithoutUserGesture):

2:57 PM Changeset in webkit [291445] by Aditya Keerthi
  • 4 edits in trunk/Source/WebKit

[iOS] Support PDF search when using a find interaction
https://bugs.webkit.org/show_bug.cgi?id=237408
rdar://89437334

Reviewed by Wenson Hsieh.

Ensure that PDFs can be searched when using a _UIFindInteraction by
making WKPDFView conform to _UITextSearching.

The implementation is a thin wrapper around existing find SPI on
PDFHostViewController. Found ranges in PDFs are uniquely identified
by an index, as more detailed range information is not exposed. Unlike
web content, there is currently no requirement to support restorable
found ranges for PDFs, making indexes safe to use.

  • UIProcess/API/ios/WKWebViewIOS.h:
  • UIProcess/API/ios/WKWebViewIOS.mm:

Use WKPDFView or WKContentView as the searchable object, depending on
the loaded content.

(-[WKWebView _didCommitLoadForMainFrame]):
(-[WKWebView _searchableObject]):
(-[WKWebView _setFindInteractionEnabled:]):

  • UIProcess/ios/WKPDFView.mm:

(+[WKPDFFoundTextRange foundTextRangeWithIndex:]):
(-[WKPDFFoundTextRange start]):
(-[WKPDFFoundTextRange end]):
(-[WKPDFFoundTextRange isEmpty]):
(+[WKPDFFoundTextPosition textPositionWithIndex:]):
(-[WKPDFView dealloc]):
(-[WKPDFView pdfHostViewController:findStringUpdate:done:]):
(-[WKPDFView selectedTextRange]):
(-[WKPDFView compareFoundRange:toRange:inDocument:]):
(-[WKPDFView performTextSearchWithQueryString:usingOptions:resultAggregator:]):
(-[WKPDFView decorateFoundTextRange:inDocument:usingStyle:]):
(-[WKPDFView clearAllDecoratedFoundText]):

2:41 PM Changeset in webkit [291444] by Russell Epstein
  • 1 copy in tags/Safari-614.1.5.13

Tag Safari-614.1.5.13.

2:28 PM Changeset in webkit [291443] by Brent Fulgham
  • 4 edits in trunk

Disable push features in CaptivePortal mode
https://bugs.webkit.org/show_bug.cgi?id=237981
<rdar://88897228>

Reviewed by Chris Dumez.

We should not support push features when running in a Captive Portal.

Source/WebKit:

Tests: TestWebKitAPI

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2:21 PM Changeset in webkit [291442] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

[GTK][WPE] m_compositorThread ASSERT in TextureMapper classes can just be used in debug mode
https://bugs.webkit.org/show_bug.cgi?id=238020

Patch by Alejandro G. Castro <alex@igalia.com> on 2022-03-17
Reviewed by Michael Catanzaro.

This is a build fix for the case where someone compiles release
with asserts activated.

  • platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.cpp:

(WebCore::TextureMapperPlatformLayerProxyDMABuf::activateOnCompositingThread):
(WebCore::TextureMapperPlatformLayerProxyDMABuf::invalidate):

  • platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.h:
  • platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.cpp:

(WebCore::TextureMapperPlatformLayerProxyGL::activateOnCompositingThread):
(WebCore::TextureMapperPlatformLayerProxyGL::invalidate):

  • platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.h:
2:19 PM Changeset in webkit [291441] by commit-queue@webkit.org
  • 7 edits
    4 adds in trunk

PerformanceNavigationTiming Response Start unavailable when using Service Worker Cache
https://bugs.webkit.org/show_bug.cgi?id=237317

Patch by Alex Christensen <achristensen@webkit.org> on 2022-03-17
Reviewed by Youenn Fablet.

Source/WebCore:

  • Modules/cache/DOMCache.cpp:

(WebCore::createResponse):

  • page/PerformanceNavigationTiming.cpp:

(WebCore::PerformanceNavigationTiming::navigationFinished):

  • platform/network/NetworkLoadMetrics.cpp:

(WebCore::NetworkLoadMetrics::updateFrom):
(WebCore::NetworkLoadMetrics::NetworkLoadMetrics): Deleted.

  • platform/network/NetworkLoadMetrics.h:

LayoutTests:

Test that these values are reasonable after loading the main resource from a service worker's cache.

  • http/wpt/service-workers/navigation-timing.https-expected.txt: Added.
  • http/wpt/service-workers/navigation-timing.https.html: Added.
  • http/wpt/service-workers/navigation-timing.js: Added.

(event.event.waitUntil.caches.open.string_appeared_here.then):
(event.event.respondWith.caches.open.string_appeared_here.then):

  • http/wpt/service-workers/resources/navigation-timing-part-2.html: Added.
2:12 PM Changeset in webkit [291440] by Jonathan Bedard
  • 2 edits in trunk/Tools

[Merge-Queue] Remove merge-queue labels when blocking PR
https://bugs.webkit.org/show_bug.cgi?id=237964
<rdar://problem/90372805>

Reviewed by Aakash Jain.

  • Tools/CISupport/ews-build/steps.py:

(GitHubMixin.add_label): Renamed from modify_label, only handle add case
because removal case requires 'get' request first.
(GitHubMixin.remove_labels): Remove list of labels from PR.
(BlockPullRequest.start): Remove merge-queue labels.
(BlockPullRequest.getResultSummary): Add label name in results summary.
(GitHubMixin.modify_label): Renamed add_label.

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

1:56 PM Changeset in webkit [291439] by mmaxfield@apple.com
  • 4 edits in trunk/Source/WebGPU

[WebGPU] Fix 32-bit build
https://bugs.webkit.org/show_bug.cgi?id=238046

Unreviewed.

  • WebGPU/Buffer.h:

(WebGPU::Buffer::size const):

  • WebGPU/Buffer.mm:

(WebGPU::Buffer::getMappedRange):
(WebGPU::Buffer::validateMapAsync const):
(WebGPU::Buffer::mapAsync):

  • WebGPU/CommandEncoder.mm:

(WebGPU::CommandEncoder::clearBuffer):

1:34 PM Changeset in webkit [291438] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[iOS] Fix build breakage from r291361
https://bugs.webkit.org/show_bug.cgi?id=238043
rdar://90447279

Unreviewed build fix.

  • platform/ios/WebAVPlayerController.mm: Declare AVMetadataItem.
1:25 PM Changeset in webkit [291437] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Unreviewed, reverting r290835.
https://bugs.webkit.org/show_bug.cgi?id=238044

Disruptive change

Reverted changeset:

"[iOS] Hard link AVPictureInPictureController"
https://bugs.webkit.org/show_bug.cgi?id=237227
https://commits.webkit.org/r290835

1:22 PM Changeset in webkit [291436] by sbarati@apple.com
  • 2 edits in trunk/Tools

compare-results should break down sync vs async time in Speedometer2
https://bugs.webkit.org/show_bug.cgi?id=237993

Reviewed by Alexey Shvayka.

  • Scripts/compare-results:

(speedometer2Breakdown):
(speedometer2BreakdownSyncAsync):
(dumpBreakdowns):
(getOptions):
(main):

1:19 PM Changeset in webkit [291435] by Cameron McCormack
  • 7 edits in trunk

Avoid calling connectionClosedFromServer on a connection twice when a version change is active
https://bugs.webkit.org/show_bug.cgi?id=215271

Reviewed by Sihui Liu.

Source/WebCore:

Since bug 203690, all IDB work is done on a single background thread.
A consequence of this change is that there are states when
UniqueIDBDatabase::m_versionChangeDatabaseConnection is also in
m_openDatabaseConnections. We should avoid calling
connectionClosedFromServer on the same connection twice, since that
can result in a spurious second error event being sent to the
IDBDatabase JS object if connections are closed while a version chnge
is in progress.

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::immediateClose):

LayoutTests:

  • platform/ios-wk2/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
  • platform/wincairo/TestExpectations:

Remove test flakiness annotations.

1:18 PM Changeset in webkit [291434] by Russell Epstein
  • 2 edits in branches/safari-614.1.6-branch/Source/WebKit

Cherry-pick r291433. rdar://problem/90431433

Removed telemetry from Networking.sb
https://bugs.webkit.org/show_bug.cgi?id=238026

Patch by Adam Mazander <mazander@apple.com> on 2022-03-17
Reviewed by Per Arne Vollan.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:

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

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

Removed telemetry from Networking.sb
https://bugs.webkit.org/show_bug.cgi?id=238026

Patch by Adam Mazander <mazander@apple.com> on 2022-03-17
Reviewed by Per Arne Vollan.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1:12 PM Changeset in webkit [291432] by mmaxfield@apple.com
  • 2 edits
    1 delete in trunk/Tools

Delete Tools/jsc-cli in favor of the jsc target in JavaScriptCore itself
https://bugs.webkit.org/show_bug.cgi?id=238042

Rubber-stamped by Saam Barati.

The last time jsc-cli was substantively modified was 8 years ago. On the other
hand, the jsc target in JavaScriptCore serves the same purpose, and is actively
maintained.

  • Scripts/build-jsc:
  • jsc-cli/jsc-cli.xcodeproj/project.pbxproj: Removed.
  • jsc-cli/jsc-cli/CLIInstance.h: Removed.
  • jsc-cli/jsc-cli/CLIInstance.m: Removed.
  • jsc-cli/jsc-cli/JSModule.h: Removed.
  • jsc-cli/jsc-cli/JSModule.m: Removed.
  • jsc-cli/jsc-cli/JSRunLoopThread.h: Removed.
  • jsc-cli/jsc-cli/JSRunLoopThread.m: Removed.
  • jsc-cli/jsc-cli/ReadEvalPrintLoop.h: Removed.
  • jsc-cli/jsc-cli/ReadEvalPrintLoop.m: Removed.
  • jsc-cli/jsc-cli/RunLoopThread.h: Removed.
  • jsc-cli/jsc-cli/RunLoopThread.m: Removed.
  • jsc-cli/jsc-cli/ScriptInputSource.h: Removed.
  • jsc-cli/jsc-cli/ScriptInputSource.m: Removed.
  • jsc-cli/jsc-cli/main.m: Removed.
1:09 PM Changeset in webkit [291431] by graouts@webkit.org
  • 2 edits in trunk/Source/WebKit

[model] loading spinner doesn't show on iOS
https://bugs.webkit.org/show_bug.cgi?id=238029
rdar://89698998

Reviewed by Dean Jackson.

We must wait until a WKModelView has non-zero bounds to create the backing ASVInlinePreview
so that the ARQL views are all sized to display the loading spinner correctly.

  • UIProcess/ios/WKModelView.mm:

(-[WKModelView initWithModel:]):
(-[WKModelView createPreview]):
(-[WKModelView layoutSubviews]):
(-[WKModelView updateBounds]):

1:08 PM Changeset in webkit [291430] by Alan Coon
  • 1 copy in tags/Safari-613.2.3

Tag Safari-613.2.3.

1:00 PM Changeset in webkit [291429] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Unreviewed, reverting r291352.
https://bugs.webkit.org/show_bug.cgi?id=238039

Disruptive change

Reverted changeset:

"Incorrect header name used in has_include"
https://bugs.webkit.org/show_bug.cgi?id=237914
https://commits.webkit.org/r291352

12:56 PM Changeset in webkit [291428] by commit-queue@webkit.org
  • 7 edits
    2 adds in trunk

Source/WebKit:
Add read and write methods to JSIPCStreamConnectionBuffer
https://bugs.webkit.org/show_bug.cgi?id=237730
rdar://problem/89676460

Patch by Simon Lewis <simon.lewis@apple.com> on 2022-03-17
Reviewed by Kimmo Kinnunen.

When using IPCTestingAPI, this change enables the underlying bytes
of a StreamClientConnection buffer to be modified.

Test: ipc/stream-buffer-read-write.html

  • Platform/IPC/StreamClientConnection.cpp:

(IPC::StreamClientConnection::bufferForTesting):

  • Platform/IPC/StreamClientConnection.h:
  • Platform/IPC/StreamConnectionBuffer.cpp:

(IPC::StreamConnectionBuffer::headerForTesting):
(IPC::StreamConnectionBuffer::dataForTesting):

  • Platform/IPC/StreamConnectionBuffer.h:
  • WebProcess/WebPage/IPCTestingAPI.cpp:

(WebKit::IPCTestingAPI::JSIPCStreamConnectionBuffer::staticFunctions):
(WebKit::IPCTestingAPI::JSIPCStreamConnectionBuffer::readHeaderBytes):
(WebKit::IPCTestingAPI::JSIPCStreamConnectionBuffer::readDataBytes):
(WebKit::IPCTestingAPI::JSIPCStreamConnectionBuffer::readBytes):
(WebKit::IPCTestingAPI::JSIPCStreamConnectionBuffer::writeHeaderBytes):
(WebKit::IPCTestingAPI::JSIPCStreamConnectionBuffer::writeDataBytes):
(WebKit::IPCTestingAPI::JSIPCStreamConnectionBuffer::writeBytes):

LayoutTests:
Functional tests for read and write methods of JSIPCStreamConnectionBuffer
https://bugs.webkit.org/show_bug.cgi?id=237730
rdar://problem/89676460

Patch by Simon Lewis <simon.lewis@apple.com> on 2022-03-17
Reviewed by Kimmo Kinnunen.

  • ipc/stream-buffer-read-write-expected.txt: Added.
  • ipc/stream-buffer-read-write.html: Added.
12:04 PM Changeset in webkit [291427] by Ben Nham
  • 2 edits in trunk/Tools

Only show notification permission prompt on user gesture
https://bugs.webkit.org/show_bug.cgi?id=237946

Unreviewed build fix for r291414.

  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
12:02 PM Changeset in webkit [291426] by commit-queue@webkit.org
  • 3 edits
    6 adds in trunk

When a “autofilled and obscured” field becomes empty, turn “autofilled and obscured” off
https://bugs.webkit.org/show_bug.cgi?id=235256

Patch by Ellie Epskamp-Hunt <eepskamphunt@apple.com> on 2022-03-17
Reviewed by Devin Rousso.

Source/WebCore:

Tests: fast/forms/input-autofilled-and-obscured-clear-field-programatically.html

fast/forms/input-autofilled-and-obscured-clear-form-programatically.html
fast/forms/input-autofilled-and-obscured.html

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::setValue):
Turn off the property if the page's JavaScript deletes all the text in the field.
(WebCore::HTMLInputElement::setValueFromRenderer):
Turn off the property if the user deletes all the text in the field.

LayoutTests:

Add tests to verify that when a text field becomes empty, the autofilled-and-obscured
property is removed from that field.

  • fast/forms/input-autofilled-and-obscured-clear-field-programatically-expected.txt: Added.
  • fast/forms/input-autofilled-and-obscured-clear-field-programatically.html: Added.

Delete the text by setting the input's value to an empty string.

  • fast/forms/input-autofilled-and-obscured-clear-form-programatically-expected.txt: Added.
  • fast/forms/input-autofilled-and-obscured-clear-form-programatically.html: Added.

Delete the text by calling reset on the form.

  • fast/forms/input-autofilled-and-obscured-expected.txt: Added.
  • fast/forms/input-autofilled-and-obscured.html: Added.

Delete the text as a user would.

11:55 AM Changeset in webkit [291425] by Simon Fraser
  • 2 edits in trunk/Source/WebKit

Fix the build when LOG_DISABLED is 0 in release builds
https://bugs.webkit.org/show_bug.cgi?id=237999

Reviewed by Tim Horton.

  • WebProcess/Plugins/PDF/PDFPlugin.h:
11:48 AM Changeset in webkit [291424] by Russell Epstein
  • 9 edits in branches/safari-614.1.5-branch/Source

Versioning.

WebKit-7614.1.5.13

11:28 AM Changeset in webkit [291423] by J Pascoe
  • 13 edits
    3 copies
    2 adds in trunk/Source

[WebAuthn] Support makeCredential for virtual HID authenticators
https://bugs.webkit.org/show_bug.cgi?id=237984
rdar://problem/90393676

Reviewed by Brent Fulgham.

Virtual authenticators for WebAuthn supports different transports: nfc,usb,internal,ble.
Currently, we support the internal transport, but the default transport used in web platform
tests is usb. This patch implements makeCredential for hid-based virtual authenticators. Virtual
credential information is stored in the VirtualCredential struct as suggested by the spec.

Source/WebCore:

  • Modules/webauthn/WebAuthenticationUtils.cpp:

(WebCore::buildAttestationMap):
(WebCore::buildAttestationObject):

  • Modules/webauthn/WebAuthenticationUtils.h:
  • Modules/webauthn/fido/FidoConstants.h:

Source/WebKit:

Tested manually via creating virtual authenticator and performing create and via wpt tests.

  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:

(WebKit::MockHidConnection::parseRequest):
(WebKit::MockHidConnection::feedReports):

  • UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorManager.cpp:

(WebKit::VirtualAuthenticatorManager::createAuthenticator):
(WebKit::VirtualAuthenticatorManager::addCredential):
(WebKit::VirtualAuthenticatorManager::createService const):

  • UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorManager.h:
  • UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorUtils.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Virtual/VirtualService.h.
  • UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorUtils.mm: Added.

(WebKit::flagsForConfig):
(WebKit::createPrivateKey):
(WebKit::credentialIdAndCosePubKeyForPrivateKey):
(WebKit::base64PrivateKey):

  • UIProcess/WebAuthentication/Virtual/VirtualCredential.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Virtual/VirtualService.h.
  • UIProcess/WebAuthentication/Virtual/VirtualHidConnection.cpp: Added.

(WebKit::VirtualHidConnection::VirtualHidConnection):
(WebKit::VirtualHidConnection::initialize):
(WebKit::VirtualHidConnection::terminate):
(WebKit::VirtualHidConnection::sendSync):
(WebKit::VirtualHidConnection::send):
(WebKit::VirtualHidConnection::assembleRequest):
(WebKit::VirtualHidConnection::receiveHidMessage):
(WebKit::VirtualHidConnection::recieveResponseCode):
(WebKit::VirtualHidConnection::parseRequest):

  • UIProcess/WebAuthentication/Virtual/VirtualHidConnection.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorManager.h.
  • UIProcess/WebAuthentication/Virtual/VirtualService.h:
  • UIProcess/WebAuthentication/Virtual/VirtualService.mm:

(WebKit::VirtualService::VirtualService):
(WebKit::VirtualService::createVirtual):
(WebKit::authenticatorInfoForConfig):
(WebKit::VirtualService::startDiscoveryInternal):

  • WebKit.xcodeproj/project.pbxproj:
11:15 AM Changeset in webkit [291422] by mmaxfield@apple.com
  • 3 edits in trunk/Source/WebGPU

[WebGPU] Fix the 32-bit build
https://bugs.webkit.org/show_bug.cgi?id=238031

Unreviewed.

  • WebGPU/Buffer.mm:

(WebGPU::validateCreateBuffer):
(WebGPU::Device::createBuffer):

  • WebGPU/CommandEncoder.mm:

(WebGPU::CommandEncoder::copyBufferToBuffer):

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

Make SharedVideoFrameReader use VideoFrameCV instead of MediaSample
https://bugs.webkit.org/show_bug.cgi?id=237596

Reviewed by Eric Carlson.

Source/WebCore:

Update media recorder and display layer to use pixel buffers instead of MediaSample.
This allows migrating to VideoFrameCV.
No change of behavior.

  • platform/cocoa/MediaUtilities.cpp:
  • platform/cocoa/MediaUtilities.h:
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h:
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:
  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:
  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:

Source/WebKit:

  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:
  • WebProcess/GPU/webrtc/SharedVideoFrame.cpp:
  • WebProcess/GPU/webrtc/SharedVideoFrame.h:
10:44 AM Changeset in webkit [291420] by graouts@webkit.org
  • 9 edits in trunk

REGRESSION (iOS 15.4 / r287669): Mobile app stopped working due to CSS / angular animation
https://bugs.webkit.org/show_bug.cgi?id=237920
LayoutTests/imported/w3c:

<rdar://problem/90335275>

Reviewed by Antti Koivisto.

Add a test that looks at the default computed style for the "transition" and "animation"
shorthands.

  • web-platform-tests/css/css-animations/parsing/animation-computed-expected.txt:
  • web-platform-tests/css/css-animations/parsing/animation-computed.html:
  • web-platform-tests/css/css-pseudo/first-letter-allowed-properties-expected.txt:
  • web-platform-tests/css/css-pseudo/first-line-allowed-properties-expected.txt:
  • web-platform-tests/css/css-transitions/parsing/transition-computed-expected.txt:
  • web-platform-tests/css/css-transitions/parsing/transition-computed.html:

Source/WebCore:

Reviewed by Antti Koivisto.

We refactored the computed style output for the "transition" and "animation" shorthand
properties in r287669 and always returned a CSSValueList, even when the list of transitions
or animations was empty. This meant that for an element without any transition or animation
properties, we'd return the empty string for those properties.

Now we return the computed style for a default animation instead.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::animationShorthandValue):

10:21 AM Changeset in webkit [291419] by mmaxfield@apple.com
  • 6 edits
    4 deletes in trunk/Source/WebGPU

[WebGPU] Delete unnecessary C files from CommandLinePlayground
https://bugs.webkit.org/show_bug.cgi?id=238005

Reviewed by Kimmo Kinnunen.

The reason the C files existed was because Swift wouldn't import a block within
a struct if the block didn't have the unsafe_unretained attribute. This patch
adds the attribute and moves the C code to be in the same file as the rest of the
playground.

  • CommandLinePlayground/CommandLinePlayground-Bridging-Header.h: Removed.
  • CommandLinePlayground/Utilities.c: Removed.
  • CommandLinePlayground/Utilities.h: Removed.
  • CommandLinePlayground/config.h: Removed.
  • CommandLinePlayground/main.swift:

(dispatchWork(_:)):

  • WebGPU.xcodeproj/project.pbxproj:
  • WebGPU/Buffer.mm:
  • WebGPU/CommandEncoder.mm:
  • WebGPU/WebGPUExt.h:
10:19 AM Changeset in webkit [291418] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

PiP on Vimeo freezes when toggled
https://bugs.webkit.org/show_bug.cgi?id=237985

Patch by Peng Liu <peng.liu6@icloud.com> on 2022-03-17
Reviewed by Jer Noble.

Add a quirk for vimeo.com to disable the "webkitendfullscreen" event when a video enters
picture-in-picture from fullscreen.

Tested manually.

  • page/Quirks.cpp:

(WebCore::Quirks::shouldDisableEndFullscreenEventWhenEnteringPictureInPictureFromFullscreenQuirk const):

10:07 AM EnvironmentVariables edited by eocanha@igalia.com
Documented the MSE_MAX_BUFFER_SIZE, WPE_SHELL_DISABLE_MEDIA_DISK_CACHE … (diff)
10:01 AM Changeset in webkit [291417] by Mikhail R. Gadelha
  • 8 edits in trunk/Source/JavaScriptCore

Unreviewed, non-unified build fix
https://bugs.webkit.org/show_bug.cgi?id=237929

  • dfg/DFGCapabilities.cpp:
  • jit/JITDisassembler.cpp:
  • jit/JITPlan.cpp:
  • llint/LLIntEntrypoint.cpp:
  • runtime/FileBasedFuzzerAgentBase.cpp:
  • runtime/ShadowRealmObject.cpp:
  • runtime/ShadowRealmPrototype.cpp:
9:54 AM Changeset in webkit [291416] by Chris Dumez
  • 8 edits in trunk/Source/WebCore

Stop returning NodeVector from functions
https://bugs.webkit.org/show_bug.cgi?id=237988

Reviewed by Darin Adler.

Stop returning NodeVector from functions and use a out-parameter instead. While this doesn't look
as modern, this is actually more efficient. This is because NodeVector has a fairly large inline
buffer and is thus not that cheap to "move".

This was causing functions like ContainerNode::parserAppendChild(Node&) to spend unnecessary
time under:
VectorBuffer<Ref<Node, RawPtrTraits<Node>>, 11, FastMalloc>::swap(VectorBuffer<Ref<Node, RawPtrTraits<Node>>, 11, FastMalloc>&, unsigned long, unsigned long)

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::removeAllChildrenWithScriptAssertion):
(WebCore::executeNodeInsertionWithScriptAssertion):
(WebCore::ContainerNode::removeSelfOrChildNodesForInsertion):
(WebCore::ContainerNode::takeAllChildrenFrom):
(WebCore::ContainerNode::replaceAll):
(WebCore::ContainerNode::removeChildren):
(WebCore::ContainerNode::replaceChildren):

  • dom/ContainerNode.h:

(WebCore::collectChildNodes):

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::notifyChildNodeInserted):

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

(WebCore::Element::addShadowRoot):
(WebCore::Element::insertAdjacentHTML):

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):

  • editing/ReplaceNodeWithSpanCommand.cpp:

(WebCore::swapInNodePreservingAttributesAndChildren):

9:52 AM Changeset in webkit [291415] by Russell Epstein
  • 4 edits
    6 deletes in branches/safari-614.1.6-branch

Revert r290628. rdar://problem/90310316

9:52 AM Changeset in webkit [291414] by Ben Nham
  • 24 edits in trunk

Only show notification permission prompt on user gesture
https://bugs.webkit.org/show_bug.cgi?id=237946

Reviewed by Geoffrey Garen.

Source/WebCore:

We want to make Notification.requestPermission and PushManager.subscribe only prompt the
user for permission in response to a user gesture. This matches existing behavior in other
browsers.

We use the error string "Push notification prompting can only be done from a user gesture"
since that string was already used by safari.pushNotification.requestPermission.

  • Modules/notifications/Notification.cpp:

(WebCore::Notification::requestPermission):

  • Modules/push-api/PushManager.cpp:

(WebCore::PushManager::subscribe):

Tools:

Change existing permission tests to use evaluateJavaScript since that executes in the
context of a user gesture.

  • TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:

LayoutTests:

Add test cases to make sure that prompting for notification permissions fails when not
handling a user gesture and succeeds when handling a user gesture.

  • http/tests/notifications/notification-request-permission-no-callback.html:
  • http/tests/notifications/notification-request-permission.html:
  • http/tests/notifications/request-expected.txt:
  • http/tests/notifications/request-with-promise-expected.txt:
  • http/tests/notifications/request-with-promise.html:
  • http/tests/notifications/request.html:
  • http/tests/push-api/resources/subscribe-iframe-cross-origin.html:
  • http/tests/push-api/resources/subscribe-iframe-same-origin.html:
  • http/tests/push-api/resources/subscribe-tests.js:

(async testDocumentSubscribeWithUserGesture): Added.
(async testDocumentSubscribeWithoutUserGesture): Added.
(async testDocumentSubscribeImpl): Added.
(async testDocumentSubscribe): Deleted.

  • http/tests/push-api/subscribe-default-permissions-expected.txt:
  • http/tests/push-api/subscribe-default-permissions-iframe-cross-origin-expected.txt:
  • http/tests/push-api/subscribe-default-permissions-iframe-same-origin-expected.txt:
  • http/tests/push-api/subscribe-default-permissions.html:
  • http/tests/push-api/subscribe-deny-permissions-expected.txt:
  • http/tests/push-api/subscribe-deny-permissions.html:
  • http/tests/push-api/subscribe-grant-permissions-expected.txt:
  • http/tests/push-api/subscribe-grant-permissions.html:
9:45 AM Changeset in webkit [291413] by Ben Nham
  • 5 edits in trunk

Allow push preference to be set programatically
https://bugs.webkit.org/show_bug.cgi?id=238003

Reviewed by Geoffrey Garen.

Source/WebKit:

This exposes the PushAPIEnabled experimental preference through WKPreferences so it can be
enabled programatically by API clients.

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _pushAPIEnabled]):
(-[WKPreferences _setPushAPIEnabled:]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:

Tools:

Make webpushd tests enable the push API via WKPreferences.

  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
9:38 AM Changeset in webkit [291412] by Kate Cheney
  • 10 edits
    1 add in trunk

Calls to print can result in unresponsive print modal
https://bugs.webkit.org/show_bug.cgi?id=237940
<rdar://problem/88257828>

Reviewed by Chris Dumez.

Source/WebKit:

Calls to print were hanging in the case of the client asynchronously
handling the completion handler passed to the delegate. To fix this
we can adjust all printing IPC to have the option
DispatchMessageEvenWhenWaitingForUnboundedSyncReply which allows IPC
messages when waiting for a sync reply in the case where the receiver
of the message is not guranteed to call the completion handler at the
end of the runloop.

  • UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
  • UIProcess/API/Cocoa/WKWebViewTesting.mm:

(-[WKWebView _computePagesForPrinting:completionHandler:]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::printingSendOptions):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::print):

Tools:

Add API test. Adjust delegate naming in the PDF case to be more
specific so we can use the generic PrintUIDelegate name in the general
case.

  • TestWebKitAPI/SourcesCocoa.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm:

(TEST):
(-[PrintUIDelegate _webView:printFrame:pdfFirstPageSize:completionHandler:]): Deleted.
(-[PrintUIDelegate waitForPageSize]): Deleted.
(-[PrintUIDelegate lastPrintedFrame]): Deleted.

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

(-[PrintUIDelegate callBlockAsync:]):
(-[PrintUIDelegate _webView:printFrame:pdfFirstPageSize:completionHandler:]):
(-[PrintUIDelegate waitForPagination]):
(TEST):

9:01 AM Changeset in webkit [291411] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebKit

Revert r290967. rdar://problem/90331977

8:45 AM Changeset in webkit [291410] by Russell Epstein
  • 2 edits in branches/safari-614.1.6-branch/Source/WebKit

Cherry-pick r291314. rdar://problem/90245766

RemoteGraphicsContextGLProxy omits context lost checks for back and front buffer access functions
https://bugs.webkit.org/show_bug.cgi?id=237891

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-03-15
Reviewed by Myles Maxfield.

Add missing isContextLost() checks to RemoteGraphicsContextGLProxy functions.
WebGLRenderingContextBase would call as follows:
void WebGLRenderingContextBase::paintRenderingResultsToCanvas()
{

if (isContextLostOrPending())

return;

...
m_context->prepareForDisplay();
...
m_context->paintCompositedResultsToCanvas();

}

The context may be ok during the first check but then fail later,
and so all the context functions need to check for validity.

No new tests, testing hooks need non-trivial implementation.
This is tracked in bug 237891.

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp: (WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToCanvas): (WebKit::RemoteGraphicsContextGLProxy::paintCompositedResultsToCanvas): (WebKit::RemoteGraphicsContextGLProxy::copyTextureFromMedia):

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

8:24 AM Changeset in webkit [291409] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[IFC][Integration] Replace enclosingTop/Bottom/height calls with Line::enclosingLogicalRect when applicable
https://bugs.webkit.org/show_bug.cgi?id=237996

Reviewed by Antti Koivisto.

This is in preparation for removing selection/hittesting related functions from InlineIterator::Line.

  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::Line::enclosingHeight const): Deleted.

  • layout/integration/InlineIteratorTextBox.cpp:

(WebCore::InlineIterator::TextBox::selectionRect const):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::inlineSelectionGaps):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::collectSelectionGeometries):

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::paintBackground):

8:19 AM Changeset in webkit [291408] by Diego Pino Garcia
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix non-unified build after r291396

  • html/HTMLTextFormControlElement.cpp:
8:13 AM Changeset in webkit [291407] by Oriol Brufau
  • 7 edits
    1 add in trunk

Clarify code for logical-to-physical mappings, and add physical-to-logical mappings
https://bugs.webkit.org/show_bug.cgi?id=237967

Reviewed by Darin Adler.

Source/WebCore:

The code for logical-to-physical mappings wasn't easy to understand, e.g.
mapLogicalSideToPhysicalSide used to cast a LogicalBoxSide enum into a
BoxSide enum, and then maybe casting it into an int and back to BoxSide.
So the code relied on the arbitrary order of the enum values, and it was
hard to grasp what was going on.

This patch makes these mappings much clearer, and also adds the inverse
physical-to-logical mappings. Being able to convert a physical property
into its logical equivalent will be needed for bug 236199.

No new tests because there is no change in behavior.

Tests in imported/w3c/web-platform-tests/css/css-logical/ ensure that
this patch doesn't break logical-to-physical mappings.
Some new API tests ensure that the physical-to-logical mappings
are the correct inverse.

Tests: WritingMode.LogicalBoxSide

WritingMode.BoxSide
WritingMode.LogicalBoxCorner
WritingMode.BoxCorner
WritingMode.LogicalBoxAxis
WritingMode.BoxAxis

  • css/CSSProperty.h:
  • css/makeprop.pl:
  • platform/text/WritingMode.h:

(WebCore::mapLogicalSideToPhysicalSide):
(WebCore::mapPhysicalSideToLogicalSide):
(WebCore::mapLogicalCornerToPhysicalCorner):
(WebCore::mapPhysicalCornerToLogicalCorner):
(WebCore::mapLogicalAxisToPhysicalAxis):
(WebCore::mapPhysicalAxisToLogicalAxis):
(WebCore::isHorizontalPhysicalSide): Deleted.
(WebCore::mirrorPhysicalSide): Deleted.
(WebCore::rotatePhysicalSide): Deleted.

Tools:

Add tests.

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/WritingModeTests.cpp: Added.

(TestWebKitAPI::TEST):

7:46 AM Changeset in webkit [291406] by commit-queue@webkit.org
  • 3 edits in trunk

[GTK][WPE] Also enable USE_TEXTURE_MAPPER_DMABUF alongside other DMABuf-related defines
https://bugs.webkit.org/show_bug.cgi?id=238017

Patch by Zan Dobersek <zdobersek@igalia.com> on 2022-03-17
Reviewed by Alejandro G. Castro.

For the GTK port, define USE_TEXTURE_MAPPER_DMABUF alongside the
dependencies and defines for DMABuf-backed ANGLE integration. This will
enable usage of the DMABuf-based video sink in any GStreamer pipeline
and subsequently display of the provided DMABuf objects. A comment is
added to explain this should be covered by a separate configuration
option on which USE_ANGLE_WEBGL should then depend.

For the WPE port the define is also added but without conditions, just
like it's done for the dependencies and the USE_LIBGBM define.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:
7:42 AM Changeset in webkit [291405] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

XSS in EWS App
https://bugs.webkit.org/show_bug.cgi?id=236633

Reported by Iman Sharafaldin - Forward Security.

Reviewed by Darin Adler.

  • CISupport/ews-app/ews/views/submittoews.py:

(SubmitToEWS.post):

7:27 AM Changeset in webkit [291404] by Jonathan Bedard
  • 5 edits in trunk/Tools

[reporelaypy] Support credentialed https repositories
https://bugs.webkit.org/show_bug.cgi?id=237853
<rdar://90252426>

Reviewed by Ryan Haddad, Dewei Zhu and Stephanie Lewis.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/init.py: Bump version.
  • Tools/Scripts/libraries/reporelaypy/reporelaypy/checkout.py:

(Checkout.Encoder.default): Pass credentials.
(Checkout.clone): Add credentials to local configuration.
(Checkout.add_credentials): Add username to .git/config and populate
.git-credentials file appropriately.
(Checkout.init): Re-add credentials.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/tests/checkout_unittest.py:

(CheckoutUnittest.test_json):

  • Tools/Scripts/libraries/reporelaypy/setup.py: Bump version.

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

6:02 AM Changeset in webkit [291403] by Nikolas Zimmermann
  • 11 edits in trunk

Build broken on macOS Monterey 12.3 - PassKitSPI related error
https://bugs.webkit.org/show_bug.cgi?id=238010
<rdar://problem/90417687>

Reviewed by Antoine Quint.

Unbreak the macOS 12.3 build: assure that 'PKShippingMethod' is declared before used
in the 'PKShippingMethods' interface. Fix various unused variable warnings.

No new tests. No change in functionality.

Source/WebCore:

  • platform/audio/mac/AudioOutputUnitAdaptorMac.cpp:

(WebCore::AudioOutputUnitAdaptor::configure):

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

(WebCore::MediaSampleAVFObjC::getRGBAImageData const):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::appendToUncommittedAnimations):

Source/WebCore/PAL:

  • pal/spi/cocoa/PassKitSPI.h: Swap PKShippingMethod/PKShippingMethods declarations

Source/WebKit:

  • Shared/cf/ArgumentCodersCF.cpp:

(IPC::ArgumentCoder<CFStringRef>::encode):

  • Shared/mac/AuxiliaryProcessMac.mm:

(WebKit::compileAndCacheSandboxProfile):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCloseAllMediaPresentations.mm:

(loadPictureInPicture):

5:54 AM Changeset in webkit [291402] by Andres Gonzalez
  • 9 edits in trunk/LayoutTests

Fix for accessibility/aria-tab-xxx.html tests in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=237980
<rdar://problem/90392451>

Reviewed by Chris Fleizach.

these tests are flaky in isolated tree mode due to setting the focus to
the body is async.

  • accessibility/aria-tab-role-on-buttons-expected.txt:
  • accessibility/aria-tab-role-on-buttons.html:
  • accessibility/aria-tab-roles.html:
  • platform/glib/accessibility/aria-tab-roles-expected.txt:
  • platform/mac/accessibility/aria-tab-role-on-buttons-expected.txt:
  • platform/mac/accessibility/aria-tab-roles-expected.txt:
  • platform/win/accessibility/aria-tab-role-on-buttons-expected.txt:
  • platform/win/accessibility/aria-tab-roles-expected.txt:
5:22 AM Changeset in webkit [291401] by Andres Gonzalez
  • 3 edits in trunk/LayoutTests

Make accessibility/roles-exposed.html faster.
https://bugs.webkit.org/show_bug.cgi?id=237960
<rdar://problem/90371580>

Reviewed by Chris Fleizach.

Make this test to run faster by storing the output in memory and
modifying the DOM once as opposed to doing it in each iteration. This is
particularly important in isolated tree mode, since the test is failing
because it takes too long to execute.
Also modify the test and expectations to explicitly output when the AX
object cannot be retrieved, i.e., it is not exposed for some reason.

  • accessibility/roles-exposed.html:
  • platform/mac-wk2/accessibility/roles-exposed-expected.txt:
5:01 AM Changeset in webkit [291400] by Andres Gonzalez
  • 5 edits in trunk/LayoutTests

Fix for accessibility/aria-option-role.html in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=237975
<rdar://problem/90386629>

Reviewed by Chris Fleizach.

This test was flaky in isolated tree mode due to setting the focus to
the body is async. Solved by retrieving the AX element of the listbox
directly.

  • accessibility/aria-option-role.html:
  • platform/glib/accessibility/aria-option-role-expected.txt:
  • platform/mac/accessibility/aria-option-role-expected.txt:
  • platform/win/accessibility/aria-option-role-expected.txt:
3:07 AM Changeset in webkit [291399] by commit-queue@webkit.org
  • 17 edits
    2 adds in trunk

WebGL context lost event is not sent again for contexts that are lost and restored
https://bugs.webkit.org/show_bug.cgi?id=237952

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-03-17
Reviewed by Antti Koivisto.

Source/WebCore:

WebGLRenderingContextBase did not register the GraphicsContextGL::Client
for new contexts after a context lost.
Move the client registration to WebGLRenderingContextBase::setGraphicsContextGL()
which is called always when setting a new context.
Rename the GraphicsContextGL::addClient as GraphicsContextGL::setClient(),
move the shared implementation to the base class GraphicsContextGL.
Remove GraphicsContextGL::Client::recycleContext(), the use was removed in
r290816 "WebGL context count is not limited for GPU process.".

Test: webgl/multiple-context-losses.html

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
(WebCore::WebGLRenderingContextBase::setGraphicsContextGL):
(WebCore::WebGLRenderingContextBase::destroyGraphicsContextGL):

  • html/canvas/WebGLRenderingContextBase.h:
  • platform/graphics/GraphicsContextGL.cpp:

(WebCore::GraphicsContextGL::markLayerComposited):
(WebCore::GraphicsContextGL::forceContextLost):
(WebCore::GraphicsContextGL::dispatchContextChangedNotification):

  • platform/graphics/GraphicsContextGL.h:

(WebCore::GraphicsContextGL::setClient):

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:
  • platform/graphics/angle/GraphicsContextGLANGLE.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:
  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:

Source/WebKit:

Adjust after GraphicsContextGL::addClient() was renamed setClient().

  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::workQueueInitialize):
(WebKit::RemoteGraphicsContextGL::workQueueUninitialize):

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::wasLost):
(WebKit::RemoteGraphicsContextGLProxy::wasChanged):
(WebKit::RemoteGraphicsContextGLProxy::markContextLost):

LayoutTests:

  • platform/glib/TestExpectations:
  • webgl/lose-context-after-context-lost-expected.txt:
  • webgl/lose-context-after-context-lost.html:

Enable the test for GPUP, it works now after
r290816 "WebGL context count is not limited for GPU process.".
Adjust the order of waiting for webglcontextlost and checking
isContextLost(), so that it works when context loss is reported
asynchronously by GPUP.

  • webgl/multiple-context-losses-expected.txt: Added.
  • webgl/multiple-context-losses.html: Added.

Add a test testing the bug fix.

2:41 AM Changeset in webkit [291398] by Antti Koivisto
  • 13 edits in trunk/Source/WebCore

Pass style builder context to CSSToLengthConversionData
https://bugs.webkit.org/show_bug.cgi?id=237963

Reviewed by Antoine Quint.

This is preparation for resolving container units.

Also general cleanups to CSSToLengthConversionData.

  • css/CSSGradientValue.cpp:

(WebCore::CSSLinearGradientValue::createGradient):
(WebCore::CSSRadialGradientValue::createGradient):
(WebCore::CSSConicGradientValue::createGradient):

  • css/CSSToLengthConversionData.cpp:

(WebCore::CSSToLengthConversionData::CSSToLengthConversionData):
(WebCore::CSSToLengthConversionData::zoom const): Deleted.

  • css/CSSToLengthConversionData.h:

(WebCore::CSSToLengthConversionData::zoom const):
(WebCore::CSSToLengthConversionData::copyForFontSizeWithParentStyle const):
(WebCore::CSSToLengthConversionData::copyWithAdjustedZoom const):
(WebCore::CSSToLengthConversionData::copyForLineHeight const):
(WebCore::CSSToLengthConversionData::CSSToLengthConversionData): Deleted.
(WebCore::CSSToLengthConversionData::copyWithAdjustedZoomAndPropertyToCompute const): Deleted.

  • css/DOMMatrixReadOnly.cpp:

(WebCore::DOMMatrixReadOnly::parseStringIntoAbstractMatrix):

  • css/MediaQueryEvaluator.cpp:

(WebCore::MediaQueryEvaluator::evaluate const):

  • css/parser/SizesAttributeParser.cpp:

(WebCore::SizesAttributeParser::computeLength):
(WebCore::SizesAttributeParser::effectiveSizeDefaultValue):

  • html/shadow/TextControlInnerElements.cpp:

(WebCore::TextControlInnerElement::resolveCustomStyle):

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::popupInternalPaddingBox const):
(WebCore::applyCommonButtonPaddingToStyle):

Setting the zoom to a weird value here does nothing, ems unit resolution ignores it.
Just don't do it.

(WebCore::RenderThemeIOS::adjustButtonStyle const):
(WebCore::RenderThemeIOS::paintMenuListButtonDecorationsWithFormControlRefresh):
(WebCore::RenderThemeIOS::adjustSearchFieldDecorationPartStyle const):

  • style/ContainerQueryEvaluator.cpp:

(WebCore::Style::ContainerQueryEvaluator::selectContainer const):

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertLineHeight):

  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::mmLength):
(WebCore::Style::BuilderCustom::inchLength):
(WebCore::Style::BuilderCustom::applyValueFontSize):

  • style/StyleBuilderState.cpp:

(WebCore::Style::BuilderState::BuilderState):

2:21 AM Changeset in webkit [291397] by Diego Pino Garcia
  • 2 edits in trunk/Source/WebCore

Unreviewed, non-unified build fix after r291390

  • Modules/webaudio/DefaultAudioDestinationNode.cpp:
2:19 AM Changeset in webkit [291396] by Ziran Sun
  • 36 edits
    3 adds in trunk

[Selection] Fixes selection range settings for TEXTAREA
https://bugs.webkit.org/show_bug.cgi?id=237641

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Updating test expectations as some sub-tests are now passing.

  • web-platform-tests/html/semantics/forms/textfieldselection/defaultSelection-expected.txt:
  • web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt:
  • web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt:
  • web-platform-tests/html/semantics/forms/textfieldselection/selection-value-interactions-expected.txt:
  • web-platform-tests/html/semantics/forms/textfieldselection/textarea-selection-while-parsing-expected.txt:

Source/WebCore:

This CL is to fix the settings of SelectionStart/SelectionEnd for TEXTAREA for non-focused Element. It sets the
caret to the end of the text value except for initializing in most cases. For the case of updating defaultValue
for a non-dirty TEXTAREA, we should following the clamping steps as per spec and it will be addressed in a
follow-up patch.

This CL refers and imports part of the changes in chromium CL at
https://codereview.chromium.org/392573002

TextArea only calls setSelectionRange() for focused element. While for non-focused element, we need to update the caret
except for initializing. Since we are not change text selection for text area in this case, we only cache the selections.
It would be ideal to have a unified function call for both focused and non-focused cases. However, the selectionRange()
function changes focus of the element and the approach we are having here is to avoid the impacts on a good number of
exisiting tests.

This CL also introduces a unified setValue() API in HTMLFormControlElement for HTMLTextAreaElement and HTMLInputElement.

  • html/BaseButtonInputType.cpp:

(WebCore::BaseButtonInputType::setValue):

  • html/BaseButtonInputType.h:
  • html/BaseCheckableInputType.cpp:

(WebCore::BaseCheckableInputType::setValue):

  • html/BaseCheckableInputType.h:
  • html/BaseDateAndTimeInputType.cpp:

(WebCore::BaseDateAndTimeInputType::setValue):
(WebCore::BaseDateAndTimeInputType::didChangeValueFromControl):

  • html/BaseDateAndTimeInputType.h:
  • html/ColorInputType.cpp:

(WebCore::ColorInputType::setValue):

  • html/ColorInputType.h:
  • html/FileInputType.cpp:

(WebCore::FileInputType::setValue):

  • html/FileInputType.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::setValue):

  • html/HTMLInputElement.h:
  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::childrenChanged):
(WebCore::HTMLTextAreaElement::reset):
(WebCore::HTMLTextAreaElement::setValue):
(WebCore::HTMLTextAreaElement::setNonDirtyValue):
(WebCore::HTMLTextAreaElement::setValueCommon):
(WebCore::HTMLTextAreaElement::copyNonAttributePropertiesFromElement):

  • html/HTMLTextAreaElement.h:
  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setRangeText):

  • html/HTMLTextFormControlElement.h:
  • html/HiddenInputType.cpp:

(WebCore::HiddenInputType::setValue):

  • html/HiddenInputType.h:
  • html/InputType.cpp:

(WebCore::InputType::setValue):

  • html/InputType.h:
  • html/NumberInputType.cpp:

(WebCore::NumberInputType::setValue):

  • html/NumberInputType.h:
  • html/RangeInputType.cpp:

(WebCore::RangeInputType::setValue):

  • html/RangeInputType.h:
  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::setValue):

  • html/TextFieldInputType.h:

LayoutTests:

Updated two tests that expect resetting value of textarea to change selection to 0.
These changes are in line with changes made in Chromium.

  • editing/pasteboard/paste-into-textarea-with-new-line.html:
  • fast/spatial-navigation/snav-textarea.html:
2:01 AM Changeset in webkit [291395] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

[model] some tests under model-element crash on Big Sur bots
https://bugs.webkit.org/show_bug.cgi?id=238011

Reviewed by Cameron McCormack.

The fix for bug 237894 added another place where we might reject the ready
failure, but we didn't check whether it had already been rejected before,
which would cause an assertion failure leading to a crash on debug builds.

We now consistently check whether the ready promise had already been
fulfilled before rejecting it.

  • Modules/model-element/HTMLModelElement.cpp:

(WebCore::HTMLModelElement::setSourceURL):
(WebCore::HTMLModelElement::notifyFinished):
(WebCore::HTMLModelElement::modelDidChange):
(WebCore::HTMLModelElement::createModelPlayer):
(WebCore::HTMLModelElement::didFailLoading):

1:29 AM Changeset in webkit [291394] by Nikolas Zimmermann
  • 2 edits in trunk/Source/WebCore

[Xcode] Build broken after r289139
https://bugs.webkit.org/show_bug.cgi?id=238010

Unreviewed build fix: Remove duplicate entry from Xcode project file.

No change of behavior.

  • WebCore.xcodeproj/project.pbxproj:
12:53 AM Changeset in webkit [291393] by graouts@webkit.org
  • 8 edits in trunk/Source/WebKit

[model] -[ASVInlinePreview setRemoteContext:] should be called inside the -[ASVInlinePreview setupRemoteConnectionWithCompletionHandler:] callback
https://bugs.webkit.org/show_bug.cgi?id=237959
rdar://87832635

Reviewed by Dean Jackson.

We need to split the code that creates a remote ASVInlinePreview on macOS in two. The first step is to create the remote ASVInlinePreview
and obtain its remote context id from the UIProcess, setting it on the WebProcess ASVInlinePreview in the callback.

The second step is to load the file in the remote ASVInlinePreview.

For these two steps, we now have two separate WebProxy messages: ModelElementCreateRemotePreview and ModelElementLoadRemotePreview.

  • UIProcess/Cocoa/ModelElementControllerCocoa.mm:

(WebKit::ModelElementController::modelElementCreateRemotePreview):
(WebKit::ModelElementController::modelElementLoadRemotePreview):
(WebKit::ModelElementController::modelElementDidCreatePreview): Deleted.

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

(WebKit::WebPageProxy::modelElementCreateRemotePreview):
(WebKit::WebPageProxy::modelElementLoadRemotePreview):
(WebKit::WebPageProxy::modelElementDidCreatePreview): Deleted.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/Model/mac/ARKitInlinePreviewModelPlayerMac.h:
  • WebProcess/Model/mac/ARKitInlinePreviewModelPlayerMac.mm:

(WebKit::ARKitInlinePreviewModelPlayerMac::load):
(WebKit::ARKitInlinePreviewModelPlayerMac::createPreviewsForModelWithURL):
(WebKit::ARKitInlinePreviewModelPlayerMac::didCreateRemotePreviewForModelWithURL):

12:41 AM Changeset in webkit [291392] by commit-queue@webkit.org
  • 10 edits in trunk

[GTK][WPE] Guard libgbm and libdrm code, make them conditional dependencies for GTK
https://bugs.webkit.org/show_bug.cgi?id=237974

Patch by Zan Dobersek <zdobersek@igalia.com> on 2022-03-17
Reviewed by Alejandro G. Castro.

.:

Guard usage of libgbm and libdrm dependencies with the USE_LIBGBM
define. This should be required until we can switch to a possibly more
dynamic implementation that doesn't require build-time dependencies.

For the GTK port, the desire is to keep these dependencies fully
optional. At the moment they are required when enabling ANGLE-backed
WebGL, with the USE_LIBGBM also defined in that case. This is needed
because ANGLE integration for Linux ports already depends on these
libraries.

For the WPE port only USE_LIBGBM is defined and the two dependencies
remain required.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:

Source/WebCore:

Add USE(LIBGBM) guards around GBMDevice and GBMBufferSwapchain code,
and compile against the libgbm and libdrm dependencies only when
USE_LIBGBM is defined. This makes the two dependencies optional if
desired.

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • platform/graphics/gbm/GBMBufferSwapchain.cpp:
  • platform/graphics/gbm/GBMBufferSwapchain.h:
  • platform/graphics/gbm/GBMDevice.cpp:
  • platform/graphics/gbm/GBMDevice.h:
12:31 AM Changeset in webkit [291391] by youenn@apple.com
  • 4 edits
    4 deletes in trunk/Source/ThirdParty/libwebrtc

Remove no longer used third party webrtc modules
https://bugs.webkit.org/show_bug.cgi?id=237945

Reviewed by Eric Carlson.

Remove folders that have not been used for a long time.

  • CMakeLists.txt: Removed jsoncpp compilation.
  • Configurations/libwebrtc.xcconfig:
  • Source/third_party/gflags: Removed.
  • Source/third_party/googletest: Removed.
  • Source/third_party/gtest-parallel: Removed.
  • Source/third_party/jsoncpp: Removed.
  • libwebrtc.xcodeproj/project.pbxproj:
12:21 AM Changeset in webkit [291390] by youenn@apple.com
  • 16 edits
    2 adds in trunk

AudioContext is suspended on iOS when page is backgrounded
https://bugs.webkit.org/show_bug.cgi?id=237878

Reviewed by Eric Carlson.

Source/WebCore:

On iOS, when the application goes in the background, AudioContext gets suspended.
This is problematic when AudioContext is used to generate audio samples but not play audio samples.
To allow those silent AudioContexts to run even in background, the following is done:

  • Override background interruptions in case the audio context default destination is not connected.
  • Monitor whether the default destination is connected or not.
  • If the default destination gets connected while application is in the background, trigger an interruption to prevent playing audio.

To prevent potential audio burst, we interrupt just before the destination gets connected and not just after.
For that reason, we add m_canOverrideBackgroundPlaybackRestriction to enforce interruption when we now the connection will be connected.

This approach keeps the existing iOS behavior in terms of rendered audio while allowing for not-playing audio contexts to continue in the background.

Tests: webaudio/suspend-context-while-backgrounded.html and API test.

  • Modules/webaudio/AudioContext.cpp:
  • Modules/webaudio/AudioContext.h:
  • Modules/webaudio/AudioNode.cpp:
  • Modules/webaudio/AudioSummingJunction.h:
  • Modules/webaudio/DefaultAudioDestinationNode.cpp:
  • Modules/webaudio/DefaultAudioDestinationNode.h:
  • platform/audio/PlatformMediaSessionManager.h:

Source/WebKit:

Expose private SPI for testing purposes.

  • UIProcess/API/Cocoa/WKProcessPool.mm:
  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
  • UIProcess/WebProcessPool.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/audio-context-playing.html:

LayoutTests:

  • webaudio/suspend-context-while-backgrounded-expected.txt: Added.
  • webaudio/suspend-context-while-backgrounded.html: Added.
12:17 AM Changeset in webkit [291389] by mmaxfield@apple.com
  • 19 edits in trunk/Source/WebGPU

[WebGPU] Mark unchanging class members as const
https://bugs.webkit.org/show_bug.cgi?id=237998

Reviewed by Kimmo Kinnunen.

Let's use the C++ type system to our advantage.

  • WebGPU/Adapter.h:
  • WebGPU/BindGroup.h:
  • WebGPU/BindGroupLayout.h:
  • WebGPU/CommandBuffer.h:
  • WebGPU/ComputePassEncoder.h:
  • WebGPU/ComputePipeline.h:
  • WebGPU/Device.h:

(WebGPU::Device::instance const):
(WebGPU::Device::instance): Deleted.

  • WebGPU/Instance.h:
  • WebGPU/QuerySet.h:
  • WebGPU/Queue.h:
  • WebGPU/RenderBundle.h:
  • WebGPU/RenderBundleEncoder.h:
  • WebGPU/RenderPassEncoder.h:
  • WebGPU/RenderPipeline.h:
  • WebGPU/Sampler.h:
  • WebGPU/ShaderModule.h:
  • WebGPU/Texture.h:
  • WebGPU/TextureView.h:
Note: See TracTimeline for information about the timeline view.