Repository navigation
Upgrade to upstream WebKit 33ce3bf11a71 - #860
Conversation
…eableBitmapAsync in RenderImage https://bugs.webkit.org/show_bug.cgi?id=327947 Reviewed by Darin Adler. Moves createShareableBitmapAsync to RenderImage/RenderVideo, mirroring createShareableBitmap. With it there, adds temporary caller specific versions of both createShareableBitmap and createShareableBitmapAsync that take just the arguments they need and moves all the callers over to it. Two of the callers, PositionInformation and ImageAnalysis, also have separate uses of Image::size() that get converted to caller specific versions of defaultConcreteObjectSize(). A bit more consolidation is needed before we can fully figure out the scope of API needed on RenderImage / analyze the uses to make sure the choices made are consistent and safe (e.g. do we need to avoid tiny images or huge images in more places?). * Source/WebCore/page/ImageAnalysisQueue.cpp: (WebCore::ImageAnalysisQueue::enqueueIfNeeded): * Source/WebCore/rendering/RenderImage.cpp: * Source/WebCore/rendering/RenderImage.h: * Source/WebCore/rendering/RenderVideo.cpp: * Source/WebCore/rendering/RenderVideo.h: * Source/WebKit/Shared/WebHitTestResultData.cpp: * Source/WebKit/Sources.txt: * Source/WebKit/WebKit.xcodeproj/project.pbxproj: * Source/WebKit/WebProcess/WebCoreSupport/ShareableBitmapUtilities.cpp: Removed. * Source/WebKit/WebProcess/WebCoreSupport/ShareableBitmapUtilities.h: Removed. * Source/WebKit/WebProcess/WebPage/Cocoa/PositionInformationForWebPage.mm: * Source/WebKit/WebProcess/WebPage/WebPage.cpp: * Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm: Canonical link: https://commits.webkit.org/324074@main
…iled message check <https://bugs.webkit.org/show_bug.cgi?id=327955> <rdar://190318800> Reviewed by Zak Ridouh. The crash report of a process killed for a failed IPC message check encodes the `IPC::MessageName` in the termination code, but its value differs between builds, so decoding it requires the WebKit binary of the build that crashed. Append the message name to the termination reason string so the crash report names it directly. Also log the invalid message and the process ID to stderr from `AuxiliaryProcessProxy::logInvalidMessage()` in ASan builds, so run-webkit-tests records them in the test's output even when no crash log is found. Every process proxy calls it before killing its process, so WebContent, GPU, Networking, and Model process kills are all logged. Name the actual process type in its existing fault log as well, which was previously hard-coded to WebContent. No new tests since this change is not directly testable. * Source/WebKit/Platform/cocoa/XPCUtilities.mm: (WebKit::terminateWithReason): * Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp: (WebKit::AuxiliaryProcessProxy::logInvalidMessage): Canonical link: https://commits.webkit.org/324075@main
https://bugs.webkit.org/show_bug.cgi?id=327954 Reviewed by Wenson Hsieh. Added LEGACY_NODELETE annotation to various functions in Source/WebCore/platform. No new tests since there should be no behavioral changes. * Source/WebCore/platform/Cookie.h: * Source/WebCore/platform/Cursor.h: * Source/WebCore/platform/DateComponents.h: * Source/WebCore/platform/Decimal.cpp: * Source/WebCore/platform/Decimal.h: * Source/WebCore/platform/DictationCaretAnimator.h: * Source/WebCore/platform/DragData.h: * Source/WebCore/platform/MIMETypeRegistry.h: * Source/WebCore/platform/MainThreadSharedTimer.h: * Source/WebCore/platform/MediaSamplesDecoder.h: * Source/WebCore/platform/PlatformScreen.cpp: (WebCore::platformScreenLock): * Source/WebCore/platform/PlatformScreen.h: * Source/WebCore/platform/PlatformSpeechSynthesisUtterance.h: * Source/WebCore/platform/PlatformSpeechSynthesisVoice.h: * Source/WebCore/platform/PlatformSpeechSynthesizer.h: * Source/WebCore/platform/ProcessIdentity.h: * Source/WebCore/platform/RemoteCommandListener.cpp: (WebCore::remoteCommandListenerCreationFunction): * Source/WebCore/platform/ScrollAnimationKeyboard.cpp: (WebCore::farthestPointInDirection): * Source/WebCore/platform/ScrollAnimationSmooth.h: * Source/WebCore/platform/ScrollSnapAnimatorState.h: * Source/WebCore/platform/ScrollableArea.h: * Source/WebCore/platform/ScrollbarThemeComposite.cpp: (WebCore::usedTotalSize): * Source/WebCore/platform/ScrollingMomentumCalculator.h: * Source/WebCore/platform/SerializedPlatformDataCue.h: * Source/WebCore/platform/ShareableResource.h: * Source/WebCore/platform/SharedBuffer.h: * Source/WebCore/platform/SharedStringHash.h: * Source/WebCore/platform/SharedTimebase.cpp: * Source/WebCore/platform/SharedTimebase.h: * Source/WebCore/platform/SleepDisablerClient.h: * Source/WebCore/platform/SystemSoundManager.h: * Source/WebCore/platform/Timer.cpp: (WebCore::TimerHeapReference::operator Ref<ThreadTimerHeapItem>& LEGACY_NODELETE const): (WebCore::TimerHeapIterator::operator<=> const): (WebCore::TimerHeapLessThanFunction::operator() const): (WebCore::TimerHeapReference::operator Ref<ThreadTimerHeapItem>& const): Deleted. * Source/WebCore/platform/animation/AcceleratedEffect.h: * Source/WebCore/platform/animation/AcceleratedEffectStack.h: * Source/WebCore/platform/animation/AcceleratedTimeline.h: * Source/WebCore/platform/animation/TimingFunction.h: * Source/WebCore/platform/animation/values/paths/AcceleratedEffectBoxPath.h: * Source/WebCore/platform/animation/values/paths/AcceleratedEffectReferencePath.h: * Source/WebCore/platform/animation/values/shapes/AcceleratedEffectCircleFunction.cpp: (WebCore::resolvePosition): * Source/WebCore/platform/animation/values/shapes/AcceleratedEffectEllipseFunction.cpp: (WebCore::resolvePosition): * Source/WebCore/platform/animation/values/shapes/AcceleratedEffectInsetFunction.cpp: (WebCore::blendRectEdges): (WebCore::blendCornerRadii): * Source/WebCore/platform/animation/values/shapes/AcceleratedEffectInsetFunction.h: * Source/WebCore/platform/animation/values/shapes/AcceleratedEffectPathFunction.h: * Source/WebCore/platform/animation/values/shapes/AcceleratedEffectPolygonFunction.cpp: (WebCore::windRule): * Source/WebCore/platform/animation/values/shapes/AcceleratedEffectPolygonFunction.h: * Source/WebCore/platform/animation/values/shapes/AcceleratedEffectRayFunction.h: * Source/WebCore/platform/animation/values/shapes/AcceleratedEffectShapeFunction.cpp: (WebCore::windRule): (WebCore::evaluateControlPointOffset): (WebCore::blendWithPreferredValue): * Source/WebCore/platform/animation/values/shapes/AcceleratedEffectShapeFunction.h: * Source/WebCore/platform/audio/AudioBus.h: * Source/WebCore/platform/audio/AudioHardwareListener.cpp: (WebCore::audioHardwareListenerCreationFunction): * Source/WebCore/platform/audio/AudioResampler.h: * Source/WebCore/platform/audio/AudioResamplerKernel.h: * Source/WebCore/platform/audio/AudioSession.h: * Source/WebCore/platform/audio/Distance.h: * Source/WebCore/platform/audio/HRTFDatabase.h: * Source/WebCore/platform/audio/HRTFPanner.h: * Source/WebCore/platform/audio/IIRFilter.cpp: (WebCore::evaluatePolynomial): * Source/WebCore/platform/audio/IIRFilter.h: * Source/WebCore/platform/audio/PushPullFIFO.h: * Source/WebCore/platform/audio/ReverbInputBuffer.h: * Source/WebCore/platform/audio/SharedAudioDestination.cpp: (WebCore::SharedAudioDestinationAdapter::framesPerBuffer const): * Source/WebCore/platform/audio/SharedAudioDestination.h: * Source/WebCore/platform/audio/SincResampler.h: * Source/WebCore/platform/audio/cocoa/AudioDecoderCocoa.cpp: (WebCore::InternalAudioDecoderCocoa::create): * Source/WebCore/platform/audio/cocoa/AudioEncoderCocoa.cpp: (WebCore::InternalAudioEncoderCocoa::create): * Source/WebCore/platform/audio/cocoa/AudioFileReaderCocoa.mm: (WebCore::readProc): (WebCore::AudioBufferListHolder::operator bool const): (WebCore::AudioBufferListHolder::operator AudioBufferList* LEGACY_NODELETE const): (WebCore::AudioBufferListHolder::operator AudioBufferList* const): Deleted. * Source/WebCore/platform/audio/cocoa/AudioSampleBufferList.h: * Source/WebCore/platform/audio/cocoa/AudioSampleDataSource.h: * Source/WebCore/platform/audio/cocoa/CAAudioStreamDescription.h: * Source/WebCore/platform/audio/cocoa/CARingBuffer.cpp: (WebCore::StoreABL): (WebCore::clamp): * Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.h: * Source/WebCore/platform/audio/mac/AudioSessionMac.h: * Source/WebCore/platform/cocoa/CoreLocationGeolocationProvider.mm: * Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.h: * Source/WebCore/platform/cocoa/ParentalControlsContentFilter.h: * Source/WebCore/platform/cocoa/ParentalControlsURLFilter.h: * Source/WebCore/platform/cocoa/SystemBattery.h: * Source/WebCore/platform/encryptedmedia/CDMProxy.h: * Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm: (WebCore::shouldExcludeGameController): * Source/WebCore/platform/gamepad/cocoa/GameControllerHapticEffect.mm: (WebCore::magnitudeToIntensity): * Source/WebCore/platform/gamepad/cocoa/GameControllerHapticEngines.h: * Source/WebCore/platform/graphics/BezierUtilities.cpp: * Source/WebCore/platform/graphics/BezierUtilities.h: * Source/WebCore/platform/graphics/BitmapImage.h: * Source/WebCore/platform/graphics/BitmapImageSource.h: * Source/WebCore/platform/graphics/ColorUtilities.h: * Source/WebCore/platform/graphics/CornerRadii.h: * Source/WebCore/platform/graphics/CornerShapeUtilities.cpp: (WebCore::offsetExtentAlongAxis): * Source/WebCore/platform/graphics/DisplayRefreshMonitor.h: * Source/WebCore/platform/graphics/DoublePoint.h: * Source/WebCore/platform/graphics/DoubleRect.h: * Source/WebCore/platform/graphics/DoubleSize.h: * Source/WebCore/platform/graphics/FloatLine.h: * Source/WebCore/platform/graphics/FloatPoint.h: * Source/WebCore/platform/graphics/FloatQuad.cpp: (WebCore::sideOf): * Source/WebCore/platform/graphics/FloatQuad.h: * Source/WebCore/platform/graphics/FloatRect.h: * Source/WebCore/platform/graphics/FloatRoundedRect.h: * Source/WebCore/platform/graphics/FloatSize.h: * Source/WebCore/platform/graphics/FontBase.h: * Source/WebCore/platform/graphics/FontCache.cpp: (WebCore::Function<void): * Source/WebCore/platform/graphics/FontCascade.cpp: (WebCore::updateX): (WebCore::findPathIntersections): * Source/WebCore/platform/graphics/FontCascade.h: * Source/WebCore/platform/graphics/FontCascadeDescription.h: * Source/WebCore/platform/graphics/FontCascadeFonts.h: * Source/WebCore/platform/graphics/FontDescription.h: * Source/WebCore/platform/graphics/FontPalette.h: * Source/WebCore/platform/graphics/FontSelectionAlgorithm.h: * Source/WebCore/platform/graphics/FormatConverter.cpp: (WebCore::uint8_t>): * Source/WebCore/platform/graphics/FormatConverter.h: * Source/WebCore/platform/graphics/GeometryUtilities.h: * Source/WebCore/platform/graphics/GlyphPage.h: * Source/WebCore/platform/graphics/Gradient.h: * Source/WebCore/platform/graphics/GraphicsContext.h: * Source/WebCore/platform/graphics/GraphicsContextGL.cpp: (WebCore::clampedSubspan): (WebCore::clampedSkip): (WebCore::clampedMoveCursorWithinSpan): * Source/WebCore/platform/graphics/GraphicsContextGLImageExtractor.cpp: (WebCore::formatUsesAlpha): * Source/WebCore/platform/graphics/GraphicsContextGLImageExtractor.h: * Source/WebCore/platform/graphics/H264Utilities.cpp: (WebCore::maxDpbMbsFromLevelNumber): (WebCore::skipH264HRDParameters): * Source/WebCore/platform/graphics/H264Utilities.h: * Source/WebCore/platform/graphics/HEVCUtilities.cpp: * Source/WebCore/platform/graphics/HEVCUtilities.h: * Source/WebCore/platform/graphics/ImageBuffer.h: * Source/WebCore/platform/graphics/ImageFrame.h: * Source/WebCore/platform/graphics/ImageFrameWorkQueue.h: * Source/WebCore/platform/graphics/IntPoint.h: * Source/WebCore/platform/graphics/IntRect.h: * Source/WebCore/platform/graphics/IntSize.h: * Source/WebCore/platform/graphics/LayoutPoint.h: * Source/WebCore/platform/graphics/LayoutRect.h: * Source/WebCore/platform/graphics/LayoutRoundedRect.h: * Source/WebCore/platform/graphics/LayoutSize.h: * Source/WebCore/platform/graphics/MIMETypeCache.h: * Source/WebCore/platform/graphics/MediaPlayer.cpp: (WebCore::registerRemotePlayerCallback): (WebCore::effectiveSelectedScope): (WebCore::engineScopeMatchesSelection): * Source/WebCore/platform/graphics/MediaPlayer.h: * Source/WebCore/platform/graphics/MediaSourcePrivate.h: * Source/WebCore/platform/graphics/MediaSourceTypeSupportedCache.h: * Source/WebCore/platform/graphics/NativeImage.h: * Source/WebCore/platform/graphics/NativeImageSource.h: * Source/WebCore/platform/graphics/ObjectSizeNegotiation.cpp: (WebCore::ObjectSizeNegotiation::usableNaturalDimensions): (WebCore::ObjectSizeNegotiation::resolveConstraint): (WebCore::ObjectSizeNegotiation::resolveSizingAlgorithm): * Source/WebCore/platform/graphics/ObjectSizeNegotiation.h: * Source/WebCore/platform/graphics/Path.h: * Source/WebCore/platform/graphics/PathSegmentData.h: * Source/WebCore/platform/graphics/PathStream.h: * Source/WebCore/platform/graphics/Pattern.h: * Source/WebCore/platform/graphics/PixelBufferConversion.cpp: * Source/WebCore/platform/graphics/PixelBufferConversion.h: * Source/WebCore/platform/graphics/PlatformDynamicRangeLimit.cpp: (WebCore::interpolateHeadroom): * Source/WebCore/platform/graphics/PlatformDynamicRangeLimit.h: * Source/WebCore/platform/graphics/PlatformTimeRanges.h: * Source/WebCore/platform/graphics/PlatformVideoColorSpace.h: * Source/WebCore/platform/graphics/Region.h: * Source/WebCore/platform/graphics/ShadowBlur.cpp: (WebCore::computeSliceSizesFromRadii): * Source/WebCore/platform/graphics/ShadowBlur.h: * Source/WebCore/platform/graphics/ShareableBitmap.h: * Source/WebCore/platform/graphics/SourceBrush.h: * Source/WebCore/platform/graphics/SourceBufferPrivate.h: * Source/WebCore/platform/graphics/SourceImage.cpp: (WebCore::nativeImageOf): (WebCore::imageBufferOf): * Source/WebCore/platform/graphics/SourceImage.h: * Source/WebCore/platform/graphics/TrackBuffer.h: * Source/WebCore/platform/graphics/TrackPrivateBase.h: * Source/WebCore/platform/graphics/VP9Utilities.cpp: (WebCore::isValidVPLevel): (WebCore::isValidVPColorPrimaries): (WebCore::isValidVPTransferCharacteristics): (WebCore::isValidVPMatrixCoefficients): * Source/WebCore/platform/graphics/WebGPUFramePacer.h: * Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h: * Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h: * Source/WebCore/platform/graphics/avfoundation/AudioVideoRendererAVFObjC.h: * Source/WebCore/platform/graphics/avfoundation/AudioVideoRendererAVFObjC.mm: (setSynchronizerScreenReserved): * Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h: * Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: * Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetCocoa.h: * Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * Source/WebCore/platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h: * Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm: (WebCore::isEqual): * Source/WebCore/platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h: * Source/WebCore/platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm: (WebCore::isValidLayerGeometry): * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (setPlayerScreenReserved): * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h: * Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: (WebCore::resourceLoadTimeout): * Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h: * Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerContentsDelayedReleaser.h: * Source/WebCore/platform/graphics/cg/CGSubimageCacheWithTimer.cpp: (WebCore::WTF_REQUIRES_LOCK): * Source/WebCore/platform/graphics/cg/CGSubimageCacheWithTimer.h: * Source/WebCore/platform/graphics/cg/GradientRendererCG.cpp: (WTF::RetainPtr<CGGradientRef>>::isKeyNull): * Source/WebCore/platform/graphics/cg/IOSurfacePool.h: * Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.cpp: (WebCore::bitmapInfoForPixelFormat): * Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp: * Source/WebCore/platform/graphics/cg/NativeImageCG.cpp: (WebCore::alphaInfoForAlphaLast): (WebCore::alphaInfoForAlphaFirst): * Source/WebCore/platform/graphics/cg/PathCG.h: * Source/WebCore/platform/graphics/cocoa/CMUtilities.mm: (WebCore::pixelFormatTypeForDecodedVideo): * Source/WebCore/platform/graphics/cocoa/FontDatabase.h: * Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm: (WebCore::alphaInfoForSurfaceBufferContents): * Source/WebCore/platform/graphics/cocoa/IOSurface.mm: (WebCore::alphaChannelModeValue): (WebCore::alphaInfoForNativeImage): * Source/WebCore/platform/graphics/cocoa/ISOBMFFPreParser.h: * Source/WebCore/platform/graphics/cocoa/ISOBMFFTrackInfoParser.cpp: (WebCore::readNextChildBox): (WebCore::readFullBoxVersion): (WebCore::readMvhdTimescale): (WebCore::readTkhdTrackID): (WebCore::readElstEntry0EmptyEditDuration): * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h: * Source/WebCore/platform/graphics/cocoa/ShareableCVPixelBuffer.h: * Source/WebCore/platform/graphics/cocoa/ShareableCVPixelFormat.h: * Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.h: * Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h: * Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm: (WebCore::shouldEnableVP9Decoder): (WebCore::isSWDecodersAlwaysEnabled): (WebCore::isVP9HardwareDecoderAvailabilityKnown): * Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.h: * Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.mm: (WebCore::isRendererThreadSafe): * Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.h: * Source/WebCore/platform/graphics/cocoa/WebProcessGraphicsContextGLCocoa.mm: * Source/WebCore/platform/graphics/controls/ApplePayButtonPart.h: * Source/WebCore/platform/graphics/controls/ControlFactory.h: * Source/WebCore/platform/graphics/controls/MeterPart.h: * Source/WebCore/platform/graphics/controls/ProgressBarPart.h: * Source/WebCore/platform/graphics/controls/SliderTrackPart.h: * Source/WebCore/platform/graphics/cv/GraphicsContextGLCVCocoa.mm: (WebCore::YCbCrMatrix::operator const GLfloat* LEGACY_NODELETE const): (WebCore::YCbCrMatrix::operator const GLfloat* const): Deleted. * Source/WebCore/platform/graphics/filters/DistantLightSource.h: * Source/WebCore/platform/graphics/filters/FEColorMatrix.h: * Source/WebCore/platform/graphics/filters/FEComponentTransfer.h: * Source/WebCore/platform/graphics/filters/FEDiffuseLighting.h: * Source/WebCore/platform/graphics/filters/FEGaussianBlur.h: * Source/WebCore/platform/graphics/filters/FEImage.h: * Source/WebCore/platform/graphics/filters/FEMorphology.h: * Source/WebCore/platform/graphics/filters/FESpecularLighting.h: * Source/WebCore/platform/graphics/filters/Filter.h: * Source/WebCore/platform/graphics/filters/FilterImage.h: * Source/WebCore/platform/graphics/filters/FilterOperation.h: * Source/WebCore/platform/graphics/filters/FilterOperations.h: * Source/WebCore/platform/graphics/filters/PointLightSource.h: * Source/WebCore/platform/graphics/filters/SpotLightSource.h: * Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareArithmeticApplier.h: * Source/WebCore/platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.h: * Source/WebCore/platform/graphics/filters/software/FETurbulenceSoftwareApplier.h: * Source/WebCore/platform/graphics/iso/ISOBox.cpp: (WebCore::isWalkableView): * Source/WebCore/platform/graphics/iso/ISOBox.h: * Source/WebCore/platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.h: * Source/WebCore/platform/graphics/mac/ScrollbarTrackCornerSystemImageMac.h: * Source/WebCore/platform/graphics/mac/controls/SwitchMacUtilities.mm: (WebCore::SwitchMacUtilities::trackRectForBounds): * Source/WebCore/platform/graphics/opentype/OpenTypeMathData.h: * Source/WebCore/platform/graphics/transforms/AffineTransform.h: * Source/WebCore/platform/graphics/transforms/IdentityTransformOperation.h: * Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.h: * Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.h: * Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.h: * Source/WebCore/platform/graphics/transforms/RotateTransformOperation.h: * Source/WebCore/platform/graphics/transforms/ScaleTransformOperation.h: * Source/WebCore/platform/graphics/transforms/SkewTransformOperation.h: * Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::clampEdgeValue): * Source/WebCore/platform/graphics/transforms/TransformationMatrix.h: * Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h: * Source/WebCore/platform/ios/wak/FloatingPointEnvironment.h: * Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoDecoder.cpp: (WebCore::LibWebRTCVPXInternalVideoDecoder::close): * Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoEncoder.cpp: (WebCore::LibWebRTCVPXInternalVideoEncoder::create): (WebCore::LibWebRTCVPXInternalVideoEncoder::close): * Source/WebCore/platform/mac/KeyEventMac.mm: (WebCore::windowsKeyCodeForKeyCode): * Source/WebCore/platform/mac/ScrollbarsControllerMac.mm: (WebCore::scrollerImpForScrollbar): * Source/WebCore/platform/mac/VideoPresentationInterfaceMac.h: * Source/WebCore/platform/mediacapabilities/PlatformMediaEngineConfigurationFactory.cpp: (WebCore::mediaSessionManagerProvider): * Source/WebCore/platform/mediarecorder/MediaRecorderPrivateEncoder.cpp: (WebCore::MediaRecorderPrivateEncoder::Listener::create): * Source/WebCore/platform/mediastream/MediaConstraints.h: * Source/WebCore/platform/mediastream/MediaStreamPrivate.h: * Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.h: * Source/WebCore/platform/mediastream/RTCIceCandidateDescriptor.h: * Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h: * Source/WebCore/platform/mediastream/RealtimeOutgoingVideoSource.h: * Source/WebCore/platform/mediastream/RealtimeVideoCaptureSource.cpp: (WebCore::updateMinMax): * Source/WebCore/platform/mediastream/WebRTCProvider.h: * Source/WebCore/platform/mediastream/cocoa/CoreAudioCaptureUnit.cpp: (WebCore::Function<void): * Source/WebCore/platform/mediastream/cocoa/MockRealtimeVideoSourceCocoa.h: * Source/WebCore/platform/mediastream/cocoa/RealtimeIncomingAudioSourceCocoa.h: * Source/WebCore/platform/mediastream/cocoa/RealtimeIncomingVideoSourceCocoa.h: * Source/WebCore/platform/mediastream/cocoa/RealtimeOutgoingVideoSourceCocoa.h: * Source/WebCore/platform/mediastream/cocoa/WebAudioSourceProviderCocoa.h: * Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::staticFactoryAndThreads): * Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h: * Source/WebCore/platform/mock/MediaPlaybackTargetMock.h: * Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp: * Source/WebCore/platform/mock/PlatformSpeechSynthesizerMock.h: * Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp: * Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.h: * Source/WebCore/platform/network/BlobResourceHandle.h: * Source/WebCore/platform/network/BlobResourceHandleBase.h: * Source/WebCore/platform/network/FormData.h: * Source/WebCore/platform/network/HTTPParsers.h: * Source/WebCore/platform/network/NetworkLoadMetrics.h: * Source/WebCore/platform/network/PendingStreamState.h: * Source/WebCore/platform/network/RFC8941.cpp: (RFC8941::parseNumber): * Source/WebCore/platform/network/ResourceHandle.h: * Source/WebCore/platform/network/cf/DNSResolveQueueCFNet.mm: (WebCore::extractIPAddress): * Source/WebCore/platform/network/cf/FormDataStreamCFNet.mm: (WebCore::pendingStreamOpen): (WebCore::pendingStreamCopyProperty): * Source/WebCore/platform/sql/SQLiteDatabaseTracker.h: * Source/WebCore/platform/text/TextFlags.h: * Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTB.mm: (WebCore::GPUVideoDecoderVTBQueue::create): (WebCore::GPUVideoDecoderVTBQueue::BufferComparator::operator() const): * Source/WebCore/platform/video-codecs/cocoa/GPUVideoEncoder.mm: (WebCore::toWebRTCVideoRotation): (WebCore::fromWebRTCEncodedVideoRotation): (WebCore::toGPUVideoEncoderFrameInfo): * Source/WebCore/platform/video-codecs/cocoa/GPUVideoEncoderVTB.h: * Source/WebCore/platform/video-codecs/cocoa/GPUVideoEncoderVTB.mm: (WebCore::GPUVideoEncoderBitrateAdjuster::setTargetBitrateBps): (WebCore::GPUVideoEncoderBitrateAdjuster::adjustedBitrateBps const): (WebCore::GPUVideoEncoderBitrateAdjuster::isWithinTolerance): (WebCore::GPUVideoEncoderBitrateAdjuster::WTF_REQUIRES_LOCK): * Source/WebCore/platform/video-codecs/cocoa/GPUVideoEncoderVTBH264.mm: Canonical link: https://commits.webkit.org/324076@main
https://bugs.webkit.org/show_bug.cgi?id=327963 Reviewed by Richard Robinson. Added LEGACY_NODELETE annotation to various functions in Source/WTF. No new tests since there should be no behavioral changes. * Source/WTF/wtf/BitVector.h: * Source/WTF/wtf/ConcurrentPtrHashSet.h: * Source/WTF/wtf/CurrentThread.h: * Source/WTF/wtf/Int128.h: * Source/WTF/wtf/JSONValues.h: * Source/WTF/wtf/LogChannels.h: * Source/WTF/wtf/MediaTime.h: * Source/WTF/wtf/ParallelHelperPool.h: * Source/WTF/wtf/ParkingLot.cpp: * Source/WTF/wtf/PlainGregorianDateTime.h: * Source/WTF/wtf/Seconds.h: * Source/WTF/wtf/SuspendableWorkQueue.h: * Source/WTF/wtf/Threading.h: * Source/WTF/wtf/TimeWithDynamicClockType.h: * Source/WTF/wtf/TimeZone.h: * Source/WTF/wtf/URL.h: * Source/WTF/wtf/URLHelpers.h: * Source/WTF/wtf/URLParser.cpp: (WTF::isInQueryEncodeSet): * Source/WTF/wtf/URLParser.h: * Source/WTF/wtf/WallTime.h: * Source/WTF/wtf/WorkQueue.h: * Source/WTF/wtf/WorkerPool.h: * Source/WTF/wtf/dragonbox/dragonbox_to_chars.h: * Source/WTF/wtf/dtoa.cpp: (WTF::truncateTrailingZeros): * Source/WTF/wtf/dtoa/double-conversion.h: * Source/WTF/wtf/dtoa/fixed-dtoa.cc: * Source/WTF/wtf/dtoa/strtod.cc: * Source/WTF/wtf/persistence/PersistentDecoder.h: * Source/WTF/wtf/text/AtomStringImpl.cpp: (WTF::UTF16BufferTranslator::equal): (WTF::SubstringTranslator8::equal): (WTF::SubstringTranslator16::equal): (WTF::Latin1BufferTranslator::equal): (WTF::BufferFromStaticDataTranslator::equal): (WTF::StaticStringAtomTranslator::equal): (WTF::StaticStringAtomTranslator::translate): (WTF::AtomStringTableRemovalHashTranslator::equal): * Source/WTF/wtf/text/Base64.h: * Source/WTF/wtf/text/StringBuilder.h: * Source/WTF/wtf/text/StringImpl.h: * Source/WTF/wtf/text/StringView.cpp: (WTF::StringView::GraphemeClusters::Iterator::Impl::operator* const): (WTF::StringView::GraphemeClusters::Iterator::Impl::operator== const): * Source/WTF/wtf/text/StringView.h: * Source/WTF/wtf/text/SymbolImpl.h: * Source/WTF/wtf/text/WTFString.cpp: (WTF::doubleToFloatCheckingOverflow): * Source/WTF/wtf/text/WTFString.h: * Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp: (WTF::textLatin1ContextAwareMoveInPriorContext): (WTF::textLatin1ContextAwareSwitchToPriorContext): * Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp: (WTF::textUTF16ContextAwareMoveInPrimaryContext): (WTF::textUTF16ContextAwareSwitchToPrimaryContext): (WTF::textUTF16ContextAwareMoveInPriorContext): (WTF::textUTF16ContextAwareSwitchToPriorContext): (WTF::uTextUTF16ContextAwareAccess): * Source/WTF/wtf/threads/Signals.cpp: (WTF::toSystemSignal): Canonical link: https://commits.webkit.org/324077@main
https://bugs.webkit.org/show_bug.cgi?id=327965 Reviewed by Alan Baradlay. Added LEGACY_NODELETE annotation to various functions in Source/WebCore/layout. No new tests since there should be no behavioral changes. * Source/WebCore/layout/floats/FloatingContext.cpp: (WebCore::Layout::floatContainsLine): * Source/WebCore/layout/floats/PlacedFloats.h: * Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp: (WebCore::constrainSizeByMinMax): * Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.h: * Source/WebCore/layout/formattingContexts/flex/FlexFormattingUtils.h: * Source/WebCore/layout/formattingContexts/grid/ExtraSpaceDistributor.cpp: (WebCore::Layout::shouldTrackGrowBeyondGrowthLimits): * Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.cpp: (WebCore::Layout::autoRepeatConstraint): * Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.cpp: (WebCore::Layout::GridLayoutUtils::blockSizeFromAspectRatio): (WebCore::Layout::GridLayoutUtils::inlineSizeFromAspectRatio): (WebCore::Layout::GridLayoutUtils::stretchFitSize): (WebCore::Layout::GridLayoutUtils::fitContentSize): (WebCore::Layout::GridLayoutUtils::isDefiniteMinimumSizeDuringItemSizing): (WebCore::Layout::GridLayoutUtils::isDefiniteMaximumSizeDuringItemSizing): (WebCore::Layout::GridLayoutUtils::transferredBlockMinimumSize): (WebCore::Layout::GridLayoutUtils::transferredBlockMaximumSize): (WebCore::Layout::GridLayoutUtils::transferredInlineMinimumSize): (WebCore::Layout::GridLayoutUtils::transferredInlineMaximumSize): * Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.h: * Source/WebCore/layout/formattingContexts/grid/ImplicitGrid.h: * Source/WebCore/layout/formattingContexts/grid/TrackSizingAlgorithm.cpp: (WebCore::Layout::InflexibleTrackState::isFlexible const): (WebCore::Layout::isSizedUnderMinOrMaxContentConstraint): (WebCore::Layout::computeFRSizeComponents): (WebCore::Layout::itemCrossesFlexibleTrack): (WebCore::Layout::hasAffectedTrackSizingFunction): (WebCore::Layout::isTrackAffectedForSpaceDistributionInPhase): (WebCore::Layout::flexFactorSum): * Source/WebCore/layout/formattingContexts/grid/UnplacedGridItem.cpp: (WebCore::Layout::explicitLineToIndex): * Source/WebCore/layout/formattingContexts/grid/UnplacedGridItem.h: * Source/WebCore/layout/formattingContexts/inline/AbstractLineBuilder.h: * Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp: (WebCore::Layout::shouldRevertToEarlierWrapOpportunity): * Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.h: * Source/WebCore/layout/formattingContexts/inline/InlineContentConstrainer.h: * Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp: (WebCore::Layout::mayExitFromPartialLayout): * Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.h: * Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp: (WebCore::Layout::isNonReplacedInlineBlock): * Source/WebCore/layout/formattingContexts/inline/InlineLine.h: * Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.h: * Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp: (WebCore::Layout::haveEnoughSpaceForFloatWithClear): * Source/WebCore/layout/formattingContexts/inline/InlineLineRun.h: * Source/WebCore/layout/formattingContexts/inline/SVGTextDisplayContentBuilder.cpp: * Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.h: * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h: * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp: (WebCore::Layout::trailingBlockEllipsis): * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.h: * Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.h: * Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp: (WebCore::Layout::baseLogicalWidthFromRubyBaseEnd): * Source/WebCore/layout/formattingContexts/inline/text/TextBreakingPositionCache.cpp: (WebCore::Layout::widthsBytes): * Source/WebCore/layout/formattingContexts/inline/text/TextBreakingPositionCache.h: * Source/WebCore/layout/integration/LayoutIntegrationBoxGeometryUpdater.cpp: (WebCore::LayoutIntegration::intrinsicBorder): * Source/WebCore/layout/integration/LayoutIntegrationBoxTreeUpdater.h: * Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.cpp: (WebCore::LayoutIntegration::updateIFCLineClampAfterLayout): * Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.h: * Source/WebCore/layout/integration/LayoutIntegrationUtils.h: * Source/WebCore/layout/integration/flex/FlexIntegrationUtils.h: * Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.h: * Source/WebCore/layout/integration/grid/LayoutIntegrationGridCoverage.cpp: (WebCore::LayoutIntegration::isUnsupportedGridTrackSize): * Source/WebCore/layout/integration/inline/InlineIteratorBox.h: * Source/WebCore/layout/integration/inline/InlineIteratorInlineBox.h: * Source/WebCore/layout/integration/inline/InlineIteratorLineBox.h: * Source/WebCore/layout/integration/inline/InlineIteratorSVGTextBox.h: * Source/WebCore/layout/integration/inline/InlineIteratorTextBox.h: * Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContent.h: * Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.cpp: (WebCore::LayoutIntegration::logicalBottomForTextDecorationContent): * Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp: (WebCore::LayoutIntegration::lastLineWithInflowContent): (WebCore::LayoutIntegration::lineClamp): (WebCore::LayoutIntegration::visibleLineRectIncludingEllipsis): * Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h: * Source/WebCore/layout/layouttree/LayoutBox.h: Canonical link: https://commits.webkit.org/324078@main
…VG text https://bugs.webkit.org/show_bug.cgi?id=327921 rdar://problem/190294833 Reviewed by Alan Baradlay. A display: contents element inside SVG text gets an anonymous inline box. SVGTextLayoutAlgorithm asked SVGTextContentElement::elementFromRenderer() for its element, which asserts on renderers without a node. Anonymous inline boxes have no text content element, so their content is collected like the content of an <a> element. Test: svg/text/display-contents-in-text-crash.html * LayoutTests/svg/text/display-contents-in-text-crash-expected.txt: Added. * LayoutTests/svg/text/display-contents-in-text-crash.html: Added. * Source/WebCore/rendering/svg/SVGTextLayoutAlgorithm.cpp: (WebCore::textContentElement): (WebCore::SVGTextLayoutAlgorithm::collectTextBoxes): A text path needs its element too. Canonical link: https://commits.webkit.org/324079@main
Canonical link: https://commits.webkit.org/324080@main
https://bugs.webkit.org/show_bug.cgi?id=327928 rdar://190304586 Reviewed by Ryosuke Niwa. These files are only compiled for macOS or only for iOS-family platforms, so checks for the other platform are dead or always true: - _WKCaptionStyleMenuControllerMac.mm cleared an iOS-only property. - _WKCaptionStyleMenuControllerIOS.mm checked !TARGET_OS_OSX. - WebPageMac.mm checked !PLATFORM(IOS_FAMILY). - ScrollViewIOS.mm had a non-iOS logging branch. - WebKitLegacy's iOS WebDefaultFormDelegate.mm had a non-iOS method. - AccessibilityTestsIOS.mm had a Mac expectation. - WebGLNoCrashOnOtherThreadAccess.mm, which requires HAVE(UIWEBVIEW), checked PLATFORM(MAC). It also corrects the #endif comments of WebCoreFullScreenPlaceholderView.mm and SearchPopupMenuIOS.cpp. Canonical link: https://commits.webkit.org/324081@main
https://bugs.webkit.org/show_bug.cgi?id=327934 rdar://190307491 Reviewed by Ryosuke Niwa. Make it more self-evident which files are actually shared across ports. PlaybackSessionInterfaceAVKitLegacy, its base class, and WebAVPlayerController are compiled for macOS as well, where WebKitLegacy's video fullscreen uses PlaybackSessionInterfaceAVKitLegacy. Move them to platform/cocoa and rename PlaybackSessionInterfaceIOS to PlaybackSessionInterfaceCocoa. Addresses some of the style nits as well. Canonical link: https://commits.webkit.org/324082@main
…ng !important custom property when called without priority https://bugs.webkit.org/show_bug.cgi?id=327174 rdar://189765758 Reviewed by Antti Koivisto. This patch aligns WebKit with Gecko / Firefox and Blink / Chromium. If a declaration block contains `--x: 1 !important`, then calling `style.setProperty("--x", "2")` should replace it with a normal `--x: 2`. This follows the CSSOM "set a CSS declaration" steps, and it's what we already do for standard properties. For custom properties, WebKit ignored the call: MutableStyleProperties::addParsedProperty() refused to replace an important custom property with a non-important one. The check isn't needed for parsing a declaration block either. In `--x: 1 !important; --x: 2`, CSSParser::filterProperties() already removes the duplicate and keeps the important value before anything is added. So remove the custom-property special case and always call setProperty(). Test: imported/w3c/web-platform-tests/css/cssom/setproperty-custom-property-override-important.html * LayoutTests/imported/w3c/web-platform-tests/css/cssom/setproperty-custom-property-override-important-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/css/cssom/setproperty-custom-property-override-important.html: Added. * Source/WebCore/css/MutableStyleProperties.cpp: (WebCore::MutableStyleProperties::addParsedProperty): Canonical link: https://commits.webkit.org/324083@main
https://bugs.webkit.org/show_bug.cgi?id=327148 rdar://189739894 Reviewed by Nikolas Zimmermann. This patch aligns WebKit with Gecko / Firefox and Blink / Chromium. If pauseAnimations() and setCurrentTime() are both called on an <svg> before its timeline begins, SMILTimeContainer::begin() seeks the animations to the preset time but never sets m_accumulatedActiveTime. While paused, elapsed() returns m_accumulatedActiveTime, so getCurrentTime() reports 0. After unpauseAnimations(), the timeline restarts from 0 instead of from the seeked time. Fix this by setting m_accumulatedActiveTime to the preset start time in begin() when the container is already paused. Test: imported/w3c/web-platform-tests/svg/animations/pause-and-seek-before-begin.html * LayoutTests/imported/w3c/web-platform-tests/svg/animations/pause-and-seek-before-begin-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/svg/animations/pause-and-seek-before-begin.html: Added. * Source/WebCore/svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::begin): Canonical link: https://commits.webkit.org/324084@main
https://bugs.webkit.org/show_bug.cgi?id=327932 rdar://190307124 Reviewed by Ryosuke Niwa. Make it more self-evident which files are actually shared across ports. The C API in Shared/API/c/mac, UIProcess/API/C/mac, and WebProcess/InjectedBundle/API/c/mac is compiled for iOS as well, so move it to new cocoa directories. WKInspectorPrivateMac.h and WKBundlePageBannerMac are macOS-only and stay. The header names are API and keep their Mac suffix, so the files with that suffix gain a comment saying they are used on all Cocoa platforms. Also removes a stale UIProcess/API/C/Cocoa entry from PlatformCocoa.cmake. Canonical link: https://commits.webkit.org/324085@main
https://bugs.webkit.org/show_bug.cgi?id=327936 rdar://190309192 Reviewed by Ryosuke Niwa. Since opaque origins stopped being potentially trustworthy in 222036@main, a data: document has not been a secure context, except in a sandboxed frame, where its URL is checked instead. That change was aimed at top-level data: documents, which have no secure creator. In a frame, HTML makes a data: document as secure as its parent, and so does Gecko. The proposal in whatwg/html#12091 which follows w3c/webappsec-secure-contexts#69 is to keep that and to only make a top-level data: document not a secure context. A data: document in a frame now takes its parent's state, and a top-level one is not a secure context. WebPageProxy::topLevelIsSecureContext(), added in 323985@main, treated a top-level data: document as secure, and so honored Origin-Agent-Cluster for its frames; it now agrees. Four WPTs are affected: - secure-contexts/basic-popup-and-iframe-tests.https.html, which expects a data: frame to be a secure context when its creator is one, now passes. - fs/opaque-origin.https.window.html, which expects FileSystemDirectoryHandle to be defined in a data: frame, now passes. - digital-credentials/get-opaque-origin-combinations.https.html expected a data: frame not to be a secure context. It now expects get() there to reject for its opaque origin, like in the other opaque-origin frames. - credential-management/credentialscontainer-frame-basics.https.html expected navigator.credentials to be undefined in a data: frame. It now expects it to be defined. Two WebKit tests covered the old behavior. http/tests/security/iframe-unique-origin.https.html asserted that a data: frame is not a secure context, which the secure-contexts WPT above covers, so it is removed. http/tests/web-locks/web-lock-in-data-url.html only checked that navigator.locks is undefined there; as with the sandboxed srcdoc test it now expects request() to reject, since the origin is still opaque. Tests: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm imported/w3c/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/data-frame-child.https.sub.html Canonical link: https://commits.webkit.org/324086@main
…bute changes https://bugs.webkit.org/show_bug.cgi?id=327151 rdar://189740877 Reviewed by Nikolas Zimmermann. When the target attribute of an SVG <a> element changed, its <use> copies were not rebuilt, so clicking a copy navigated using the old target. Invalidate <use> instances when the target attribute changes. Also stop returning early from SVGAElement::attributeChanged() for target, so the base class handling still runs. The test is skipped on iOS, where tapping a <use> instance of an SVG <a> does not navigate even without changing the target. Test: imported/w3c/web-platform-tests/svg/linking/scripted/a.target-dynamic-update.html * LayoutTests/imported/w3c/web-platform-tests/svg/linking/scripted/a.target-dynamic-update-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/svg/linking/scripted/a.target-dynamic-update.html: Added. * LayoutTests/platform/ios/TestExpectations: Skip the test on iOS, where tapping a <use> instance of an SVG <a> does not navigate. * Source/WebCore/svg/SVGAElement.cpp: (WebCore::SVGAElement::attributeChanged): (WebCore::SVGAElement::svgAttributeChanged): Canonical link: https://commits.webkit.org/324087@main
https://bugs.webkit.org/show_bug.cgi?id=327912 rdar://problem/190288583 Reviewed by Alan Baradlay. Turn on SVG2TextLayoutAlgorithmEnabled. Test changes: - svg/batik/text/xmlSpace.svg: a collapsible space that follows a preserved space is now kept, as the line layout decides whitespace. This matches Chrome and Firefox. - svg/batik/text/textLayout.svg: spacingAndGlyphs with word-spacing now dumps the stretched positions of each word instead of unstretched positions under a single transform. The rendering is the same. - svg/batik/text/textLength.svg: spacingAndGlyphs with text-anchor now dumps the start of the stretched text, for example 225 - 50 / 2 = 200 for textLength="50" at x="225", instead of the unstretched anchored position under a transform. The rendering is the same. - svg/custom/glyph-transformation-with-hkern.svg, svg/text/font-size-below-point-five.svg, svg/zoom/page/zoom-mask-with-percentages.svg: 0.01px width differences. - GTK and WPE: 1px text box size differences in svg/ text tests. - WPT textLength-list-x-spacingAndGlyphs.svg: fix the test. It expected the explicit x positions to move with the glyph stretching. That is wrong per spec, which applies absolute positions after textLength, and Chrome and Firefox fail the test on wpt.fyi. The test and the reference now expect each glyph to stretch in place at its x position. What the test is about, textLength applying across the whole element instead of to each chunk (webkit.org/b/61855), is not affected. - mozilla/svg/text/textLength-5.svg and WPT textLength-list-y-spacing.svg now pass. * LayoutTests/TestExpectations: textLength-5.svg and textLength-list-y-spacing.svg pass. * LayoutTests/imported/w3c/web-platform-tests/svg/text/reftests/textLength-list-x-spacingAndGlyphs-expected.svg: * LayoutTests/imported/w3c/web-platform-tests/svg/text/reftests/textLength-list-x-spacingAndGlyphs-ref.svg: * LayoutTests/imported/w3c/web-platform-tests/svg/text/reftests/textLength-list-x-spacingAndGlyphs.svg: * LayoutTests/platform/glib/svg/W3C-I18N/g-dirLTR-ubNone-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/g-dirLTR-ubOverride-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/g-dirRTL-ubNone-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/g-dirRTL-ubOverride-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/text-dirLTR-ubNone-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/text-dirLTR-ubOverride-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/text-dirRTL-ubNone-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/text-dirRTL-ubOverride-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/tspan-direction-ltr-expected.txt: * LayoutTests/platform/glib/svg/W3C-I18N/tspan-direction-rtl-expected.txt: * LayoutTests/platform/glib/svg/W3C-SVG-1.1/animate-elem-06-t-expected.txt: * LayoutTests/platform/glib/svg/W3C-SVG-1.1/text-text-01-b-expected.txt: * LayoutTests/platform/glib/svg/batik/text/textAnchor-expected.txt: * LayoutTests/platform/glib/svg/batik/text/textLayout-expected.txt: * LayoutTests/platform/glib/svg/batik/text/textLength-expected.txt: * LayoutTests/platform/glib/svg/batik/text/xmlSpace-expected.txt: * LayoutTests/platform/glib/svg/carto.net/window-expected.txt: * LayoutTests/platform/glib/svg/custom/tref-update-expected.txt: * LayoutTests/platform/glib/svg/text/font-size-below-point-five-expected.txt: * LayoutTests/platform/glib/svg/text/select-textLength-spacing-stretch-1-expected.txt: * LayoutTests/platform/glib/svg/text/select-textLength-spacing-stretch-2-expected.txt: * LayoutTests/platform/glib/svg/text/select-textLength-spacing-stretch-3-expected.txt: * LayoutTests/platform/glib/svg/text/select-textLength-spacing-stretch-4-expected.txt: * LayoutTests/platform/glib/svg/text/select-textLength-spacingAndGlyphs-stretch-4-expected.txt: * LayoutTests/platform/glib/svg/text/select-x-list-with-tspans-4-expected.txt: * LayoutTests/platform/glib/svg/text/text-align-01-b-expected.txt: * LayoutTests/platform/glib/svg/text/text-align-02-b-expected.txt: * LayoutTests/platform/glib/svg/text/text-align-04-b-expected.txt: * LayoutTests/platform/glib/svg/text/text-align-06-b-expected.txt: * LayoutTests/platform/glib/svg/text/text-text-05-t-expected.txt: * LayoutTests/platform/glib/svg/transforms/text-with-pattern-inside-transformed-html-expected.txt: * LayoutTests/platform/glib/svg/transforms/text-with-pattern-with-svg-transform-expected.txt: * LayoutTests/platform/ios/svg/batik/text/textLength-expected.txt: * LayoutTests/platform/ios/svg/text/font-size-below-point-five-expected.txt: * LayoutTests/platform/mac/svg/batik/text/textLayout-expected.txt: * LayoutTests/platform/mac/svg/batik/text/textLength-expected.txt: * LayoutTests/platform/mac/svg/batik/text/xmlSpace-expected.txt: * LayoutTests/platform/mac/svg/text/font-size-below-point-five-expected.txt: * LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.txt: * LayoutTests/platform/wpe/svg/text/select-textLength-spacingAndGlyphs-squeeze-4-expected.txt: * LayoutTests/svg/custom/glyph-transformation-with-hkern-expected.txt: * LayoutTests/svg/text/textLength-spacing-absolute-positions.html: The flag is on by default now. * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: Canonical link: https://commits.webkit.org/324088@main
https://bugs.webkit.org/show_bug.cgi?id=327876 Reviewed by Patrick Griffis. SVGDocumentExtensions stored connected <font-face> elements in a WeakHashSet, which iterates in pointer-hash order. Style::Resolver::addCurrentSVGFontFaceRules() registers @font-face rules in that order, and CSSFontFaceSet::fontFace() prefers the last registered of equally matching faces, so the chosen face varied between runs. This is the reason for long observed flakiness in svg/W3C-SVG-1.1/fonts-desc-02-t.svg. Store them in a WeakListHashSet instead, which iterates in insertion order, avoiding the run-to-run flakiness. Constructing a specific test for that didn't work out, but we can remove the flakiness markers for font-desc-02-t.svg from LBSE. The test itself is still broken because of webkit.org/b/140588 - which needs a follow-up fix. * LayoutTests/platform/mac-tahoe-wk2-lbse-text/TestExpectations: * Source/WebCore/svg/SVGDocumentExtensions.h: Canonical link: https://commits.webkit.org/324089@main
… explicit conversion operators https://bugs.webkit.org/show_bug.cgi?id=327985 Reviewed by Anne van Kesteren. Re-running the reverse no-delete static analysis after the recent NODELETE annotation patches revealed two cases where LEGACY_NODELETE was present but not honored by the checker: 1. Function templates with a separate declaration: annotating only the declaration (in a header or as a forward declaration) did not suppress the per-instantiation warnings. The annotation also needs to be on the out-of-line definition, so this patch adds it there. 2. Explicit conversion operators: `explicit LEGACY_NODELETE operator bool()` is accepted by the compiler but ignored by the checker, while `operator T LEGACY_NODELETE ()` is honored. This patch moves the annotation to after the conversion type. No new tests since there should be no behavioral changes. * Source/WTF/wtf/MediaTime.h: * Source/WTF/wtf/URLParser.cpp: (WTF::URLParser::takesTwoAdvancesUntilEnd): (WTF::URLParser::checkLocalhostCodePoint): (WTF::URLParser::isAtLocalhost): (WTF::URLParser::parseIPv4Piece): (WTF::URLParser::parseIPv4PieceInsideIPv6): (WTF::URLParser::parseIPv4AddressInsideIPv6): * Source/WebCore/dom/Node.cpp: (WebCore::commonInclusiveAncestor): (WebCore::treeOrder): * Source/WebCore/html/HTMLAttachmentElement.cpp: (WebCore::AttachmentEvent::operator bool LEGACY_NODELETE const): (WebCore::AttachmentEvent::operator bool const): Deleted. * Source/WebCore/layout/integration/inline/InlineIteratorLineBox.h: * Source/WebCore/platform/DateComponents.cpp: (WebCore::DateComponents::parseYear): (WebCore::DateComponents::parseMonth): (WebCore::DateComponents::parseDate): (WebCore::DateComponents::parseWeek): (WebCore::DateComponents::parseTime): (WebCore::DateComponents::parseDateTimeLocal): * Source/WebCore/platform/audio/cocoa/AudioFileReaderCocoa.mm: (WebCore::AudioBufferListHolder::operator bool LEGACY_NODELETE const): (WebCore::AudioBufferListHolder::operator bool const): Deleted. * Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareArithmeticApplier.cpp: (WebCore::FECompositeSoftwareArithmeticApplier::computePixels): (WebCore::FECompositeSoftwareArithmeticApplier::computePixelsUnclamped): * Source/WebCore/rendering/HitTestLocation.cpp: (WebCore::HitTestLocation::intersectsRect const): * Source/WebCore/style/calc/StyleCalculationTree+Copy.cpp: * Source/WebCore/style/calc/StyleCalculationTree+Substitution.cpp: (WebCore::Style::Calculation::mapLeaves): * Source/WebCore/svg/SVGPathStringViewSource.cpp: (WebCore::SVGPathStringViewSource::parse): Canonical link: https://commits.webkit.org/324090@main
https://bugs.webkit.org/show_bug.cgi?id=327986 Reviewed by Anne van Kesteren. Add LEGACY_NODELETE annotations to more WTF functions. No new tests since there should be no behavioral changes. * Source/WTF/wtf/Seconds.h: * Source/WTF/wtf/Threading.h: * Source/WTF/wtf/cocoa/TimeZoneCocoa.cpp: (WTF::timeZoneChangeNotification): Canonical link: https://commits.webkit.org/324091@main
https://bugs.webkit.org/show_bug.cgi?id=315153 Reviewed by Michael Catanzaro Keep sandbox-rejected prewarmed processes in the prewarmed set so that subsequent prewarming does not accumulate untracked web processes. Canonical link: https://commits.webkit.org/324092@main
…rsions of a font are used repeatedly https://bugs.webkit.org/show_bug.cgi?id=327981 Reviewed by Darin Adler. Add kerning to FontCascadeCacheKey so each kerning setting gets its own FontCascadeFonts. Test: fast/text/font-kerning-width-cache.html * LayoutTests/fast/text/font-kerning-width-cache-expected.txt: Added. * LayoutTests/fast/text/font-kerning-width-cache.html: Added. * Source/WebCore/platform/graphics/FontCascadeCache.cpp: (WebCore::makeFontCascadeCacheKey): * Source/WebCore/platform/graphics/FontCascadeCache.h: (WebCore::add): Canonical link: https://commits.webkit.org/324093@main
…s in dark mode https://bugs.webkit.org/show_bug.cgi?id=325433 Reviewed by Carlos Garcia Campos and Michael Catanzaro. When opening a new tab or loading about:blank in dark mode, WebKitGTK/WPE flashes an opaque white frame before page content is parsed and rendered. Causes: - Document::useDarkAppearance() evaluated to false for uncommitted/about:blank documents without CSS color schemes, causing canvas colors to default to white. - AcceleratedSurface clear operations fell back to hardcoded white when no explicit background color was set on WebPage. - webkit_web_view_get_background_color() defaulted to white and set_background_color() did not accept NULL to restore the default system appearance background. Fix: - Allow Document::useDarkAppearance() to adopt the page's dark appearance for about:blank and uncommitted documents in the main frame (and matching subframes). - Add WebPage::effectiveBackgroundColor() and use it in AcceleratedSurface to clear to the theme's canvas color instead of hardcoded white. - Allow passing NULL to webkit_web_view_set_background_color() to reset to system default, and report the dark canvas color in webkit_web_view_get_background_color() when unset. * Source/WebCore/dom/Document.cpp: (WebCore::Document::useDarkAppearance const): * Source/WebKit/UIProcess/API/gtk/WebKitWebViewGtk.cpp: (webkit_web_view_set_background_color): (webkit_web_view_get_background_color): * Source/WebKit/UIProcess/API/gtk/WebKitWebViewGtk3.cpp: * Source/WebKit/UIProcess/API/gtk/WebKitWebViewGtk4.cpp: * Source/WebKit/UIProcess/API/wpe/WebKitWebViewWPE.cpp: (webkit_web_view_set_background_color): (webkit_web_view_get_background_color): * Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/AcceleratedSurface.cpp: (WebKit::AcceleratedSurface::AcceleratedSurface): (WebKit::AcceleratedSurface::backgroundColorDidChange): (WebKit::AcceleratedSurface::skiaClearColor): (WebKit::AcceleratedSurface::clear): * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::effectiveBackgroundColor const): (WebKit::WebPage::setUseColorAppearance): * Source/WebKit/WebProcess/WebPage/WebPage.h: (WebKit::WebPage::effectiveBackgroundColor const): Signed-off-by: John Cardullo <john@jcarmedia.org> Canonical link: https://commits.webkit.org/324094@main
… run https://bugs.webkit.org/show_bug.cgi?id=327872 Reviewed by Rob Buis. SVGTextBoxPainter decides per run whether a non-scaling stroke is used using the style of the parent renderer of each run. At the moment legacy / LBSE disagree on size of the stroke bounding box. LBSE only checked the <text> style, which is incorrect, since vector-effect is not an inherited property. <text vector-effect="non-scaling-stroke"><tspan> paints a _scaling_ stroke for the tspan run. The legacy engine ignored vector-effect for the stroke bounding box computation and always inflated by the stroke width in user units. Fix both issues and unify the non-scaling stroke computation logic. Both legacy and LBSE now report the same repaint rect for the repaint-non-scaling-stroke-text.html test and its text-decoration variant. Add more tests covering the remaining cases with nested tspan elements. Tests: svg/repaint/non-scaling-stroke-nested-tspan-repaint-rects.html svg/repaint/non-scaling-stroke-text-plain-tspan-repaint-rects.html svg/repaint/non-scaling-stroke-text-scale-down-repaint-rects.html svg/repaint/non-scaling-stroke-tspan-in-plain-tspan-repaint-rects.html svg/repaint/non-scaling-stroke-tspan-repaint-rects.html svg/repaint/non-scaling-stroke-tspan-scale-down-repaint-rects.html * LayoutTests/platform/glib/svg/repaint/non-scaling-stroke-nested-tspan-repaint-rects-expected.txt: Added. * LayoutTests/platform/glib/svg/repaint/non-scaling-stroke-text-plain-tspan-repaint-rects-expected.txt: Added. * LayoutTests/platform/glib/svg/repaint/non-scaling-stroke-text-scale-down-repaint-rects-expected.txt: Added. * LayoutTests/platform/glib/svg/repaint/non-scaling-stroke-tspan-in-plain-tspan-repaint-rects-expected.txt: Added. * LayoutTests/platform/glib/svg/repaint/non-scaling-stroke-tspan-repaint-rects-expected.txt: Added. * LayoutTests/platform/glib/svg/repaint/non-scaling-stroke-tspan-scale-down-repaint-rects-expected.txt: Added. * LayoutTests/platform/glib/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt: * LayoutTests/platform/glib/svg/repaint/repaint-non-scaling-stroke-text-expected.txt: * LayoutTests/platform/ios/svg/repaint/non-scaling-stroke-nested-tspan-repaint-rects-expected.txt: Added. * LayoutTests/platform/ios/svg/repaint/non-scaling-stroke-text-plain-tspan-repaint-rects-expected.txt: Added. * LayoutTests/platform/ios/svg/repaint/non-scaling-stroke-text-scale-down-repaint-rects-expected.txt: Added. * LayoutTests/platform/ios/svg/repaint/non-scaling-stroke-tspan-in-plain-tspan-repaint-rects-expected.txt: Added. * LayoutTests/platform/ios/svg/repaint/non-scaling-stroke-tspan-repaint-rects-expected.txt: Added. * LayoutTests/platform/ios/svg/repaint/non-scaling-stroke-tspan-scale-down-repaint-rects-expected.txt: Added. * LayoutTests/platform/ios/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt: * LayoutTests/platform/ios/svg/repaint/repaint-non-scaling-stroke-text-expected.txt: * LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/repaint/non-scaling-stroke-text-scale-down-repaint-rects-expected.txt: Added. * LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/repaint/non-scaling-stroke-tspan-scale-down-repaint-rects-expected.txt: Added. * LayoutTests/svg/repaint/non-scaling-stroke-nested-tspan-repaint-rects-expected.txt: Added. * LayoutTests/svg/repaint/non-scaling-stroke-nested-tspan-repaint-rects.html: Added. * LayoutTests/svg/repaint/non-scaling-stroke-text-plain-tspan-repaint-rects-expected.txt: Added. * LayoutTests/svg/repaint/non-scaling-stroke-text-plain-tspan-repaint-rects.html: Added. * LayoutTests/svg/repaint/non-scaling-stroke-text-scale-down-repaint-rects-expected.txt: Added. * LayoutTests/svg/repaint/non-scaling-stroke-text-scale-down-repaint-rects.html: Added. * LayoutTests/svg/repaint/non-scaling-stroke-tspan-in-plain-tspan-repaint-rects-expected.txt: Added. * LayoutTests/svg/repaint/non-scaling-stroke-tspan-in-plain-tspan-repaint-rects.html: Added. * LayoutTests/svg/repaint/non-scaling-stroke-tspan-repaint-rects-expected.txt: Added. * LayoutTests/svg/repaint/non-scaling-stroke-tspan-repaint-rects.html: Added. * LayoutTests/svg/repaint/non-scaling-stroke-tspan-scale-down-repaint-rects-expected.txt: Added. * LayoutTests/svg/repaint/non-scaling-stroke-tspan-scale-down-repaint-rects.html: Added. * LayoutTests/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt: * LayoutTests/svg/repaint/repaint-non-scaling-stroke-text-expected.txt: * Source/WebCore/rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::updateFromStyle): * Source/WebCore/rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::strokeBoundingBox const): (WebCore::RenderSVGText::strokeInflation const): (WebCore::RenderSVGText::updateFromStyle): (WebCore::RenderSVGText::invalidateNonScalingStrokeCaches): (WebCore::RenderSVGText::hasNonScalingStroke const): Deleted. * Source/WebCore/rendering/svg/RenderSVGText.h: Canonical link: https://commits.webkit.org/324095@main
https://bugs.webkit.org/show_bug.cgi?id=327888 Reviewed by Ian Grunert. Bump the dependencies used by the Windows port by using `vcpkg x-update-baseline`. * vcpkg-configuration.json: Canonical link: https://commits.webkit.org/324096@main
https://bugs.webkit.org/show_bug.cgi?id=327913 rdar://190291456 Reviewed by Alexey Proskuryakov. Replace the TelephonyUtilities soft-linking in WebKit with direct linking on macOS. TUCall is now referenced directly. On macOS 27 and later, TelephonyUtilities is lazy linked because it depends on about 100 frameworks that WebKit otherwise doesn't load. Loading them at launch added about 0.8ms and 50KB to the launch of a minimal process that links WebKit. With lazy linking, TelephonyUtilities is only loaded once TUCall is first used, so there's no launch cost. It's also weak linked because it isn't in the recoveryOS base system, but WebKit is. A lazy linked framework that's missing at runtime aborts on first use; weak linking makes TUCall nil instead, matching the previous optional soft-linking behavior. Lazy linking requires a macOS 27 deployment target. Since recoveryOS isn't updated on older OSes, older OSes use regular linking. TelephonyUtilities doesn't have any static initializers or +load methods. * Configurations/WebKitTargetConditionals.xcconfig: * Source/WebKit/Configurations/WebKit.xcconfig: * Source/WebKit/Platform/mac/MenuUtilities.mm: (WebKit::menuItemTitleForTelephoneNumberGroup): * Source/WebKit/PlatformCocoa.cmake: Canonical link: https://commits.webkit.org/324097@main
… to errors https://bugs.webkit.org/show_bug.cgi?id=327982 rdar://190336417 Reviewed by Zak Ridouh. Treat the VariableNeverMutated and UnusedImportAccess Swift diagnostic groups as errors instead of warnings. In the Xcode build, both are only errors with SDKs that ship Swift 6.4 or later, since the build still has to support Swift 6.3. With Swift 6.3, the existing violations can't be fixed (rdar://170907318) or suppressed (`@diagnose` is unavailable). In the CMake build, this also fixes NoUsage and NoUseUnstructuredThrowingTask never being enforced. They were gated on CMAKE_Swift_LANGUAGE_VERSION, which is never set, and WebKitSwiftFlags.cmake is included before enable_language(Swift), so no Swift version variable is available at that point anyway. The gate kept unknown warning groups on older toolchains from failing the build, but that can no longer happen since Swift warnings are no longer treated as errors, so remove it to match Xcode. * Configurations/CommonBase.xcconfig: * Source/WebGPU/WebGPU/CommandEncoder.swift: (WebGPU.beginRenderPass(_:)): * Source/WebKit/UIProcess/API/Swift/WebPage+ImmersiveEnvironment.swift: * Source/WebKit/UIProcess/Cocoa/TextExtraction/WKWebView+TextExtraction.swift: * Source/WebKit/_WebKit_SwiftUI/CrossImportOverlay.swift: * Source/cmake/WebKitSwiftFlags.cmake: Canonical link: https://commits.webkit.org/324098@main
https://bugs.webkit.org/show_bug.cgi?id=327910 rdar://problem/190284409 Reviewed by Taher Ali. * LayoutTests/platform/mac-wk2/TestExpectations: * LayoutTests/platform/mac/TestExpectations: Canonical link: https://commits.webkit.org/324099@main
…er layers https://bugs.webkit.org/show_bug.cgi?id=327701 Reviewed by Nikolas Zimmermann. SkiaCompositingLayer::paintBackdrop() paints the backdrop root's subtree into an intermediate surface. That walk reaches every earlier layer that has a backdrop filter, and each of them paints its own backdrop again, so the k-th backdrop-filter layer costs 2^(k-1) subtree paints. A page with 20 or more such layers (for example a carousel whose buttons use `backdrop-filter: blur(0)`) never finishes a frame: the compositing thread runs at 100% and the memory of the surfaces and the GPU work recorded for the frame keeps growing until the web process is killed. 1. paintWithFilter() created the surface and painted the subtree before finding out that none of the filter output was visible. The visible output rect does not depend on the painted content, so compute it first and bail out when it is empty. Layers that are out of view, or outside the surface of the backdrop being painted, are now skipped at no cost. 2. Keep the filtered backdrops in the PaintContext for the rest of the frame, and draw a kept result again when all inputs match: the layer, its transform, the surface scale, the local bounds and the output rect. Different inputs are filtered again, so the result does not depend on how the filter is implemented. n stacked backdrop-filter layers now cost n(n+1)/2 filter passes per frame instead of 2^n. Measured with WebKitGTK 2.54.1 (Intel HD 4600, X11), plain WebKitWebView, 10 s per page, before -> after: - 28 non-overlapping backdrop-filter layers: no frame, 3.3 GB and 100% CPU -> 154 MB, 7% CPU, 16 ms frames. - 30 stacked backdrop-filter layers: no frame -> 16 ms median frame interval. - 18 stacked backdrop-filter layers over animated content: no frame -> 16 ms median frame interval with blur(0), blur(6px) and mixed blurs. - www.24ur.com (16 s): no frame, 2.2 GB and a full core -> 324 MB, 16 ms frames. Rendering is pixel-identical (0 differing pixels) before and after on 9 test pages (blur from 0 to 8px, filter chains, rotation, border-radius, opacity, overflow clip, hue-rotate on the layer) and after each of 5 in-frame changes of background, z-order, position, filter and transform. Test: compositing/filters/backdrop-filter-many-layers.html * LayoutTests/compositing/filters/backdrop-filter-many-layers-expected.txt: Added. * LayoutTests/compositing/filters/backdrop-filter-many-layers.html: Added. * Source/WebCore/platform/graphics/skia/SkiaCompositingLayer.cpp: (WebCore::SkiaCompositingLayer::paintBackdrop): (WebCore::SkiaCompositingLayer::paintWithFilter): * Source/WebCore/platform/graphics/skia/SkiaCompositingLayer.h: Canonical link: https://commits.webkit.org/324100@main
https://bugs.webkit.org/show_bug.cgi?id=327988 Reviewed by Anne van Kesteren. Added LEGACY_NODELETE annotation to various functions in Source/WebCore/css. No new tests since there should be no behavioral changes. * Source/WebCore/css/CSSBorderImageRepeatValue.h: * Source/WebCore/css/CSSBorderImageSourceValue.h: * Source/WebCore/css/CSSCalcSizeValue.h: * Source/WebCore/css/CSSClipValue.h: * Source/WebCore/css/CSSColorImageValue.h: * Source/WebCore/css/CSSComputedStyleDeclaration.h: * Source/WebCore/css/CSSCounterStyleRule.h: * Source/WebCore/css/CSSCustomIdentValue.h: * Source/WebCore/css/CSSCustomPropertyValue.h: * Source/WebCore/css/CSSFlexWrapValue.h: * Source/WebCore/css/CSSFontFaceSet.h: * Source/WebCore/css/CSSFontFaceSrcValue.h: * Source/WebCore/css/CSSFontFamilyNameValue.h: * Source/WebCore/css/CSSFontPaletteValue.h: * Source/WebCore/css/CSSFontStyleRangeValue.h: * Source/WebCore/css/CSSFunctionRule.h: * Source/WebCore/css/CSSGradientValue.cpp: * Source/WebCore/css/CSSGridAutoFlowValue.h: * Source/WebCore/css/CSSGridTemplateAreasValue.h: * Source/WebCore/css/CSSImageSetOptionValue.h: * Source/WebCore/css/CSSKeywordValue.h: * Source/WebCore/css/CSSLayerStatementRule.h: * Source/WebCore/css/CSSLightDarkImageValue.h: * Source/WebCore/css/CSSMarkup.cpp: (WebCore::isNonPrintableCodePoint): * Source/WebCore/css/CSSMaskBorderRepeatValue.h: * Source/WebCore/css/CSSMaskBorderSourceValue.h: * Source/WebCore/css/CSSPositionTryRule.h: * Source/WebCore/css/CSSPrimitiveValue.cpp: (WebCore::valueFromPool): * Source/WebCore/css/CSSPropertyRule.h: * Source/WebCore/css/CSSRandomKeyParser.h: * Source/WebCore/css/CSSRule.h: * Source/WebCore/css/CSSSelectorList.cpp: (WebCore::forEachTagSelector): (WebCore::forEachSelector): * Source/WebCore/css/CSSShorthandSubstitutionValue.h: * Source/WebCore/css/CSSStringValue.h: * Source/WebCore/css/CSSStyleProperties.cpp: * Source/WebCore/css/CSSStyleSheet.h: * Source/WebCore/css/CSSStyleSheetObservableArray.h: * Source/WebCore/css/CSSURLValue.h: * Source/WebCore/css/CSSVariableData.cpp: (WebCore::CSSVariableData::updateBackingStringsInTokens): * Source/WebCore/css/CSSViewTransitionRule.h: * Source/WebCore/css/DOMMatrixReadOnly.h: * Source/WebCore/css/MediaList.h: * Source/WebCore/css/MutableStyleProperties.h: * Source/WebCore/css/SelectorChecker.cpp: (WebCore::localContextForParent): (WebCore::isScopeOnlyCompoundSelector): (WebCore::matchesDocumentScopingRoot): (WebCore::isSimpleSelectorAllowedToMatchFeaturelessShadowHost): (WebCore::isSelectorListAllowedToMatchFeaturelessShadowHost): (WebCore::canJITCompileHasArgument): * Source/WebCore/css/SelectorChecker.h: * Source/WebCore/css/StyleProperties.h: * Source/WebCore/css/calc/CSSCalcTree+Copy.cpp: * Source/WebCore/css/calc/CSSCalcTree+Evaluation.cpp: * Source/WebCore/css/calc/CSSCalcTree+Parser.cpp: (WebCore::CSSCalc::consumeZeroArguments): * Source/WebCore/css/calc/CSSCalcTree+Serialization.cpp: (WebCore::CSSCalc::clampValue): * Source/WebCore/css/calc/CSSCalcTree+Simplification.cpp: (WebCore::CSSCalc::copyAndSimplifyChildren): * Source/WebCore/css/calc/CSSCalcTree.h: * Source/WebCore/css/calc/CSSCalcValue.h: * Source/WebCore/css/deprecated-cssom/DeprecatedCSSOMCustomValue.h: * Source/WebCore/css/deprecated-cssom/DeprecatedCSSOMPrimitiveValue.h: * Source/WebCore/css/deprecated-cssom/DeprecatedCSSOMRGBColor.cpp: (WebCore::createWrapperForColorComponent): * Source/WebCore/css/deprecated-cssom/DeprecatedCSSOMRGBColor.h: * Source/WebCore/css/deprecated-cssom/DeprecatedCSSOMRect.h: * Source/WebCore/css/deprecated-cssom/DeprecatedCSSOMValueList.h: * Source/WebCore/css/parser/CSSParserFastPaths.cpp: (WebCore::parseColorIntOrPercentage): (WebCore::parseRGBAlphaValue): * Source/WebCore/css/parser/CSSPropertyParser.cpp: (WebCore::isAppleLegacyCSSValueKeyword): * Source/WebCore/css/parser/CSSPropertyParserConsumer+CalcSize.cpp: (WebCore::CSSPropertyParserHelpers::isValidBasisKeyword): * Source/WebCore/css/parser/CSSSubstitutionParser.cpp: (WebCore::startsWithReservedNamedArgument): * Source/WebCore/css/parser/CSSTokenizer.h: * Source/WebCore/css/query/ContainerQueryFeatures.cpp: (WebCore::CQ::Features::styleRangeValuesShareCategory): (WebCore::CQ::Features::StyleFeatureSchema::localPropertyRegistry): * Source/WebCore/css/query/GenericMediaQueryParser.h: * Source/WebCore/css/query/MediaQueryParser.cpp: (WebCore::MQ::mediaQueryCount): * Source/WebCore/css/typedom/CSSStyleValueFactory.cpp: (WebCore::mayConvertCSSValueListToSingleValue): * Source/WebCore/css/typedom/CSSUnitValue.h: * Source/WebCore/css/typedom/CSSUnparsedValue.h: * Source/WebCore/css/typedom/ComputedStylePropertyMapReadOnly.h: * Source/WebCore/css/typedom/DeclaredStylePropertyMap.h: * Source/WebCore/css/typedom/HashMapStylePropertyMapReadOnly.h: * Source/WebCore/css/typedom/InlineStylePropertyMap.h: * Source/WebCore/css/typedom/StylePropertyMap.cpp: (WebCore::propertySerializationForCheckAssociatedProperties): * Source/WebCore/css/typedom/color/CSSHWB.h: * Source/WebCore/css/typedom/numeric/CSSMathInvert.h: * Source/WebCore/css/typedom/numeric/CSSNumericArray.h: * Source/WebCore/css/typedom/transform/CSSMatrixComponent.h: (WebCore::CSSMatrixComponent::create): * Source/WebCore/css/values/primitives/CSSKeyword.h: * Source/WebCore/css/values/primitives/CSSPrimitiveData.h: * Source/WebCore/css/values/primitives/CSSUnevaluatedCalc.h: Canonical link: https://commits.webkit.org/324101@main
https://bugs.webkit.org/show_bug.cgi?id=327990 Reviewed by Anne van Kesteren. Added LEGACY_NODELETE annotation to various functions in Source/WebCore based on the results of running reverse no-delete checker once more. No new tests since there should be no behavioral changes. * Source/WebCore/Modules/WebGPU/GPUExternalTextureBindingLayout.h: * Source/WebCore/Modules/mediasource/SampleMap.cpp: (WebCore::SamplePresentationTimeIsInsideRangeComparator::operator()): (WebCore::SamplePresentationTimeIsWithinRangeComparator::operator()): * Source/WebCore/Modules/mediasource/SampleMap.h: * Source/WebCore/Modules/mediasource/SourceBuffer.h: * Source/WebCore/Modules/model-element/HTMLModelElement.cpp: (WebCore::isSupportedModelType): * Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h: * Source/WebCore/Modules/webtransport/WebTransport.h: * Source/WebCore/dom/Element.h: * Source/WebCore/dom/MutationObserver.h: * Source/WebCore/dom/Node.cpp: (WebCore::isDocumentEligibleForFastAdoption): * Source/WebCore/dom/SimpleRange.cpp: (WebCore::commonInclusiveAncestor): * Source/WebCore/dom/SimpleRange.h: * Source/WebCore/editing/Editing.cpp: (WebCore::advanceInDirection): * Source/WebCore/editing/Editor.h: * Source/WebCore/editing/RenderedPosition.h: * Source/WebCore/editing/VisibleUnits.cpp: (WebCore::isTextOrLineBreakBox): * Source/WebCore/html/CanvasNoiseInjection.h: * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::compareCueIntervalEndTime): * Source/WebCore/html/NumberInputType.cpp: (WebCore::calculateRenderSize): * Source/WebCore/html/RangeInputType.cpp: (WebCore::ensureMaximum): * Source/WebCore/html/StepRange.h: * Source/WebCore/html/canvas/WebGLRenderingContextBase.h: * Source/WebCore/html/parser/HTMLDocumentParserFastPath.cpp: (WebCore::HTMLFastPathParser::TagInfo::B::create): (WebCore::HTMLFastPathParser::TagInfo::Footer::create): (WebCore::HTMLFastPathParser::TagInfo::I::create): (WebCore::HTMLFastPathParser::TagInfo::Strong::create): * Source/WebCore/html/track/TextTrackCueList.cpp: (WebCore::cueSortsBefore): * Source/WebCore/inspector/agents/InspectorCanvasAgent.h: * Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp: (WebCore::Layout::handleAfterSideMargin): * Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp: * Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.h: * Source/WebCore/layout/integration/inline/InlineIteratorBox.h: * Source/WebCore/layout/integration/inline/InlineIteratorInlineBox.h: * Source/WebCore/layout/integration/inline/InlineIteratorLineBox.h: * Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h: * Source/WebCore/page/LocalFrame.h: * Source/WebCore/page/LocalFrameView.h: * Source/WebCore/page/RuntimeQuirkTable.cpp: (WebCore::nonEmptyString): * Source/WebCore/page/scrolling/ScrollingTree.h: * Source/WebCore/page/scrolling/ScrollingTreeStickyNode.h: * Source/WebCore/platform/MIMETypeRegistry.h: * Source/WebCore/platform/ScrollableArea.h: * Source/WebCore/platform/VideoDecoder.h: * Source/WebCore/platform/animation/values/paths/AcceleratedEffectRayPath.h: * Source/WebCore/platform/graphics/BezierUtilities.cpp: * Source/WebCore/platform/graphics/BitmapImageSource.h: * Source/WebCore/platform/graphics/GeometryUtilities.h: * Source/WebCore/platform/graphics/GraphicsLayer.h: * Source/WebCore/platform/graphics/ImageBufferBackend.cpp: (WebCore::baseTransformForBackingStore): * Source/WebCore/platform/graphics/ImageBufferBackend.h: * Source/WebCore/platform/graphics/MediaSourcePrivate.h: * Source/WebCore/platform/graphics/PathSegmentData.cpp: (WebCore::extendRect): * Source/WebCore/platform/graphics/PathSegmentData.h: * Source/WebCore/platform/graphics/PlatformTimeRanges.h: * Source/WebCore/platform/graphics/avfoundation/AudioVideoRendererAVFObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/QueuedVideoOutput.h: * Source/WebCore/platform/graphics/avfoundation/objc/QueuedVideoOutput.mm: (WebCore::decltype): * Source/WebCore/platform/graphics/cocoa/AudioTrackPrivateWebM.h: * Source/WebCore/platform/graphics/cocoa/H264UtilitiesCocoa.mm: (WebCore::h264AnnexBSpsIsFollowedByPps): * Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.mm: (WebCore::hevcAnnexBVpsIsFollowedBySpsAndPps): * Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h: * Source/WebCore/platform/graphics/filters/Filter.h: * Source/WebCore/platform/graphics/filters/FilterEffect.h: * Source/WebCore/platform/graphics/filters/FilterImage.h: * Source/WebCore/platform/graphics/mac/controls/ControlMac.h: * Source/WebCore/platform/graphics/opentype/OpenTypeCPAL.h: * Source/WebCore/platform/graphics/transforms/TransformationMatrix.h: * Source/WebCore/platform/mediarecorder/MediaRecorderPrivate.h: * Source/WebCore/rendering/Grid.h: * Source/WebCore/rendering/GridLanesLayout.h: * Source/WebCore/rendering/GridLayoutFunctions.h: * Source/WebCore/rendering/GridTrackSizingAlgorithm.h: * Source/WebCore/rendering/RenderBlockFlow.h: * Source/WebCore/rendering/RenderFlexibleBox.h: * Source/WebCore/rendering/RenderFragmentContainer.h: * Source/WebCore/rendering/RenderGrid.cpp: (WebCore::clearGridItemOverridingSizesBeforeLayout): * Source/WebCore/rendering/RenderLayer.h: * Source/WebCore/rendering/RenderListItem.cpp: (WebCore::markerSearchBoxType): * Source/WebCore/rendering/RenderListItem.h: * Source/WebCore/rendering/RenderTableSection.h: * Source/WebCore/rendering/RenderView.h: * Source/WebCore/rendering/TextBoxPainter.cpp: (WebCore::decoratingBoxFragmentInlineSizes): * Source/WebCore/rendering/shapes/RasterLayoutShape.h: * Source/WebCore/rendering/svg/RenderSVGText.cpp: * Source/WebCore/rendering/svg/RenderSVGText.h: * Source/WebCore/rendering/svg/SVGRenderSupport.h: * Source/WebCore/rendering/svg/SVGTextChunkBuilder.h: * Source/WebCore/rendering/svg/SVGTextQuery.h: * Source/WebCore/rendering/updating/RenderTreeBuilder.cpp: (WebCore::getInlineRun): * Source/WebCore/style/StyleBuilderState.h: * Source/WebCore/style/values/backgrounds/StyleLineWidth.h: * Source/WebCore/style/values/color/StyleKeywordColor.h: * Source/WebCore/style/values/grid/StyleGridPosition.cpp: * Source/WebCore/style/values/grid/StyleGridPositionsResolver.cpp: (WebCore::Style::clampedImplicitLineForArea): * Source/WebCore/style/values/images/StyleGradient.cpp: (WebCore::Style::RadialGradientAdapter::maxExtent const): * Source/WebCore/style/values/outline/StyleOutlineOffset.h: * Source/WebCore/style/values/ui/StyleCaretColor.h: * Source/WebCore/svg/SVGFitToViewBox.h: * Source/WebCore/svg/SVGToOTFFontConversion.cpp: * Source/WebCore/workers/service/ServiceWorkerGlobalScope.h: Canonical link: https://commits.webkit.org/324102@main
…ess computes https://bugs.webkit.org/show_bug.cgi?id=327839 rdar://190232099 Reviewed by Matt Woodrow. Under site isolation, the UI process sends each frame's FrameTreeSyncData to every web process in the page from its own state: the document's security origin and security policy, whether it can create a payment session, and its URL's protocol. But the process that owns the frame could replace any of these for all other processes, through BroadcastFrameTreeSyncData for one property or BroadcastAllFrameTreeSyncData for all of them, and the UI process relayed them without checking. A compromised process could so make a frame look like a secure context, or like a frame that can create a payment session, to its children in other processes. BroadcastFrameTreeSyncData now only accepts the two properties web processes send, FrameDocumentIsSandboxedOrigin and FrameRect. BroadcastAllFrameTreeSyncData is removed. It mirrored the document sync data messages when it was added in 303298@main, but nothing has ever sent it. Test: ipc/broadcast-frame-tree-sync-data-ui-owned-properties.html Canonical link: https://commits.webkit.org/324103@main
https://bugs.webkit.org/show_bug.cgi?id=328124 rdar://190466337 Reviewed by Devin Rousso. This patch replaces dragonbox with zmij, which is state-of-the-art double-to-string conversion. We import zmij as-is, and wrap it for following edge cases in dtoa.cpp. 1. zero 2. subnormals 3. non-finite values 4. the magnitudes [2^-30, 2^-13) and [2^53, 2^70), where zmij picks a different notation or pads the exponent Test: Tools/TestWebKitAPI/Tests/WTF/ZmijTest.cpp * Source/JavaScriptCore/runtime/JSONObject.cpp: (JSC::bufferMode>::append): * Source/JavaScriptCore/runtime/NumberPrototype.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * Source/WTF/LICENSE-dragonbox.txt: Removed. * Source/WTF/LICENSE-zmij.txt: Added. * Source/WTF/WTF.xcodeproj/project.pbxproj: * Source/WTF/wtf/CMakeLists.txt: * Source/WTF/wtf/Zmij.cpp: Added. * Source/WTF/wtf/dragonbox/detail/bits.h: Removed. * Source/WTF/wtf/dragonbox/detail/cache_holder.h: Removed. * Source/WTF/wtf/dragonbox/detail/decimal_fp.h: Removed. * Source/WTF/wtf/dragonbox/detail/div.h: Removed. * Source/WTF/wtf/dragonbox/detail/log.h: Removed. * Source/WTF/wtf/dragonbox/detail/policy.h: Removed. * Source/WTF/wtf/dragonbox/detail/policy_holder.h: Removed. * Source/WTF/wtf/dragonbox/detail/util.h: Removed. * Source/WTF/wtf/dragonbox/detail/wuint.h: Removed. * Source/WTF/wtf/dragonbox/dragonbox.h: Removed. * Source/WTF/wtf/dragonbox/dragonbox_to_chars.cpp: Removed. * Source/WTF/wtf/dragonbox/dragonbox_to_chars.h: Removed. * Source/WTF/wtf/dragonbox/ieee754_format.h: Removed. * Source/WTF/wtf/dtoa.cpp: (WTF::eightDecimalDigits): (WTF::numberToStringAndSize): Deleted. (WTF::numberToStringWithTrailingPoint): Deleted. (WTF::truncateTrailingZeros): Deleted. (WTF::numberToFixedPrecisionString): Deleted. (WTF::numberToFixedWidthString): Deleted. (WTF::numberToCSSString): Deleted. * Source/WTF/wtf/dtoa.h: * Source/WTF/wtf/zmij/zmij.cc.h: Added. * Source/WTF/wtf/zmij/zmij.h: Added. * Tools/Scripts/webkitpy/style/checker.py: * Tools/TestWebKitAPI/CMakeLists.txt: * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/Tests/WTF/DragonBoxTest.cpp: Removed. * Tools/TestWebKitAPI/Tests/WTF/ZmijTest.cpp: Added. (TestWebKitAPI::zmijToString): (TestWebKitAPI::zmijToExponential): (TestWebKitAPI::doubleConversionToString): (TestWebKitAPI::doubleConversionToExponential): (TestWebKitAPI::checkDouble): (TestWebKitAPI::checkFloat): (TestWebKitAPI::TEST(WTF, ZmijSpecialValues)): (TestWebKitAPI::TEST(WTF, ZmijRandom)): (TestWebKitAPI::TEST(WTF, Zmij_perf)): Canonical link: https://commits.webkit.org/324317@main
…3bf11a71 # Conflicts: # Source/JavaScriptCore/SaferCPPExpectations/MemoryUnsafeCastCheckerExpectations # Source/JavaScriptCore/bytecode/CodeBlock.h # Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp # Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h # Source/JavaScriptCore/dfg/DFGClobberize.h # Source/JavaScriptCore/dfg/DFGFixupPhase.cpp # Source/JavaScriptCore/dfg/DFGNodeType.h # Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp # Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp # Source/JavaScriptCore/ftl/FTLCapabilities.cpp # Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp # Source/JavaScriptCore/heap/ConservativeRoots.cpp # Source/JavaScriptCore/heap/Heap.cpp # Source/JavaScriptCore/heap/MarkedBlock.cpp # Source/JavaScriptCore/parser/Nodes.h # Source/JavaScriptCore/runtime/JSObject.h # Source/WTF/wtf/URLParser.cpp # Source/WTF/wtf/URLParser.h # Source/WTF/wtf/posix/POSIXExtras.h # Source/WebCore/html/track/TrackOpaqueRoot.h
…has no std::atomic_ref 324276@main (89f9618) wrote the free functions of Atomics.h with std::atomic_ref. libc++ has it from LLVM 19 on; the Android NDK that the android lanes and Bun build against (r27c) ships an older one, and every file that includes Atomics.h failed there: Atomics.h:162:17: error: no member named 'atomic_ref' in namespace 'std' Where __cpp_lib_atomic_ref is not defined, the functions are what they were before that change.
|
Preview build of 35cf4b1: |
There was a problem hiding this comment.
Findings marked 🟡 are optional suggestions and need no follow-up push.
Additional findings (outside the current diff — GitHub can't attach inline comments there):
-
🔴
Source/WebCore/html/canvas/PlaceholderRenderingContext.cpp:140— Pages that read a displayed OffscreenCanvas placeholder once (toDataURL, toBlob, drawImage, createImageBitmap) now get an older frame or transparent black instead of the last drawn frame. Once the placeholder's layer has a delegate, LocalPlaceholderRenderingContextSource::setPlaceholderBuffer at PlaceholderRenderingContext.cpp:137 stops cloning the buffer, so surfaceBufferToImageBuffer only returns stale data and schedules a recommit for later; if the worker was terminated or the OffscreenCanvas is gone, the recommit never runs and reads stay stale forever. Fix: a synchronous read must return the frame currently shown on the layer, e.g. keep cloning until the first read completes, or fetch the frame from the delegate on demand, covering 2D, WebGL and WebGPU sources. [also at: Source/WebCore/html/canvas/PlaceholderRenderingContext.cpp:139 - Pages that read a worker-driven placeholder canvas once (toDataURL, toBlob, drawImage, texImage2D) now get an old frame or a blank image, not the latest frame.]Why this was flagged
A page transfers a canvas to a worker (or main-thread) OffscreenCanvas, lets it render while composited, then calls placeholder.toDataURL() or ctx.drawImage(placeholder) once, as a 'save image' button would. Reads go through CanvasBase::makeRenderingResultsAvailable at CanvasBase.cpp:88 into PlaceholderRenderingContext::surfaceBufferToImageBuffer at PlaceholderRenderingContext.cpp:327, which only calls requestFrameBuffersIfStale and then returns the old m_buffer, or createTransparentBlackImageBuffer when no buffer ever arrived. On the base branch every commit cloned the buffer (the code now under the needsFrameBuffers check at PlaceholderRenderingContext.cpp:137-140 ran unconditionally), so the read returned the last committed frame. The recommit path depends on the OffscreenCanvas's event loop: OffscreenCanvas.cpp:178-183 posts to the original context identifier, so after worker.terminate() or once the OffscreenCanvas is collected the task is dropped and no buffer ever reaches the placeholder. The new test works around it by polling up to 120 frames (offscreen-canvas-worker-placeholder-readback.html:29-46), which real pages do not do.
Verification: PlaceholderRenderingContext.cpp:73-77 needsFrameBuffers() returns !m_delegate || m_frameBuffersRequested, so once the layer has a delegate setPlaceholderBuffer (lines 137-140) never clones the buffer. The synchronous read then returns m_buffer or createTransparentBlackImageBuffer() (line 330-333). If the worker was terminated, ScriptExecutionContext::postTaskTo (ScriptExecutionContext.cpp:838-849) drops the task.
-
🟣
Source/WebCore/page/cocoa/ContentChangeObserver.cpp:703— pre-existing: on iOS, a tap after a tap handled as hover can still be misclassified; only one stale per-tap set is cleared. The hover path at WebPageCocoa.mm:3333 returns without stopContentObservation(). ContentChangeObserver.cpp:703 clears m_visibilityCandidateList but leaves m_initialElementVisibility and m_elementsWithDestroyedVisibleRenderer from the previous tap. An element hidden during tap 1 is ignored when tap 2 reveals it (ContentChangeObserver.cpp:519, :839), so tap 2 becomes a click instead of a hover. Fix: reset every per-tap set in resetToStartObserving, or call stopContentObservation on the hover path, so the next tap starts clean.Why this was flagged
Tap 1 lands on a hidden element T (opacity 0) whose touchstart handler shows T and hides an open menu M with display:none. During touchstart ContentChangeObserver is observing, so rendererWillBeDestroyed adds M to m_elementsWithDestroyedVisibleRenderer (ContentChangeObserver.cpp:496) and elementDidBecomeHidden records M as initially Visible (:531). WebPage::handleSyntheticClick sees targetNodeWentFromHiddenToVisible and calls didHandleTapAsHover and returns (WebPageCocoa.mm:3333-3336) without stopContentObservation(), so reset() (:452-473) never runs. Tap 2 lands on a button whose touchstart shows M again. StartedTouchStartEventDispatching runs resetToStartObserving (:701-713), which now clears the candidate list but not the two other sets. StyleChangeScope for M then skips observation because visibleRendererWasDestroyed(M) is true (:839, :848), and even without that elementDidBecomeVisible would ignore M because its recorded initial state is Visible (:519-522). On the base branch the stale candidate T made tap 2 a hover; after this change the remaining stale sets make it a click, so the stale-state root cause is only partly fixed.
Verification: WebPageCocoa.mm:3333-3336 returns before the stopContentObservation() at :3365. resetToStartObserving (ContentChangeObserver.cpp:701-713) now clears m_visibilityCandidateList (:703) but not m_initialElementVisibility or m_elementsWithDestroyedVisibleRenderer. When tap 2 reveals M, visibleRendererWasDestroyed(M) (:839) blocks tracking and :519 returns the stale Visible entry, so tap 2 completes as a click.
|
On the review's two findings outside the diff ( Both files are upstream WebCore, identical to WebKit/WebKit at Generated by Claude Code |
…he SourceProviderCache 323815@main (c5f66f3) reserves a register for each private name a function uses, and counts the names among the scope's used variables only when the parser has seen a private name (m_seenPrivateNameUse). An inner function whose body is skipped through the SourceProviderCache hands its used variables to the scope without the parser seeing anything, so the flag, and with it the number of registers reserved, depended on whether that body was parsed or skipped: a function that uses no private name itself but contains one that does got registers with --useSourceProviderCache=0 and none without. The bytecode cache's output has to be a function of the source alone. Bun's test/bundler/bundler_bytecode_portable.test.ts ("encoder output does not depend on the encoding process") failed on the difference. A skipped body now sets the flag when one of its used variables is a private name, as parsing it would have.
…ASSERT 324232@main (cc50ab1) turned the ASSERT in crashIfBorrowed() into a RELEASE_ASSERT. On Darwin a RELEASE_ASSERT hands __FILE__ and __PRETTY_FUNCTION__ to the crash, and this one sits in a template that is inlined into every mutation of every Vector: bin/jsc of the macOS arm64 LTO lane got 814 strings of the form "void WTF::VectorBufferBase<T, Malloc>::crashIfBorrowed() const [T = ...]" (166 KB of __cstring) and 773 KB of __text, and Bun's macOS binaries grew by 1.3 MB, against 0.3 to 0.4 MB on the other platforms. The check stays in release builds. When it fails it calls WTF::crashDueToBorrowedVector(), which is out of line and the same for every instantiation. Builds with assertions keep the RELEASE_ASSERT.
…d3fedb Two fixes on the WebKit side since 5ac1583e: the count of private names a function uses no longer depends on the SourceProviderCache (the bytecode cache's output differed with --useSourceProviderCache=0), and Vector::crashIfBorrowed() shares one out-of-line crash instead of a RELEASE_ASSERT per instantiation (1.3 MB of the macOS binaries).
There was a problem hiding this comment.
Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.
Beyond the inline finding, I also checked the new ARM64 tryEmitXorOrChainBranch lowering in Source/JavaScriptCore/b3/B3LowerToAir.cpp (around line 3021) for a comparison that is both a branch condition and used elsewhere being consumed without lowering — the Branch case only reaches it under canBeInternal(m_value->child(0)), and tryAppendXorOrChainCompare checks canBeInternal on the inner values, so a multi-use comparison falls back to the generic path.
Extended reasoning...
The diff is a very large sync of upstream changes (about 6500 files) rather than a focused change; the one confirmed finding is a pre-existing stale is8Bit issue in FTLLowerDFGToB3.cpp, and the one new concrete candidate in B3LowerToAir.cpp was ruled out by the canBeInternal guards at the call site and inside the chain matcher.
|
The This is an intermittent failure that the fork already has, not something this branch introduces. I ran the exact command from
Every failing run takes the full 50 s and ends the same way on all three: the traces that are left are either empty or only show I have not root-caused the flake itself and am not changing or skipping the test in this PR. Re-running the failed job once. Generated by Claude Code |
There was a problem hiding this comment.
Additional findings (outside the current diff — GitHub can't attach inline comments there):
-
🔴
Source/WebCore/html/track/TrackBase.cpp:106— Pages that reach a track through HTMLTrackElement.track can lose that TextTrack's JS listeners and expandos after a GC, which the base branch kept alive. TrackBase::opaqueRoot at TrackBase.cpp:101-106 now returns the HTMLMediaElement pointer (HTMLMediaElement.cpp:666), and that pointer is only added as an opaque root by JSHTMLMediaElementCustom.cpp:37 when the media element's own wrapper is marked. The base returned the element's shadow-including root (the Document), which is always marked while the page lives. Fix: make the root reachable whenever the media element is in a live document, e.g. have TrackOpaqueRoot hold the element's tree root and update it on insertion, removal and didMoveToNewDocument.Why this was flagged
A page with <video><track src=...></video> runs document.querySelector('track').track.addEventListener('cuechange', fn) without ever touching the <video> element from script. TextTrack.idl:35 uses GenerateIsReachable, so JSTextTrack survives only while containsWebCoreOpaqueRoot(visitor, root(&wrapped())) is true, and root(TrackBase*) at TrackBase.h:151 returns TrackBase::opaqueRoot(). After TextTrackList::append calls setTrackList (TextTrackList.cpp:216, TrackBase.cpp:120-124) that root is HTMLMediaElement::m_trackOpaqueRoot's WebCoreOpaqueRoot { this } (HTMLMediaElement.cpp:666). Only JSHTMLMediaElement::visitAdditionalChildrenInGCThread (JSHTMLMediaElementCustom.cpp:37) and the GenerateAddOpaqueRoot wrappers of TextTrackList/TextTrack add that pointer, and none of those wrappers exist here, so the next GC collects the JSTextTrack wrapper; cuechange stops firing. On the base branch TrackListBase::opaqueRoot called the observer returning weakThis->opaqueRoot(), i.e. Node::opaqueRoot() at Node.h:314 (the Document), which every live node wrapper marks, so the TextTrack wrapper stayed alive.
Verification: Source/WebCore/html/HTMLMediaElement.cpp:666 m_trackOpaqueRoot(TrackOpaqueRoot::create(WebCoreOpaqueRoot { this })): the shared root is now the raw HTMLMediaElement pointer. The only addWebCoreOpaqueRoot call site that adds that pointer is the new Source/WebCore/bindings/js/JSHTMLMediaElementCustom.cpp:37, which runs only when a JSHTMLMediaElement wrapper exists and is marked.
-
🔴
Source/WebCore/page/RuntimeQuirkTable.cpp:616— PlayStation users lose every site-specific quirk after this merge, because the quirk table now comes only from QuirkTable.json and that port cannot read it. loadQuirkTable at RuntimeQuirkTable.cpp:609-616 returns an empty table when loadQuirkTableJSON() is null, and QuirkTablePlayStation.cpp:32-37 always returns null. The base resolved quirks from the compiled SiteSpecificQuirks::table on every port. Fix: when the JSON cannot be loaded, fall back to the compiled table (WTF::map(compiledQuirks(), RuntimeQuirk::from)) instead of an empty table, so ports without a runtime resource still get the shipped quirks; the FIXME(327589) notes the gap but the consequence is a silent loss of all quirks, not a missing feature.Why this was flagged
On PlayStation, WebProcessPool.cpp:1108 fills parameters.quirkTable from quirkTable(), which calls QuirkTableHolder::table() -> loadQuirkTable() at RuntimeQuirkTable.cpp:609. loadQuirkTableJSON() at Source/WebCore/page/playstation/QuirkTablePlayStation.cpp:32-37 is notImplemented() and returns a null String, so loadQuirkTable logs "QuirkTable.json could not be loaded; no site-specific quirks will apply" and returns an empty RuntimeQuirkTable; WebProcess.cpp:804 installs that empty table. resolveSiteSpecificQuirks at QuirkTable.cpp:1265-1273 now iterates quirkTable().quirks, so no quirk ever applies. On the base branch the same function iterated compiledQuirkTable(), built from SiteSpecificQuirks::table via RuntimeQuirk::from, which is still compiled in (QuirkTable.cpp:1252 and compiledQuirks() at :1286) but is no longer consulted. Every behavior in QuirkTable.json (user-agent overrides, script injection, form-control focus quirks, etc.) stops working on that port, with only a release log as a hint.
Verification: Triggering condition: any PlayStation build.
loadQuirkTable()(RuntimeQuirkTable.cpp:609-622) on null JSON returns{ }.loadQuirkTableJSON()for PlayStation (QuirkTablePlayStation.cpp:32-37) is always null. There is no fallback tocompiledQuirks(). Many compiled rows have no.isAvailablerestriction, so on the base they applied on PlayStation and after this merge they do not.
|
On the two findings of the review of Generated by Claude Code |
main moved WEBKIT_VERSION to d0b16ad0 (oven-sh/WebKit#851). That commit is merged into oven-sh/WebKit#860 as bc7aebee, so the pin is that head's preview build.
main moved WEBKIT_VERSION to 7d0c8a7d (oven-sh/WebKit#861 and #865). Those are merged into oven-sh/WebKit#860 as 35cf4b1e, so the pin is that head's preview build.
There was a problem hiding this comment.
Additional findings (outside the current diff — GitHub can't attach inline comments there):
-
🔴
Source/WebCore/dom/Document.cpp:10627— Pages without a body element (SVG, XML, XHTML before body) now get null from document.activeElement where the base branch returned the document element. Document::activeElement at Document.cpp:10627 returns bodyOrFrameset() and drops the documentElement() fallback, so when no element is focused and there is no body the result is null. The HTML spec step 6 returns the document element in that case, and the diff turns the WPT svg/struct/scripted/autofocus-attribute.svg third case from PASS to FAIL with "TypeError: null is not an object (evaluating 'w.document.activeElement.tagName')". Fix: keep returning documentElement() when bodyOrFrameset() is null so every document with a root element reports a non-null activeElement.Why this was flagged
A script reads document.activeElement in a document that has no body element and no focused element, for example the SVG window opened by LayoutTests/imported/w3c/web-platform-tests/svg/struct/scripted/autofocus-attribute.svg:39-52. Document::activeElement at Source/WebCore/dom/Document.cpp:10624-10627 returns treeScope().focusedElementInScope() if set, otherwise bodyOrFrameset(), which is null for an SVG root; the base branch fell back to documentElement() here. The caller now gets null and the test's w.document.activeElement.tagName throws; the diff records this at LayoutTests/imported/w3c/web-platform-tests/svg/struct/scripted/autofocus-attribute-expected.txt:4 as a new FAIL where the base had PASS. The test comment cites https://html.spec.whatwg.org/C/#dom-documentorshadowroot-activeelement step 6, which returns the document element when there is no body, so no other safeguard restores the old value.
Verification: HEAD Source/WebCore/dom/Document.cpp:10624-10628 returns bodyOrFrameset() when no element is focused, which is null for an SVG root. The base commit 7d0c8a7 fell back to documentElement(), matching HTML spec step 6. The diff rebaselines LayoutTests/imported/w3c/web-platform-tests/svg/struct/scripted/autofocus-attribute-expected.txt from PASS to a null-dereference TypeError FAIL.
|
On the finding of the review of Generated by Claude Code |
oven-sh/WebKit#860 is merged: WEBKIT_VERSION is its merge commit, 5e3554fa, in place of the preview build. That commit contains d6375c72, which main moved its pin to in the meantime.
### What does this PR do? Upgrades WebKit to upstream [`33ce3bf11a71`](WebKit/WebKit@33ce3bf) (2026-10-20), through oven-sh/WebKit#860: 520 upstream commits since `23b0720b409a`, 89 of them in JavaScriptCore, WTF or bmalloc. `WEBKIT_VERSION` is `5e3554face1338d738543540a82f23e3163045f5`, the merge commit of oven-sh/WebKit#860 on the fork's `main`. It also contains what the fork's `main` had gained by then, up to `d6375c72`, which is what `main` pinned when this was last merged. `JSType.h` did not change (so `src/jsc/JSType.rs` stays as it is), and Bun uses none of the JSC/WTF APIs that upstream removed or renamed in this range. Besides the version, four things change in Bun: - **`scripts/verify-baseline-static/allowlist-aarch64.txt`**: three more outline-atomics helpers, `__aarch64_ldclr4_rel`, `__aarch64_ldeor4_acq` and `__aarch64_ldset4_acq`. Upstream's `BlockDirectory` bits are atomic now ([`847b1d1f5e`](WebKit/WebKit@847b1d1f5e)), and these are the compiler-rt helpers the compiler calls for them; like the 56 already listed they check for LSE at run time. - **`src/jsc/bindings/bindings.cpp`, `Bun.gc()`**: `JSC__VM__runGC` clears the dead stack below it between `deleteAllUnlinkedCodeBlocks()` and the collection. This is a mitigation with fixed sizes, not an exact fix; see "Why `Bun.gc()` changes" below. - **`test/js/bun/jsc/webkit-upgrade-33ce3bf11a.test.ts`** (new): pins the engine changes listed below, like the files for the earlier syncs. - **`test/bundler/bundler_bytecode_portable.test.ts`**: the snapshot. The serialized bytecode changed on every platform; the values are the ones CI reported, identical on all nine Linux and Windows shards. Behaviour that changes with the engine: - A module with `var x; import {y as x}` or `var x; export let x` is a SyntaxError now ([`f88678d334`](WebKit/WebKit@f88678d334)). - A static private method reached before the class is initialized throws TypeError, not ReferenceError ([`5d5248a69a`](WebKit/WebKit@5d5248a69a)). - `includes`, `indexOf` and `lastIndexOf` of a `BigInt64Array` or `BigUint64Array` no longer wrap a BigInt that is out of range ([`de4efbb4d3`](WebKit/WebKit@de4efbb4d3)). - A callable `Proxy` with no `apply` trap is called straight through to its target once the call is linked ([`b40ec02b7c`](WebKit/WebKit@b40ec02b7c)), so the native proxy frame is in a stack trace taken on the first call and not on later ones. - Shortest number-to-string goes through zmij instead of dragonbox ([`33ce3bf11a`](WebKit/WebKit@33ce3bf11a)). What the fork needed is in oven-sh/WebKit#860. For the merge: the fork's GC code adapted to upstream's new locking of `BlockDirectory` bits, two `Heap` accessors made public after upstream dropped `friend class CodeBlock`, and a fallback in `wtf/Atomics.h` for standard libraries without `std::atomic_ref` (the Android NDK's). Found by this pull request's CI and fixed there: - The bytecode of a function that uses private names depended on whether an inner function's body was skipped through the SourceProviderCache, so `bun build --bytecode` was not a function of its input ("encoder output does not depend on the encoding process" failed with `--useSourceProviderCache=0`). - `Vector::crashIfBorrowed()` became a `RELEASE_ASSERT` upstream, which cost the macOS binaries 1.3 MB (814 copies of `__PRETTY_FUNCTION__` and the code that passes them). In the fork it is one shared out-of-line crash; the binary-size check passes with it (darwin-aarch64 +211 KB, darwin-x64 +333 KB, linux-x64 +260 KB). ### Why `Bun.gc()` changes On the x64 ASAN build, `node-sqlite.test.ts` › "a write statement that iterate() stopped after its first row is finished by the next call on the connection after it's collected" failed on every run with the new WebKit: the `StatementSyncIterator` survived `Bun.gc(true)`. Nothing references it. What kept it alive is one word of the collector's own stack, and `JSC__VM__runGC` is what puts it there: 1. `JSC__VM__runGC` calls `vm.heap.deleteAllUnlinkedCodeBlocks()` before it collects. That iterates the heap, so it stops the allocators (`MarkedSpace::willStartIterating()` → `stopAllocating()` → `didFinishUsingBlock()` → `BlockDirectory::releaseAndNoteIfStealable()`, new in [`847b1d1f5e`](WebKit/WebKit@847b1d1f5e)). `MarkedBlock::Handle::stopAllocating()` walks the allocator's free list and ends with its sentinel in a callee-saved register: the address of the first cell of the list's last interval, plus one (`FreeCell::makeLast()`). That cell is the first one allocated from the interval, here the iterator. The prologue of `releaseAndNoteIfStealable()` pushes that register. 2. It then calls `collectNow()`. The frames from there down to where the collector calls `sanitizeStackForVM()` are built over that part of the stack, and `Heap::waitForCollection()`'s frame does not write the slot the word is in. 3. The conservative scan covers that frame, aligns the word down to the cell and marks it. `sanitizeStackForVM()` cannot help: the word is above the stack pointer by then, inside a live frame. With the previous WebKit the same test passes on the same ASAN configuration. Only the ASAN build failed in CI; which slot is left unwritten depends on frame sizes, so nothing makes the other builds immune. The fix zeroes 2 KB of stack below `JSC__VM__runGC` (16 KB in ASAN and debug builds, whose frames are larger) after `deleteAllUnlinkedCodeBlocks()` returns and before the collection starts, in a `NEVER_INLINE` function that returns before `collectNow()` is called. Only the dead stack between `JSC__VM__runGC` and the point where the collector captures the stack (`callWithCurrentThreadState()`) can matter, since nothing below that is scanned. Measured with gdb on CI's x64 builds, that point is 0.6 KB below `JSC__VM__runGC` in the release build and 1.8 KB in the ASAN build. The regression test is the one that failed: it fails on every run on x64 ASAN without the change and passes with it. A conservative scan honours a pointer into the middle of a cell by design (`ConservativeRoots::genericAddPointer()`, "We could point into the middle of an object"), so the scan itself is not what to change. <details> <summary>The debugger session (CI's x64 ASAN build of <code>d65db1e4</code>, gdb with Python breakpoints)</summary> The iterator of the failing test is the cell `0x7bffaadf4160`. In the `Bun.gc(true)` of that test, when `ConservativeRoots::add()` is called for the main thread's stack (`0x7fffffff1da0..0x7fffffffbfd8`), that span holds the cell's address in exactly one word: ``` word @0x7fffffff1fa0 = 0x7bffaadf4161 frame #18 sp=0x7fffffff1fa0 (size 416, offset 0 from sp) JSC::Heap::waitForCollection(unsigned long) + 545 #0 JSC::ConservativeRoots::add(void*, void*, JSC::JITStubRoutineSet&, JSC::CodeBlockSet&) #1 JSC::MachineThreads::gatherFromConductor(...) #2 JSC::MachineThreads::gatherConservativeRoots(...) #3 JSC::Heap::gatherStackRoots(JSC::ConservativeRoots&) ... #12 JSC::Collector::runFixpointPhase(JSC::GCConductor) #13 JSC::Collector::runCurrentPhase(JSC::GCConductor, JSC::CurrentThreadState*) #15 JSC::callWithCurrentThreadState(...) #16 JSC::Collector::collectInMutatorThread(JSC::Heap&) #17 JSC::Heap::collectInMutatorThread() #18 JSC::Heap::waitForCollection(unsigned long) sp=0x7fffffff1fa0 #19 JSC::Heap::collect(JSC::Synchronousness, JSC::GCRequest) #20 JSC::Heap::collectSync(JSC::GCRequest) #21 JSC::Heap::collectNow(JSC::Synchronousness, JSC::GCRequest) #22 JSC__VM__runGC sp=0x7fffffff2380 #23 Bun__Bindgen__BunObject__gc ``` A hardware watchpoint on `0x7fffffff1fa0`: the last write before the scan is in the prologue of `BlockDirectory::releaseAndNoteIfStealable()`, called from the same `JSC__VM__runGC`: ``` WRITE val=0x7bffaadf4161 pc=JSC::BlockDirectory::releaseAndNoteIfStealable(unsigned int) + 12 #0 sp=0x7fffffff1fa0 JSC::BlockDirectory::releaseAndNoteIfStealable(unsigned int) + 12 #1 sp=0x7fffffff1fd0 JSC::BlockDirectory::didFinishUsingBlock(WTF::AbstractLocker&, JSC::MarkedBlock::Handle*) + 177 #2 sp=0x7fffffff2010 JSC::BlockDirectory::didFinishUsingBlock(JSC::MarkedBlock::Handle*) + 63 #3 sp=0x7fffffff2040 JSC::MarkedBlock::Handle::stopAllocating(JSC::FreeList const&, JSC::MarkedBlock::Handle::StopAllocatingMode) + 2143 #4 sp=0x7fffffff20e0 JSC::LocalAllocator::stopAllocating(JSC::MarkedBlock::Handle::StopAllocatingMode) + 103 #5 sp=0x7fffffff2120 JSC::BlockDirectory::stopAllocating() + 78 #6 sp=0x7fffffff2150 JSC::MarkedSpace::willStartIterating() + 88 #7 sp=0x7fffffff2180 JSC::Heap::deleteAllUnlinkedCodeBlocks(JSC::DeleteAllCodeEffort, WTF::OptionSet<JSC::UnlinkedCodeToDelete>) + 586 #8 sp=0x7fffffff2380 JSC__VM__runGC + 351 #9 sp=0x7fffffff24c0 Bun__Bindgen__BunObject__gc + 88 ``` - With that one word zeroed before the scan, and nothing else changed, the iterator is collected and the test passes. - With the 4 KB below `JSC__VM__runGC`'s frame zeroed when `deleteAllUnlinkedCodeBlocks()` returns (what the fix does), the file passes, 145 tests. **The heap snapshot `CLAUDE.md` asks for next to the debugger session could not be taken with the cell retained**, and this is why: - `generateHeapSnapshotForDebugging()` called right after the failing `Bun.gc(true)` returns a snapshot with no `StatementSyncIterator` instance in it (only the prototype), and the test then passes: the snapshot's own collection, from a stack without the word, frees the iterator. - Routing the snapshot's collection through `JSC__VM__runGC` under gdb (at `Heap::collectNow()` called from `HeapSnapshotBuilder::buildSnapshot()`, set `pc` to `JSC__VM__runGC`) reproduces the mechanism, with the same function writing the same slot, but not the cell: `HeapProfiler::setActiveHeapAnalyzer()` first calls `materializeLazySymbolTablesForHeapAnalysis()`, which iterates the heap, and resuming the allocators after that rebuilds the free list. Its sentinel is then the first *free* cell (`0x7bffaadf4191`, the cell after the iterator), which is not live, and the iterator is collected. So a snapshot perturbs the two things the retention depends on. What stands in for "no incoming edge and no root" is the single-word experiment above: with that one stack word zeroed and nothing else changed, the same collection frees the cell, which no reference from the heap or from a root would allow. </details> ### How did you verify your code works? **Bun was not built locally**: the machine this was prepared on could not get the pinned LLVM. It was built and tested by this pull request's CI, and the failures were reproduced and the fixes checked locally with the binaries CI built. - CI build 129843 (`5df48324`, everything but the snapshot update): all 13 targets build; binary-size and verify-baseline pass; on the nine Linux and Windows test shards the only failure is the bytecode snapshot, with the same 25 new values on each, which the last commit updates. The macOS shards had not finished. - `node-sqlite.test.ts` with CI's x64 ASAN binaries: fails on every run at `d65db1e4`, passes (145 tests, three runs) at `5df48324`. It passes on the x64 ASAN shard of build 129843. - `bundler_bytecode_portable.test.ts` with CI's x64 ASAN binary of `5df48324`: everything passes except the snapshot, and regenerating the snapshot locally gives the values CI reported (except for `libraries.js`, whose input differs on this machine; CI's value is used). - oven-sh/WebKit#860: all 47 lanes build at `35cf4b1e` and its preview release has the same 47 tarballs as the release `main` pins; at `bc7aebee`, one merge of the fork's `main` earlier, all 45 lanes built and `run-javascriptcore-tests` passed on both tested lanes. At `70d3fedb`, the head before the fork's `main` was merged in: `run-javascriptcore-tests` passes on arm64; on x64 one test, `stress/sampling-profiler-line-column.js.ftl-eager`, failed once. It fails at the same rate (8 of 1,600 runs) with the WebKit Bun pins today, so it is not from this upgrade; details are in that pull request. - `test/js/bun/jsc/webkit-upgrade-33ce3bf11a.test.ts` with CI's x64 ASAN binary of this branch: 5 pass. With Bun 1.4.2 (the previous engine) the three cases that pin a difference fail and the two that pin what stayed the same pass. - CI build 129865 (`01e90fd0`): 179 jobs passed, none failed, macOS arm64 tests included; the two macOS x64 test shards had not been picked up by an agent when the next push replaced the build. - `main` has been merged in twice since, each time because it moved `WEBKIT_VERSION` to a newer commit of the fork (`d0b16ad0`, then `7d0c8a7d`), which was merged into oven-sh/WebKit#860 first; the only conflict each time was the `WEBKIT_VERSION` line. With the first merge (`fd7ca509`, CI build 129962) 179 jobs passed, the macOS arm64 tests included, and the bytecode snapshot did not change; the two macOS x64 test shards expired in the queue three times without an agent picking them up, as in every earlier build of this branch. With the second merge (`09f25a63`, CI build 130114) **every job passed**, 181 of 181, the macOS x64 test shards included (they ran on the fourth attempt, after three more expiries in the queue). - oven-sh/WebKit#860 is merged, as a merge commit. The release `autobuild-5e3554face…` of that commit has all 47 tarballs, and the fork's CI run for it passed, tests included. The pin was moved from the preview build to it in `ac4acefa`; up to then every build here used a preview build of the pull request's head. In that commit's CI build (130477) 179 jobs passed, the macOS arm64 tests included, and the two macOS x64 test shards expired in the queue four times and never ran. `main` was merged in again (`22841132`, no conflicts) to get a new build (130790), which ended the same way: 179 jobs passed, and the two macOS x64 test shards expired in the queue three times and never ran. With the next merge of `main` (`dab57aca`, CI build 131098) **every job passed** on the merged pin, 181 of 181, the macOS x64 test shards included, on their first attempt; the bytecode snapshot did not change. - `test/internal/source-lints/webkit-prebuilt-url.test.ts` passes. ## Upstream WebKit changes Range: [`23b0720b409a`](WebKit/WebKit@23b0720) (2026-10-14) .. [`33ce3bf11a71`](WebKit/WebKit@33ce3bf) (2026-10-20). **89** of the 520 upstream commits touch `Source/JavaScriptCore`, `Source/WTF` or `Source/bmalloc`; of those, 21 are annotation-only, bot-expectation or WebCore-feature commits that only touch a preferences/protocol/SPI file under those directories. ### Highlights - **dtoa: dragonbox replaced by zmij** ([`33ce3bf11a`](WebKit/WebKit@33ce3bf11a)). `wtf/dragonbox/` is deleted; `wtf/Zmij.cpp` + `wtf/zmij/` are added, and `wtf/dtoa.h` gains `numberToShortestString` / `numberToShortestExponentialString`. `JSON.stringify` fast path and `Number.prototype.toExponential()` (no argument) now go through these. Build-system change for WTF (see "Things to check"). - **GC: `BlockDirectory` bits are now guarded by a shared/exclusive `MutateGrowLock`** ([`847b1d1f5e`](WebKit/WebKit@847b1d1f5e)), with relaxed-atomic per-bit accessors, an `inUse` bit used as a per-block lock, a new `WTF::VersionedField` for the cursors, and a separate lock in `IsoCellSet`. Groundwork for concurrent sweeping / multi-mutator global GC; upstream states no behaviour change. - **GC: conservative scan no longer marks the previous cell in non-butterfly blocks** ([`68b19b2888`](WebKit/WebKit@68b19b2888)). Fixes a false-positive retention where a stale stack pointer to a dead `JSCell` kept its neighbour alive. - **`%TypedArray%.prototype.set` is a DFG/FTL intrinsic** ([`a1e5cdc19b`](WebKit/WebKit@a1e5cdc19b), [`7a76e975a3`](WebKit/WebKit@7a76e975a3), [`29c41f19e7`](WebKit/WebKit@29c41f19e7), [`f0f45f1604`](WebKit/WebKit@f0f45f1604)): 3.2x-4x on upstream microbenchmarks, further 1.3x in FTL via B3 `MemoryMove`. - **Spread of typed arrays** (`[...ta]`, `f(...ta)`) has a fast path in all tiers ([`d158e058d1`](WebKit/WebKit@d158e058d1)): 12x on the upstream microbenchmark. - **`String#split(/\r?\n/)`** takes the vectorized newline path ([`6eff649c33`](WebKit/WebKit@6eff649c33)): 1.8x. - **Callable `Proxy` without an `apply` trap** is called directly through the call IC ([`b40ec02b7c`](WebKit/WebKit@b40ec02b7c)). - **Named-property puts on arrays** (e.g. `array.tag = v`, the dart2js pattern) reallocate the butterfly in JIT code instead of calling into C++ ([`fa3737d9c1`](WebKit/WebKit@fa3737d9c1)). - **LLInt/Baseline**: `op_to_this` fast path for non-final objects ([`3cc4f8be50`](WebKit/WebKit@3cc4f8be50)); LLInt no longer re-enters the tier-up slow path on every execution while a Baseline compile is pending ([`ad96437625`](WebKit/WebKit@ad96437625)); `create_this` fast path handles poly-proto ([`2b7b986157`](WebKit/WebKit@2b7b986157)). - **FTL string work**: inline `str === "constant"` for constants up to 16 chars, 8-bit and 16-bit ([`8bd3c1b6e0`](WebKit/WebKit@8bd3c1b6e0), [`456aadb99c`](WebKit/WebKit@456aadb99c)); word-at-a-time ASCII prefix skip in `localeCompare` ([`14211b3b5c`](WebKit/WebKit@14211b3b5c)) and SIMD prefix skip in the `Intl.Collator` ASCII fast path ([`7b2dc739ee`](WebKit/WebKit@7b2dc739ee)). - **Correctness fixes with observable behaviour**: module `var x; import {y as x}` / `var x; export let x` is now a SyntaxError ([`f88678d334`](WebKit/WebKit@f88678d334)); private class brand installed before class elements are evaluated ([`5d5248a69a`](WebKit/WebKit@5d5248a69a)); `array.push()` with non-writable `length` throws in DFG/FTL ([`7febf0a4de`](WebKit/WebKit@7febf0a4de)); BigInt typed array search no longer wraps out-of-range BigInts ([`de4efbb4d3`](WebKit/WebKit@de4efbb4d3)). - **Wasm**: BBQ/OMG atomic load/store sequences on x86_64 now match IPInt ([`e1bfd55294`](WebKit/WebKit@e1bfd55294)); `any.convert_extern` accepts subtypes of `externref` ([`8ec01439a3`](WebKit/WebKit@8ec01439a3)). - **B3/Air miscompile fixes** (four): [`fad9c3932f`](WebKit/WebKit@fad9c3932f), [`858b529cba`](WebKit/WebKit@858b529cba), [`df5a49f70d`](WebKit/WebKit@df5a49f70d), [`a1b4772be7`](WebKit/WebKit@a1b4772be7) (the last one is x86-64 only). - **WTF**: `Vector` "borrowed" check is now a `RELEASE_ASSERT` ([`cc50ab1fce`](WebKit/WebKit@cc50ab1fce)); `Atomics.h` free functions are implemented with `std::atomic_ref` ([`89f96182aa`](WebKit/WebKit@89f96182aa)). ### Runtime & builtins - [`de4efbb4d3`](WebKit/WebKit@de4efbb4d3) ([328083](https://bugs.webkit.org/show_bug.cgi?id=328083)) — `toNativeFromValueWithoutCoercion` for BigInt64/BigUint64 checks the BigInt is in range instead of truncating; adds `JSBigInt::tryToBigInt64` / `tryToBigUInt64`. Affects `indexOf`/`includes`-style searches on BigInt typed arrays. - [`b40ec02b7c`](WebKit/WebKit@b40ec02b7c) ([328101](https://bugs.webkit.org/show_bug.cgi?id=328101)) — `ProxyObject` caches the `apply` trap offset like the other traps; when there is none, call linking forwards straight to the target. `m_isCallable`/`m_isConstructible` bitfields replaced by type-info flags; `numberOfCachedHandlerTrapsOffsets` 5 -> 6. - [`9f224feda2`](WebKit/WebKit@9f224feda2) ([327933](https://bugs.webkit.org/show_bug.cgi?id=327933)) — Avoid atomic `String` ref/deref in the `RegExp` constructor, `padStart`/`padEnd` and `replace`/`replaceAll` (1.1x-1.25x on microbenchmarks). - [`7b2dc739ee`](WebKit/WebKit@7b2dc739ee) ([327979](https://bugs.webkit.org/show_bug.cgi?id=327979)) — `Intl.Collator` ASCII fast path: single pass, SIMD skip of identical printable-ASCII prefix (up to 2x on long-common-prefix compares). - [`d158e058d1`](WebKit/WebKit@d158e058d1) ([327804](https://bugs.webkit.org/show_bug.cgi?id=327804)) — `trySpreadFast` handles typed arrays when iteration is unobservable and the array is not detached/out of bounds (`JSCellButterfly::createFromTypedArray`). - [`6eff649c33`](WebKit/WebKit@6eff649c33) ([327627](https://bugs.webkit.org/show_bug.cgi?id=327627)) — New `Yarr::SpecificPattern::OptionalCRThenLF` for `/\r?\n/`; shares the fast split path with `/\r\n?|\n/`. Only taken when the subject is not split-cacheable. - [`a3c8dbf35b`](WebKit/WebKit@a3c8dbf35b) ([324343](https://bugs.webkit.org/show_bug.cgi?id=324343)) — `preCapacity(Structure*)` / `indexingPayloadSizeInBytes(Structure*)` move from `IndexingHeader` to `Butterfly` so no header pointer is formed for header-less butterflies (GCC >= 13 speculatively read through it; crashed on 32-bit ARM with bmalloc). `IndexingHeaderInlines.h` removed. - [`996f6599b5`](WebKit/WebKit@996f6599b5) ([327972](https://bugs.webkit.org/show_bug.cgi?id=327972)) — Inspector: `JSJavaScriptCallFrame` reports zero-based `Debugger.Location` for scope locations. ### Parser / bytecode generator - [`825e9634ee`](WebKit/WebKit@825e9634ee) ([328184](https://bugs.webkit.org/show_bug.cgi?id=328184)) — Array literals consisting only of holes (`[,,]`, emitted by minifiers for `new Array(2)`) compile to `new_array_with_size` (1.65x). - [`f88678d334`](WebKit/WebKit@f88678d334) ([327927](https://bugs.webkit.org/show_bug.cgi?id=327927)) — Import/export declarations are parsed at statement depth 1, so a lexical name that redeclares a `var` in module code is an early SyntaxError (previously accepted; asserted in debug). - [`5d5248a69a`](WebKit/WebKit@5d5248a69a) ([327984](https://bugs.webkit.org/show_bug.cgi?id=327984)) — Private static brand is stored right after the constructor is created. Fixes a DFG/FTL crash for `#m in o` closures created in computed keys. Accessing a static private method at that point now throws TypeError instead of ReferenceError. - [`c5f66f3853`](WebKit/WebKit@c5f66f3853) ([326801](https://bugs.webkit.org/show_bug.cgi?id=326801)) — Private name symbols are loaded once per straight-line region and kept in up to 16 reserved registers instead of `resolve_scope`+`get_from_scope` per access. ### LLInt / Baseline / tiering - [`3cc4f8be50`](WebKit/WebKit@3cc4f8be50) ([327644](https://bugs.webkit.org/show_bug.cgi?id=327644)) — `op_to_this` fast paths for (1) any cell with the cached structure and (2) conflicted status with a non-`JSScope` object. Touches `LowLevelInterpreter64.asm` and `JITOpcodes.cpp`. - [`ad96437625`](WebKit/WebKit@ad96437625) ([327603](https://bugs.webkit.org/show_bug.cgi?id=327603)) — LLInt resets its execute counter after enqueueing a Baseline compile; `BaselineJITPlan::notifyReady()` re-arms it when the code is ready. `CodeBlock::checkIfJITThresholdReached()` moved out of line. - [`2b7b986157`](WebKit/WebKit@2b7b986157) ([328035](https://bugs.webkit.org/show_bug.cgi?id=328035)) — `create_this` fast path allocates poly-proto objects in Baseline, LOL, DFG and FTL. - [`98571bec55`](WebKit/WebKit@98571bec55) ([328041](https://bugs.webkit.org/show_bug.cgi?id=328041)) — Double `x % c` for power-of-two `c >= 1` is computed inline in Baseline and DFG (was FTL-only); new `powerOfTwoDivisorForDoubleMod` in `MathCommon.h`. ### DFG / FTL - [`a1e5cdc19b`](WebKit/WebKit@a1e5cdc19b) ([326994](https://bugs.webkit.org/show_bug.cgi?id=326994)) — New `TypedArraySet` node and `TypedArraySetIntrinsic` for same-type, non-resizable, non-detached sources. - [`7a76e975a3`](WebKit/WebKit@7a76e975a3) ([327802](https://bugs.webkit.org/show_bug.cgi?id=327802)) — Source array check of `TypedArraySet` extracted into a `CheckArray` node (hoistable). - [`29c41f19e7`](WebKit/WebKit@29c41f19e7) ([327809](https://bugs.webkit.org/show_bug.cgi?id=327809)) — FTL lowers `TypedArraySet` to B3 `BulkMemoryValue` `MemoryMove`. - [`f0f45f1604`](WebKit/WebKit@f0f45f1604) (no bug id in subject) — `TypedArraySet` intrinsic is not re-selected after an `Uncountable` exit (avoids a recompile loop). - [`fa3737d9c1`](WebKit/WebKit@fa3737d9c1) ([327336](https://bugs.webkit.org/show_bug.cgi?id=327336)) — Out-of-line property storage growth for Undecided/Int32/Double/Contiguous arrays is done in IC stubs, DFG and FTL without a C++ call; adds `Structure::canAllocatePropertyStorageInJIT()`. - [`8bd3c1b6e0`](WebKit/WebKit@8bd3c1b6e0) ([327641](https://bugs.webkit.org/show_bug.cgi?id=327641)) — FTL inlines `string === "constant"` (8-bit constant, length <= 16); ARM64 B3 lowering turns the xor/or chain into `cmp`/`ccmp`. - [`456aadb99c`](WebKit/WebKit@456aadb99c) ([327996](https://bugs.webkit.org/show_bug.cgi?id=327996)) — Same fast path extended to 16-bit inputs and constants. - [`14211b3b5c`](WebKit/WebKit@14211b3b5c) ([328034](https://bugs.webkit.org/show_bug.cgi?id=328034)) — FTL `StringLocaleCompare` compares 8 then 4 bytes at a time while all-ASCII. - [`e120f362fb`](WebKit/WebKit@e120f362fb) ([327759](https://bugs.webkit.org/show_bug.cgi?id=327759)) — FTL direct calls always record `maxArgumentCountIncludingThis`, so calls passing enough arguments link to the non-arity-check entrypoint. - [`290ba2619a`](WebKit/WebKit@290ba2619a) ([327815](https://bugs.webkit.org/show_bug.cgi?id=327815)) — Backwards propagation: `Branch` does not need negative zero from its operand (fixes repeated exits for `if (!(x % 1))`, the Ajv `integer` check). - [`e7acf9bf3a`](WebKit/WebKit@e7acf9bf3a) ([327661](https://bugs.webkit.org/show_bug.cgi?id=327661)) — Iterator-open fast paths pass a `JSTypeRange` to `IsCellWithType`; a bare `JSType` was read back as an empty range and caused an OSR exit on every Map/Set `for-of` at polymorphic sites. `OpInfo(JSType)` is now deleted. - [`7febf0a4de`](WebKit/WebKit@7febf0a4de) ([328086](https://bugs.webkit.org/show_bug.cgi?id=328086)) — `array.push()` with zero arguments is only folded to `GetArrayLength` for Int32/Double/Contiguous arrays, so the TypeError for non-writable `length` is kept. - [`e6f2e2c201`](WebKit/WebKit@e6f2e2c201) ([328022](https://bugs.webkit.org/show_bug.cgi?id=328022)) — Strength reduction of constant string concat/replace uses `OverflowPolicy::RecordOverflow` instead of crashing the compiler thread on overlong results. - [`cd506b1d33`](WebKit/WebKit@cd506b1d33) ([328024](https://bugs.webkit.org/show_bug.cgi?id=328024)) — Object allocation sinking escapes allocations with a worklist instead of recursion (stack overflow on deeply nested literals). - [`89dcb36841`](WebKit/WebKit@89dcb36841) ([328245](https://bugs.webkit.org/show_bug.cgi?id=328245)), [`8e8cccb14c`](WebKit/WebKit@8e8cccb14c) ([328249](https://bugs.webkit.org/show_bug.cgi?id=328249)) — Compile-time: skip object allocation sinking when there are no candidate nodes; skip the second `PutStackSinking` when `ArgumentsElimination` changed nothing. - [`2eb82b333f`](WebKit/WebKit@2eb82b333f) ([327584](https://bugs.webkit.org/show_bug.cgi?id=327584)) + [`e0cffadd30`](WebKit/WebKit@e0cffadd30) ([328258](https://bugs.webkit.org/show_bug.cgi?id=328258)) — "Truncate int32 multiplications by narrow integer typed array loads" landed and was reverted within the range (possible MotionMark regression). Net zero. ### B3 / Air - [`fad9c3932f`](WebKit/WebKit@fad9c3932f) ([328171](https://bugs.webkit.org/show_bug.cgi?id=328171)) — `LowerToAir` xor-and-rotate match requires a logical right shift and masks shift amounts (constant shift amounts above `int8_t` range were mis-read). - [`858b529cba`](WebKit/WebKit@858b529cba) ([328172](https://bugs.webkit.org/show_bug.cgi?id=328172)) — `ReduceStrength` checks the zip lane size before turning vector shift-of-zip into an extend. - [`df5a49f70d`](WebKit/WebKit@df5a49f70d) ([328174](https://bugs.webkit.org/show_bug.cgi?id=328174)) — `ReduceStrength` no longer folds `Trunc(SShr(Shl(SExt32(x), c), c))` to `x` for negative `c`. - [`a1b4772be7`](WebKit/WebKit@a1b4772be7) ([327768](https://bugs.webkit.org/show_bug.cgi?id=327768)) — Six-operand `MoveConditionallyTest64` declares its test operands as 64-bit; on x86-64 the allocator could narrow a feeding `Move` to `Move32` and `Select` picked the wrong arm. - [`3ad5047803`](WebKit/WebKit@3ad5047803) ([327659](https://bugs.webkit.org/show_bug.cgi?id=327659)) — B3 opcode `MemoryCopy` renamed to `MemoryMove`; `BulkMemoryValue` gains an `isGCSafe` flag (word-wise copy); `operationWasmArrayCopyRefs` removed. - [`a54d5f756c`](WebKit/WebKit@a54d5f756c) ([327633](https://bugs.webkit.org/show_bug.cgi?id=327633)) — `foldPathConstants` treats a boolean branch condition as constant 1 on the taken edge (collapses `a === 1 || a === 2 || ...` phi chains). - [`5d6638408f`](WebKit/WebKit@5d6638408f) ([327547](https://bugs.webkit.org/show_bug.cgi?id=327547)) — `FixSSA` tracks reaching defs along a dominator-tree pre-order walk instead of repeated `reachingDefAtHead` queries; adds `Dominators::forAllBlocksInDominatorTreePreOrder` to WTF, also used by `ReduceStrength` and DFG `PutStackSinking`. ### Wasm - [`e1bfd55294`](WebKit/WebKit@e1bfd55294) ([327931](https://bugs.webkit.org/show_bug.cgi?id=327931)) — BBQ and OMG compile seq-cst atomic stores as `xchg` and atomic loads as a plain load (x86_64) / `ldar` (ARM64), same as IPInt. Before, the tiers disagreed on x86_64 and a load in one tier could be reordered before a store in another. - [`8ec01439a3`](WebKit/WebKit@8ec01439a3) ([328169](https://bugs.webkit.org/show_bug.cgi?id=328169)) — `any.convert_extern` validation accepts any subtype of `externref` (e.g. `ref null noextern`). ### GC / Heap - [`847b1d1f5e`](WebKit/WebKit@847b1d1f5e) ([325474](https://bugs.webkit.org/show_bug.cgi?id=325474)) — `BlockDirectory::m_bitvectorLock` becomes a `MutateGrowLock` (wrapper over `WTF::ReadWriteLock`); per-bit accessors are relaxed atomics; `claimInUse`/`releaseInUse` with a Clang thread-safety `BlockOwnership` capability; cursors become `VersionedField`; `IsoCellSet` gets its own lock; `BlockDirectory::sweep()` renamed `sweepAll()`. - [`68b19b2888`](WebKit/WebKit@68b19b2888) ([328098](https://bugs.webkit.org/show_bug.cgi?id=328098)) — `ConservativeRoots::genericAddPointer` checks `mayHaveIndexingHeader(cellKind)` before marking the previous cell in the same block. - [`9d236ecf92`](WebKit/WebKit@9d236ecf92) ([327777](https://bugs.webkit.org/show_bug.cgi?id=327777)) — Heaps that join global collections late adopt the other heaps' marking version (`MarkedSpace::adoptMarkingVersion`). Upstream states no change for local collections. - [`4f97164ba5`](WebKit/WebKit@4f97164ba5) ([328127](https://bugs.webkit.org/show_bug.cgi?id=328127)) — Drops 14 `friend` declarations from `Heap`; `jitStubRoutines()` replaced by `addGCAwareJITStubRoutine()`; adds `noteStringFoundOnStack()`. ### WTF - [`33ce3bf11a`](WebKit/WebKit@33ce3bf11a) ([328124](https://bugs.webkit.org/show_bug.cgi?id=328124)) — Replace dragonbox with zmij (MIT / Boost licensed, `LICENSE-zmij.txt`). `dtoa.cpp` wraps it for zero, subnormals, non-finite values and the magnitude ranges where zmij's notation differs from `Number::toString`. - [`89f96182aa`](WebKit/WebKit@89f96182aa) (rdar only) — `atomicLoad`/`atomicStore`/`atomicExchange*`/`atomicCompareExchange*` free functions use `std::atomic_ref` instead of casting to `Atomic<T>*`. `memcpyAtomic` in `AssemblerCommon.h` now asserts/checks destination alignment. - [`cc50ab1fce`](WebKit/WebKit@cc50ab1fce) ([327898](https://bugs.webkit.org/show_bug.cgi?id=327898)) — `Vector` `crashIfBorrowed` is enforced with `RELEASE_ASSERT` in release builds (was `ASSERT`). - [`554a3bd6fb`](WebKit/WebKit@554a3bd6fb) ([304022](https://bugs.webkit.org/show_bug.cgi?id=304022)) — `WeakPtr` constructors/deduction guides use `requires` clauses; `WeakPtr<T> p = 0` is now ambiguous (use `nullptr`). - [`0083ac448c`](WebKit/WebKit@0083ac448c) ([304025](https://bugs.webkit.org/show_bug.cgi?id=304025)) — `std::derived_from` / `std::same_as` / `std::is_final_v` in static asserts and `TypeCasts.h` helpers. - [`1ace22c8b2`](WebKit/WebKit@1ace22c8b2) ([327673](https://bugs.webkit.org/show_bug.cgi?id=327673)) — `downcast<>`/`dynamicDowncast<>`/`uncheckedDowncast<>` overloads for `std::unique_ptr` and `UniqueRef` lvalues. - [`2b5d8a2c1c`](WebKit/WebKit@2b5d8a2c1c) ([327826](https://bugs.webkit.org/show_bug.cgi?id=327826)) — `LockAlgorithm::unlockSlow` no longer assumes a one-byte `LockType`; `LockType` constrained to `std::integral`. - [`0af6a2c4c2`](WebKit/WebKit@0af6a2c4c2) ([327810](https://bugs.webkit.org/show_bug.cgi?id=327810)) — Safer C++ fixes across WTF headers: `JSON::ArrayOf::castedArray()` removed, `WTF::addressOfArgument()` added, `Variant.h` uses `std::forward`/`std::invoke_result_t`, `CompactPointerTuple::setType` no longer decodes the pointer. - [`87e378eb19`](WebKit/WebKit@87e378eb19) ([327728](https://bugs.webkit.org/show_bug.cgi?id=327728)) — `[[likely]]`/`[[unlikely]]` moved before the brace where Clang was ignoring them (`MarkedVector::at`, `TZoneHeapInlines.h`). - [`75bd0aeec2`](WebKit/WebKit@75bd0aeec2) ([327849](https://bugs.webkit.org/show_bug.cgi?id=327849)) — `posixShmOpen`/`posixShmUnlink` not defined on Android. - [`deeedf4bcc`](WebKit/WebKit@deeedf4bcc) ([327943](https://bugs.webkit.org/show_bug.cgi?id=327943)) — New Darwin-only header `wtf/darwin/WebKitReasonCode.h`. ### bmalloc / libpas - [`9c59cec326`](WebKit/WebKit@9c59cec326) ([328091](https://bugs.webkit.org/show_bug.cgi?id=328091)) — `pas_page_sharing_participant` can specialize the scavenger epoch delta per participant kind. Mechanism only; upstream says no offsets are set yet. - [`01ad7b234c`](WebKit/WebKit@01ad7b234c) ([327757](https://bugs.webkit.org/show_bug.cgi?id=327757)) — `pas_mte.c` guarded by `LIBPAS_ENABLED` (32-bit GCC build fix). - [`b8affbe2f5`](WebKit/WebKit@b8affbe2f5) ([328133](https://bugs.webkit.org/show_bug.cgi?id=328133)) — Remove unused `pas_compact_atomic_bitfit_global_size_class_ptr.h` (also removed from `Source/bmalloc/CMakeLists.txt`). ### Build, feature flags, tooling - [`4d44245d61`](WebKit/WebKit@4d44245d61) ([328255](https://bugs.webkit.org/show_bug.cgi?id=328255)) — New `ENABLE(LIB_JSC_TOOLS)` in `PlatformEnable.h` (macOS / Apple internal SDK only) guarding `corpse/` and `mya/`. - [`0da18ae060`](WebKit/WebKit@0da18ae060) ([325962](https://bugs.webkit.org/show_bug.cgi?id=325962)), [`675aae044d`](WebKit/WebKit@675aae044d) ([328262](https://bugs.webkit.org/show_bug.cgi?id=328262)), [`69028f045a`](WebKit/WebKit@69028f045a) ([327878](https://bugs.webkit.org/show_bug.cgi?id=327878)) — Apple-internal JIT cage: `ENABLE_JIT_CAGE_RELAXATION` 0 -> 1 on iOS; `JSC_FORCE_USE_JIT_CAGE` / `JSC_ALLOW_JIT_CAGE_SPECIFIC_RESERVATION` removed; stale `JSGlobalObjectAdditions.h` reference removed. - [`577d6b79b2`](WebKit/WebKit@577d6b79b2) ([327279](https://bugs.webkit.org/show_bug.cgi?id=327279)) — `ENABLE_PROOF_OF_POSSESSION` renamed `ENABLE_PHONE_NUMBER_POSSESSION` (`PlatformEnable.h`, `WebKitFeatures.cmake`). - [`87c02de7bb`](WebKit/WebKit@87c02de7bb) ([328110](https://bugs.webkit.org/show_bug.cgi?id=328110)) — `HAVE(NW_PROXY_CONFIG)` removed. - [`9c6d90a96b`](WebKit/WebKit@9c6d90a96b) ([327420](https://bugs.webkit.org/show_bug.cgi?id=327420)) — `GLIB_VERSION_MAX_ALLOWED` 2.70 -> 2.74 in `Platform.h` (GLib ports only). - Safer C++ / `NODELETE` annotations and bot expectation updates, no behaviour change (8): [`16a7f29cda`](WebKit/WebKit@16a7f29cda), [`7b54846607`](WebKit/WebKit@7b54846607), [`cf30450ee4`](WebKit/WebKit@cf30450ee4), [`034130058a`](WebKit/WebKit@034130058a) (also removes `SUPPRESS_UNCOUNTED_LAMBDA_CAPTURE_IN_FUNCTION_TEMPLATE` from `Compiler.h`), [`ac6b35cf02`](WebKit/WebKit@ac6b35cf02), [`78d767ce3a`](WebKit/WebKit@78d767ce3a), [`450812ba4a`](WebKit/WebKit@450812ba4a), [`6e15083a99`](WebKit/WebKit@6e15083a99). - WebCore/WebKit feature commits that only touch `UnifiedWebPreferences.yaml`, `inspector/protocol/DOM.json` or a Cocoa SPI header under these directories (13): [`2b4cd37f9d`](WebKit/WebKit@2b4cd37f9d), [`7d12474f8d`](WebKit/WebKit@7d12474f8d), [`9da0fa42de`](WebKit/WebKit@9da0fa42de), [`5132841233`](WebKit/WebKit@5132841233), [`62122313c3`](WebKit/WebKit@62122313c3), [`e6b7551c57`](WebKit/WebKit@e6b7551c57), [`9826f001de`](WebKit/WebKit@9826f001de), [`a635980e57`](WebKit/WebKit@a635980e57), [`dc64f9a144`](WebKit/WebKit@dc64f9a144), [`797f26ec84`](WebKit/WebKit@797f26ec84), [`3c91014a71`](WebKit/WebKit@3c91014a71), [`78ae5427c4`](WebKit/WebKit@78ae5427c4), [`33bdc3c5ad`](WebKit/WebKit@33bdc3c5ad). ### Things to check for Bun **1. `Source/JavaScriptCore/runtime/JSType.h`** — unchanged. `git diff 23b0720b409a upstream/main -- Source/JavaScriptCore/runtime/JSType.h` is empty and no commit in the range touches the file. No enum entries added, removed or reordered. **2. WebCore bindings code generator** — changed by one commit, [`57cf50c95c`](WebKit/WebKit@57cf50c95c) ([327654](https://bugs.webkit.org/show_bug.cgi?id=327654), Safer C++ warnings in WebCore/bindings). `CodeGeneratorJS.pm` +10/-7, 26 files of `test/JS/` reference output updated. Three changes in generated code shape, none structural: - Generated headers: `wrapped()` on interfaces with a parent gains a comment and a `SUPPRESS_MEMORY_UNSAFE_CAST` prefix on the `static_cast`: ```cpp // JSTestNode wrappers always wrap TestNode objects. SUPPRESS_MEMORY_UNSAFE_CAST return static_cast<TestNode&>(Base::wrapped()); ``` - Callback implementations: the constructor initializer is now `TestCallbackFunction(protect(globalObject->scriptExecutionContext()))` (was `globalObject->scriptExecutionContext()`). - Operations taking an `EventListener` argument: the write barrier is now `vm.writeBarrier(castedThis, argumentN.value());` (was `vm.writeBarrier(&static_cast<JSObject&>(*castedThis), ...)`); for the `EventTarget` interface itself the generator emits `&castedThis->wrapper()` as the owner. `GenerateWriteBarriersForArguments` takes an extra `$interface` parameter. **3. JSC / WTF API renamed, removed or changed** (a grep of Bun's `src/`, `scripts/` and `cmake/` for the old names below found no uses): | Old | New | Commit | | --- | --- | --- | | `<wtf/dragonbox/dragonbox_to_chars.h>`, `WTF::dragonbox::*` (`to_chars_n`, `ToExponential`, `max_string_length`) | removed; use `WTF::numberToShortestString(double, std::span<char, numberToShortestStringBufferSize>)` (returns length; buffer size constant is 34) and `WTF::numberToShortestExponentialString(double, NumberToStringBuffer&)` from `<wtf/dtoa.h>` | [`33ce3bf11a`](WebKit/WebKit@33ce3bf11a) | | `<JavaScriptCore/IndexingHeaderInlines.h>` | header removed (no longer included by `JSObject.h`) | [`a3c8dbf35b`](WebKit/WebKit@a3c8dbf35b) | | `IndexingHeader::preCapacity(Structure*)`, `IndexingHeader::indexingPayloadSizeInBytes(Structure*)` | `Butterfly::preCapacity(Structure*)`, `Butterfly::indexingPayloadSizeInBytes(Structure*)` | [`a3c8dbf35b`](WebKit/WebKit@a3c8dbf35b) | | `Heap::jitStubRoutines()` | removed; `Heap::addGCAwareJITStubRoutine(GCAwareJITStubRoutine*)` | [`4f97164ba5`](WebKit/WebKit@4f97164ba5) | | `Heap` friends: `JIT`, `DFG::SpeculativeJIT`, `CodeBlock`, `ConservativeRoots`, `GCAwareJITStubRoutine`, `GCLogging`, `GCThread`, `HeapUtil`, `HeapVerifier`, `JITStubRoutine`, `LLIntOffsetsExtractor`, `BlockDirectory`, `MarkedBlock`, `IncrementalSweeper` | no longer friends | [`4f97164ba5`](WebKit/WebKit@4f97164ba5) | | `BlockDirectory::sweep()` | `BlockDirectory::sweepAll()` | [`847b1d1f5e`](WebKit/WebKit@847b1d1f5e) | | `Lock& BlockDirectory::bitvectorLock()` | `MutateGrowLock& BlockDirectory::bitvectorLock()` (lock with `.mutate()` shared / `.grow()` exclusive views) | [`847b1d1f5e`](WebKit/WebKit@847b1d1f5e) | | `BlockDirectory::assertSweeperIsSuspended()`, `releaseAssertAcquiredBitVectorLock()`, `noteBlockMayBeStealable()` | removed; `assertWorldIsStopped()`, `assertInUse()`, `claimInUse()`/`claimInUseOrCrash()`/`releaseInUse()`, `releaseAndNoteIfStealable()` | [`847b1d1f5e`](WebKit/WebKit@847b1d1f5e) | | `FOR_EACH_BLOCK_DIRECTORY_BIT(macro)` with `macro(lower, Capital)` | `macro(lower, Capital, ownership)` (3 arguments) | [`847b1d1f5e`](WebKit/WebKit@847b1d1f5e) | | `MarkedBlock::Handle::setIsDestructible(bool)` | `MarkedBlock::Handle::noteNeedsDestruction()` | [`847b1d1f5e`](WebKit/WebKit@847b1d1f5e) | | inline `CodeBlock::checkIfJITThresholdReached()` | out-of-line (same signature) | [`ad96437625`](WebKit/WebKit@ad96437625) | | `ProxyObject::numberOfCachedHandlerTrapsOffsets == 5` | `6` (`HandlerTrap::Apply` added; object layout changes, `m_isCallable`/`m_isConstructible` removed) | [`b40ec02b7c`](WebKit/WebKit@b40ec02b7c) | | B3 opcode `MemoryCopy` | `MemoryMove`; `BulkMemoryValue` ctor gains `bool isGCSafe = false` | [`3ad5047803`](WebKit/WebKit@3ad5047803) | | `operationWasmArrayCopyRefs` | removed | [`3ad5047803`](WebKit/WebKit@3ad5047803) | | `DFG::OpInfo(JSType)` | `= delete` (pass a `JSTypeRange`) | [`e7acf9bf3a`](WebKit/WebKit@e7acf9bf3a) | | `JSON::ArrayOf<T>::castedArray()` | removed | [`0af6a2c4c2`](WebKit/WebKit@0af6a2c4c2) | | `WeakPtr(const T*)` etc. as constrained templates | non-template with `requires`; initializing a `WeakPtr` from literal `0` is ambiguous | [`554a3bd6fb`](WebKit/WebKit@554a3bd6fb) | | `SUPPRESS_UNCOUNTED_LAMBDA_CAPTURE_IN_FUNCTION_TEMPLATE` (`Compiler.h`) | removed | [`034130058a`](WebKit/WebKit@034130058a) | | `Vector` borrowed check: `ASSERT(!m_isBorrowed)` | `RELEASE_ASSERT(!m_isBorrowed)` | [`cc50ab1fce`](WebKit/WebKit@cc50ab1fce) | Additions only (no action needed unless mirrored): `Heap::assertIsMutatorOrMutatorIsStopped()`, `Heap::noteStringFoundOnStack()`, `MarkedSpace::adoptMarkingVersion()`, `JSBigInt::tryToBigInt64/tryToBigUInt64`, `JSCellButterfly::createFromTypedArray`, `Structure::canAllocatePropertyStorageInJIT()`, `TypedArraySetIntrinsic` (inserted in `Intrinsic.h` after `TypedArrayEntriesIntrinsic`, shifting later intrinsic values), `Yarr::SpecificPattern::OptionalCRThenLF`, `FastBitReference::concurrentGet/concurrentSet/concurrentTestAndSet/concurrentTestAndClear`, `WTF::VersionedField`, `WTF::addressOfArgument`, `WTF::DominatorTreeChildOrder`. `Atomics.h` free functions now require `std::atomic_ref` from the standard library. **4. CMake options, feature flags, new sources, third-party code** - New third-party code: **zmij** replaces **dragonbox** in WTF ([`33ce3bf11a`](WebKit/WebKit@33ce3bf11a)). - `Source/WTF/wtf/CMakeLists.txt`: `Zmij.cpp` added to `WTF_SOURCES`; `dragonbox/dragonbox_to_chars.cpp` removed from `WTF_SOURCES`; the 12 `dragonbox/*.h` entries removed from `WTF_PUBLIC_HEADERS`. `zmij/zmij.h` and `zmij/zmij.cc.h` are not public headers; they are included only from `dtoa.cpp` and `Zmij.cpp`. - `LICENSE-dragonbox.txt` removed, `LICENSE-zmij.txt` (MIT) added. - `Zmij.cpp` sets `ZMIJ_USE_SIMD 0` unless `CPU(ARM64) || CPU(X86_64)`. Inside zmij the SSE4.1 path is selected at compile time by `__SSE4_1__` / `__AVX__` and the NEON path by `__ARM_NEON` / `_M_ARM64`, so codegen depends on the target flags WTF is compiled with. - Other WTF/JSC/bmalloc source list changes a CMake build must pick up: - `Source/WTF/wtf/CMakeLists.txt`: `VersionedField.h` added to `WTF_PUBLIC_HEADERS` ([`847b1d1f5e`](WebKit/WebKit@847b1d1f5e)); `darwin/WebKitReasonCode.h` added in the `APPLE` branch and in `PlatformCocoa.cmake` ([`deeedf4bcc`](WebKit/WebKit@deeedf4bcc)). - `Source/JavaScriptCore/CMakeLists.txt`: `runtime/IndexingHeaderInlines.h` removed from `JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS` ([`a3c8dbf35b`](WebKit/WebKit@a3c8dbf35b)). No JSC source files were added in the range; `Sources.txt` is unchanged. - `Source/bmalloc/CMakeLists.txt`: `pas_compact_atomic_bitfit_global_size_class_ptr.h` removed ([`b8affbe2f5`](WebKit/WebKit@b8affbe2f5)). - Feature flags (`PlatformEnable.h` / `PlatformHave.h` / `Platform.h`; `PlatformUse.h` unchanged): - added `ENABLE_LIB_JSC_TOOLS` (defined only for `(OS(MACOS) || USE(APPLE_INTERNAL_SDK)) && !MACCATALYST && !IOS_FAMILY_SIMULATOR`); - `ENABLE_JIT_CAGE_RELAXATION` 0 -> 1 in the non-Mac `HAVE(JIT_CAGE_RELAXATION)` branch (Apple internal SDK, ARM64E only); - `ENABLE_PROOF_OF_POSSESSION` -> `ENABLE_PHONE_NUMBER_POSSESSION` (also the `WEBKIT_OPTION_DEFINE` / `WEBKIT_OPTION_DEPEND` in `Source/cmake/WebKitFeatures.cmake`); - `HAVE_NW_PROXY_CONFIG` removed; - `GLIB_VERSION_MAX_ALLOWED` `GLIB_VERSION_2_70` -> `GLIB_VERSION_2_74` (and `OptionsWPE.cmake` requires GLib 2.74). - No changes to `runtime/OptionsList.h` (no new or removed JSC runtime options) and none to `BytecodeList.rb`. - `Source/cmake` / top-level changes outside JSC/WTF/bmalloc (from the other 431 commits): - `Source/CMakeLists.txt`: `add_subdirectory(WebGPU)` is now unconditional (was under `if (ENABLE_WEBGPU)`); with WebGPU disabled, `Source/WebGPU/CMakeLists.txt` only copies `WebGPUCpp.h` to `${WebGPU_PRIVATE_HEADERS_DIR}` ([`b6ab04a3c6`](WebKit/WebKit@b6ab04a3c6)). May affect a build that drives `Source/CMakeLists.txt` with a trimmed tree. - `WebKitMacros.cmake`: `WEBKIT_COMPUTE_SOURCES` unsets `_sourceListFileTruePaths` on entry and honours a new optional `${_framework}_UNIFIED_SOURCE_BUNDLE_PREFIX` (passed as `--bundle-filename-prefix`). - `WebKitFS.cmake`: for `PORT STREQUAL "Cocoa"` only, `bmalloc_/WTF_/PAL_FRAMEWORK_HEADERS_DIR` now point at `${CMAKE_BINARY_DIR}/usr/local/include`; other ports unchanged. - Remaining `Source/cmake` edits are Cocoa signing/entitlements (`WebKitEntitlements.cmake`, `OptionsCocoa.cmake`) and Swift flags (`WebKitSwiftFlags.cmake`). --- _Generated by [Claude Code](https://claude.ai/code)_ --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
Merges upstream WebKit
33ce3bf11a71(2026-10-20): 520 commits since23b0720b40(#814), 89 of them in Source/JavaScriptCore, Source/WTF or Source/bmalloc.Please land this as a merge commit, not a squash. The merge records upstream/main as a parent, which is how the next upgrade finds its base.
JSType.h,BytecodeList.rb,OptionsList.h,.github/and the Dockerfiles are untouched by the merge.The commits:
The merge. What was done about the conflicts, and about the places that merged cleanly but no longer fit, is below.
[WTF] Atomics.h: keep the Atomic<T> casts where the standard library has no std::atomic_ref.89f96182aawrote the free functions ofAtomics.hwithstd::atomic_ref, which libc++ has from LLVM 19 on. The Android NDK the android lanes (and Bun) build against, r27c, ships an older one, and all six android lanes failed in WTF. Where__cpp_lib_atomic_refis not defined, the functions are what they were before that commit. The other way is a newer NDK, here and in Bun.[JSC] The count of private names a function uses does not depend on the SourceProviderCache.c5f66f3853reserves a register for each private name a function uses, and counts them only when the parser has seen a private name. An inner function whose body is skipped through the SourceProviderCache hands over its used variables without the parser seeing anything, so a function that uses no private name itself but contains one that does got registers with--useSourceProviderCache=0and none without. The bytecode cache's output has to be a function of the source alone, and Bun'stest/bundler/bundler_bytecode_portable.test.ts("encoder output does not depend on the encoding process") failed on it. A skipped body now sets the flag when one of its used variables is a private name.[WTF] Vector::crashIfBorrowed(): one shared crash instead of RELEASE_ASSERT.cc50ab1fcemade the check aRELEASE_ASSERT. On Darwin that hands__FILE__and__PRETTY_FUNCTION__to the crash, in a template inlined into every mutation of every Vector, and Bun's macOS binaries grew by 1.3 MB (0.3 to 0.4 MB elsewhere). The check stays in release builds; when it fails it calls one out-of-lineWTF::crashDueToBorrowedVector().bin/jscof the macOS arm64 LTO lane, againstmain's:__text__cstringRELEASE_ASSERT(5ac1583e)70d3fedb)A decision for the maintainers: it makes
Vector.hdiffer from upstream's by a few lines. The other way is to take the growth.A merge of
mainatd0b16ad0([JSC] The control flow profiler has basic blocks for what is skipped and for what is after a yield or an await #851, the control flow profiler's basic blocks), which landed after this branch was cut and which Bun'smainnow requires. No conflicts. It changes the signatures ofemitOptionalCheck(),pushOptionalChainTarget()andemitShortCircuitAssignment(); every call site in the merged tree was checked to pass the new arguments, upstream's new code in this range included. Atbc7aebeeall 45 lanes build andrun-javascriptcore-testspasses on the Linux x64 and arm64 LTO lanes; the other results below are for70d3fedb.A second merge of
main, at7d0c8a7d([JSC] Keep expression info sorted when a peephole replaces a wider instruction #861, expression info stays sorted when a peephole replaces an instruction; CI: two Linux x64 lanes with the stack protector, _FORTIFY_SOURCE, stack clash protection and zeroed locals #865, two hardened Linux x64 lanes), which Bun'smainpins now. No conflicts. At this head (35cf4b1e) all 47 lanes build andrun-javascriptcore-testspasses on the three tested lanes (Linux x64 LTO, x64 LTO hardened, arm64 LTO).What needs a careful look
847b1d1f5e). A block's inUse bit is a per-block lock, and only its holder may write the block's other bits. The fork's code was adapted in two places:Heap.cpp, the evacuation of auxiliary blocks: it used to takebitvectorLock()and flip a candidate's CanAllocate bit. It now goes through a new staticexchangeCanAllocate(), which takesbitvectorLock().mutate(), claims the block's inUse bit, reads and writes CanAllocate, and releases inUse. A block somebody else holds is left alone (and reported as "could not allocate", so it is not restored later either).MarkedBlock::Handle::decommitUnusedPages():releaseAssertAcquiredBitVectorLock()is gone upstream; the call is dropped, and the read of the MarkingRetired bit stays underassertIsMutatorOrMutatorIsStopped(). Insweep(), upstream's locking, with the fork'sisFirstSweepSinceFullCollectionand the call todecommitUnusedPages()before the mutate lock is taken (the lock is not recursive).Heaplost 14 friend declarations (4f97164ba5),CodeBlockamong them. The fork's CodeBlock aging read two private members of Heap;currentGCStartApproximateTime()andisIdleCollection()are public now. This merged without a conflict and would not have compiled.CodeBlock::checkIfJITThresholdReached()is out of line (ad96437625): upstream's new body, ending in the fork's call withstartupJITDeferralScale().68b19b2888, checkmayHaveIndexingHeaderbefore marking the previous cell): the fork already had the strictermayBeReferencedByButterflyEndPointer()on that line, which includes it. The fork's line.The other conflicts
20 files conflicted.
TypedArraySetis a new node, added next to the fork'sBufferReadInt/BufferReadFloat/BufferWrite): both, inDFGNodeType.h,DFGClobberize.h,DFGFixupPhase.cpp,DFGPredictionPropagationPhase.cpp,FTLCapabilities.cppandFTLLowerDFGToB3.cpp.DFGStrengthReductionPhase.cpp: the fork's bail-out for a sticky non-global RegExp, then upstream'sStringBuilder builder(OverflowPolicy::RecordOverflow).BytecodeGenerator.cpp(5d5248a69a, the private class brand is installed before class elements are evaluated): upstream removed the TDZ check on the brand inemitCheckPrivateBrand(); the fork had only rewritten that line asemitTDZCheck(brand). Removed.BytecodeGenerator.h,Nodes.h: both sides' declarations.JSObject.h: the fork's quoted includes, withoutIndexingHeaderInlines.h, which upstream deleted (a3c8dbf35b).Heap.cpp: upstream's newaddGCAwareJITStubRoutine(), and the fork's signature ofaddReference().URLParser.{h,cpp}(cf30450ee4,16a7f29cda, LEGACY_NODELETE on definitions): the fork's parser, with the annotation added to the two definitions that still exist in it (parseIPv4PieceInsideIPv6,parseIPv4AddressInsideIPv6).POSIXExtras.h(75bd0aeec2): upstream fixed the same thing the fork had (noshm_open()on Android). Upstream's file.MemoryUnsafeCastCheckerExpectations: upstream's list, plus the fork's two entries.WebCore/html/track/TrackOpaqueRoot.handWTF/wtf/darwin/WebKitReasonCode.hare new upstream files that git took for renames of the deletedIndexingHeaderInlines.h. Upstream's files.How it was verified
Nothing was compiled locally: the machine this was done on has 4 cores and could not get the pinned LLVM 23. This pull request's CI is what built and tested it.
70d3fedb.run-javascriptcore-testspasses on the Linux arm64 LTO lane at70d3fedb, and passed on both tested lanes at5ac1583e. On x64 at70d3fedbthe first run had one failure,stress/sampling-profiler-line-column.js.ftl-eager. It is an intermittent failure the fork already has: the command fromjsc-failures.logfails 8 times in 1,600 with this build, with5ac1583e's, and withautobuild-274ebb3c…from before the merge (details in a comment below). The job was re-run once and passed; the test is not changed or skipped here.WEBKIT_VERSIONat this pull request's preview build. Bun builds against it on all thirteen targets; what its tests found is commits 3 and 4 above, and two things fixed on Bun's side (an allowlist entry for three outline-atomics helpers, and a stale stack word inBun.gc()). With70d3fedb, Bun's binary-size check passes and the only failing test on its Linux and Windows shards was the bytecode snapshot, which is updated there.What was checked without a compiler:
main's.jitStubRoutines(),releaseAssertAcquiredBitVectorLock(),assertSweeperIsSuspended(),noteBlockMayBeStealable(),MarkedBlock::Handle::setIsDestructible(),IndexingHeader::preCapacity(),IndexingHeaderInlines.h,dragonbox, B3MemoryCopy,m_discoveredAccessedStringsFromGCOwnedDataScope, two-argumentFOR_EACH_BLOCK_DIRECTORY_BITcallbacks, two-argumentOpCheckTdz::emit.Heap.{h,cpp}that reach intoHeapwere checked against what is private there now.Generated by Claude Code