Repository navigation
Add AsyncContextData and custom promise context tracking (for AsyncLocalStorage in bun) - #11
Closed
small-angel wants to merge 11 commits into
Closed
small-angel wants to merge 11 commits into
small-angel wants to merge 11 commits into
Conversation
added 2 commits
July 13, 2023 22:23
small-angel
marked this pull request as ready for review
July 14, 2023 07:47
dylan-conway
pushed a commit
that referenced
this pull request
Jul 9, 2024
https://bugs.webkit.org/show_bug.cgi?id=276291 Reviewed by Antti Koivisto. In 162878@main we went from isPercent() to isPercentOrCalculated() without adding support for the "calculated" part. (FIXME: we should find a common place for this) https://drafts.csswg.org/css-sizing-3/#replaced-percentage-min-contribution "If the box is replaced, a cyclic percentage in the value of any max size property or preferred size property (width/max-width/height/max-height), is resolved against zero when calculating the min-content contribution in the corresponding axis" and https://drafts.csswg.org/css-sizing-3/#min-content-zero "In addition to the replaced elements listed in HTML 14.4 [HTML], the following HTML elements are also considered to be replaced elements...select, textarea, progress, meter..." * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flex-item-compressible-001-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flex-item-compressible-002-expected.txt: * Source/WebCore/rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths const): * Source/WebCore/rendering/RenderListBox.cpp: (WebCore::RenderListBox::computeIntrinsicLogicalWidths const): * Source/WebCore/rendering/RenderMenuList.cpp: (RenderMenuList::computeIntrinsicLogicalWidths const): * Source/WebCore/rendering/RenderSlider.cpp: (WebCore::RenderSlider::computeIntrinsicLogicalWidths const): * Source/WebCore/rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::computeIntrinsicLogicalWidths const): Canonical link: https://commits.webkit.org/280722@main
sosukesuzuki
pushed a commit
that referenced
this pull request
Apr 17, 2026
https://bugs.webkit.org/show_bug.cgi?id=312485 rdar://174932570 Reviewed by Yusuke Suzuki. Use value - trunc(value) == 0.0 for isInteger, which rejects NaN and Infinity without an explicit isFinite check since NaN - NaN and Inf - Inf both produce NaN. Add MacroAssembler::isDoubleInteger helper and use it in the DFG NumberIsInteger path, removing the manual exponent-bit extraction branch. Simplify the FTL NumberIsInteger path similarly using B3 IR. Remove redundant isFinite checks from DFG and FTL NumberIsSafeInteger, since the range check against maxSafeInteger already rejects Infinity. On ARM64 the difference in codegen is roughly: isIntegerOld(double): frintz d1, d0 fmov x8, d0 mov w9, WebKit#2047 ubfx x8, x8, #52, #11 fcmp d1, d0 ccmp x8, x9, #2, eq cset w0, lo ret isIntegerNew(double): frintz d1, d0 fsub d0, d0, d1 fcmp d0, #0.0 cset w0, eq ret No new tests, no behavior change. Covered by existing tests. Canonical link: https://commits.webkit.org/311413@main
pull Bot
referenced
this pull request
in coleleavitt/WebKit
Jul 19, 2026
…xItem and marginBoxAscentForFlexItem instead of reading the renderer https://bugs.webkit.org/show_bug.cgi?id=318518 Reviewed by Antti Koivisto. Following 318517, which captured each flex item's used cross size into computeCrossSizeForFlexItems's list, route the remaining post-stretch cross-axis alignment reads through that list. availableAlignmentSpaceForFlexItem and marginBoxAscentForFlexItem now take the used cross size as an argument rather than reading crossAxisExtentForFlexItem (the renderer's border box) themselves. Their post-stretch callers (handleCrossAxisAlignmentForFlexItems and performBaselineAlignment) pass crossSizes[itemIndex] -- the value captured in #11, which nothing relays out before these phases, so it is exactly what they read from the renderer before. The two callers that run outside that window pass crossAxisExtentForFlexItem directly, unchanged: crossSizeForFlexLines (#8, before the stretch pass, and only for baseline items, which are never stretched) and the out-of-flow static-position path, whose item is not in the list. So the used cross size now flows through the algorithm's list for the whole post-stretch alignment path; the only renderer cross-size reads left are #8 and the external baseline queries (firstLineBaseline / baselinePosition). No change in behavior. * Source/WebCore/rendering/RenderFlexibleBox.h: * Source/WebCore/rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::availableAlignmentSpaceForFlexItem): (WebCore::RenderFlexibleBox::marginBoxAscentForFlexItem): (WebCore::RenderFlexibleBox::staticCrossAxisPositionForPositionedFlexItem): (WebCore::RenderFlexibleBox::crossSizeForFlexLines): (WebCore::RenderFlexibleBox::handleCrossAxisAlignmentForFlexItems): (WebCore::RenderFlexibleBox::performBaselineAlignment): Canonical link: https://commits.webkit.org/316980@main
Jarred-Sumner
pushed a commit
that referenced
this pull request
Sep 25, 2026
* [JSC] Air FixObviousSpills state should track aliased regs
https://bugs.webkit.org/show_bug.cgi?id=324695
rdar://187965961
Reviewed by Dan Hecht.
State::clobber(Reg) is very frequently called as it is called once per
def of regs in Air::Inst.
1. For regConst case, one reg can only have one const. So instead of
having Vector of Reg and Const pair, we have std::array for const
value with Reg-index. And we have ScalarRegisterSet for set constReg.
2. To quickly know whether we have RegSlot for a particular Reg, we
maintain ScalarRegisterSet regSlotRegs bitset.
* Source/JavaScriptCore/b3/air/AirFixObviousSpills.cpp:
Canonical link: https://commits.webkit.org/321519@main
* WebGPU: Rename wgpu*Reference to wgpu*AddRef
https://bugs.webkit.org/show_bug.cgi?id=324701
rdar://187977974
Reviewed by Mike Wyrzykowski.
The standard webgpu.h uses wgpu*AddRef instead of wgpu*Reference.
Use same symbols in WebGPU.h.
Since WebGPU.h header exists and mimics webgpu.h, it is logical to match
webgpu.h. This makes it simpler to integrate ANGLE WebGPU backend, which
already uses webgpu.h signatures.
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUPtr.h:
* Source/WebGPU/WebGPU/Adapter.mm:
(wgpuAdapterAddRef):
(wgpuAdapterReference): Deleted.
* Source/WebGPU/WebGPU/BindGroup.mm:
* Source/WebGPU/WebGPU/BindGroupLayout.mm:
(wgpuBindGroupLayoutAddRef):
(wgpuBindGroupLayoutReference): Deleted.
* Source/WebGPU/WebGPU/Buffer.mm:
(wgpuBufferAddRef):
(wgpuBufferReference): Deleted.
* Source/WebGPU/WebGPU/CommandBuffer.mm:
(wgpuCommandBufferAddRef):
(wgpuCommandBufferReference): Deleted.
* Source/WebGPU/WebGPU/CommandEncoder.mm:
(wgpuCommandEncoderAddRef):
(wgpuCommandEncoderReference): Deleted.
* Source/WebGPU/WebGPU/ComputePassEncoder.mm:
(wgpuComputePassEncoderAddRef):
(wgpuComputePassEncoderReference): Deleted.
* Source/WebGPU/WebGPU/ComputePipeline.mm:
(wgpuComputePipelineAddRef):
(wgpuComputePipelineReference): Deleted.
* Source/WebGPU/WebGPU/Device.mm:
* Source/WebGPU/WebGPU/ExternalTexture.mm:
(wgpuExternalTextureAddRef):
(wgpuExternalTextureReference): Deleted.
* Source/WebGPU/WebGPU/Instance.mm:
(wgpuInstanceAddRef):
(wgpuInstanceReference): Deleted.
* Source/WebGPU/WebGPU/PipelineLayout.mm:
(wgpuPipelineLayoutAddRef):
(wgpuPipelineLayoutReference): Deleted.
* Source/WebGPU/WebGPU/PresentationContext.mm:
(wgpuSurfaceAddRef):
(wgpuSwapChainAddRef):
(wgpuSurfaceReference): Deleted.
(wgpuSwapChainReference): Deleted.
* Source/WebGPU/WebGPU/QuerySet.mm:
(wgpuQuerySetAddRef):
(wgpuQuerySetReference): Deleted.
* Source/WebGPU/WebGPU/Queue.mm:
* Source/WebGPU/WebGPU/RenderBundle.mm:
(wgpuRenderBundleAddRef):
(wgpuRenderBundleReference): Deleted.
* Source/WebGPU/WebGPU/RenderBundleEncoder.mm:
(wgpuRenderBundleEncoderAddRef):
(wgpuRenderBundleEncoderReference): Deleted.
* Source/WebGPU/WebGPU/RenderPassEncoder.mm:
(wgpuRenderPassEncoderAddRef):
(wgpuRenderPassEncoderReference): Deleted.
* Source/WebGPU/WebGPU/RenderPipeline.mm:
(wgpuRenderPipelineAddRef):
(wgpuRenderPipelineReference): Deleted.
* Source/WebGPU/WebGPU/Sampler.mm:
(wgpuSamplerAddRef):
(wgpuSamplerReference): Deleted.
* Source/WebGPU/WebGPU/ShaderModule.mm:
(wgpuShaderModuleAddRef):
(wgpuShaderModuleReference): Deleted.
* Source/WebGPU/WebGPU/Texture.mm:
(wgpuTextureAddRef):
(wgpuTextureReference): Deleted.
* Source/WebGPU/WebGPU/TextureView.mm:
(wgpuTextureViewAddRef):
(wgpuTextureViewReference): Deleted.
* Source/WebGPU/WebGPU/WGPUBufferImpl.h:
* Source/WebGPU/WebGPU/WGPUQuerySetImpl.h:
* Source/WebGPU/WebGPU/WGPUTextureImpl.h:
* Source/WebGPU/WebGPU/WGPUTextureViewImpl.h:
* Source/WebGPU/WebGPU/WebGPU.h:
* Source/WebGPU/WebGPU/WebGPUExt.h:
* Source/WebGPU/WebGPU/XRBinding.mm:
(wgpuXRBindingAddRef):
(wgpuXRBindingReference): Deleted.
* Source/WebGPU/WebGPU/XRProjectionLayer.mm:
(wgpuXRProjectionLayerAddRef):
(wgpuXRProjectionLayerReference): Deleted.
* Source/WebGPU/WebGPU/XRSubImage.mm:
(wgpuXRSubImageAddRef):
(wgpuXRSubImageReference): Deleted.
* Source/WebGPU/WebGPU/XRView.mm:
(wgpuXRViewAddRef):
(wgpuXRViewReference): Deleted.
Canonical link: https://commits.webkit.org/321520@main
* Siri AI queries are not working correctly on WKWebView when long pressing an image
https://bugs.webkit.org/show_bug.cgi?id=324568
rdar://183648577
Reviewed by Pascoe and Abrar Rahman Protyasha.
Set the `exportableData` property for context menu preview target elements (e.g. an image that the
user is long-pressing), such that the system can extract data from the corresponding drag
interaction via item providers.
* Source/WebKit/Configurations/AllowedSPI-legacy.toml:
* Source/WebKit/UIProcess/Cocoa/TextExtraction/WKWebView+TextExtraction.swift:
(ContextMenuSource.createIntelligenceElement(_:contextMenuSource:)):
(createIntelligenceElement(_:contextMenuTargetNodeIdentifier:)): Deleted.
Canonical link: https://commits.webkit.org/321521@main
* Implement a VideoToolbox H265 encoder in WebCore
https://bugs.webkit.org/show_bug.cgi?id=324332
rdar://problem/187565323
We implement directly in WebCore a H265 encoder using VideoToolbox.
It is implemented as WebRTCVideoEncoderVTBH265 with VideoEncoderVTB/WebRTCVideoEncoderVTB as base classes.
WebRTCVideoEncoderVTBH265 is instantiated when WebRTCWebCoreVideoEncodersEnabled is set.
H264 still goes through libwebrtc.
We add support for QP-extraction bitstream parsing and H265 Annex B conversion by introducing routines into HEVCUtilitiesCocoa/HEVCUtilities.
These are replacements to libwebrtc's H265CMSampleBufferToAnnexBBuffer and H265BitstreamParser, implemented with safe C++ guidelines.
Covered by existing tests and API tests.
Reviewed by Jean-Yves Avenard.
* Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.cpp:
* Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.h:
* Source/WebCore/PAL/pal/cf/VideoToolboxSoftLink.cpp:
* Source/WebCore/PAL/pal/cf/VideoToolboxSoftLink.h:
* Source/WebCore/SourcesCocoa.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/HEVCUtilities.cpp:
(WebCore::findHEVCNaluIndices):
(WebCore::hevcNaluType):
(WebCore::parseRbsp):
(WebCore::HEVCBitstreamParser::parseProfileTierLevel):
(WebCore::HEVCBitstreamParser::parseScalingListData):
(WebCore::HEVCBitstreamParser::parseShortTermRefPicSet):
(WebCore::HEVCBitstreamParser::parseSps):
(WebCore::HEVCBitstreamParser::parsePps):
(WebCore::HEVCBitstreamParser::parseNonParameterSetNalu):
(WebCore::HEVCBitstreamParser::parseSlice):
(WebCore::HEVCBitstreamParser::pps const):
(WebCore::HEVCBitstreamParser::sps const):
(WebCore::HEVCBitstreamParser::parseBitstream):
(WebCore::HEVCBitstreamParser::lastSliceQP const):
* Source/WebCore/platform/graphics/HEVCUtilities.h:
* Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.h:
* Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:
(WebCore::convertHEVCCMSampleBufferToAnnexB):
* Source/WebCore/platform/video-codecs/BitReader.cpp:
(WebCore::BitReader::readBits):
(WebCore::BitReader::readFlag):
(WebCore::BitReader::consumeBits):
(WebCore::BitReader::readExpGolomb):
(WebCore::BitReader::readSignedExpGolomb):
* Source/WebCore/platform/video-codecs/BitReader.h:
(WebCore::BitReader::ok const):
* Tools/TestWebKitAPI/CMakeLists.txt:
* Tools/TestWebKitAPI/PlatformCocoa.cmake:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebCore/HEVCUtilitiesTests.cpp: Added.
(TestWebKitAPI::TEST(HEVCBitstreamParser, ReportsNoQpBeforeAnyParsing)):
(TestWebKitAPI::TEST(HEVCBitstreamParser, ReportsNoQpAfterParsingOnlyParameterSets)):
(TestWebKitAPI::TEST(HEVCBitstreamParser, ReportsQpForImageSlices)):
(TestWebKitAPI::TEST(HEVCBitstreamParser, ReportsQpFromShortTermReferencePicSetSlice)):
(TestWebKitAPI::TEST(HEVCBitstreamParser, ReportsQpWithPredWeightTable)):
(TestWebKitAPI::TEST(HEVCBitstreamParser, RejectsOutOfRangeQp)):
* Tools/TestWebKitAPI/Tests/WebCore/cocoa/HEVCUtilitiesCocoaTests.mm: Added.
(TestWebKitAPI::appendByte):
(TestWebKitAPI::appendBytes):
(TestWebKitAPI::makeHVCCData):
(TestWebKitAPI::createHEVCFormatDescription):
(TestWebKitAPI::createHEVCSampleBuffer):
(TestWebKitAPI::annexBStartCode):
(TestWebKitAPI::TEST(HEVCUtilitiesCocoa, KeyframePrependsParameterSets)):
(TestWebKitAPI::TEST(HEVCUtilitiesCocoa, NonKeyframeOmitsParameterSets)):
(TestWebKitAPI::TEST(HEVCUtilitiesCocoa, MultipleNALUsOfDifferentSizesAreAllExtracted)):
(TestWebKitAPI::TEST(HEVCUtilitiesCocoa, TruncatedNALULengthReturnsEmpty)):
* Source/WebCore/platform/video-codecs/cocoa/GPUVideoEncoder.h:
* Source/WebCore/platform/video-codecs/cocoa/GPUVideoEncoder.mm:
(WebCore::GPUVideoEncoder::create):
* Source/WebCore/platform/video-codecs/cocoa/GPUVideoEncoderVTB.h: Added.
(WebCore::GPUVideoEncoderVTB::width const):
(WebCore::GPUVideoEncoderVTB::height const):
(WebCore::GPUVideoEncoderVTB::useAnnexB const):
(WebCore::GPUVideoEncoderVTB::needsToSendDescription const):
(WebCore::GPUVideoEncoderVTB::setNeedsToSendDescription):
(WebCore::GPUVideoEncoderVTB::creationThreadID const):
* Source/WebCore/platform/video-codecs/cocoa/GPUVideoEncoderVTB.mm: Added.
(WebCore::GPUVideoEncoderBitrateAdjuster::setTargetBitrateBps):
(WebCore::GPUVideoEncoderBitrateAdjuster::adjustedBitrateBps const):
(WebCore::GPUVideoEncoderBitrateAdjuster::update):
(WebCore::GPUVideoEncoderBitrateAdjuster::isWithinTolerance):
(WebCore::GPUVideoEncoderBitrateAdjuster::WTF_REQUIRES_LOCK):
(WebCore::GPUVideoEncoderBitrateAdjuster::WTF_GUARDED_BY_LOCK):
(WebCore::GPUVideoEncoderVTB::GPUVideoEncoderVTB):
(WebCore::GPUVideoEncoderVTB::notifyEncodedFrame):
(WebCore::GPUVideoEncoderVTB::notifyDescription):
(WebCore::GPUVideoEncoderVTB::notifyError):
(WebCore::GPUVideoEncoderVTB::notifyFrameDropped):
(WebCore::GPUVideoEncoderVTB::setLowLatency):
(WebCore::GPUVideoEncoderVTB::initialize):
(WebCore::GPUVideoEncoderVTB::resetCompressionSession):
(WebCore::GPUVideoEncoderVTB::configureCompressionSession):
(WebCore::GPUVideoEncoderVTB::setEncoderBitrateBps):
(WebCore::GPUVideoEncoderVTB::setRates):
(WebCore::GPUVideoEncoderVTB::encodeFrame):
(WebCore::GPUVideoEncoderVTB::flush):
* Source/WebCore/platform/video-codecs/cocoa/GPUVideoEncoderVTBH265.h: Copied from Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.h.
* Source/WebCore/platform/video-codecs/cocoa/GPUVideoEncoderVTBH265.mm: Added.
(WebCore::GPUVideoEncoderVTBH265::GPUVideoEncoderVTBH265):
(WebCore::GPUVideoEncoderVTBH265::codecType const):
(WebCore::GPUVideoEncoderVTBH265::convertAndNotify):
* Source/WebCore/platform/video-codecs/cocoa/VideoEncoderVTBSession.h: Added.
(WebCore::VideoEncoderVTBSession::VideoEncoderVTBSession):
* Source/WebCore/platform/video-codecs/cocoa/VideoEncoderVTBSession.mm: Added.
(WebCore::VideoEncoderVTBSession::create):
(WebCore::VideoEncoderVTBSession::~VideoEncoderVTBSession):
(WebCore::VideoEncoderVTBSession::isHardwareAccelerated const):
(WebCore::VideoEncoderVTBSession::setProperty):
(WebCore::VideoEncoderVTBSession::prepareToEncodeFrames):
(WebCore::VideoEncoderVTBSession::completeFrames):
(WebCore::VideoEncoderVTBSession::encodeFrame):
* Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.h:
* Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
(WebKit::LibWebRTCCodecsProxy::createEncoder):
Canonical link: https://commits.webkit.org/321522@main
* [AppKit Gestures] Mouse dragging the track of a custom-styled range input often does not slide
https://bugs.webkit.org/show_bug.cgi?id=324408
rdar://186965160
Reviewed by Tim Horton.
Restyling a range input's track can produce a hit area that is only as
tall as the track itself, which can be just a couple of points.
A mouse drag starting on the track, away from the thumb, therefore lands
on whatever wraps the control. Position information reports the wrapper,
so the WKAppKitGestureController has content to yield to, and mouse
tracking does not end up getting recognized.
To fix this, we now supply input source to InteractionInformationRequest
such that we can perform adjustments appropriate for Automation-sourced
requests.
Test: AppKitGesturesTests.Basic/mouseDragOverThinRangeInputChangesValue
Canonical link: https://commits.webkit.org/321523@main
* Versioning. WebKit-7627.1.2
Canonical link: https://commits.webkit.org/321524@main
* [AccentColor] Introduce Style::ResolvedColors
rdar://187666049
https://bugs.webkit.org/show_bug.cgi?id=324433
Reviewed by Sam Weinig.
Currently, Style::CurrentColor is resolved to the current color by supplying
the current color to Style::resolveColor(), then it gets plumbed to
Style::resolveColor(const CurrentColor&), which simply returns it.
To implement AccentColor following the current accent color, we'd have to
plumb the current accent color the same way as the current color. The obvious
solution is to add another parameter, but we don't want to do that every time
a new "current X" color is introduced.
This patch introduces Style::ResolvedColors, which acts as a storage of colors
needed to resolve "current X" colors like currentColor and AccentColor. A
Style::ResolvedColors is created by pulling out the needed colors from a
ComputedStyle. Then ResolvedColors is given to Style::resolveColor() to
help resolve "current X" colors.
For now it only stores the current `color` property, but future patches will
add accent color to it, so it can resolve current accent color.
No new behaviors, tested by existing test suite.
* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyInitialColor):
(WebCore::Style::BuilderCustom::applyValueColor):
(WebCore::Style::BuilderCustom::applyHighlightInheritColor):
* Source/WebCore/style/StyleColorResolver.cpp:
(WebCore::Style::ColorResolver::colorResolvingCurrentColor const):
(WebCore::Style::ColorResolver::visitedLinkColorResolvingCurrentColor const):
* Source/WebCore/style/StyleColorResolver.h:
(WebCore::Style::ColorPropertyResolver<ColorTraits>::colorResolvingCurrentColor const):
(WebCore::Style::requires):
* Source/WebCore/style/computed/StyleComputedStyleProperties+GettersCustomInlines.h:
(WebCore::Style::ColorPropertyTraits<PropertyNameConstant<CSSPropertyTextDecorationColor>>::colorResolvingCurrentColor):
(WebCore::Style::ColorPropertyTraits<PropertyNameConstant<CSSPropertyTextDecorationColor>>::visitedLinkColorResolvingCurrentColor):
* Source/WebCore/style/values/color/StyleColor.cpp:
(WebCore::Style::Color::resolveColor const):
(WebCore::Style::resolveColor):
* Source/WebCore/style/values/color/StyleColor.h:
* Source/WebCore/style/values/color/StyleColorLayers.cpp:
(WebCore::Style::resolveColor):
* Source/WebCore/style/values/color/StyleColorLayers.h:
* Source/WebCore/style/values/color/StyleColorMix.cpp:
(WebCore::Style::resolveColor):
* Source/WebCore/style/values/color/StyleColorMix.h:
* Source/WebCore/style/values/color/StyleContrastColor.cpp:
(WebCore::Style::resolveColor):
* Source/WebCore/style/values/color/StyleContrastColor.h:
* Source/WebCore/style/values/color/StyleCurrentAccentColor.h:
(WebCore::Style::resolveColor):
* Source/WebCore/style/values/color/StyleCurrentColor.h:
(WebCore::Style::resolveColor):
* Source/WebCore/style/values/color/StyleRelativeAlphaColor.cpp:
(WebCore::Style::resolveColor):
* Source/WebCore/style/values/color/StyleRelativeAlphaColor.h:
* Source/WebCore/style/values/color/StyleRelativeColor.h:
(WebCore::Style::resolveColor):
* Source/WebCore/style/values/color/StyleResolvedColor.h:
(WebCore::Style::resolveColor):
* Source/WebCore/style/values/color/StyleResolvedColors.cpp: Copied from Source/WebCore/style/values/color/StyleCurrentColor.h.
(WebCore::Style::ResolvedColors::ResolvedColors):
(WebCore::Style::ResolvedColors::fromStyle):
(WebCore::Style::ResolvedColors::fromVisitedLinkStyle):
* Source/WebCore/style/values/color/StyleResolvedColors.h: Copied from Source/WebCore/style/values/color/StyleCurrentColor.h.
(WebCore::Style::ResolvedColors::currentColor const):
* Source/WebCore/style/values/filter-effects/StyleDropShadowFunction.cpp:
(WebCore::Style::Ref<FilterEffect>>::operator):
(WebCore::Style::ToPlatform<DropShadow>::operator):
* Source/WebCore/style/values/color/StyleCurrentColor.cpp:
(WebCore::Style::resolveColor):
Canonical link: https://commits.webkit.org/321525@main
* Support the container option ("all" | "nearest") in scrollIntoView()
https://bugs.webkit.org/show_bug.cgi?id=324383
rdar://187616355
Reviewed by Simon Fraser.
CSSOM View defines [1] a `container` member on ScrollIntoViewOptions that
controls how far a scroll propagates: "all" (the default) walks every
ancestor scroll container up to the viewport, while "nearest" stops at
the nearest scroll container of the target.
Add the ScrollIntoViewContainer enum and thread it from the options
dictionary down through scrollRectToVisible. When "nearest" is
requested we stop after scrolling the first scroll container and do not
propagate the scroll to ancestor scrollers or out to an embedding
frame.
[1] https://drafts.csswg.org/cssom-view/#dictdef-scrollintoviewoptions
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
Register the new ScrollIntoViewContainer IDL enum and generated
bindings.
* Source/WebCore/page/ScrollIntoViewContainer.h: Added.
* Source/WebCore/page/ScrollIntoViewContainer.idl: Added.
New enum with "all" and "nearest" values.
* Source/WebCore/page/ScrollIntoViewOptions.h:
* Source/WebCore/page/ScrollIntoViewOptions.idl:
Add the `container` member, defaulting to "all".
* Source/WebCore/rendering/RenderLayer.h:
Carry the container option on ScrollRectToVisibleOptions.
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::scrollIntoView): Pass options.container through.
* LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollIntoView-container-expected.txt: Progression
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::scrollRectToVisible): For "nearest", stop
after the nearest scroll container instead of propagating to ancestors.
(WebCore::LocalFrameView::scrollRectToVisibleInChildView): For
"nearest", don't propagate the scroll out to the embedding frame.
Canonical link: https://commits.webkit.org/321526@main
* Element::setScrollLeft/setScrollTop re-check a guaranteed-non-null renderer and call layer() twice
https://bugs.webkit.org/show_bug.cgi?id=324666
rdar://187925755
Reviewed by Ryosuke Niwa.
Inside `if (CheckedPtr renderer = renderBox())`, both setScrollLeft() and
setScrollTop() computed the scrollable area with:
if (auto* scrollableArea = renderer && renderer->layer() ? renderer->layer()->scrollableArea() : nullptr)
The `renderer &&` guard is dead — renderer is the branch condition and cannot
be null here — and layer() is evaluated twice. Replace with a single CheckedPtr
guard over layer(). No behavior change.
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::setScrollLeft):
(WebCore::Element::setScrollTop):
Canonical link: https://commits.webkit.org/321527@main
* Redefining an IDL union typedef silently replaces the previous one
https://bugs.webkit.org/show_bug.cgi?id=324704
Reviewed by Sam Weinig.
The check compared type names, which are "UNION" for every union, so two different
unions under one name compared equal. %typedefs is never reset and
generate-bindings-all.pl parses files in batches, so whichever was parsed last won,
depending on how the files were distributed across jobs.
That found three conflicts, none of which change behavior. VideoFrame's
CanvasImageSource leaves out VideoFrame, which has a constructor overload of its
own, so it gets a name of its own. WebGL's Float32List, Int32List, and Uint32List
are [AllowShared] in the rendering contexts but not in the multi-draw extensions,
so the former become AllowSharedFloat32List and so on. CanvasImageSource was
declared six times in two member orders, each pinned to a Variant; they now use the
HTML standard's order.
Canonical link: https://commits.webkit.org/321528@main
* Web Inspector: Blank gap in tables after resizing
https://bugs.webkit.org/show_bug.cgi?id=324565
Reviewed by Devin Rousso.
Resizing the Web Inspector window while a table has more rows than
currently fit can leave a blank gap at the bottom of the table.
Both `WI.Table` and `WI.DataGrid` only render the rows currently on
screen, and skip recomputing them unless something relevant changed.
The early return condition never checks if the container height has
changed since the last computation, so a resize could leave old rows
and spacer heights behind.
Force a recompute of the visible row window when the container height
changes.
* Source/WebInspectorUI/UserInterface/Views/DataGrid.js:
(WI.DataGrid.prototype.updateVisibleRows):
(WI.DataGrid.prototype._calculateOffsetHeight):
(WI.DataGrid.prototype._calculateScrollTop):
* Source/WebInspectorUI/UserInterface/Views/Table.js:
(WI.Table.prototype._updateVisibleRows):
Canonical link: https://commits.webkit.org/321529@main
* Rename _allowSharedProcess to _prefersIsolatedProcess
https://bugs.webkit.org/show_bug.cgi?id=324636
rdar://187886280
Reviewed by Ryosuke Niwa and Per Arne Vollan.
_allowSharedProcess was named as if the client could veto placing a site in the shared process, but the process decision
is made per (browsing context group, site) and is never revisited. Only the first navigation to a site in a group
consults the policy, so setting _allowSharedProcess = NO on a later navigation to a site that already joined the shared
process has no effect. The scope of the API (per navigation) is finer than the scope of the decision (per browsing
context group), which makes any API of this shape order dependent. In practice it expresses a preference, not a
guarantee.
Rename it to _prefersIsolatedProcess so the name matches what it does. The polarity is inverted along with the name.
This does not change the per browsing context group stickiness described above; it only stops the name from promising
something the API cannot deliver.
* Source/WebKit/Shared/WebsitePoliciesData.h:
* Source/WebKit/Shared/WebsitePoliciesData.serialization.in:
* Source/WebKit/UIProcess/API/APIWebsitePolicies.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.mm:
(-[WKWebpagePreferences _prefersIsolatedProcess]):
(-[WKWebpagePreferences _setPrefersIsolatedProcess:]):
(-[WKWebpagePreferences _allowSharedProcess]): Deleted.
(-[WKWebpagePreferences _setAllowSharedProcess:]): Deleted.
* Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h:
* Source/WebKit/UIProcess/BrowsingContextGroup.cpp:
(WebKit::BrowsingContextGroup::sharedProcessForSite):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm:
(TestWebKitAPI::TEST(SiteIsolation, UnresponsiveProcessMousedown)):
(TestWebKitAPI::(SiteIsolation, SharedProcessWithWebsitePolicies)):
Canonical link: https://commits.webkit.org/321530@main
* [Text Extraction] Automatic password fixes on MEGA.nz are still flaky (agent is sometimes confused by password change form)
https://bugs.webkit.org/show_bug.cgi?id=324709
rdar://187895616
Reviewed by Abrar Rahman Protyasha.
Make a targeted adjustment to help the password change agent reason about MEGA's change password
form, whose 'Change Password' form submission button only shows up after a new strong password is
AutoFilled:
1. If search `text` is specified in the click interaction that targets a button with no rendered
text, allow the interaction to happen as long as the `text` is contained within the non-rendered
contents of the target and the target is "not very large" (i.e. roughly button/link-sized), or
if the target itself is already a form control or link, simply waive the text match altogether.
2. Bump up the character limit for 'fallback human readable class names' slightly, to capture the
`change-password-button` class.
Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.swift
* Source/WebCore/page/text-extraction/TextExtraction.cpp:
(WebCore::TextExtraction::searchTextMatchesUnrenderedElementText):
(WebCore::TextExtraction::textDescription):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.swift:
(TextExtractionTests.interactionDescriptionUsesUnrenderedTextForCollapsedTarget):
Canonical link: https://commits.webkit.org/321531@main
* Auto dimming is not synced from video fullscreen to element fullscreen
https://bugs.webkit.org/show_bug.cgi?id=324473
rdar://187712192
Reviewed by Andy Estes.
The element fullscreen window layer keeps whatever lightspill flag we gave it on entry. Only
_enterFullScreen: and toggleSceneDimming ever write that flag and neither one runs on the way back
from video fullscreen, so turning dimming off in video fullscreen had no effect once you returned.
Re-apply it in didExitVideoFullscreen.
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController didExitVideoFullscreen]):
Canonical link: https://commits.webkit.org/321532@main
* content-visibility: auto element stuck relevant after scrollIntoView() of clipped descendant
https://bugs.webkit.org/show_bug.cgi?id=324202
rdar://187417053
Reviewed by Simon Fraser.
scrollIntoView() of a descendant of a content-visibility:auto element forces the
element's viewport proximity to Near (out-of-band, not via the intersection
observer) so the skipped content can be scrolled to. When the descendant is
clipped and cannot actually be revealed, the element ends up outside the viewport
after scrolling and should return to hidden.
That never happened: the internal IntersectionObserver's previousThresholdIndex
still reflected the pre-scroll non-intersecting state (0), so when it recomputed
the still-non-intersecting element it saw no change, never ran its callback, and
never reset the proximity to Far. The element stayed relevant forever and the
"hidden again" contentvisibilityautostatechange event never fired, hanging the
test.
Clear the observer's cached threshold index for the target when forcing Near, so
the next intersection computation is treated as a first observation and re-syncs
the proximity with reality.
* LayoutTests/TestExpectations: Progression
* LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-vs-scrollIntoView-003-expected.txt: Ditto
* Source/WebCore/dom/ContentVisibilityDocumentState.cpp:
(WebCore::ContentVisibilityDocumentState::updateContentRelevancyForScrollIfNeeded):
* Source/WebCore/page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::resetPreviousThresholdIndexForTarget):
* Source/WebCore/page/IntersectionObserver.h:
Canonical link: https://commits.webkit.org/321533@main
* [build-webkit] Bring up post-commit Golden Gate builders and testers
https://bugs.webkit.org/show_bug.cgi?id=324728
rdar://188009726
Reviewed by Jonathan Bedard.
Bring up of post-commit macOS 27 Golden Gate build and test queues.
* Tools/CISupport/build-webkit-org/config.json:
* Tools/CISupport/build-webkit-org/factories_unittest.py:
(TestExpectedBuildSteps):
* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Dashboard.js:
* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot):
* Tools/CISupport/build-webkit-org/public_html/dashboard/Styles/Main.css:
(table.queue-grid tr.platform.macos-golden-gate img.logo):
* Tools/CISupport/build-webkit-org/wkbuild.py:
(_should_file_trigger_build):
Canonical link: https://commits.webkit.org/321534@main
* [JSC] Avoid calling hasNonArgEffects when unnecessary
https://bugs.webkit.org/show_bug.cgi?id=324716
rdar://188002873
Reviewed by Dan Hecht.
hasNonArgEffects is costly operation. So calling it only when necessary.
* Source/JavaScriptCore/b3/air/AirAllocateStackByGraphColoring.cpp:
Canonical link: https://commits.webkit.org/321535@main
* Avoid allocation in StringImpl::simplifyWhiteSpace() when the string is already simplified
https://bugs.webkit.org/show_bug.cgi?id=324694
rdar://187966162
Reviewed by Yusuke Suzuki.
simplifyMatchedCharactersToSpace() unconditionally allocated a
StringBuffer of the full length and copied every character, only to
return *this and discard the buffer when the string turned out to need
no simplification -- the common case for prose and attribute values.
Add a cheap pre-scan that returns *this without allocating unless the
string actually needs work: a leading or trailing matched character, a
run of two or more matched characters, or a matched character that is
not already a space. The scan uses the same runtime predicate, so every
caller benefits regardless of which whitespace definition it passes.
Measured ~2x on already-simplified strings and neutral on strings that
do need collapsing. The pre-scan verdict was verified against the
rewrite exhaustively for all strings of length <= 7 over {a, b, space,
newline, tab} and 500000 random strings, with no divergence.
Test: Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp
* Source/WTF/wtf/text/StringImpl.cpp:
(WTF::StringImpl::simplifyMatchedCharactersToSpace):
* Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp:
(TestWebKitAPI::TEST(WTF, StringSimplifyWhiteSpace)):
Canonical link: https://commits.webkit.org/321536@main
* [ews-build.webkit.org] Allow ops folks to manually validate (Follow-up)
https://bugs.webkit.org/show_bug.cgi?id=324587
rdar://187822390
Unreviewed follow-up.
* Tools/CISupport/ews-build/steps_unittest.py:
Canonical link: https://commits.webkit.org/321537@main
* REGRESSION(321370@main) [GLIB] Rebaseline imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml.html port-specific files
https://bugs.webkit.org/show_bug.cgi?id=324739
Unreviewed test gardening.
Add missing new message to glib baseline.
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
Canonical link: https://commits.webkit.org/321538@main
* [JSC] Check for interference when moving CAS to Branch in Air
https://bugs.webkit.org/show_bug.cgi?id=319842
rdar://182130524
Reviewed by Marcus Plutowski.
When lowering B3 to Air, CAS operations with a single Branch consumer can be
fused into the Branch or be moved to the Branch site. This motion needs to
check for interference. Consider the following wasm snippet:
L1: i32.atomic.rmw.cmpxchg
L2: memory.grow
<some stuff>
L3: if
The cmpxchg in L1 can be moved past the memory.grow in L2 into L3, which is
incorrect as the Air CAS opcode for L1 may have a stale memory input that
interferes with the grow in L2.
This PR adds interference checks for all CAS motions in B3 to Air lowering.
Test: JSTests/wasm/stress/atomic-cmpxchg-motion-interference.js
Originally-landed-as: 316606.100@safari-7625-branch (1217ca887d85). rdar://187506940
Canonical link: https://commits.webkit.org/321539@main
* [JSC] Fix cross-realm DFG Set spread optimization
https://bugs.webkit.org/show_bug.cgi?id=321705
rdar://184821678
Reviewed by Keith Miller and Mark Lam.
The DFG optimization for spreading a Set depends on the Set iterator protocol
being intact. This is guarded by a watchpoint. This watchpoint is armed on the
global of the set itself, which is node->child1(). Subsequent optimization
passes incorrectly depends on the Set structure of node, which corresponds to
the spread operation itself and may be in a different realm than the set.
This PR fixes this by using child1() everywhere to determine the global.
Test: JSTests/stress/spread-set-cross-realm-symbol-iterator-side-effects.js
* JSTests/stress/spread-set-cross-realm-symbol-iterator-side-effects.js: Added.
(shouldBe):
* Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:
* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileSpread):
Originally-landed-as: 316606.361@safari-7625-branch (62860f03b72a). rdar://187507225
Canonical link: https://commits.webkit.org/321540@main
* [JSC] Do not track lines and columns while parsing
https://bugs.webkit.org/show_bug.cgi?id=324564
rdar://187793434
Reviewed by Yusuke Suzuki.
Currently JS parser tracks three pieces of information for each source location (such as the
start or the end of a token): source offset, line number, and column number. This is redundant,
as a source offset alone uniquely identifies a location. Lines and columns are only needed for
human-readable messages. It makes sense to stop tracking and storing them, and reconstruct them
lazily from the offset if and when they are needed. This avoids the tracking cost on the fast
path and eliminates the complexity of converting lines and columns between multiple frames of
reference (html document, script element, function being reparsed).
This patch implements that change. It is stage 1 of the entire work, focused on functional
changes. After landing, it will be followed by stage 2 with additional refactorings. The work
is split this way to make each patch more focused and easier to review, because both patches
have a small set of core changes that trigger many cascading changes at dependent use sites.
Stage 1 captures all performance gains.
Key changes in this patch:
1. Many data structures lose fields for line and column tracking, associated constructor
parameters, getters, setters, and computation logic.
2. SourceProvider carries a lazily-built LineStartTable. The table is built the first time
a line or column number is required for the provider's source. APIs that used to return
stored lines and columns now route to the SourceProvider.
3. Because LineStartTable is now responsible for scanning the source to identify line breaks,
most of the related logic is moved from Lexer.h/.cpp to SourceProvider.h/.cpp. Some
utility functions and predicates are moved to the new files SourceCharacters.h/.cpp.
4. Line break scanning in LineStartTable includes a fix for a minor latent bug in JSC line
tracking: an unquoted Unicode line separator (LS) character inside a string literal is legal
and is a LineTerminator (starts a new line, ECMA-262 #11.3). The existing JSC lexer code
allows it, but doesn't count it as a start of a new line.
The bulk of the patch are mechanical changes cascading from the above.
Testing:
- Existing tests verify no observable behavior differences.
- A new test to verify the line start table is not prematurely built by accident:
JSTests/stress/line-start-table-not-built-by-ordinary-parse.js
Canonical link: https://commits.webkit.org/321541@main
* GraphicsContext::drawVideoFrame() should take ImagePaintingOptions
https://bugs.webkit.org/show_bug.cgi?id=324617
rdar://187851417
Reviewed by Mike Wyrzykowski.
drawVideoFrame() took a bare ImageOrientation, so a video frame could not carry
the HDR, headroom or dynamic-range-limit options that the drawNativeImage() call
it ends in already understands. Replace it with a trailing ImagePaintingOptions,
which holds orientation itself, and make shouldDiscardAlpha a ShouldDiscardAlpha
enum so the call sites read as something other than a bare true or false.
No behavior change. The composite operator is still derived from
shouldDiscardAlpha and still overrides the caller's; Added FIXME:
drawing a video frame into a canvas ignores its globalCompositeOperation.
* Source/WebCore/Modules/mediastream/ImageCapture.cpp:
(WebCore::createImageBitmapViaDrawing):
* Source/WebCore/html/ImageBitmap.cpp:
(WebCore::ImageBitmap::createCompletionHandler):
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::drawImage):
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp:
(WebCore::BifurcatedGraphicsContext::drawVideoFrame):
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h:
* Source/WebCore/platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawVideoFrame):
* Source/WebCore/platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::drawVideoFrame):
* Source/WebCore/platform/graphics/GraphicsContextGL.cpp:
(WebCore::GraphicsContextGL::videoFrameToNativeImage):
* Source/WebCore/platform/graphics/NullGraphicsContext.h:
* Source/WebCore/platform/graphics/cairo/CairoOperationRecorder.cpp:
(WebCore::Cairo::OperationRecorder::drawVideoFrame):
* Source/WebCore/platform/graphics/cairo/CairoOperationRecorder.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
(WebCore::DisplayList::RecorderImpl::drawVideoFrame):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h:
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::paint):
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContext.cpp:
(WebKit::RemoteGraphicsContext::drawVideoFrame):
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContext.h:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContext.messages.in:
* Source/WebKit/Scripts/webkit/messages.py:
(headers_for_type):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextProxy.cpp:
(WebKit::RemoteGraphicsContextProxy::drawVideoFrame):
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextProxy.h:
* Source/WebKit/WebProcess/GPU/media/AudioVideoRendererRemote.cpp:
(WebKit::AudioVideoRendererRemote::paintCurrentVideoFrameInContext):
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::paintCurrentFrameInContext):
Canonical link: https://commits.webkit.org/321542@main
* block-spammers sometimes gets blocked by edge firewall
https://bugs.webkit.org/show_bug.cgi?id=324734
rdar://188014640
Reviewed by Jonathan Bedard.
Because user id was sent as part of the URL, edge firewall could see blocked patterns,
and reject such requests before they could reach Bugzilla.
Work around this by sending data in body. Refactored the code to have a helper that
fetches and decodes JSON for consistent error handling.
Additionally, drive-by fix for invalidate_bugzilla_token(), which sent rest/logout?<token>
instead of rest/logout?token=<token>, so the session token was never actually invalidated
at exit.
* Tools/Scripts/block-spammers:
(get_json):
(get_bugzilla_token):
(invalidate_bugzilla_token):
(get_user_info):
(get_bugs_created_by_user):
(get_bugs_commented_on_by_user):
(get_comments):
(get_bugs_with_attachments_created_by_user):
(get_attachments):
Canonical link: https://commits.webkit.org/321543@main
* Use requesting origin instead of active origin for Geolocation permission prompt
<rdar://problem/183281228>
https://bugs.webkit.org/show_bug.cgi?id=306286
Reviewed by Chris Dumez.
The Geolocation permission prompt derived the origin it displays from the page's active
(provisional) navigation URL rather than from the request's origin, so a page could start a
navigation to another origin and have the prompt attribute the request to that origin while
the requesting document kept running. Use the request's top-level origin (frameInfo.topOrigin)
for both the WKUIDelegate prompt and the built-in iOS provider prompt, matching the
DeviceOrientation permission prompt.
Originally-landed-as: 316606.259@safari-7625-branch (8f8dbbfd88ca). rdar://187506915
Canonical link: https://commits.webkit.org/321544@main
* [Flex Wrap Balance] Implement flex-line-count
https://bugs.webkit.org/show_bug.cgi?id=323240
rdar://186491976
Reviewed by Alan Baradlay.
flex-line-count puts a floor under the number of lines a balanced container
produces. The line breaker already solves balancing with a dynamic program over
suffixes, so the constraint goes in as a second dimension rather than as a
bisection over line-break sizes: minScores[start][remaining] is the least total
squared free space covering items [start, itemCount) in at least remaining
further lines.
Scores accumulate in a WTF::UInt128. A column flow with an auto height has a
capacity of LayoutUnit::max(), so one line's squared free space reaches
(2^31 - 1)^2, and five such lines overflow 64 bits. Saturating there would make
every candidate compare equal to the sentinel and collapse the argmin to a
single line, so the old accumulator answered one line for a container that
asked for five. 128 bits cannot overflow here: it would take more than 7e19
lines, and SIZE_MAX bounds the item count at 1.8e19.
The candidate scan keeps its <= comparison deliberately. With end ascending,
the last end reaching the minimum wins, which puts as many items as possible on
the earliest line which is the tie-break the spec specifies.
Eight reftests in css-flexbox/balance come off the failing list. Nine remain,
for the intrinsic sizing that is not implemented yet, i.e. the case when we
have flex-line-count but no specified width.
Test: Tools/TestWebKitAPI/Tests/WebCore/FlexLineBreakerTests.cpp
* LayoutTests/TestExpectations:
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp:
(WebCore::FlexFormattingContext::computeFlexLines):
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.h:
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingUtils.cpp:
(WebCore::FlexFormattingUtils::minimumLineCount):
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingUtils.h:
* Source/WebCore/layout/formattingContexts/flex/FlexLineBreaker.cpp:
(WebCore::balancedLineBreaks):
* Source/WebCore/layout/formattingContexts/flex/FlexLineBreaker.h:
* Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp:
(WebCore::LayoutIntegration::FlexLayout::flexLayoutConstraints const):
* Tools/TestWebKitAPI/CMakeLists.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebCore/FlexLineBreakerTests.cpp: Added.
(TestWebKitAPI::itemSizes):
(TestWebKitAPI::expectLineBreaks):
(TestWebKitAPI::TEST(WebCoreFlexLineBreaker, GreedyFillsEachLineBeforeMovingOn)):
(TestWebKitAPI::TEST(WebCoreFlexLineBreaker, NoItemsProducesNoLines)):
(TestWebKitAPI::TEST(WebCoreFlexLineBreaker, EverythingOnOneLineWhenNoMinimumApplies)):
(TestWebKitAPI::TEST(WebCoreFlexLineBreaker, BalancingBeatsGreedyFilling)):
(TestWebKitAPI::TEST(WebCoreFlexLineBreaker, MinimumLineCountSplitsALineThatWouldOtherwiseFit)):
(TestWebKitAPI::TEST(WebCoreFlexLineBreaker, MinimumLineCountClampsToTheItemCount)):
(TestWebKitAPI::TEST(WebCoreFlexLineBreaker, AnItemWiderThanTheLineGetsALineToItself)):
(TestWebKitAPI::TEST(WebCoreFlexLineBreaker, IndefiniteAvailableSpaceStillHonorsTheMinimumLineCount)):
Canonical link: https://commits.webkit.org/321545@main
* [GLIB] http/tests/workers/service/indexeddb-file-broadcast-after-release.html is flaky timing out since added
https://bugs.webkit.org/show_bug.cgi?id=324746
Unreviewed test gardening.
Marking this test as flaky timeout, as it has been for GTK and WPE since
it was added in 321170@main.
* LayoutTests/platform/glib/TestExpectations:
Canonical link: https://commits.webkit.org/321546@main
* [GTK][WPE] http/tests/xmlhttprequest/logout.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=306455
Unreviewed test gardening.
Test is also failing on GTK
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/wpe/TestExpectations:
Canonical link: https://commits.webkit.org/321547@main
* Adopt WebCodecs init.transfer
https://bugs.webkit.org/show_bug.cgi?id=324603
rdar://187834056
Reviewed by Youenn Fablet.
EncodedAudioChunkInit, EncodedVideoChunkInit, AudioDataInit, VideoFrameBufferInit
and ImageDecoderInit did not have the transfer member, so a page could not hand
ownership of its ArrayBuffers to these objects: the constructors always copied
init.data, and the page's buffers stayed alive afterwards holding it a second
time.
Data in WebCodecsEncodedAudioChunk and WebCodecsEncodedVideoChunk was stored in
a Vector<uint8_t> which didn't allow for JS data to be moved into.
So data was copied from JSC::SharedBuffer into WebCodecsEncoded{Audio,Video}Chunk
and again into the encoder or decoder own's buffers.
We amend the related idl files to have the spec mandated sequence<ArrayBuffer> transfer.
The ArrayBuffer's data is then moved into a SharedBuffer instead of being copied
into a Vector and passed around without a need to copy.
We amend DataSegment variant to accept an ArrayBufferContents to ease
wrapping the content into a SharedBuffer. We specifically don't use DataSegment::Provider
so that in a follow-up change we can detect what content type the SharedBuffer
is using.
We have the SharedBuffer store an ArrayBufferContent instead of the JSC::ArrayBuffer
due to ArrayBuffer lack of thread-safe refcounting and we don't want to
modify JSC for this.
While ArrayBufferContent is a using a gigacage allocated buffer, its usage
for our purpose is safe as it's both immutable and gigacage allocation/free
is thread-safe.
Following this change, the ArrayBuffer copy is removed when creating
the WebCodecsEncodedChunk.
However, AudioData and VideoFrame while they are validated like the spec
required and detached, we still perform a copy due to how the PlatformRawAudioData
and VideoFrame works.
They currently take a span that forces a copy.
We will amend those classes to take a Ref<SharedBuffer> in a followup
change.
Test expectations are amended for tests that are now passing, adding API
tests to actually check the data is moved rather than copied.
Added tests to check that non detachable arrays will cause the code to throw as required.
* LayoutTests/http/wpt/webcodecs/transfer-non-detachable-buffer.any-expected.txt: Added.
* LayoutTests/http/wpt/webcodecs/transfer-non-detachable-buffer.any.html: Added.
* LayoutTests/http/wpt/webcodecs/transfer-non-detachable-buffer.any.js: Added.
(nonDetachableBuffer):
(test):
* LayoutTests/http/wpt/webcodecs/transfer-non-detachable-buffer.any.worker-expected.txt: Added.
* LayoutTests/http/wpt/webcodecs/transfer-non-detachable-buffer.any.worker.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/transfering.https.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/transfering.https.any.worker-expected.txt:
* Source/WebCore/Headers.cmake:
* Source/WebCore/Modules/webcodecs/WebCodecsAudioData.cpp:
(WebCore::WebCodecsAudioData::create): Validates the transfer list, then detaches
it once the platform object exists. Also drops a pointless move of
init.data.span(), since PlatformRawAudioData::create() takes a plain span.
* Source/WebCore/Modules/webcodecs/WebCodecsAudioData.h:
* Source/WebCore/Modules/webcodecs/WebCodecsAudioData.idl:
* Source/WebCore/Modules/webcodecs/WebCodecsAudioEncoder.cpp:
(WebCore::WebCodecsAudioEncoder::configure): Moves the encoded data into the
chunk instead of copying it through a JSC::ArrayBuffer.
* Source/WebCore/Modules/webcodecs/WebCodecsBufferTransfer.cpp: Added.
(WebCore::adoptArrayBufferContents): Wraps detached contents in a SharedBuffer.
(WebCore::WebCodecsTransferList::validate):
(WebCore::WebCodecsTransferList::detachAll const):
(WebCore::WebCodecsTransferList::takeData const):
* Source/WebCore/Modules/webcodecs/WebCodecsBufferTransfer.h: Added.
(WebCore::WebCodecsTransferList::WebCodecsTransferList):
(WebCore::WebCodecsTransferList::isEmpty const):
(WebCore::WebCodecsTransferList::contains const):
* Source/WebCore/Modules/webcodecs/WebCodecsEncodedAudioChunk.cpp:
(WebCore::WebCodecsEncodedAudioChunk::create): Validates and consumes the
transfer list; replaces the Init constructor, which could not report an
exception.
(WebCore::WebCodecsEncodedAudioChunk::WebCodecsEncodedAudioChunk): Deleted.
* Source/WebCore/Modules/webcodecs/WebCodecsEncodedAudioChunk.h:
(WebCore::WebCodecsEncodedAudioChunkStorage::create):
(WebCore::WebCodecsEncodedAudioChunkStorage::memoryCost const):
(WebCore::WebCodecsEncodedAudioChunk::create):
(WebCore::WebCodecsEncodedAudioChunk::byteLength const):
* Source/WebCore/Modules/webcodecs/WebCodecsEncodedAudioChunk.idl:
* Source/WebCore/Modules/webcodecs/WebCodecsEncodedAudioChunkData.h:
* Source/WebCore/Modules/webcodecs/WebCodecsEncodedVideoChunk.cpp:
(WebCore::WebCodecsEncodedVideoChunk::create): Ditto.
(WebCore::WebCodecsEncodedVideoChunk::WebCodecsEncodedVideoChunk): Deleted.
* Source/WebCore/Modules/webcodecs/WebCodecsEncodedVideoChunk.h:
(WebCore::WebCodecsEncodedVideoChunkStorage::create):
(WebCore::WebCodecsEncodedVideoChunkStorage::memoryCost const):
(WebCore::WebCodecsEncodedVideoChunk::create):
(WebCore::WebCodecsEncodedVideoChunk::byteLength const):
* Source/WebCore/Modules/webcodecs/WebCodecsEncodedVideoChunk.idl:
* Source/WebCore/Modules/webcodecs/WebCodecsEncodedVideoChunkData.h:
* Source/WebCore/Modules/webcodecs/WebCodecsImageDecoder.cpp:
(WebCore::WebCodecsImageDecoder::create): Validates the transfer list.
(WebCore::WebCodecsImageDecoder::WebCodecsImageDecoder): Adopts the transferred
contents rather than copying them. Removes a dead local that each lambda
shadowed, and two null checks on a SharedBuffer::create() returning Ref.
* Source/WebCore/Modules/webcodecs/WebCodecsImageDecoder.h:
* Source/WebCore/Modules/webcodecs/WebCodecsImageDecoder.idl:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.cpp:
(WebCore::WebCodecsVideoEncoder::configure): Ditto.
* Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.cpp:
(WebCore::WebCodecsVideoFrame::create): Validates the transfer list up front and
detaches it after the frame is created.
* Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.h:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.idl:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/SharedBuffer.cpp:
(WebCore::DataSegment::DataSegment): Moved out of line.
(WebCore::DataSegment::create): Added an overload taking ArrayBufferContents.
* Source/WebCore/platform/SharedBuffer.h: Reshuffling of inline DataSegment constructor had to happen
in order to avoid pulling JSC headers in SharedBuffer.h. We moved them to SharedBuffer.cpp near where they are actually called.
(WebCore::DataSegment::DataSegment): Deleted.
* Source/WebKit/Scripts/webkit/opaque_ipc_types.tracking.in: Moved the two chunk
payload records to a Ref<WebCore::SharedBuffer> group, matching their new type.
* Source/WebKit/Shared/WebCoreArgumentCodersMedia.serialization.in:
* Tools/TestWebKitAPI/CMakeLists.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebCore/WebCodecsBufferTransfer.cpp: Added.
(TestWebKitAPI::TEST(WebCodecsBufferTransfer, AdoptedContentsAreNotCopied)):
(TestWebKitAPI::TEST(WebCodecsBufferTransfer, AdoptedContentsOutliveTheirArrayBuffer)):
(TestWebKitAPI::TEST(WebCodecsBufferTransfer, AdoptedContentsCanBeReleasedOffTheMainThread)):
(TestWebKitAPI::TEST(WebCodecsBufferTransfer, TransferredArrayBufferIsAdoptedWithoutCopying)):
Canonical link: https://commits.webkit.org/321548@main
* REGRESSION(321347@main) [webkitpy] FileNotFoundError on Linux when invoking xcrun
https://bugs.webkit.org/show_bug.cgi?id=324736
Reviewed by Nikolas Zimmermann.
Passing check=False to subprocess.run avoids CalledProcessError but does
not prevent it from throwing other exceptions like OSError and its subclasses
FileNotFoundError, PermissionError.
* Tools/Scripts/webkitpy/llvm_profile_utils.py:
(locate_binary_xcrun):
Canonical link: https://commits.webkit.org/321549@main
* [results.webkit.org] Only list recent branches
https://bugs.webkit.org/show_bug.cgi?id=324293
rdar://187523382
Reviewed by Aakash Jain.
To prevent branch-bloat in the UI, only surface recent branches when querying for all branches.
* Tools/Scripts/libraries/resultsdbpy/resultsdbpy/controller/commit_controller_unittest.py:
(CommitControllerTest.test_branches):
* Tools/Scripts/libraries/resultsdbpy/resultsdbpy/model/commit_context.py:
(CommitContext.RecentBranches): Added.
(CommitContext.__init__): Initialize RecentBranches table.
(CommitContext.branches): Only report recent branches when listing all branches.
(CommitContext.register_commit): Report to RecentBranches table with a TTL.
* Tools/Scripts/libraries/resultsdbpy/resultsdbpy/model/commit_context_unittest.py:
(CommitContextTest.init_database):
(CommitContextTest.test_branches):
(CommitContextTest):
(CommitContextTest.test_stale_branches): Added.
Canonical link: https://commits.webkit.org/321550@main
* [JSC] Extract specialize-select from B3::ReduceStrength
https://bugs.webkit.org/show_bug.cgi?id=324673
rdar://187939367
Reviewed by Dan Hecht.
This is one of series of patches in B3 changes. specialize-select
operation in B3::ReduceStrength is very weird: this is not a value local
operation and inserting new basic blocks. This breaks PureCSE results
(so it is removing matching values), adjusting various conditions
(m_root, etc.). This operation is not a natural fit in
B3::ReduceStrength.
This patch extracts this from B3::ReduceStrength. We define it in a
separate phase as B3SpecializeSelect. This significantly simplifies
B3::ReduceStrength, and allowing us to do further massive change in this
phase.
This conversion happens 1613 times in JetStream3, and this phase covers
1581 cases (all of conversions in ReduceStrength Initial phase, and only
missing cases happening in Final phase). And this is performance-neutral
or slightly better due to removing second iteration of ReduceStrength
(when specialize-select happens, we ran the iteration twice, costly much
more for compile time rather than the gain). So, while this is not
strictly covering all cases we had, in terms of compile time v.s.
throughput tradeoff, this is the better design.
Test: Source/JavaScriptCore/b3/testb3_6.cpp
* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/Sources.txt:
* Source/JavaScriptCore/b3/B3Generate.cpp:
(JSC::B3::generateToAir):
* Source/JavaScriptCore/b3/B3PureCSE.cpp:
(JSC::B3::PureCSE::remove): Deleted.
* Source/JavaScriptCore/b3/B3PureCSE.h:
* Source/JavaScriptCore/b3/B3ReduceDoubleToFloat.cpp:
* Source/JavaScriptCore/b3/B3ReduceStrength.cpp:
* Source/JavaScriptCore/b3/B3SpecializeSelect.cpp: Added.
(JSC::B3::specializeSelect):
* Source/JavaScriptCore/b3/B3SpecializeSelect.h: Copied from Source/JavaScriptCore/b3/B3PureCSE.h.
* Source/JavaScriptCore/b3/testb3_6.cpp:
(testCheckSelectAndDeadCheckCSE):
* Source/JavaScriptCore/runtime/OptionsList.h:
Canonical link: https://commits.webkit.org/321551@main
* REGRESSION (321551@main) Linker failure when building with cmake
https://bugs.webkit.org/show_bug.cgi?id=324757
rdar://188031494
Unreviewed build fix.
* Source/JavaScriptCore/parser/LexerUnicodeProperties.h:
Canonical link: https://commits.webkit.org/321552@main
* [Site Isolation] matchIndex should track position across remote frames, not just per-frame.
https://bugs.webkit.org/show_bug.cgi?id=324599
rdar://187833234
Reviewed by Brady Eidson.
Currently, WebKit only aggregates matchCount across processes but does not track the matchCount per frame.
This causes FindStringCallbackAggregator to report the matchIndex relative to the frame and not globally.
The fix is to track the match count per frame. We offset the current frame's index by the sum of the previous
frames' match counts.
Separately, in FindController.cpp, we also include a fix so that the matchIndex for the selected frame is not
double-counted. FindStringCallbackAggregator's destructor sends SelectLastFoundRange to the target frame so it
can apply its match as a visible selection and report back its rects and index. This invokes an additional
FindController::findString call on that same frame, which re-counts a matchIndex that was already computed by
that frame's initial findString call.
Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm
* Source/WebKit/UIProcess/FindStringCallbackAggregator.cpp:
(WebKit::FindStringCallbackAggregator::foundString):
(WebKit::FindStringCallbackAggregator::globalIndexOffsetForFrame):
(WebKit::FindStringCallbackAggregator::~FindStringCallbackAggregator):
* Source/WebKit/UIProcess/FindStringCallbackAggregator.h:
* Source/WebKit/WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::findString):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm:
(TestWebKitAPI::TEST(SiteIsolation, FindStringMatchIndexAcrossFrames)):
Canonical link: https://commits.webkit.org/321553@main
* [WPE] document.cookie can return stale values after the web process cookie cache is cleared
https://bugs.webkit.org/show_bug.cgi?id=324464
Reviewed by Devin Rousso.
Invalidate the Document cookie caches in WebCookieJar::clearCache(), which runs when the web
process is told that cookies changed (WebProcess::DeleteAllCookies, cookie accept policy
changes). Until now it only dropped WebCookieCache, and on WPE a task triggered by an IPC
message could still read a Document's cached document.cookie before its zero-delay expiry
timer had fired, because that timer has a lower GLib priority than IPC dispatch.
This fixes the flakiness of imported/w3c/web-platform-tests/cookies/path/default.html on WPE
(bug 307989): on a WPE release build it failed 17 of 100 separate run-webkit-tests invocations
without this change and none of 100 with it.
* LayoutTests/platform/wpe/TestExpectations:
* Source/WebCore/dom/Document.h:
* Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp:
(WebKit::WebCookieJar::clearCache):
Canonical link: https://commits.webkit.org/321554@main
* Allow WebKitAdditions to extend SettingsBase
https://bugs.webkit.org/show_bug.cgi?id=324718
rdar://188005084
Reviewed by Lily Spiniolas and Tim Nguyen.
Some settings added via WebPreferencesAdditions.yaml need custom hooks in
SettingsBase, so add an WKA extension point there.
* Source/WebCore/page/SettingsBase.cpp:
(WebCore::SettingsBase::axCustomColorModeStateChanged): Deleted.
(WebCore::SettingsBase::axCustomColorModeAppearanceDetectionChanged): Deleted.
* Source/WebCore/page/SettingsBase.h:
Canonical link: https://commits.webkit.org/321555@main
* Don't consider a Web Extension service worker as fully loaded until registration has been completed
https://bugs.webkit.org/show_bug.cgi?id=324743
rdar://186304610
Reviewed by Timothy Hatcher.
When determining if a Web Extension service worker has finished loading and is ready to receive messages,
make sure that the service worker registration has finished. Without this, it's possible for the service
worker to not think it has any clients, breaking extension compatibility with the offscreen API.
I'm not sure if polling is the best way to handle this, but this was successful in my testing.
Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionAPIOffscreen.mm
* Source/WebCore/page/Page.cpp:
(WebCore::Page::serviceWorkerThread const): Expose the service worker thread.
* Source/WebCore/page/Page.h:
* Source/WebCore/workers/service/context/ServiceWorkerThread.cpp:
(WebCore::ServiceWorkerThread::finishedFiringActivateEvent): Expose whether or not the thread has
finished activating.
* Source/WebCore/workers/service/context/ServiceWorkerThread.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebExtensionContext.mm:
(-[WKWebExtensionContext _unloadBackgroundContentForTesting]): Call into WebExtensionContextCocoa.
* Source/WebKit/UIProcess/API/Cocoa/WKWebExtensionContextPrivate.h:
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm:
(WebKit::WebExtensionContext::unloadBackgroundContentForTesting): Unload the background content.
* Source/WebKit/UIProcess/Extensions/WebExtensionContext.h:
* Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIRuntimeCocoa.mm:
(WebKit::WebExtensionContextProxy::backgroundServiceWorkerIsStillActivating): Determines if there is a service worker still activating.
(WebKit::WebExtensionContextProxy::internalDispatchRuntimeMessageEvent): Don't dispatch the message until the background service worker is
active.
(WebKit::WebExtensionContextProxy::dispatchRuntimeMessageEventOnceBackgroundServiceWorkerIsActive): Poll for the service worker
(WebKit::WebExtensionContextProxy::isBackgroundServiceWorkerStillActivating):
waiting to finish activation.
* Source/WebKit/WebProcess/Extensions/WebExtensionContextProxy.h:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionAPIOffscreen.mm:
(TestWebKitAPI::TEST_F(WKWebExtensionAPIOffscreen, OffscreenDocumentImmediatelyVisibleToClientsMatchAllWhenWokenByTabMessage)): Make sure
that the service worker has the offscreen page as a client when it has been spun up from receiving a message.
Canonical link: https://commits.webkit.org/321556@main
* [corner-shape] clip-path with a <geometry-box> ignores corner-shape
https://bugs.webkit.org/show_bug.cgi?id=324646
Reviewed by Simon Fraser.
computeClipPath() built the <geometry-box> clip from computeRoundedRectForBoxShape(),
which returns a LayoutRoundedRect and therefore cannot represent scoop, bevel, notch
or superellipse corners. Use computeGeometryForBoxShape() and clip to
BorderShape::pathForOuterShape() or pathForInnerShape(), chosen by the geometry's
edge, when the border has a non-round corner shape.
Test: imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-clip-path-border-box.html
* LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-clip-path-border-box-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-clip-path-border-box-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-clip-path-border-box.html: Added.
* Source/WebCore/rendering/ClipPathPaintScope.cpp:
(WebCore::ClipPathPaintScope::computeClipPath):
* Source/WebCore/rendering/shapes/BoxLayoutShape.cpp:
(WebCore::computeRoundedRectForBoxShape): Deleted.
* Source/WebCore/rendering/shapes/BoxLayoutShape.h:
Canonical link: https://commits.webkit.org/321557@main
* [GTK] skip non-composited frames without damage
https://bugs.webkit.org/show_bug.cgi?id=323978
Reviewed by Carlos Alberto Lopez Perez.
GTK can still (re)present frames even after `requestAnimationFrame` callbacks with no rendering changes.
Removing that waste also exposes cases where GTK loses its displayed image without any WebCore damage.
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/NonCompositedFrameRenderer.cpp:
(WebKit::NonCompositedFrameRenderer::updateRendering):
Skipping unnecessary frames must not stop animation callbacks or strand callers waiting for an explicit repaint.
* Source/WebKit/UIProcess/gtk/AcceleratedBackingStore.h:
* Source/WebKit/UIProcess/gtk/AcceleratedBackingStore.cpp:
(WebKit::AcceleratedBackingStore::realize):
(WebKit::AcceleratedBackingStore::unrealize):
Removing and reinserting a view in one callback can coalesce visibility changes (i.e. `resume` may never run).
Recovery must follow actual buffer loss without requesting another frame when one is already pending.
* Source/WebKit/WebProcess/WebPage/DrawingArea.messages.in:
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphicsGLib.h:
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphicsGLib.cpp:
(WebKit::DrawingAreaCoordinatedGraphics::didDiscardBackingStore): Added.
The UIProcess knows when GTK lost the image even though the WebProcess owns damage and rendering.
The missing picture requires full recovery, including when painting was suspended.
* Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseSnapshotFromWidget):
GTK events can invalidate the allocation during reparenting and attempting to snapshot that state can cause a null PNG data dereference.
* LayoutTests/platform/gtk/non-compositing/reparent-view-without-damage.html: Added.
* LayoutTests/platform/gtk/non-compositing/reparent-view-without-damage-expected.txt: Added.
* LayoutTests/platform/gtk/reparent-view-without-damage.html: Added.
* LayoutTests/platform/gtk/reparent-view-without-damage-expected.txt: Added.
* LayoutTests/platform/gtk/resources/reparent-view-without-damage.js: Added.
* Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::takeViewPortSnapshot):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestWebKitWebView.cpp:
(PresentationWebViewTest): Added.
(PresentationWebViewTest::PresentationWebViewTest): Added.
(PresentationWebViewTest::~PresentationWebViewTest): Added.
(PresentationWebViewTest::waitForColor): Added.
(PresentationWebViewTest::waitForNextFrame): Added.
(PresentationWebViewTest::waitForAnimationFrames): Added.
(PresentationWebViewTest::assertAnimationFramesWithoutDamage): Added.
(PresentationWebViewTest::loadPageForReparenting): Added.
(AcceleratedPresentationWebViewTest): Added.
(AcceleratedPresentationWebViewTest::AcceleratedPresentationWebViewTest): Added.
(testWebViewPresentationWithoutDamage): Added.
(testWebViewPresentationAfterReparentToNewWindow): Added.
(testWebViewPresentationAfterRapidReparent): Added.
(testWebViewPresentationAfterReparentDuringLoad): Added.
(testWebViewCloseAfterReparent): Added.
(beforeAll):
Canonical link: https://commits.webkit.org/321558@main
* [Quirks] Partition cookies from wellnessliving.com iframes
https://bugs.webkit.org/show_bug.cgi?id=323384
rdar://185639386
Reviewed by Brent Fulgham.
Quirk wellnessliving…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
woo