From 59203c63bb777a3bacec32fb8830fba33540e809 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:35:29 +0200 Subject: Adding upstream version 127.0. Signed-off-by: Daniel Baumann --- dom/base/AbstractRange.cpp | 8 + dom/base/BodyConsumer.cpp | 25 +- dom/base/ContentIterator.cpp | 2 +- dom/base/CrossShadowBoundaryRange.cpp | 115 + dom/base/CrossShadowBoundaryRange.h | 89 + dom/base/DOMIntersectionObserver.cpp | 3 +- dom/base/Document.cpp | 70 +- dom/base/Document.h | 5 +- dom/base/Element.cpp | 4 +- dom/base/EventSource.cpp | 6 +- dom/base/FocusModel.h | 41 + dom/base/FragmentOrElement.cpp | 14 +- dom/base/Highlight.cpp | 40 +- dom/base/HighlightRegistry.cpp | 22 +- dom/base/MimeType.cpp | 14 +- dom/base/RadioGroupContainer.cpp | 8 +- dom/base/ResizeObserver.h | 1 - dom/base/Selection.h | 24 + dom/base/StaticRange.h | 12 +- dom/base/crashtests/1419902.html | 24 +- dom/base/crashtests/1741957.html | 22 + dom/base/crashtests/crashtests.list | 3 +- dom/base/fragmentdirectives/lib.rs | 4 +- dom/base/fragmentdirectives/test.rs | 20 +- dom/base/moz.build | 3 + dom/base/nsAttrValue.cpp | 32 +- dom/base/nsAttrValue.h | 4 +- dom/base/nsContentAreaDragDrop.cpp | 2 +- dom/base/nsContentUtils.cpp | 81 +- dom/base/nsContentUtils.h | 22 +- dom/base/nsCopySupport.cpp | 26 +- dom/base/nsCopySupport.h | 4 +- dom/base/nsDOMWindowUtils.cpp | 8 +- dom/base/nsFocusManager.cpp | 70 +- dom/base/nsGlobalWindowInner.cpp | 33 +- dom/base/nsGlobalWindowInner.h | 8 + dom/base/nsIContent.h | 23 +- dom/base/nsJSEnvironment.cpp | 5 + dom/base/nsRange.cpp | 46 +- dom/base/nsRange.h | 17 +- dom/base/nsTextFragment.cpp | 40 +- dom/base/nsTextFragment.h | 17 +- dom/base/test/browser_page_load_event_telemetry.js | 10 + dom/base/test/chrome/bug418986-1.js | 2 +- dom/base/test/fullscreen/browser.toml | 3 + .../jsmodules/importmaps/bug_1893164_module_1.mjs | 3 + .../jsmodules/importmaps/bug_1893164_module_2.mjs | 5 + .../jsmodules/importmaps/bug_1893164_module_3.mjs | 1 + .../jsmodules/importmaps/bug_1894631_module_1.mjs | 5 + .../jsmodules/importmaps/bug_1894631_module_2.mjs | 3 + .../jsmodules/importmaps/bug_1894631_module_3.mjs | 1 + .../jsmodules/importmaps/bug_1894631_module_4.mjs | 1 + dom/base/test/jsmodules/importmaps/mochitest.toml | 10 + .../jsmodules/importmaps/test_bug_1893164.html | 20 + .../test_shared_submodules_with_modulepreload.html | 30 + .../test/test_anchor_target_blank_referrer.html | 3 + dom/base/test/test_focus_radio.html | 69 +- dom/bindings/BindingUtils.cpp | 65 +- dom/bindings/Bindings.conf | 4 + dom/bindings/Codegen.py | 24 +- dom/bindings/DOMString.h | 5 +- dom/bindings/Errors.msg | 1 + dom/bindings/FakeString.h | 2 +- dom/bindings/mach_commands.py | 2 +- dom/bindings/test/TestFunctions.cpp | 10 +- dom/broadcastchannel/BroadcastChannel.cpp | 5 +- dom/cache/CacheChild.cpp | 2 +- dom/cache/CacheStorageChild.cpp | 2 +- dom/cache/CacheStreamControlParent.cpp | 4 +- dom/cache/CacheStreamControlParent.h | 5 + dom/cache/Connection.cpp | 3 +- dom/cache/StreamList.cpp | 10 +- .../test_caches_delete_cleanup_after_shutdown.py | 116 +- dom/canvas/CanvasImageCache.cpp | 64 +- dom/canvas/CanvasImageCache.h | 15 +- dom/canvas/CanvasRenderingContext2D.cpp | 54 +- dom/canvas/CanvasRenderingContext2D.h | 2 + dom/canvas/ClientWebGLContext.cpp | 17 +- dom/canvas/ClientWebGLContext.h | 14 + dom/canvas/HostWebGLContext.h | 3 + dom/canvas/ImageBitmap.cpp | 18 +- dom/canvas/OffscreenCanvas.cpp | 15 + dom/canvas/OffscreenCanvasDisplayHelper.cpp | 26 +- dom/canvas/OffscreenCanvasDisplayHelper.h | 3 + dom/canvas/WebGLContext.cpp | 318 +- dom/canvas/WebGLContext.h | 25 + dom/canvas/WebGLContextTextures.cpp | 2 +- dom/canvas/WebGLIpdl.h | 28 + dom/canvas/WebGLMethodDispatcher.h | 1 + dom/canvas/WebGLQueueParamTraits.h | 41 +- dom/canvas/WebGLTypes.h | 4 +- dom/canvas/crashtests/crashtests.list | 2 +- .../test/reftest/colors/_generated_reftest.list | 371 ++- dom/canvas/test/reftest/colors/color_canvas.html | 1 + .../colors/generate_color_canvas_reftests.py | 44 +- dom/chrome-webidl/InspectorUtils.webidl | 50 + dom/chrome-webidl/UniFFI.webidl | 8 +- dom/console/Console.h | 1 + dom/console/ConsoleInstance.cpp | 23 +- dom/console/ConsoleInstance.h | 1 + dom/console/tests/xpcshell/test_worker.js | 59 + dom/console/tests/xpcshell/worker.mjs | 15 + dom/console/tests/xpcshell/xpcshell.toml | 6 + dom/crypto/WebCryptoTask.cpp | 21 +- dom/docs/ipc/process_model.rst | 2 +- dom/docs/workersAndStorage/PerformanceTesting.rst | 6 +- dom/encoding/test/reftest/reftest.list | 4 +- dom/events/Clipboard.cpp | 37 +- dom/events/Clipboard.h | 2 + dom/events/ClipboardItem.cpp | 12 + dom/events/ClipboardItem.h | 2 + dom/events/DataTransfer.cpp | 4 +- dom/events/DataTransferItem.cpp | 8 +- dom/events/DataTransferItem.h | 2 + dom/events/EventStateManager.cpp | 7 +- dom/events/IMEStateManager.cpp | 2 +- dom/events/WheelHandlingHelper.cpp | 7 +- dom/events/test/pointerevents/mochitest.toml | 1 - .../pointerevents/test_getCoalescedEvents.html | 43 +- dom/events/test/test_dom_storage_event.html | 4 +- dom/fetch/Fetch.cpp | 20 +- dom/fetch/FetchDriver.cpp | 7 + dom/fetch/FetchDriver.h | 8 + dom/fetch/FetchParent.cpp | 4 +- dom/fetch/FetchParent.h | 1 + dom/fetch/FetchService.cpp | 13 +- dom/fetch/FetchService.h | 13 +- dom/fetch/PFetch.ipdl | 1 + dom/file/BaseBlobImpl.h | 10 +- dom/file/Blob.cpp | 3 + dom/file/FileReaderSync.cpp | 3 +- dom/fs/parent/FileSystemAccessHandle.cpp | 2 +- dom/html/HTMLAnchorElement.cpp | 37 +- dom/html/HTMLAnchorElement.h | 4 +- dom/html/HTMLButtonElement.cpp | 11 +- dom/html/HTMLButtonElement.h | 2 +- dom/html/HTMLCanvasElement.cpp | 14 + dom/html/HTMLCanvasElement.h | 2 + dom/html/HTMLDNSPrefetch.cpp | 138 +- dom/html/HTMLDNSPrefetch.h | 14 +- dom/html/HTMLDetailsElement.h | 2 +- dom/html/HTMLDialogElement.cpp | 2 +- dom/html/HTMLEmbedElement.cpp | 4 +- dom/html/HTMLEmbedElement.h | 2 +- dom/html/HTMLImageElement.cpp | 13 +- dom/html/HTMLImageElement.h | 2 +- dom/html/HTMLInputElement.cpp | 62 +- dom/html/HTMLInputElement.h | 26 +- dom/html/HTMLLinkElement.cpp | 2 +- dom/html/HTMLMediaElement.cpp | 48 +- dom/html/HTMLMediaElement.h | 24 +- dom/html/HTMLObjectElement.cpp | 3 +- dom/html/HTMLObjectElement.h | 2 +- dom/html/HTMLSelectElement.cpp | 5 +- dom/html/HTMLSelectElement.h | 2 +- dom/html/HTMLSharedElement.cpp | 12 +- dom/html/HTMLSummaryElement.cpp | 7 +- dom/html/HTMLSummaryElement.h | 2 +- dom/html/HTMLTextAreaElement.cpp | 5 +- dom/html/HTMLTextAreaElement.h | 2 +- dom/html/nsGenericHTMLElement.cpp | 40 +- dom/html/nsGenericHTMLElement.h | 11 +- dom/html/nsGenericHTMLFrameElement.cpp | 5 +- dom/html/nsGenericHTMLFrameElement.h | 12 +- dom/html/test/forms/mochitest.toml | 2 + .../forms/test_input_datetime_preventDefault.html | 23 + dom/indexedDB/IDBFactory.cpp | 171 +- dom/indexedDB/IDBFactory.h | 32 +- dom/indexedDB/IDBObjectStore.cpp | 22 +- dom/indexedDB/Key.cpp | 125 +- dom/indexedDB/Key.h | 8 +- dom/indexedDB/crashtests/1499854-1.html | 2 +- dom/indexedDB/crashtests/1857979-1.html | 4 +- dom/indexedDB/test/perfdocs/index.rst | 2 +- dom/indexedDB/test/unit/test_invalid_version.js | 16 - dom/indexedDB/test/unit/test_metadata2Restore.js | 40 +- dom/indexedDB/test/unit/test_metadataRestore.js | 24 +- dom/interfaces/base/nsIDOMWindowUtils.idl | 8 - dom/interfaces/base/nsIFocusManager.idl | 28 +- .../notification/nsINotificationStorage.idl | 4 + .../security/nsIContentSecurityPolicy.idl | 52 +- dom/ipc/BrowserChild.cpp | 30 +- dom/ipc/BrowserChild.h | 5 - dom/ipc/BrowserParent.cpp | 99 +- dom/ipc/BrowserParent.h | 19 +- dom/ipc/ContentChild.cpp | 22 +- dom/ipc/ContentChild.h | 3 - dom/ipc/ContentParent.cpp | 196 +- dom/ipc/ContentParent.h | 41 +- dom/ipc/DOMTypes.ipdlh | 8 + dom/ipc/IPCTransferable.ipdlh | 9 +- dom/ipc/PBrowser.ipdl | 20 +- dom/ipc/PContent.ipdl | 38 +- dom/ipc/PWindowGlobal.ipdl | 4 + dom/ipc/TabContext.cpp | 4 +- dom/ipc/WindowGlobalChild.cpp | 23 +- dom/ipc/WindowGlobalParent.cpp | 28 +- dom/ipc/WindowGlobalParent.h | 2 + dom/l10n/DocumentL10n.cpp | 9 +- .../document_l10n/test_docl10n_ready_rejected.html | 11 +- .../chrome/accessibility/win/accessible.properties | 9 + dom/locales/en-US/chrome/security/csp.properties | 9 + dom/mathml/MathMLElement.cpp | 7 +- dom/mathml/MathMLElement.h | 2 +- dom/media/AsyncLogger.h | 2 +- dom/media/AudioInputSource.cpp | 105 +- dom/media/AudioInputSource.h | 13 + dom/media/AudioRingBuffer.cpp | 14 +- dom/media/AudioRingBuffer.h | 10 +- dom/media/AudioStream.cpp | 3 +- dom/media/AudioStream.h | 2 +- dom/media/ChannelMediaResource.cpp | 14 +- dom/media/CubebInputStream.cpp | 7 +- dom/media/CubebInputStream.h | 3 + dom/media/CubebUtils.cpp | 45 + dom/media/CubebUtils.h | 9 + dom/media/DeviceInputTrack.cpp | 57 + dom/media/DeviceInputTrack.h | 11 + dom/media/EncoderTraits.cpp | 2 +- dom/media/ExternalEngineStateMachine.h | 4 +- dom/media/GraphDriver.cpp | 141 +- dom/media/GraphDriver.h | 48 +- dom/media/ImageConversion.cpp | 207 ++ dom/media/ImageConversion.h | 32 + dom/media/ImageToI420.cpp | 154 - dom/media/ImageToI420.h | 26 - dom/media/MediaFormatReader.cpp | 71 +- dom/media/MediaFormatReader.h | 12 +- dom/media/MediaInfo.h | 27 +- dom/media/MediaManager.cpp | 257 +- dom/media/MediaManager.h | 2 +- dom/media/MediaResult.h | 2 +- dom/media/MediaTimer.cpp | 4 +- dom/media/MediaTimer.h | 6 +- dom/media/MediaTrackGraph.cpp | 63 +- dom/media/MediaTrackGraph.h | 18 +- dom/media/MediaTrackGraphImpl.h | 13 + dom/media/SeekJob.cpp | 4 +- dom/media/SeekJob.h | 4 +- dom/media/VideoFrameConverter.h | 2 +- dom/media/VideoUtils.cpp | 21 + dom/media/VideoUtils.h | 5 + dom/media/WavDumper.h | 15 +- dom/media/doctor/DDLifetime.cpp | 1 + dom/media/doctor/test/gtest/moz.build | 7 +- dom/media/driftcontrol/AudioDriftCorrection.cpp | 9 +- dom/media/driftcontrol/AudioResampler.cpp | 17 +- dom/media/driftcontrol/AudioResampler.h | 21 +- dom/media/driftcontrol/DriftController.cpp | 32 +- dom/media/driftcontrol/DriftController.h | 33 +- dom/media/driftcontrol/DynamicResampler.cpp | 83 +- dom/media/driftcontrol/DynamicResampler.h | 148 +- .../gtest/TestAudioDriftCorrection.cpp | 60 +- .../driftcontrol/gtest/TestAudioResampler.cpp | 50 +- .../driftcontrol/gtest/TestDriftController.cpp | 97 +- .../driftcontrol/gtest/TestDynamicResampler.cpp | 76 +- dom/media/driftcontrol/plot.py | 8 +- dom/media/encoder/VP8TrackEncoder.cpp | 2 +- dom/media/gmp/CDMStorageIdProvider.cpp | 2 +- dom/media/gmp/ChromiumCDMChild.h | 2 +- dom/media/gmp/GMPVideoDecoderChild.cpp | 55 +- dom/media/gmp/GMPVideoDecoderChild.h | 1 + dom/media/gmp/GMPVideoEncoderChild.cpp | 43 +- dom/media/gmp/GMPVideoEncoderChild.h | 1 + dom/media/gmp/mozIGeckoMediaPluginService.idl | 2 +- dom/media/gtest/AudioVerifier.h | 4 +- dom/media/gtest/GMPTestMonitor.h | 4 +- dom/media/gtest/MockCubeb.cpp | 301 +- dom/media/gtest/MockCubeb.h | 184 +- dom/media/gtest/TestAudioCallbackDriver.cpp | 457 ++- dom/media/gtest/TestAudioInputProcessing.cpp | 175 + dom/media/gtest/TestAudioInputSource.cpp | 114 +- dom/media/gtest/TestAudioRingBuffer.cpp | 50 +- dom/media/gtest/TestAudioTrackGraph.cpp | 740 +++-- dom/media/gtest/TestCDMStorage.cpp | 24 +- dom/media/gtest/TestDeviceInputTrack.cpp | 18 +- dom/media/gtest/TestMP4Demuxer.cpp | 4 +- dom/media/gtest/TestMediaDataEncoder.cpp | 2 +- dom/media/gtest/TestWebMWriter.cpp | 6 +- dom/media/ipc/MFCDMChild.cpp | 7 +- dom/media/ipc/MFCDMChild.h | 2 +- dom/media/ipc/RDDChild.cpp | 9 + dom/media/ipc/RDDParent.cpp | 16 +- dom/media/ipc/RemoteImageHolder.h | 12 +- dom/media/mediacapabilities/KeyValueStorage.cpp | 2 +- dom/media/mediacontrol/ContentMediaController.cpp | 31 + dom/media/mediacontrol/ContentMediaController.h | 3 + dom/media/mediacontrol/MediaControlKeyManager.cpp | 7 + dom/media/mediacontrol/MediaControlService.cpp | 1 + dom/media/mediacontrol/MediaPlaybackStatus.cpp | 64 + dom/media/mediacontrol/MediaPlaybackStatus.h | 16 + dom/media/mediacontrol/MediaStatusManager.cpp | 29 +- dom/media/mediacontrol/MediaStatusManager.h | 17 +- .../browser_media_control_position_state.js | 243 +- dom/media/mediacontrol/tests/browser/head.js | 81 + dom/media/mediasource/MediaSource.cpp | 3 +- dom/media/mediasource/MediaSourceDemuxer.cpp | 20 +- dom/media/mediasource/MediaSourceDemuxer.h | 11 +- dom/media/metrics.yaml | 24 + dom/media/moz.build | 6 +- dom/media/ogg/OggDemuxer.cpp | 4 - dom/media/platforms/EncoderConfig.cpp | 42 + dom/media/platforms/EncoderConfig.h | 2 + dom/media/platforms/MediaCodecsSupport.cpp | 9 +- dom/media/platforms/MediaCodecsSupport.h | 2 +- dom/media/platforms/PDMFactory.cpp | 62 +- dom/media/platforms/PDMFactory.h | 5 - dom/media/platforms/SimpleMap.h | 86 +- dom/media/platforms/agnostic/AOMDecoder.cpp | 2 + dom/media/platforms/agnostic/DAV1DDecoder.cpp | 2 + dom/media/platforms/agnostic/TheoraDecoder.cpp | 2 + dom/media/platforms/agnostic/VPXDecoder.cpp | 2 + .../platforms/agnostic/gmp/GMPVideoDecoder.cpp | 32 +- dom/media/platforms/agnostic/gmp/GMPVideoDecoder.h | 2 +- .../platforms/android/AndroidDecoderModule.cpp | 68 +- dom/media/platforms/android/AndroidDecoderModule.h | 15 +- .../platforms/android/AndroidEncoderModule.cpp | 3 + dom/media/platforms/android/RemoteDataDecoder.cpp | 4 +- dom/media/platforms/apple/AppleEncoderModule.cpp | 3 + dom/media/platforms/apple/AppleVTDecoder.cpp | 2 + dom/media/platforms/ffmpeg/FFmpegAudioDecoder.cpp | 23 +- dom/media/platforms/ffmpeg/FFmpegAudioEncoder.cpp | 11 +- dom/media/platforms/ffmpeg/FFmpegDataDecoder.cpp | 21 +- dom/media/platforms/ffmpeg/FFmpegDataEncoder.h | 2 +- dom/media/platforms/ffmpeg/FFmpegEncoderModule.cpp | 7 + dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp | 121 +- dom/media/platforms/ffmpeg/FFmpegLibWrapper.h | 4 +- dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp | 8 + dom/media/platforms/ffmpeg/FFmpegUtils.h | 30 + dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp | 92 +- dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h | 3 +- dom/media/platforms/ffmpeg/FFmpegVideoEncoder.cpp | 4 +- dom/media/platforms/ffmpeg/FFmpegVideoEncoder.h | 2 +- .../ffmpeg/ffmpeg61/include/COPYING.LGPLv2.1 | 504 +++ .../ffmpeg/ffmpeg61/include/libavcodec/avcodec.h | 3121 +++++++++++++++++ .../ffmpeg/ffmpeg61/include/libavcodec/avdct.h | 85 + .../ffmpeg/ffmpeg61/include/libavcodec/bsf.h | 335 ++ .../ffmpeg/ffmpeg61/include/libavcodec/codec.h | 382 +++ .../ffmpeg61/include/libavcodec/codec_desc.h | 134 + .../ffmpeg/ffmpeg61/include/libavcodec/codec_id.h | 676 ++++ .../ffmpeg/ffmpeg61/include/libavcodec/codec_par.h | 250 ++ .../ffmpeg/ffmpeg61/include/libavcodec/defs.h | 344 ++ .../ffmpeg/ffmpeg61/include/libavcodec/packet.h | 871 +++++ .../ffmpeg/ffmpeg61/include/libavcodec/vdpau.h | 168 + .../ffmpeg/ffmpeg61/include/libavcodec/version.h | 45 + .../ffmpeg61/include/libavcodec/version_major.h | 52 + .../ffmpeg/ffmpeg61/include/libavutil/attributes.h | 173 + .../ffmpeg/ffmpeg61/include/libavutil/avconfig.h | 6 + .../ffmpeg/ffmpeg61/include/libavutil/avutil.h | 363 ++ .../ffmpeg/ffmpeg61/include/libavutil/buffer.h | 324 ++ .../ffmpeg61/include/libavutil/channel_layout.h | 804 +++++ .../ffmpeg/ffmpeg61/include/libavutil/common.h | 587 ++++ .../ffmpeg/ffmpeg61/include/libavutil/cpu.h | 153 + .../ffmpeg/ffmpeg61/include/libavutil/dict.h | 259 ++ .../ffmpeg/ffmpeg61/include/libavutil/error.h | 158 + .../ffmpeg/ffmpeg61/include/libavutil/frame.h | 1112 +++++++ .../ffmpeg/ffmpeg61/include/libavutil/hwcontext.h | 594 ++++ .../ffmpeg61/include/libavutil/hwcontext_drm.h | 169 + .../ffmpeg61/include/libavutil/hwcontext_vaapi.h | 117 + .../ffmpeg/ffmpeg61/include/libavutil/intfloat.h | 73 + .../ffmpeg/ffmpeg61/include/libavutil/log.h | 388 +++ .../ffmpeg/ffmpeg61/include/libavutil/macros.h | 87 + .../ffmpeg61/include/libavutil/mathematics.h | 305 ++ .../ffmpeg/ffmpeg61/include/libavutil/mem.h | 611 ++++ .../ffmpeg/ffmpeg61/include/libavutil/pixfmt.h | 920 +++++ .../ffmpeg/ffmpeg61/include/libavutil/rational.h | 226 ++ .../ffmpeg/ffmpeg61/include/libavutil/samplefmt.h | 275 ++ .../ffmpeg/ffmpeg61/include/libavutil/version.h | 121 + dom/media/platforms/ffmpeg/ffmpeg61/moz.build | 47 + .../platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp | 48 +- dom/media/platforms/ffmpeg/ffvpx/moz.build | 2 +- dom/media/platforms/ffmpeg/moz.build | 1 + dom/media/platforms/omx/OmxDataDecoder.cpp | 6 +- dom/media/platforms/omx/OmxDataDecoder.h | 4 +- dom/media/platforms/wmf/MFTEncoder.cpp | 22 +- dom/media/platforms/wmf/WMF.h | 43 +- dom/media/platforms/wmf/WMFDataEncoderUtils.cpp | 221 ++ dom/media/platforms/wmf/WMFDataEncoderUtils.h | 140 +- dom/media/platforms/wmf/WMFDecoderModule.cpp | 34 +- dom/media/platforms/wmf/WMFDecoderModule.h | 15 +- dom/media/platforms/wmf/WMFEncoderModule.cpp | 3 + dom/media/platforms/wmf/WMFMediaDataEncoder.cpp | 399 +++ dom/media/platforms/wmf/WMFMediaDataEncoder.h | 302 +- dom/media/platforms/wmf/WMFVideoMFTManager.cpp | 6 +- dom/media/platforms/wmf/moz.build | 2 + dom/media/test/complete_length_worker.js | 80 + dom/media/test/mochitest.toml | 4 + .../test/rdd_process_xpcom/RddProcessTest.cpp | 3 +- dom/media/test/reftest/reftest.list | 2 +- dom/media/test/test_complete_length.html | 49 + dom/media/tests/crashtests/crashtests.list | 4 +- dom/media/utils/PerformanceRecorder.cpp | 26 + dom/media/utils/PerformanceRecorder.h | 56 +- dom/media/utils/TelemetryProbesReporter.cpp | 28 + dom/media/utils/TelemetryProbesReporter.h | 4 + dom/media/webaudio/FFTBlock.cpp | 3 +- dom/media/webcodecs/DecoderAgent.cpp | 8 +- dom/media/webcodecs/DecoderTemplate.cpp | 102 +- dom/media/webcodecs/DecoderTemplate.h | 39 +- dom/media/webcodecs/EncoderTemplate.cpp | 195 +- dom/media/webcodecs/EncoderTemplate.h | 17 +- dom/media/webcodecs/VideoEncoder.cpp | 15 +- dom/media/webcodecs/crashtests/1889831.html | 21 + dom/media/webcodecs/crashtests/crashtests.list | 2 +- dom/media/webrtc/MediaEnginePrefs.h | 2 + dom/media/webrtc/MediaEngineWebRTCAudio.cpp | 125 +- dom/media/webrtc/MediaEngineWebRTCAudio.h | 36 +- .../webrtc/jsapi/RTCTransformEventRunnable.cpp | 4 +- dom/media/webrtc/libwebrtcglue/VideoConduit.cpp | 14 +- .../webrtc/libwebrtcglue/VideoStreamFactory.cpp | 5 +- dom/media/webrtc/metrics.yaml | 81 + dom/media/webrtc/sdp/rsdparsa_capi/src/lib.rs | 2 +- dom/media/webrtc/sdp/rsdparsa_capi/src/types.rs | 1 - dom/media/webrtc/tests/mochitests/head.js | 2 +- dom/media/webrtc/tests/mochitests/iceTestUtils.js | 21 +- .../mochitests/test_peerConnection_glean.html | 182 + .../webrtc/third_party_build/default_config_env | 20 +- dom/media/webrtc/third_party_build/elm_rebase.sh | 25 +- .../webrtc/third_party_build/fetch_github_repo.py | 11 +- dom/media/webrtc/third_party_build/loop-ff.sh | 6 +- dom/media/webrtc/third_party_build/prep_repo.sh | 48 +- .../webrtc/third_party_build/verify_vendoring.sh | 29 +- dom/media/webrtc/transport/test/moz.build | 30 +- dom/media/webrtc/transport/test_nr_socket.cpp | 38 +- .../transport/third_party/nICEr/src/stun/addrs.c | 161 +- .../transport/third_party/nrappkit/src/log/r_log.c | 20 +- .../third_party/nrappkit/src/registry/registry.c | 2 +- .../nrappkit/src/registry/registry_local.c | 36 +- .../third_party/nrappkit/src/registry/registrycb.c | 12 +- .../third_party/nrappkit/src/util/libekr/r_assoc.c | 18 +- .../third_party/nrappkit/src/util/libekr/r_crc32.c | 2 +- .../third_party/nrappkit/src/util/libekr/r_data.c | 4 +- .../third_party/nrappkit/src/util/libekr/r_list.c | 6 +- .../nrappkit/src/util/libekr/r_memory.c | 10 +- .../nrappkit/src/util/libekr/r_replace.c | 2 +- .../third_party/nrappkit/src/util/p_buf.c | 8 +- .../transport/third_party/nrappkit/src/util/util.c | 83 +- .../transport/third_party/nrappkit/src/util/util.h | 5 - dom/media/webrtc/transport/transportlayerdtls.cpp | 103 +- dom/media/webrtc/transport/transportlayerdtls.h | 2 +- dom/media/webvtt/vtt.sys.mjs | 62 +- dom/metrics.yaml | 6 + dom/network/ConnectionWorker.cpp | 6 +- dom/network/interfaces/nsITCPSocketCallback.idl | 8 +- dom/notification/Notification.cpp | 114 +- dom/notification/NotificationStorage.sys.mjs | 60 +- dom/notification/components.conf | 6 + dom/notification/moz.build | 1 + dom/notification/old/MemoryNotificationDB.sys.mjs | 21 + dom/notification/old/NotificationDB.sys.mjs | 222 +- dom/notification/test/unit/head_notificationdb.js | 3 + dom/notification/test/unit/test_notificationdb.js | 86 + dom/performance/Performance.cpp | 20 + dom/performance/PerformanceStorageWorker.cpp | 5 +- dom/promise/Promise.cpp | 8 +- dom/promise/PromiseNativeHandler.h | 5 +- dom/push/PushManager.cpp | 13 +- dom/push/PushSubscription.cpp | 38 +- dom/push/PushSubscriptionOptions.cpp | 7 +- dom/push/PushUtil.cpp | 36 - dom/push/PushUtil.h | 39 - dom/push/moz.build | 2 - dom/quota/QuotaCommon.cpp | 6 +- dom/quota/QuotaCommon.h | 54 +- dom/quota/StorageManager.cpp | 8 +- dom/quota/test/gtest/TestEncryptedStream.cpp | 17 +- dom/security/FramingChecker.cpp | 4 +- dom/security/metrics.yaml | 14 +- dom/security/nsCSPContext.cpp | 82 +- dom/security/nsCSPContext.h | 38 +- dom/security/nsCSPParser.cpp | 159 +- dom/security/nsCSPParser.h | 2 + dom/security/nsCSPUtils.cpp | 85 +- dom/security/nsCSPUtils.h | 48 +- dom/security/nsHTTPSOnlyUtils.cpp | 35 +- dom/security/test/gtest/TestCSPParser.cpp | 17 + .../test/https-first/browser_httpsfirst.js | 9 +- dom/serializers/nsDocumentEncoder.cpp | 33 +- dom/serviceworkers/ServiceWorkerEvents.cpp | 1 - dom/serviceworkers/ServiceWorkerOp.cpp | 17 +- dom/serviceworkers/ServiceWorkerOp.h | 3 +- dom/serviceworkers/test/gtest/TestReadWrite.cpp | 9 +- .../test/test_serviceworker_interfaces.js | 1 + dom/svg/SVGAElement.cpp | 7 +- dom/svg/SVGAElement.h | 2 +- dom/svg/SVGAnimatedLength.cpp | 21 + dom/svg/SVGAnimatedLength.h | 3 + dom/svg/SVGContentUtils.cpp | 28 +- dom/svg/SVGContentUtils.h | 13 +- dom/svg/SVGDefsElement.h | 2 +- dom/svg/SVGGeometryElement.cpp | 2 +- dom/svg/SVGGraphicsElement.cpp | 6 +- dom/svg/SVGGraphicsElement.h | 2 +- dom/svg/SVGLength.cpp | 36 +- dom/svg/SVGSwitchElement.cpp | 56 +- dom/svg/SVGSwitchElement.h | 3 - dom/svg/SVGSymbolElement.cpp | 4 +- dom/svg/SVGSymbolElement.h | 2 +- dom/svg/SVGTests.cpp | 158 +- dom/svg/SVGTests.h | 44 +- dom/svg/test/test_switch.xhtml | 107 +- dom/svg/test/test_tabindex.html | 15 +- dom/tests/browser/browser.toml | 1 + dom/tests/mochitest/chrome/test_focus.xhtml | 5 +- .../mochitest/general/frameStoragePrevented.html | 4 +- .../mochitest/general/storagePermissionsUtils.js | 133 +- dom/tests/mochitest/general/test_interfaces.js | 5 +- .../general/test_storagePermissionsReject.html | 2 +- .../general/window_storagePermissions.html | 2 + .../mochitest/general/workerStorageAllowed.js | 131 +- .../mochitest/general/workerStoragePrevented.js | 114 +- dom/tests/mochitest/webcomponents/chrome.toml | 2 +- .../test_custom_element_auto_import.html | 49 + .../test_custom_element_ensure_custom_element.html | 55 - dom/webauthn/MacOSWebAuthnService.mm | 20 + dom/webgpu/Adapter.h | 1 + dom/webgpu/CanvasContext.cpp | 4 + dom/webgpu/ComputePassEncoder.cpp | 60 +- dom/webgpu/ComputePassEncoder.h | 2 +- dom/webgpu/ComputePipeline.cpp | 7 +- dom/webgpu/Device.cpp | 49 + dom/webgpu/RenderBundleEncoder.cpp | 103 +- dom/webgpu/RenderBundleEncoder.h | 4 +- dom/webgpu/RenderPassEncoder.cpp | 148 +- dom/webgpu/RenderPassEncoder.h | 2 +- dom/webgpu/RenderPipeline.cpp | 1 + .../cts/checkout/.github/pull_request_template.md | 1 + .../tests/cts/checkout/.github/workflows/pr.yml | 11 +- .../tests/cts/checkout/.github/workflows/push.yml | 5 + dom/webgpu/tests/cts/checkout/.gitignore | 1 + dom/webgpu/tests/cts/checkout/Gruntfile.js | 210 +- dom/webgpu/tests/cts/checkout/cts.code-workspace | 5 + .../cts/checkout/docs/adding_timing_metadata.md | 95 +- dom/webgpu/tests/cts/checkout/docs/build.md | 55 +- dom/webgpu/tests/cts/checkout/docs/case_cache.md | 81 + dom/webgpu/tests/cts/checkout/docs/fp_primer.md | 102 +- .../tests/cts/checkout/docs/intro/developing.md | 23 +- dom/webgpu/tests/cts/checkout/docs/terms.md | 2 +- dom/webgpu/tests/cts/checkout/package-lock.json | 3503 ++------------------ dom/webgpu/tests/cts/checkout/package.json | 15 +- .../cts/checkout/src/common/framework/fixture.ts | 17 +- .../checkout/src/common/framework/test_config.ts | 18 + .../checkout/src/common/internal/file_loader.ts | 4 +- .../src/common/internal/logging/log_message.ts | 51 +- .../checkout/src/common/internal/logging/logger.ts | 5 +- .../checkout/src/common/internal/logging/result.ts | 22 +- .../common/internal/logging/test_case_recorder.ts | 8 +- .../checkout/src/common/internal/query/compare.ts | 5 +- .../src/common/internal/query/parseQuery.ts | 43 +- .../checkout/src/common/internal/query/query.ts | 6 +- .../cts/checkout/src/common/internal/test_group.ts | 10 +- .../src/common/internal/test_suite_listing.ts | 2 +- .../tests/cts/checkout/src/common/internal/tree.ts | 7 +- .../src/common/internal/websocket_logger.ts | 13 +- .../cts/checkout/src/common/runtime/cmdline.ts | 52 +- .../checkout/src/common/runtime/helper/options.ts | 61 +- .../common/runtime/helper/test_worker-worker.ts | 49 +- .../src/common/runtime/helper/test_worker.ts | 202 +- .../src/common/runtime/helper/utils_worker.ts | 35 + .../src/common/runtime/helper/wrap_for_worker.ts | 54 + .../cts/checkout/src/common/runtime/server.ts | 62 +- .../cts/checkout/src/common/runtime/standalone.ts | 53 +- .../tests/cts/checkout/src/common/runtime/wpt.ts | 18 +- .../tests/cts/checkout/src/common/tools/crawl.ts | 56 +- .../cts/checkout/src/common/tools/dev_server.ts | 13 + .../cts/checkout/src/common/tools/gen_cache.ts | 278 +- .../cts/checkout/src/common/tools/gen_listings.ts | 11 +- .../common/tools/gen_listings_and_webworkers.ts | 89 + .../checkout/src/common/tools/gen_wpt_cts_html.ts | 135 +- .../src/common/tools/merge_listing_times.ts | 12 +- .../cts/checkout/src/common/tools/validate.ts | 29 +- .../tests/cts/checkout/src/common/util/crc32.ts | 57 + .../cts/checkout/src/common/util/parse_imports.ts | 36 + .../tests/cts/checkout/src/common/util/util.ts | 5 +- .../tests/cts/checkout/src/external/README.md | 2 +- .../src/external/petamoriken/float16/LICENSE.txt | 2 +- .../src/external/petamoriken/float16/float16.d.ts | 27 + .../src/external/petamoriken/float16/float16.js | 181 +- .../tests/cts/checkout/src/resources/README.md | 100 +- .../cts/checkout/src/resources/cache/hashes.json | 111 + .../cache/webgpu/shader/execution/abs.bin | Bin 0 -> 17976 bytes .../cache/webgpu/shader/execution/acos.bin | Bin 0 -> 26440 bytes .../cache/webgpu/shader/execution/acosh.bin | Bin 0 -> 30248 bytes .../cache/webgpu/shader/execution/asin.bin | Bin 0 -> 26440 bytes .../cache/webgpu/shader/execution/asinh.bin | Bin 0 -> 11664 bytes .../cache/webgpu/shader/execution/atan.bin | Bin 0 -> 20128 bytes .../cache/webgpu/shader/execution/atan2.bin | Bin 0 -> 51608 bytes .../cache/webgpu/shader/execution/atanh.bin | Bin 0 -> 21104 bytes .../webgpu/shader/execution/binary/af_addition.bin | Bin 0 -> 237960 bytes .../webgpu/shader/execution/binary/af_division.bin | Bin 0 -> 77496 bytes .../webgpu/shader/execution/binary/af_logical.bin | Bin 0 -> 12456 bytes .../shader/execution/binary/af_matrix_addition.bin | Bin 0 -> 175672 bytes .../binary/af_matrix_matrix_multiplication.bin | Bin 0 -> 82608 bytes .../binary/af_matrix_scalar_multiplication.bin | Bin 0 -> 291528 bytes .../execution/binary/af_matrix_subtraction.bin | Bin 0 -> 181112 bytes .../binary/af_matrix_vector_multiplication.bin | Bin 0 -> 152528 bytes .../shader/execution/binary/af_multiplication.bin | Bin 0 -> 207864 bytes .../shader/execution/binary/af_remainder.bin | Bin 0 -> 77496 bytes .../shader/execution/binary/af_subtraction.bin | Bin 0 -> 237960 bytes .../shader/execution/binary/ai_arithmetic.bin | Bin 0 -> 831992 bytes .../shader/execution/binary/f16_addition.bin | Bin 0 -> 169680 bytes .../shader/execution/binary/f16_division.bin | Bin 0 -> 120856 bytes .../webgpu/shader/execution/binary/f16_logical.bin | Bin 0 -> 15912 bytes .../execution/binary/f16_matrix_addition.bin | Bin 0 -> 557464 bytes .../binary/f16_matrix_matrix_multiplication.bin | Bin 0 -> 1481368 bytes .../binary/f16_matrix_scalar_multiplication.bin | Bin 0 -> 906440 bytes .../execution/binary/f16_matrix_subtraction.bin | Bin 0 -> 534232 bytes .../binary/f16_matrix_vector_multiplication.bin | Bin 0 -> 601680 bytes .../shader/execution/binary/f16_multiplication.bin | Bin 0 -> 171072 bytes .../shader/execution/binary/f16_remainder.bin | Bin 0 -> 118944 bytes .../shader/execution/binary/f16_subtraction.bin | Bin 0 -> 169680 bytes .../shader/execution/binary/f32_addition.bin | Bin 0 -> 279984 bytes .../shader/execution/binary/f32_division.bin | Bin 0 -> 174960 bytes .../webgpu/shader/execution/binary/f32_logical.bin | Bin 0 -> 18984 bytes .../execution/binary/f32_matrix_addition.bin | Bin 0 -> 991896 bytes .../binary/f32_matrix_matrix_multiplication.bin | Bin 0 -> 2510560 bytes .../binary/f32_matrix_scalar_multiplication.bin | Bin 0 -> 1534768 bytes .../execution/binary/f32_matrix_subtraction.bin | Bin 0 -> 995984 bytes .../binary/f32_matrix_vector_multiplication.bin | Bin 0 -> 950336 bytes .../shader/execution/binary/f32_multiplication.bin | Bin 0 -> 257976 bytes .../shader/execution/binary/f32_remainder.bin | Bin 0 -> 171384 bytes .../shader/execution/binary/f32_subtraction.bin | Bin 0 -> 279968 bytes .../shader/execution/binary/i32_arithmetic.bin | Bin 0 -> 727864 bytes .../shader/execution/binary/i32_comparison.bin | Bin 0 -> 3872 bytes .../shader/execution/binary/u32_arithmetic.bin | Bin 0 -> 225816 bytes .../shader/execution/binary/u32_comparison.bin | Bin 0 -> 2192 bytes .../cache/webgpu/shader/execution/bitcast.bin | Bin 0 -> 2240896 bytes .../cache/webgpu/shader/execution/ceil.bin | Bin 0 -> 16016 bytes .../cache/webgpu/shader/execution/clamp.bin | Bin 0 -> 1048136 bytes .../cache/webgpu/shader/execution/cos.bin | Bin 0 -> 20176 bytes .../cache/webgpu/shader/execution/cosh.bin | Bin 0 -> 14904 bytes .../cache/webgpu/shader/execution/cross.bin | Bin 0 -> 829096 bytes .../cache/webgpu/shader/execution/degrees.bin | Bin 0 -> 18048 bytes .../cache/webgpu/shader/execution/derivatives.bin | Bin 0 -> 11264 bytes .../cache/webgpu/shader/execution/determinant.bin | Bin 0 -> 9944 bytes .../cache/webgpu/shader/execution/distance.bin | Bin 0 -> 1731496 bytes .../cache/webgpu/shader/execution/dot.bin | Bin 0 -> 469272 bytes .../cache/webgpu/shader/execution/exp.bin | Bin 0 -> 34592 bytes .../cache/webgpu/shader/execution/exp2.bin | Bin 0 -> 34592 bytes .../cache/webgpu/shader/execution/faceForward.bin | Bin 0 -> 4214688 bytes .../cache/webgpu/shader/execution/floor.bin | Bin 0 -> 16016 bytes .../cache/webgpu/shader/execution/fma.bin | Bin 0 -> 886720 bytes .../cache/webgpu/shader/execution/fract.bin | Bin 0 -> 16408 bytes .../cache/webgpu/shader/execution/frexp.bin | Bin 0 -> 47072 bytes .../cache/webgpu/shader/execution/inverseSqrt.bin | Bin 0 -> 78424 bytes .../cache/webgpu/shader/execution/ldexp.bin | Bin 0 -> 33096 bytes .../cache/webgpu/shader/execution/length.bin | Bin 0 -> 35696 bytes .../cache/webgpu/shader/execution/log.bin | Bin 0 -> 148848 bytes .../cache/webgpu/shader/execution/log2.bin | Bin 0 -> 148848 bytes .../cache/webgpu/shader/execution/max.bin | Bin 0 -> 37944 bytes .../cache/webgpu/shader/execution/min.bin | Bin 0 -> 37944 bytes .../cache/webgpu/shader/execution/mix.bin | Bin 0 -> 5817432 bytes .../cache/webgpu/shader/execution/modf.bin | Bin 0 -> 82448 bytes .../cache/webgpu/shader/execution/normalize.bin | Bin 0 -> 47608 bytes .../webgpu/shader/execution/pack2x16float.bin | Bin 0 -> 1791400 bytes .../cache/webgpu/shader/execution/pow.bin | Bin 0 -> 1308224 bytes .../webgpu/shader/execution/quantizeToF16.bin | Bin 0 -> 8904 bytes .../cache/webgpu/shader/execution/radians.bin | Bin 0 -> 10992 bytes .../cache/webgpu/shader/execution/reflect.bin | Bin 0 -> 277720 bytes .../cache/webgpu/shader/execution/refract.bin | Bin 0 -> 2828888 bytes .../cache/webgpu/shader/execution/round.bin | Bin 0 -> 14816 bytes .../cache/webgpu/shader/execution/saturate.bin | Bin 0 -> 17096 bytes .../cache/webgpu/shader/execution/sign.bin | Bin 0 -> 21224 bytes .../cache/webgpu/shader/execution/sin.bin | Bin 0 -> 20176 bytes .../cache/webgpu/shader/execution/sinh.bin | Bin 0 -> 14904 bytes .../cache/webgpu/shader/execution/smoothstep.bin | Bin 0 -> 629408 bytes .../cache/webgpu/shader/execution/sqrt.bin | Bin 0 -> 10024 bytes .../cache/webgpu/shader/execution/step.bin | Bin 0 -> 33160 bytes .../cache/webgpu/shader/execution/tan.bin | Bin 0 -> 21776 bytes .../cache/webgpu/shader/execution/tanh.bin | Bin 0 -> 11448 bytes .../cache/webgpu/shader/execution/transpose.bin | Bin 0 -> 129192 bytes .../cache/webgpu/shader/execution/trunc.bin | Bin 0 -> 14696 bytes .../shader/execution/unary/af_arithmetic.bin | Bin 0 -> 30376 bytes .../shader/execution/unary/af_assignment.bin | Bin 0 -> 10296 bytes .../shader/execution/unary/ai_arithmetic.bin | Bin 0 -> 3256 bytes .../shader/execution/unary/ai_assignment.bin | Bin 0 -> 6936 bytes .../shader/execution/unary/bool_conversion.bin | Bin 0 -> 6480 bytes .../shader/execution/unary/f16_arithmetic.bin | Bin 0 -> 15208 bytes .../shader/execution/unary/f16_conversion.bin | Bin 0 -> 97912 bytes .../shader/execution/unary/f32_arithmetic.bin | Bin 0 -> 19544 bytes .../shader/execution/unary/f32_conversion.bin | Bin 0 -> 105744 bytes .../shader/execution/unary/i32_arithmetic.bin | Bin 0 -> 1648 bytes .../shader/execution/unary/i32_conversion.bin | Bin 0 -> 11856 bytes .../shader/execution/unary/u32_conversion.bin | Bin 0 -> 10680 bytes .../webgpu/shader/execution/unpack2x16float.bin | Bin 0 -> 4832 bytes .../webgpu/shader/execution/unpack2x16snorm.bin | Bin 0 -> 4968 bytes .../webgpu/shader/execution/unpack2x16unorm.bin | Bin 0 -> 4968 bytes .../webgpu/shader/execution/unpack4x8snorm.bin | Bin 0 -> 7416 bytes .../webgpu/shader/execution/unpack4x8unorm.bin | Bin 0 -> 7416 bytes .../src/resources/four-colors-h264-bt601-hflip.mp4 | Bin 0 -> 3174 bytes .../four-colors-h264-bt601-rotate-180.mp4 | Bin 16261 -> 3113 bytes .../four-colors-h264-bt601-rotate-270.mp4 | Bin 16261 -> 3211 bytes .../resources/four-colors-h264-bt601-rotate-90.mp4 | Bin 16261 -> 3204 bytes .../src/resources/four-colors-h264-bt601-vflip.mp4 | Bin 0 -> 3174 bytes .../src/resources/four-colors-h264-bt601.mp4 | Bin 16261 -> 3174 bytes .../src/resources/four-colors-theora-bt601.ogv | Bin 44488 -> 0 bytes .../src/resources/four-colors-vp8-bt601.webm | Bin 17910 -> 2421 bytes .../src/resources/four-colors-vp9-bt601-hflip.mp4 | Bin 0 -> 2077 bytes .../resources/four-colors-vp9-bt601-rotate-180.mp4 | Bin 0 -> 2079 bytes .../resources/four-colors-vp9-bt601-rotate-270.mp4 | Bin 0 -> 2016 bytes .../resources/four-colors-vp9-bt601-rotate-90.mp4 | Bin 0 -> 2079 bytes .../src/resources/four-colors-vp9-bt601-vflip.mp4 | Bin 0 -> 2077 bytes .../src/resources/four-colors-vp9-bt601.mp4 | Bin 0 -> 2077 bytes .../src/resources/four-colors-vp9-bt601.webm | Bin 13116 -> 1847 bytes .../src/resources/four-colors-vp9-bt709.webm | Bin 12584 -> 1789 bytes .../cts/checkout/src/unittests/conversion.spec.ts | 14 +- .../tests/cts/checkout/src/unittests/crc32.spec.ts | 28 + .../checkout/src/unittests/floating_point.spec.ts | 2289 +++++++------ .../tests/cts/checkout/src/unittests/maths.spec.ts | 44 +- .../checkout/src/unittests/parse_imports.spec.ts | 79 + .../checkout/src/unittests/serialization.spec.ts | 69 + .../cts/checkout/src/unittests/texture_ok.spec.ts | 31 +- .../api/operation/adapter/requestDevice.spec.ts | 59 + .../command_buffer/copyTextureToTexture.spec.ts | 113 +- .../operation/command_buffer/image_copy.spec.ts | 94 +- .../command_buffer/queries/occlusionQuery.spec.ts | 8 +- .../texture/readonly_depth_stencil.spec.ts | 329 ++ .../src/webgpu/api/operation/reflection.spec.ts | 293 +- .../operation/render_pipeline/sample_mask.spec.ts | 24 +- .../operation/rendering/3d_texture_slices.spec.ts | 363 ++ .../operation/rendering/color_target_state.spec.ts | 8 +- .../webgpu/api/operation/rendering/depth.spec.ts | 9 +- .../api/operation/rendering/depth_bias.spec.ts | 12 + .../operation/rendering/depth_clip_clamp.spec.ts | 20 +- .../resource_init/check_texture/by_copy.ts | 3 +- .../resource_init/check_texture/by_ds_test.ts | 3 +- .../resource_init/check_texture/by_sampling.ts | 38 +- .../check_texture/texture_zero_init_test.ts | 548 +++ .../operation/resource_init/texture_zero.spec.ts | 554 +--- .../shader_module/compilation_info.spec.ts | 39 +- .../operation/storage_texture/read_only.spec.ts | 626 ++++ .../operation/storage_texture/read_write.spec.ts | 385 +++ .../texture_view/format_reinterpretation.spec.ts | 10 +- .../api/operation/texture_view/write.spec.ts | 347 +- .../webgpu/api/validation/buffer/mapping.spec.ts | 39 +- .../capability_checks/features/query_types.spec.ts | 56 +- .../capability_checks/limits/limit_utils.ts | 119 +- .../capability_checks/limits/maxBindGroups.spec.ts | 156 +- .../limits/maxBindGroupsPlusVertexBuffers.spec.ts | 301 ++ .../limits/maxComputeWorkgroupStorageSize.spec.ts | 9 +- .../limits/maxInterStageShaderComponents.spec.ts | 8 +- .../maxSampledTexturesPerShaderStage.spec.ts | 50 +- .../limits/maxSamplersPerShaderStage.spec.ts | 54 +- .../limits/maxStorageBuffersPerShaderStage.spec.ts | 85 +- .../maxStorageTexturesPerShaderStage.spec.ts | 46 +- .../limits/maxUniformBuffersPerShaderStage.spec.ts | 46 +- .../limits/maxVertexBuffers.spec.ts | 68 +- .../webgpu/api/validation/compute_pipeline.spec.ts | 50 + .../webgpu/api/validation/createBindGroup.spec.ts | 49 +- .../api/validation/createBindGroupLayout.spec.ts | 47 +- .../webgpu/api/validation/createTexture.spec.ts | 43 +- .../src/webgpu/api/validation/createView.spec.ts | 11 +- .../encoding/cmds/copyTextureToTexture.spec.ts | 15 +- .../encoding/createRenderBundleEncoder.spec.ts | 44 +- .../validation/encoding/encoder_open_state.spec.ts | 14 +- .../pipeline_bind_group_compat.spec.ts | 343 +- .../validation/encoding/queries/general.spec.ts | 42 +- .../api/validation/encoding/render_bundle.spec.ts | 14 +- .../src/webgpu/api/validation/error_scope.spec.ts | 18 +- .../gpu_external_texture_expiration.spec.ts | 35 +- .../webgpu/api/validation/image_copy/image_copy.ts | 4 +- .../validation/image_copy/texture_related.spec.ts | 2 +- .../api/validation/layout_shader_compat.spec.ts | 287 +- .../CopyExternalImageToTexture.spec.ts | 4 +- .../validation/queue/destroyed/query_set.spec.ts | 53 +- .../api/validation/queue/destroyed/texture.spec.ts | 9 +- .../render_pass/attachment_compatibility.spec.ts | 7 - .../render_pass/render_pass_descriptor.spec.ts | 190 +- .../api/validation/render_pipeline/common.ts | 11 +- .../render_pipeline/depth_stencil_state.spec.ts | 12 +- .../render_pipeline/fragment_state.spec.ts | 77 +- .../validation/render_pipeline/inter_stage.spec.ts | 72 +- .../api/validation/render_pipeline/misc.spec.ts | 34 + .../render_pipeline/resource_compatibility.spec.ts | 95 + .../texture/in_pass_encoder.spec.ts | 269 +- .../texture/in_render_common.spec.ts | 101 +- .../resource_usages/texture/in_render_misc.spec.ts | 307 +- .../validation/shader_module/entry_point.spec.ts | 226 +- .../validation/state/device_lost/destroy.spec.ts | 12 +- .../validation/texture/bgra8unorm_storage.spec.ts | 31 - .../checkout/src/webgpu/api/validation/utils.ts | 275 ++ .../src/webgpu/api/validation/validation_test.ts | 25 +- .../cts/checkout/src/webgpu/capability_info.ts | 125 +- .../compat/api/validation/createBindGroup.spec.ts | 178 + .../api/validation/createBindGroupLayout.spec.ts | 34 + .../encoding/cmds/copyTextureToBuffer.spec.ts | 9 +- .../encoding/cmds/copyTextureToTexture.spec.ts | 94 + .../render_pipeline/depth_stencil_state.spec.ts | 53 + .../render_pipeline/shader_module.spec.ts | 207 ++ .../api/validation/texture/createTexture.spec.ts | 131 + .../tests/cts/checkout/src/webgpu/constants.ts | 5 + .../tests/cts/checkout/src/webgpu/format_info.ts | 1147 +++++-- .../tests/cts/checkout/src/webgpu/gpu_test.ts | 232 +- .../checkout/src/webgpu/idl/constructable.spec.ts | 54 + .../cts/checkout/src/webgpu/listing_meta.json | 724 +++- .../cts/checkout/src/webgpu/multisample_info.ts | 75 + .../checkout/src/webgpu/print_environment.spec.ts | 70 + .../expression/access/array/index.spec.ts | 354 ++ .../expression/access/matrix/index.spec.ts | 200 ++ .../expression/access/structure/index.spec.ts | 508 +++ .../expression/access/vector/components.spec.ts | 118 + .../expression/access/vector/index.spec.ts | 87 + .../expression/binary/af_addition.cache.ts | 54 + .../expression/binary/af_addition.spec.ts | 85 +- .../expression/binary/af_comparison.cache.ts | 90 + .../expression/binary/af_comparison.spec.ts | 141 +- .../expression/binary/af_division.cache.ts | 57 + .../expression/binary/af_division.spec.ts | 85 +- .../expression/binary/af_matrix_addition.cache.ts | 26 + .../expression/binary/af_matrix_addition.spec.ts | 34 +- .../af_matrix_matrix_multiplication.cache.ts | 29 + .../binary/af_matrix_matrix_multiplication.spec.ts | 45 + .../af_matrix_scalar_multiplication.cache.ts | 49 + .../binary/af_matrix_scalar_multiplication.spec.ts | 69 + .../binary/af_matrix_subtraction.cache.ts | 26 + .../binary/af_matrix_subtraction.spec.ts | 34 +- .../af_matrix_vector_multiplication.cache.ts | 51 + .../binary/af_matrix_vector_multiplication.spec.ts | 69 + .../expression/binary/af_multiplication.cache.ts | 54 + .../expression/binary/af_multiplication.spec.ts | 85 +- .../expression/binary/af_remainder.cache.ts | 57 + .../expression/binary/af_remainder.spec.ts | 83 +- .../expression/binary/af_subtraction.cache.ts | 54 + .../expression/binary/af_subtraction.spec.ts | 85 +- .../expression/binary/ai_arithmetic.cache.ts | 145 + .../expression/binary/ai_arithmetic.spec.ts | 303 ++ .../expression/binary/ai_comparison.spec.ts | 124 + .../shader/execution/expression/binary/binary.ts | 8 +- .../execution/expression/binary/bitwise.spec.ts | 505 ++- .../expression/binary/bitwise_shift.spec.ts | 25 +- .../expression/binary/bool_logical.spec.ts | 18 +- .../expression/binary/f16_addition.cache.ts | 60 + .../expression/binary/f16_addition.spec.ts | 81 +- .../expression/binary/f16_comparison.cache.ts | 144 + .../expression/binary/f16_comparison.spec.ts | 159 +- .../expression/binary/f16_division.cache.ts | 60 + .../expression/binary/f16_division.spec.ts | 81 +- .../expression/binary/f16_matrix_addition.cache.ts | 23 + .../expression/binary/f16_matrix_addition.spec.ts | 34 +- .../f16_matrix_matrix_multiplication.cache.ts | 25 + .../f16_matrix_matrix_multiplication.spec.ts | 36 +- .../f16_matrix_scalar_multiplication.cache.ts | 44 + .../f16_matrix_scalar_multiplication.spec.ts | 59 +- .../binary/f16_matrix_subtraction.cache.ts | 23 + .../binary/f16_matrix_subtraction.spec.ts | 34 +- .../f16_matrix_vector_multiplication.cache.ts | 44 + .../f16_matrix_vector_multiplication.spec.ts | 59 +- .../expression/binary/f16_multiplication.cache.ts | 60 + .../expression/binary/f16_multiplication.spec.ts | 81 +- .../expression/binary/f16_remainder.cache.ts | 60 + .../expression/binary/f16_remainder.spec.ts | 81 +- .../expression/binary/f16_subtraction.cache.ts | 60 + .../expression/binary/f16_subtraction.spec.ts | 81 +- .../expression/binary/f32_addition.cache.ts | 60 + .../expression/binary/f32_addition.spec.ts | 81 +- .../expression/binary/f32_comparison.cache.ts | 144 + .../expression/binary/f32_comparison.spec.ts | 159 +- .../expression/binary/f32_division.cache.ts | 60 + .../expression/binary/f32_division.spec.ts | 81 +- .../expression/binary/f32_matrix_addition.cache.ts | 23 + .../expression/binary/f32_matrix_addition.spec.ts | 34 +- .../f32_matrix_matrix_multiplication.cache.ts | 25 + .../f32_matrix_matrix_multiplication.spec.ts | 36 +- .../f32_matrix_scalar_multiplication.cache.ts | 44 + .../f32_matrix_scalar_multiplication.spec.ts | 59 +- .../binary/f32_matrix_subtraction.cache.ts | 23 + .../binary/f32_matrix_subtraction.spec.ts | 34 +- .../f32_matrix_vector_multiplication.cache.ts | 44 + .../f32_matrix_vector_multiplication.spec.ts | 59 +- .../expression/binary/f32_multiplication.cache.ts | 60 + .../expression/binary/f32_multiplication.spec.ts | 81 +- .../expression/binary/f32_remainder.cache.ts | 64 + .../expression/binary/f32_remainder.spec.ts | 81 +- .../expression/binary/f32_subtraction.cache.ts | 60 + .../expression/binary/f32_subtraction.spec.ts | 81 +- .../expression/binary/i32_arithmetic.cache.ts | 306 ++ .../expression/binary/i32_arithmetic.spec.ts | 392 +-- .../expression/binary/i32_comparison.cache.ts | 21 + .../expression/binary/i32_comparison.spec.ts | 36 +- .../expression/binary/u32_arithmetic.cache.ts | 293 ++ .../expression/binary/u32_arithmetic.spec.ts | 379 +-- .../expression/binary/u32_comparison.cache.ts | 21 + .../expression/binary/u32_comparison.spec.ts | 36 +- .../execution/expression/call/builtin/abs.cache.ts | 26 + .../execution/expression/call/builtin/abs.spec.ts | 64 +- .../expression/call/builtin/acos.cache.ts | 24 + .../execution/expression/call/builtin/acos.spec.ts | 57 +- .../expression/call/builtin/acosh.cache.ts | 24 + .../expression/call/builtin/acosh.spec.ts | 56 +- .../execution/expression/call/builtin/all.spec.ts | 20 +- .../execution/expression/call/builtin/any.spec.ts | 20 +- .../expression/call/builtin/asin.cache.ts | 24 + .../execution/expression/call/builtin/asin.spec.ts | 57 +- .../expression/call/builtin/asinh.cache.ts | 18 + .../expression/call/builtin/asinh.spec.ts | 41 +- .../expression/call/builtin/atan.cache.ts | 25 + .../execution/expression/call/builtin/atan.spec.ts | 52 +- .../expression/call/builtin/atan2.cache.ts | 35 + .../expression/call/builtin/atan2.spec.ts | 56 +- .../expression/call/builtin/atanh.cache.ts | 32 + .../expression/call/builtin/atanh.spec.ts | 63 +- .../call/builtin/atomics/atomicAdd.spec.ts | 4 +- .../call/builtin/atomics/atomicAnd.spec.ts | 4 +- .../atomics/atomicCompareExchangeWeak.spec.ts | 18 +- .../call/builtin/atomics/atomicExchange.spec.ts | 8 +- .../call/builtin/atomics/atomicLoad.spec.ts | 4 +- .../call/builtin/atomics/atomicMax.spec.ts | 4 +- .../call/builtin/atomics/atomicMin.spec.ts | 4 +- .../call/builtin/atomics/atomicOr.spec.ts | 4 +- .../call/builtin/atomics/atomicStore.spec.ts | 8 +- .../call/builtin/atomics/atomicSub.spec.ts | 4 +- .../call/builtin/atomics/atomicXor.spec.ts | 4 +- .../expression/call/builtin/atomics/harness.ts | 7 +- .../expression/call/builtin/bitcast.cache.ts | 837 +++++ .../expression/call/builtin/bitcast.spec.ts | 1142 ++----- .../execution/expression/call/builtin/builtin.ts | 8 +- .../expression/call/builtin/ceil.cache.ts | 26 + .../execution/expression/call/builtin/ceil.spec.ts | 79 +- .../expression/call/builtin/clamp.cache.ts | 131 + .../expression/call/builtin/clamp.spec.ts | 140 +- .../execution/expression/call/builtin/cos.cache.ts | 23 + .../execution/expression/call/builtin/cos.spec.ts | 57 +- .../expression/call/builtin/cosh.cache.ts | 23 + .../execution/expression/call/builtin/cosh.spec.ts | 47 +- .../call/builtin/countLeadingZeros.spec.ts | 6 +- .../expression/call/builtin/countOneBits.spec.ts | 6 +- .../call/builtin/countTrailingZeros.spec.ts | 6 +- .../expression/call/builtin/cross.cache.ts | 25 + .../expression/call/builtin/cross.spec.ts | 79 +- .../expression/call/builtin/degrees.cache.ts | 24 + .../expression/call/builtin/degrees.spec.ts | 52 +- .../expression/call/builtin/derivatives.cache.ts | 14 + .../expression/call/builtin/derivatives.ts | 215 ++ .../expression/call/builtin/determinant.cache.ts | 99 + .../expression/call/builtin/determinant.spec.ts | 112 +- .../expression/call/builtin/distance.cache.ts | 49 + .../expression/call/builtin/distance.spec.ts | 208 +- .../execution/expression/call/builtin/dot.cache.ts | 118 + .../execution/expression/call/builtin/dot.spec.ts | 238 +- .../expression/call/builtin/dot4I8Packed.spec.ts | 74 + .../expression/call/builtin/dot4U8Packed.spec.ts | 59 + .../execution/expression/call/builtin/dpdx.spec.ts | 16 +- .../expression/call/builtin/dpdxCoarse.spec.ts | 16 +- .../expression/call/builtin/dpdxFine.spec.ts | 16 +- .../execution/expression/call/builtin/dpdy.spec.ts | 16 +- .../expression/call/builtin/dpdyCoarse.spec.ts | 16 +- .../expression/call/builtin/dpdyFine.spec.ts | 16 +- .../execution/expression/call/builtin/exp.cache.ts | 44 + .../execution/expression/call/builtin/exp.spec.ts | 69 +- .../expression/call/builtin/exp2.cache.ts | 44 + .../execution/expression/call/builtin/exp2.spec.ts | 69 +- .../expression/call/builtin/extractBits.spec.ts | 20 +- .../expression/call/builtin/faceForward.cache.ts | 125 + .../expression/call/builtin/faceForward.spec.ts | 198 +- .../call/builtin/firstLeadingBit.spec.ts | 6 +- .../call/builtin/firstTrailingBit.spec.ts | 6 +- .../expression/call/builtin/floor.cache.ts | 26 + .../expression/call/builtin/floor.spec.ts | 61 +- .../execution/expression/call/builtin/fma.cache.ts | 26 + .../execution/expression/call/builtin/fma.spec.ts | 70 +- .../expression/call/builtin/fract.cache.ts | 50 + .../expression/call/builtin/fract.spec.ts | 81 +- .../expression/call/builtin/frexp.cache.ts | 103 + .../expression/call/builtin/frexp.spec.ts | 304 +- .../expression/call/builtin/insertBits.spec.ts | 18 +- .../expression/call/builtin/inversesqrt.cache.ts | 44 + .../expression/call/builtin/inversesqrt.spec.ts | 60 +- .../expression/call/builtin/ldexp.cache.ts | 61 + .../expression/call/builtin/ldexp.spec.ts | 94 +- .../expression/call/builtin/length.cache.ts | 42 + .../expression/call/builtin/length.spec.ts | 146 +- .../execution/expression/call/builtin/log.cache.ts | 30 + .../execution/expression/call/builtin/log.spec.ts | 62 +- .../expression/call/builtin/log2.cache.ts | 30 + .../execution/expression/call/builtin/log2.spec.ts | 62 +- .../execution/expression/call/builtin/max.cache.ts | 18 + .../execution/expression/call/builtin/max.spec.ts | 106 +- .../execution/expression/call/builtin/min.cache.ts | 18 + .../execution/expression/call/builtin/min.spec.ts | 106 +- .../execution/expression/call/builtin/mix.cache.ts | 56 + .../execution/expression/call/builtin/mix.spec.ts | 210 +- .../expression/call/builtin/modf.cache.ts | 75 + .../execution/expression/call/builtin/modf.spec.ts | 192 +- .../expression/call/builtin/normalize.cache.ts | 25 + .../expression/call/builtin/normalize.spec.ts | 88 +- .../expression/call/builtin/pack2x16float.cache.ts | 55 + .../expression/call/builtin/pack2x16float.spec.ts | 68 +- .../expression/call/builtin/pack2x16snorm.spec.ts | 15 +- .../expression/call/builtin/pack2x16unorm.spec.ts | 15 +- .../expression/call/builtin/pack4x8snorm.spec.ts | 23 +- .../expression/call/builtin/pack4x8unorm.spec.ts | 23 +- .../expression/call/builtin/pack4xI8.spec.ts | 69 + .../expression/call/builtin/pack4xI8Clamp.spec.ts | 73 + .../expression/call/builtin/pack4xU8.spec.ts | 54 + .../expression/call/builtin/pack4xU8Clamp.spec.ts | 57 + .../execution/expression/call/builtin/pow.cache.ts | 24 + .../execution/expression/call/builtin/pow.spec.ts | 67 +- .../expression/call/builtin/quantizeToF16.cache.ts | 41 + .../expression/call/builtin/quantizeToF16.spec.ts | 46 +- .../expression/call/builtin/radians.cache.ts | 18 + .../expression/call/builtin/radians.spec.ts | 44 +- .../expression/call/builtin/reflect.cache.ts | 26 + .../expression/call/builtin/reflect.spec.ts | 151 +- .../expression/call/builtin/refract.cache.ts | 116 + .../expression/call/builtin/refract.spec.ts | 191 +- .../expression/call/builtin/reverseBits.spec.ts | 6 +- .../expression/call/builtin/round.cache.ts | 24 + .../expression/call/builtin/round.spec.ts | 55 +- .../expression/call/builtin/saturate.cache.ts | 18 + .../expression/call/builtin/saturate.spec.ts | 56 +- .../expression/call/builtin/select.spec.ts | 129 +- .../expression/call/builtin/sign.cache.ts | 31 + .../execution/expression/call/builtin/sign.spec.ts | 66 +- .../execution/expression/call/builtin/sin.cache.ts | 23 + .../execution/expression/call/builtin/sin.spec.ts | 57 +- .../expression/call/builtin/sinh.cache.ts | 23 + .../execution/expression/call/builtin/sinh.spec.ts | 47 +- .../expression/call/builtin/smoothstep.cache.ts | 25 + .../expression/call/builtin/smoothstep.spec.ts | 71 +- .../expression/call/builtin/sqrt.cache.ts | 23 + .../execution/expression/call/builtin/sqrt.spec.ts | 47 +- .../expression/call/builtin/step.cache.ts | 41 + .../execution/expression/call/builtin/step.spec.ts | 66 +- .../execution/expression/call/builtin/tan.cache.ts | 23 + .../execution/expression/call/builtin/tan.spec.ts | 57 +- .../expression/call/builtin/tanh.cache.ts | 18 + .../execution/expression/call/builtin/tanh.spec.ts | 41 +- .../call/builtin/textureDimension.spec.ts | 160 - .../call/builtin/textureDimensions.spec.ts | 518 +++ .../expression/call/builtin/textureSample.spec.ts | 99 +- .../call/builtin/textureSampleBias.spec.ts | 22 - .../call/builtin/textureSampleCompare.spec.ts | 23 - .../expression/call/builtin/texture_utils.ts | 809 +++++ .../expression/call/builtin/transpose.cache.ts | 27 + .../expression/call/builtin/transpose.spec.ts | 85 +- .../expression/call/builtin/trunc.cache.ts | 17 + .../expression/call/builtin/trunc.spec.ts | 39 +- .../call/builtin/unpack2x16float.cache.ts | 20 + .../call/builtin/unpack2x16float.spec.ts | 25 +- .../call/builtin/unpack2x16snorm.cache.ts | 20 + .../call/builtin/unpack2x16snorm.spec.ts | 25 +- .../call/builtin/unpack2x16unorm.cache.ts | 20 + .../call/builtin/unpack2x16unorm.spec.ts | 25 +- .../call/builtin/unpack4x8snorm.cache.ts | 20 + .../expression/call/builtin/unpack4x8snorm.spec.ts | 25 +- .../call/builtin/unpack4x8unorm.cache.ts | 20 + .../expression/call/builtin/unpack4x8unorm.spec.ts | 25 +- .../expression/call/builtin/unpack4xI8.spec.ts | 56 + .../expression/call/builtin/unpack4xU8.spec.ts | 48 + .../call/builtin/workgroupUniformLoad.spec.ts | 182 + .../expression/call/user/ptr_params.spec.ts | 849 +++++ .../src/webgpu/shader/execution/expression/case.ts | 440 +++ .../shader/execution/expression/case_cache.ts | 39 +- .../expression/constructor/non_zero.spec.ts | 797 +++++ .../expression/constructor/zero_value.spec.ts | 162 + .../shader/execution/expression/expectation.ts | 38 + .../shader/execution/expression/expression.ts | 800 ++--- .../shader/execution/expression/interval_filter.ts | 8 + .../shader/execution/expression/precedence.spec.ts | 113 + .../unary/address_of_and_indirection.spec.ts | 171 + .../expression/unary/af_arithmetic.cache.ts | 13 + .../expression/unary/af_arithmetic.spec.ts | 30 +- .../expression/unary/af_assignment.cache.ts | 51 + .../expression/unary/af_assignment.spec.ts | 66 +- .../expression/unary/ai_arithmetic.cache.ts | 11 + .../expression/unary/ai_arithmetic.spec.ts | 30 + .../expression/unary/ai_assignment.cache.ts | 21 + .../expression/unary/ai_assignment.spec.ts | 65 + .../expression/unary/ai_complement.spec.ts | 32 + .../expression/unary/bool_conversion.cache.ts | 54 + .../expression/unary/bool_conversion.spec.ts | 87 +- .../expression/unary/bool_logical.spec.ts | 4 +- .../expression/unary/f16_arithmetic.cache.ts | 13 + .../expression/unary/f16_arithmetic.spec.ts | 18 +- .../expression/unary/f16_conversion.cache.ts | 135 + .../expression/unary/f16_conversion.spec.ts | 226 +- .../expression/unary/f32_arithmetic.cache.ts | 13 + .../expression/unary/f32_arithmetic.spec.ts | 18 +- .../expression/unary/f32_conversion.cache.ts | 79 + .../expression/unary/f32_conversion.spec.ts | 113 +- .../expression/unary/i32_arithmetic.cache.ts | 11 + .../expression/unary/i32_arithmetic.spec.ts | 15 +- .../expression/unary/i32_complement.spec.ts | 17 +- .../expression/unary/i32_conversion.cache.ts | 116 + .../expression/unary/i32_conversion.spec.ts | 158 +- .../expression/unary/u32_complement.spec.ts | 17 +- .../expression/unary/u32_conversion.cache.ts | 107 + .../expression/unary/u32_conversion.spec.ts | 144 +- .../shader/execution/expression/unary/unary.ts | 8 +- .../shader/execution/flow_control/call.spec.ts | 113 + .../shader/execution/flow_control/for.spec.ts | 50 + .../shader/execution/flow_control/loop.spec.ts | 60 + .../shader/execution/flow_control/switch.spec.ts | 33 + .../shader/execution/flow_control/while.spec.ts | 54 + .../webgpu/shader/execution/memory_layout.spec.ts | 1059 ++++++ .../shader/execution/memory_model/barrier.spec.ts | 179 +- .../execution/memory_model/memory_model_setup.ts | 341 +- .../texture_intra_invocation_coherence.spec.ts | 333 ++ .../webgpu/shader/execution/robust_access.spec.ts | 30 +- .../shader/execution/robust_access_vertex.spec.ts | 1 + .../execution/shader_io/compute_builtins.spec.ts | 175 +- .../execution/shader_io/fragment_builtins.spec.ts | 1410 ++++++++ .../shader/execution/shader_io/user_io.spec.ts | 213 ++ .../execution/shader_io/workgroup_size.spec.ts | 150 + .../src/webgpu/shader/execution/stage.spec.ts | 133 + .../shader/execution/statement/compound.spec.ts | 137 + .../shader/execution/statement/discard.spec.ts | 645 ++++ .../src/webgpu/shader/execution/zero_init.spec.ts | 4 + .../tests/cts/checkout/src/webgpu/shader/types.ts | 206 +- .../validation/const_assert/const_assert.spec.ts | 20 +- .../validation/decl/compound_statement.spec.ts | 98 + .../webgpu/shader/validation/decl/const.spec.ts | 158 + .../decl/context_dependent_resolution.spec.ts | 338 ++ .../src/webgpu/shader/validation/decl/let.spec.ts | 180 + .../webgpu/shader/validation/decl/override.spec.ts | 178 + .../src/webgpu/shader/validation/decl/var.spec.ts | 529 +++ .../validation/expression/access/vector.spec.ts | 3 +- .../expression/binary/add_sub_mul.spec.ts | 320 ++ .../expression/binary/and_or_xor.spec.ts | 182 + .../expression/binary/bitwise_shift.spec.ts | 182 +- .../expression/binary/comparison.spec.ts | 186 ++ .../validation/expression/binary/div_rem.spec.ts | 279 ++ .../validation/expression/call/builtin/abs.spec.ts | 114 +- .../expression/call/builtin/acos.spec.ts | 162 +- .../expression/call/builtin/acosh.spec.ts | 158 +- .../validation/expression/call/builtin/all.spec.ts | 191 ++ .../validation/expression/call/builtin/any.spec.ts | 191 ++ .../expression/call/builtin/arrayLength.spec.ts | 109 + .../expression/call/builtin/asin.spec.ts | 161 +- .../expression/call/builtin/asinh.spec.ts | 153 +- .../expression/call/builtin/atan.spec.ts | 146 +- .../expression/call/builtin/atan2.spec.ts | 293 +- .../expression/call/builtin/atanh.spec.ts | 169 +- .../expression/call/builtin/atomics.spec.ts | 235 +- .../expression/call/builtin/barriers.spec.ts | 109 + .../expression/call/builtin/ceil.spec.ts | 18 +- .../expression/call/builtin/clamp.spec.ts | 14 +- .../call/builtin/const_override_validation.ts | 292 +- .../validation/expression/call/builtin/cos.spec.ts | 59 +- .../expression/call/builtin/cosh.spec.ts | 66 +- .../call/builtin/countLeadingZeros.spec.ts | 198 ++ .../expression/call/builtin/countOneBits.spec.ts | 198 ++ .../call/builtin/countTrailingZeros.spec.ts | 198 ++ .../expression/call/builtin/cross.spec.ts | 122 + .../expression/call/builtin/degrees.spec.ts | 56 +- .../expression/call/builtin/derivatives.spec.ts | 129 + .../expression/call/builtin/determinant.spec.ts | 95 + .../expression/call/builtin/distance.spec.ts | 149 + .../expression/call/builtin/dot4I8Packed.spec.ts | 66 + .../expression/call/builtin/dot4U8Packed.spec.ts | 66 + .../validation/expression/call/builtin/exp.spec.ts | 122 +- .../expression/call/builtin/exp2.spec.ts | 122 +- .../expression/call/builtin/extractBits.spec.ts | 218 ++ .../expression/call/builtin/faceForward.spec.ts | 152 + .../call/builtin/firstLeadingBit.spec.ts | 198 ++ .../call/builtin/firstTrailingBit.spec.ts | 198 ++ .../expression/call/builtin/floor.spec.ts | 108 + .../expression/call/builtin/fract.spec.ts | 94 + .../expression/call/builtin/frexp.spec.ts | 94 + .../expression/call/builtin/insertBits.spec.ts | 241 ++ .../expression/call/builtin/inverseSqrt.spec.ts | 76 +- .../expression/call/builtin/length.spec.ts | 58 +- .../validation/expression/call/builtin/log.spec.ts | 50 +- .../expression/call/builtin/log2.spec.ts | 50 +- .../validation/expression/call/builtin/max.spec.ts | 91 + .../validation/expression/call/builtin/min.spec.ts | 91 + .../expression/call/builtin/modf.spec.ts | 17 +- .../expression/call/builtin/normalize.spec.ts | 146 + .../expression/call/builtin/pack2x16snorm.spec.ts | 58 + .../expression/call/builtin/pack2x16unorm.spec.ts | 58 + .../expression/call/builtin/pack4x8snorm.spec.ts | 58 + .../expression/call/builtin/pack4x8unorm.spec.ts | 58 + .../expression/call/builtin/pack4xI8.spec.ts | 62 + .../expression/call/builtin/pack4xI8Clamp.spec.ts | 62 + .../expression/call/builtin/pack4xU8.spec.ts | 62 + .../expression/call/builtin/pack4xU8Clamp.spec.ts | 62 + .../expression/call/builtin/quantizeToF16.spec.ts | 113 + .../expression/call/builtin/radians.spec.ts | 50 +- .../expression/call/builtin/reflect.spec.ts | 131 + .../expression/call/builtin/reverseBits.spec.ts | 198 ++ .../expression/call/builtin/round.spec.ts | 31 +- .../expression/call/builtin/saturate.spec.ts | 17 +- .../expression/call/builtin/select.spec.ts | 250 ++ .../expression/call/builtin/shader_stage_utils.ts | 64 + .../expression/call/builtin/sign.spec.ts | 63 +- .../validation/expression/call/builtin/sin.spec.ts | 60 +- .../expression/call/builtin/sinh.spec.ts | 66 +- .../expression/call/builtin/smoothstep.spec.ts | 241 ++ .../expression/call/builtin/sqrt.spec.ts | 66 +- .../expression/call/builtin/step.spec.ts | 108 + .../validation/expression/call/builtin/tan.spec.ts | 76 +- .../expression/call/builtin/tanh.spec.ts | 98 + .../expression/call/builtin/textureGather.spec.ts | 335 ++ .../call/builtin/textureGatherCompare.spec.ts | 264 ++ .../expression/call/builtin/textureLoad.spec.ts | 370 +++ .../expression/call/builtin/textureSample.spec.ts | 267 ++ .../builtin/textureSampleBaseClampToEdge.spec.ts | 54 + .../call/builtin/textureSampleBias.spec.ts | 309 ++ .../call/builtin/textureSampleCompare.spec.ts | 308 ++ .../call/builtin/textureSampleCompareLevel.spec.ts | 268 ++ .../call/builtin/textureSampleGrad.spec.ts | 317 ++ .../call/builtin/textureSampleLevel.spec.ts | 282 ++ .../expression/call/builtin/textureStore.spec.ts | 168 + .../expression/call/builtin/trunc.spec.ts | 94 + .../call/builtin/unpack2x16float.spec.ts | 62 + .../call/builtin/unpack2x16snorm.spec.ts | 62 + .../call/builtin/unpack2x16unorm.spec.ts | 62 + .../expression/call/builtin/unpack4x8snorm.spec.ts | 62 + .../expression/call/builtin/unpack4x8unorm.spec.ts | 62 + .../expression/call/builtin/unpack4xI8.spec.ts | 61 + .../expression/call/builtin/unpack4xU8.spec.ts | 61 + .../call/builtin/workgroupUniformLoad.spec.ts | 122 + .../expression/overload_resolution.spec.ts | 268 ++ .../validation/expression/precedence.spec.ts | 188 ++ .../unary/address_of_and_indirection.spec.ts | 243 ++ .../expression/unary/arithmetic_negation.spec.ts | 114 + .../expression/unary/bitwise_complement.spec.ts | 114 + .../expression/unary/logical_negation.spec.ts | 114 + .../extension/pointer_composite_access.spec.ts | 130 + ...readonly_and_readwrite_storage_textures.spec.ts | 48 + .../validation/functions/alias_analysis.spec.ts | 545 ++- .../validation/functions/restrictions.spec.ts | 313 +- .../webgpu/shader/validation/parse/break.spec.ts | 4 - .../shader/validation/parse/break_if.spec.ts | 141 + .../shader/validation/parse/compound.spec.ts | 52 + .../shader/validation/parse/continuing.spec.ts | 185 ++ .../shader/validation/parse/diagnostic.spec.ts | 260 ++ .../webgpu/shader/validation/parse/enable.spec.ts | 18 +- .../shader/validation/parse/must_use.spec.ts | 63 +- .../shader/validation/parse/pipeline_stage.spec.ts | 42 +- .../shader/validation/parse/requires.spec.ts | 103 + .../shader/validation/parse/semicolon.spec.ts | 15 + .../validation/parse/shadow_builtins.spec.ts | 995 ++++++ .../validation/parse/statement_behavior.spec.ts | 143 + .../shader/validation/shader_io/binding.spec.ts | 14 - .../shader/validation/shader_io/builtins.spec.ts | 4 +- .../shader/validation/shader_io/group.spec.ts | 14 - .../validation/shader_io/group_and_binding.spec.ts | 4 +- .../shader_io/layout_constraints.spec.ts | 543 +++ .../shader/validation/shader_io/locations.spec.ts | 149 + .../shader/validation/shader_io/size.spec.ts | 20 +- .../webgpu/shader/validation/types/alias.spec.ts | 122 + .../webgpu/shader/validation/types/array.spec.ts | 122 + .../webgpu/shader/validation/types/atomics.spec.ts | 145 + .../webgpu/shader/validation/types/matrix.spec.ts | 152 + .../shader/validation/types/textures.spec.ts | 170 + .../validation/uniformity/uniformity.spec.ts | 209 +- .../cts/checkout/src/webgpu/util/binary_stream.ts | 10 + .../cts/checkout/src/webgpu/util/check_contents.ts | 38 +- .../src/webgpu/util/color_space_conversion.ts | 32 +- .../tests/cts/checkout/src/webgpu/util/compare.ts | 32 +- .../cts/checkout/src/webgpu/util/constants.ts | 15 + .../cts/checkout/src/webgpu/util/conversion.ts | 1752 +++++++--- .../cts/checkout/src/webgpu/util/device_pool.ts | 12 +- .../cts/checkout/src/webgpu/util/floating_point.ts | 601 ++-- .../tests/cts/checkout/src/webgpu/util/math.ts | 465 ++- .../checkout/src/webgpu/util/pretty_diff_tables.ts | 37 +- .../tests/cts/checkout/src/webgpu/util/shader.ts | 25 +- .../cts/checkout/src/webgpu/util/texture/base.ts | 44 +- .../util/texture/color_space_conversions.spec.ts | 108 + .../src/webgpu/util/texture/texel_data.spec.ts | 16 +- .../checkout/src/webgpu/util/texture/texel_data.ts | 50 +- .../checkout/src/webgpu/util/texture/texel_view.ts | 17 +- .../checkout/src/webgpu/util/texture/texture_ok.ts | 20 +- .../webgpu/web_platform/canvas/configure.spec.ts | 5 +- .../web_platform/canvas/getCurrentTexture.spec.ts | 75 +- .../canvas/readbackFromWebGPUCanvas.spec.ts | 155 +- .../web_platform/copyToTexture/canvas.spec.ts | 6 +- .../web_platform/copyToTexture/video.spec.ts | 86 +- .../web_platform/external_texture/video.spec.ts | 349 +- .../canvas_colorspace_bgra8unorm.https.html | 1 + .../canvas_colorspace_rgba16float.https.html | 2 +- .../canvas_colorspace_rgba8unorm.https.html | 1 + ..._alpha_bgra8unorm_premultiplied_copy.https.html | 2 +- ..._alpha_bgra8unorm_premultiplied_draw.https.html | 2 +- ...alpha_rgba16float_premultiplied_copy.https.html | 2 +- ...alpha_rgba16float_premultiplied_draw.https.html | 2 +- ..._alpha_rgba8unorm_premultiplied_copy.https.html | 2 +- ..._alpha_rgba8unorm_premultiplied_draw.https.html | 2 +- .../reftests/canvas_image_rendering.https.html | 12 +- .../reftests/delay_get_texture.html.ts | 46 + .../reftests/delay_get_texture.https.html | 10 + .../reftests/ref/canvas_image_rendering-ref.html | 12 +- .../reftests/ref/delay_get_texture-ref.html | 17 + .../cts/checkout/src/webgpu/web_platform/util.ts | 430 ++- .../src/webgpu/web_platform/worker/worker.spec.ts | 72 +- .../src/webgpu/web_platform/worker/worker.ts | 20 +- .../webgpu/web_platform/worker/worker_launcher.ts | 59 +- dom/webgpu/tests/cts/checkout/tools/gen_listings | 7 - .../cts/checkout/tools/gen_listings_and_webworkers | 8 + dom/webgpu/tests/cts/checkout/tools/gen_version | 13 +- .../checkout/tools/gen_wpt_cfg_chunked2sec.json | 1 + .../cts/checkout/tools/gen_wpt_cfg_unchunked.json | 1 + dom/webgpu/tests/cts/checkout/tools/server | 6 + dom/webgpu/tests/cts/checkout_commit.txt | 2 +- dom/webgpu/tests/cts/vendor/Cargo.lock | 106 +- dom/webgpu/tests/cts/vendor/Cargo.toml | 2 + dom/webgpu/tests/cts/vendor/src/fs.rs | 33 +- dom/webgpu/tests/cts/vendor/src/main.rs | 49 +- dom/webidl/AddonManager.webidl | 19 - dom/webidl/CSPDictionaries.webidl | 2 + dom/webidl/CSSMarginRule.webidl | 15 + dom/webidl/CSSStyleRule.webidl | 4 + dom/webidl/Clipboard.webidl | 2 + dom/webidl/HTMLAnchorElement.webidl | 2 +- dom/webidl/HTMLAreaElement.webidl | 2 +- dom/webidl/HTMLSourceElement.webidl | 4 +- dom/webidl/IDBFactory.webidl | 10 +- dom/webidl/PushSubscription.webidl | 6 +- dom/webidl/RTCDataChannel.webidl | 2 +- dom/webidl/Selection.webidl | 2 + dom/webidl/StorageEvent.webidl | 7 +- dom/webidl/WebGLRenderingContext.webidl | 5 + dom/webidl/WebGPU.webidl | 3 + dom/webidl/moz.build | 1 + dom/webscheduling/WebTaskSchedulerWorker.cpp | 4 +- dom/websocket/WebSocket.cpp | 38 +- dom/webtransport/parent/WebTransportParent.cpp | 26 - dom/workers/EventWithOptionsRunnable.cpp | 16 +- dom/workers/MessageEventRunnable.cpp | 112 +- dom/workers/MessageEventRunnable.h | 16 +- dom/workers/RuntimeService.cpp | 47 +- dom/workers/ScriptLoader.cpp | 6 +- dom/workers/Worker.cpp | 6 +- dom/workers/WorkerCSPEventListener.cpp | 5 +- dom/workers/WorkerDebugger.cpp | 8 +- dom/workers/WorkerDocumentListener.cpp | 7 +- dom/workers/WorkerError.cpp | 12 +- dom/workers/WorkerEventTarget.cpp | 7 +- dom/workers/WorkerNavigator.cpp | 2 + dom/workers/WorkerPrivate.cpp | 267 +- dom/workers/WorkerPrivate.h | 55 +- dom/workers/WorkerRef.cpp | 5 +- dom/workers/WorkerRef.h | 2 + dom/workers/WorkerRunnable.cpp | 563 ++-- dom/workers/WorkerRunnable.h | 304 +- dom/workers/WorkerScope.cpp | 22 +- dom/workers/WorkerThread.cpp | 87 +- dom/workers/WorkerThread.h | 11 +- dom/workers/remoteworkers/RemoteWorkerChild.cpp | 6 +- dom/workers/test/test_worker_interfaces.js | 1 + dom/xhr/XMLHttpRequestString.cpp | 3 +- dom/xhr/XMLHttpRequestWorker.cpp | 13 +- dom/xul/nsXULElement.cpp | 23 +- dom/xul/nsXULElement.h | 4 +- 1345 files changed, 84290 insertions(+), 23354 deletions(-) create mode 100644 dom/base/CrossShadowBoundaryRange.cpp create mode 100644 dom/base/CrossShadowBoundaryRange.h create mode 100644 dom/base/FocusModel.h create mode 100644 dom/base/crashtests/1741957.html create mode 100644 dom/base/test/jsmodules/importmaps/bug_1893164_module_1.mjs create mode 100644 dom/base/test/jsmodules/importmaps/bug_1893164_module_2.mjs create mode 100644 dom/base/test/jsmodules/importmaps/bug_1893164_module_3.mjs create mode 100644 dom/base/test/jsmodules/importmaps/bug_1894631_module_1.mjs create mode 100644 dom/base/test/jsmodules/importmaps/bug_1894631_module_2.mjs create mode 100644 dom/base/test/jsmodules/importmaps/bug_1894631_module_3.mjs create mode 100644 dom/base/test/jsmodules/importmaps/bug_1894631_module_4.mjs create mode 100644 dom/base/test/jsmodules/importmaps/test_bug_1893164.html create mode 100644 dom/base/test/jsmodules/importmaps/test_shared_submodules_with_modulepreload.html create mode 100644 dom/console/tests/xpcshell/test_worker.js create mode 100644 dom/console/tests/xpcshell/worker.mjs create mode 100644 dom/html/test/forms/test_input_datetime_preventDefault.html create mode 100644 dom/media/ImageConversion.cpp create mode 100644 dom/media/ImageConversion.h delete mode 100644 dom/media/ImageToI420.cpp delete mode 100644 dom/media/ImageToI420.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/COPYING.LGPLv2.1 create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavcodec/avcodec.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavcodec/avdct.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavcodec/bsf.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavcodec/codec.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavcodec/codec_desc.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavcodec/codec_id.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavcodec/codec_par.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavcodec/defs.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavcodec/packet.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavcodec/vdpau.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavcodec/version.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavcodec/version_major.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/attributes.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/avconfig.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/avutil.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/buffer.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/channel_layout.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/common.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/cpu.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/dict.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/error.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/frame.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/hwcontext.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/hwcontext_drm.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/hwcontext_vaapi.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/intfloat.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/log.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/macros.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/mathematics.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/mem.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/pixfmt.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/rational.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/samplefmt.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/include/libavutil/version.h create mode 100644 dom/media/platforms/ffmpeg/ffmpeg61/moz.build create mode 100644 dom/media/platforms/wmf/WMFDataEncoderUtils.cpp create mode 100644 dom/media/platforms/wmf/WMFMediaDataEncoder.cpp create mode 100644 dom/media/test/complete_length_worker.js create mode 100644 dom/media/test/test_complete_length.html create mode 100644 dom/media/webcodecs/crashtests/1889831.html create mode 100644 dom/notification/old/MemoryNotificationDB.sys.mjs delete mode 100644 dom/push/PushUtil.cpp delete mode 100644 dom/push/PushUtil.h create mode 100644 dom/tests/mochitest/webcomponents/test_custom_element_auto_import.html delete mode 100644 dom/tests/mochitest/webcomponents/test_custom_element_ensure_custom_element.html create mode 100644 dom/webgpu/tests/cts/checkout/docs/case_cache.md create mode 100644 dom/webgpu/tests/cts/checkout/src/common/runtime/helper/utils_worker.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/common/runtime/helper/wrap_for_worker.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/common/tools/gen_listings_and_webworkers.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/common/util/crc32.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/common/util/parse_imports.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/hashes.json create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/abs.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/acos.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/acosh.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/asin.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/asinh.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/atan.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/atan2.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/atanh.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/af_addition.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/af_division.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/af_logical.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/af_matrix_addition.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/af_matrix_matrix_multiplication.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/af_matrix_scalar_multiplication.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/af_matrix_subtraction.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/af_matrix_vector_multiplication.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/af_multiplication.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/af_remainder.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/af_subtraction.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/ai_arithmetic.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f16_addition.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f16_division.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f16_logical.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f16_matrix_addition.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f16_matrix_matrix_multiplication.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f16_matrix_scalar_multiplication.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f16_matrix_subtraction.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f16_matrix_vector_multiplication.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f16_multiplication.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f16_remainder.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f16_subtraction.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f32_addition.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f32_division.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f32_logical.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f32_matrix_addition.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f32_matrix_matrix_multiplication.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f32_matrix_scalar_multiplication.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f32_matrix_subtraction.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f32_matrix_vector_multiplication.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f32_multiplication.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f32_remainder.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/f32_subtraction.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/i32_arithmetic.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/i32_comparison.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/u32_arithmetic.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/binary/u32_comparison.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/bitcast.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/ceil.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/clamp.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/cos.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/cosh.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/cross.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/degrees.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/derivatives.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/determinant.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/distance.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/dot.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/exp.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/exp2.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/faceForward.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/floor.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/fma.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/fract.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/frexp.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/inverseSqrt.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/ldexp.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/length.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/log.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/log2.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/max.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/min.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/mix.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/modf.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/normalize.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/pack2x16float.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/pow.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/quantizeToF16.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/radians.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/reflect.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/refract.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/round.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/saturate.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/sign.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/sin.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/sinh.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/smoothstep.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/sqrt.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/step.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/tan.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/tanh.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/transpose.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/trunc.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/unary/af_arithmetic.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/unary/af_assignment.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/unary/ai_arithmetic.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/unary/ai_assignment.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/unary/bool_conversion.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/unary/f16_arithmetic.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/unary/f16_conversion.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/unary/f32_arithmetic.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/unary/f32_conversion.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/unary/i32_arithmetic.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/unary/i32_conversion.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/unary/u32_conversion.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/unpack2x16float.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/unpack2x16snorm.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/unpack2x16unorm.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/unpack4x8snorm.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/cache/webgpu/shader/execution/unpack4x8unorm.bin create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/four-colors-h264-bt601-hflip.mp4 create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/four-colors-h264-bt601-vflip.mp4 delete mode 100644 dom/webgpu/tests/cts/checkout/src/resources/four-colors-theora-bt601.ogv create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/four-colors-vp9-bt601-hflip.mp4 create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/four-colors-vp9-bt601-rotate-180.mp4 create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/four-colors-vp9-bt601-rotate-270.mp4 create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/four-colors-vp9-bt601-rotate-90.mp4 create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/four-colors-vp9-bt601-vflip.mp4 create mode 100644 dom/webgpu/tests/cts/checkout/src/resources/four-colors-vp9-bt601.mp4 create mode 100644 dom/webgpu/tests/cts/checkout/src/unittests/crc32.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/unittests/parse_imports.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/api/operation/memory_sync/texture/readonly_depth_stencil.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/api/operation/rendering/3d_texture_slices.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/api/operation/resource_init/check_texture/texture_zero_init_test.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/api/operation/storage_texture/read_only.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/api/operation/storage_texture/read_write.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/api/validation/capability_checks/limits/maxBindGroupsPlusVertexBuffers.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/api/validation/render_pipeline/resource_compatibility.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/api/validation/utils.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/compat/api/validation/createBindGroup.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/compat/api/validation/createBindGroupLayout.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/compat/api/validation/encoding/cmds/copyTextureToTexture.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/compat/api/validation/render_pipeline/depth_stencil_state.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/idl/constructable.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/multisample_info.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/print_environment.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/access/array/index.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/access/matrix/index.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/access/structure/index.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/access/vector/components.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/access/vector/index.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_addition.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_comparison.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_division.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_matrix_addition.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_matrix_matrix_multiplication.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_matrix_matrix_multiplication.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_matrix_scalar_multiplication.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_matrix_scalar_multiplication.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_matrix_subtraction.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_matrix_vector_multiplication.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_matrix_vector_multiplication.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_multiplication.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_remainder.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/af_subtraction.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/ai_arithmetic.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/ai_arithmetic.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/ai_comparison.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f16_addition.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f16_comparison.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f16_division.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f16_matrix_addition.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f16_matrix_matrix_multiplication.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f16_matrix_scalar_multiplication.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f16_matrix_subtraction.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f16_matrix_vector_multiplication.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f16_multiplication.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f16_remainder.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f16_subtraction.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f32_addition.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f32_comparison.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f32_division.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f32_matrix_addition.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f32_matrix_matrix_multiplication.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f32_matrix_scalar_multiplication.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f32_matrix_subtraction.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f32_matrix_vector_multiplication.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f32_multiplication.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f32_remainder.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/f32_subtraction.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/i32_arithmetic.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/i32_comparison.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/u32_arithmetic.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/u32_comparison.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/abs.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/acos.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/acosh.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/asin.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/asinh.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/atan.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/atan2.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/atanh.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/bitcast.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/ceil.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/clamp.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/cos.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/cosh.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/cross.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/degrees.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/derivatives.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/derivatives.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/determinant.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/distance.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/dot.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/dot4I8Packed.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/dot4U8Packed.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/exp.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/exp2.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/faceForward.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/floor.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/fma.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/fract.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/frexp.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/inversesqrt.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/ldexp.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/length.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/log.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/log2.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/max.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/min.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/mix.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/modf.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/normalize.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/pack2x16float.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/pack4xI8.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/pack4xI8Clamp.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/pack4xU8.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/pack4xU8Clamp.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/pow.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/quantizeToF16.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/radians.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/reflect.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/refract.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/round.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/saturate.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/sign.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/sin.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/sinh.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/smoothstep.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/sqrt.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/step.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/tan.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/tanh.cache.ts delete mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/textureDimension.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/textureDimensions.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/texture_utils.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/transpose.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/trunc.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/unpack2x16float.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/unpack2x16snorm.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/unpack2x16unorm.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/unpack4x8snorm.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/unpack4x8unorm.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/unpack4xI8.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/unpack4xU8.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/builtin/workgroupUniformLoad.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/call/user/ptr_params.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/case.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/constructor/non_zero.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/constructor/zero_value.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/expectation.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/interval_filter.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/precedence.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/unary/address_of_and_indirection.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/unary/af_arithmetic.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/unary/af_assignment.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/unary/ai_arithmetic.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/unary/ai_arithmetic.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/unary/ai_assignment.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/unary/ai_assignment.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/unary/ai_complement.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/unary/bool_conversion.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/unary/f16_arithmetic.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/unary/f16_conversion.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/unary/f32_arithmetic.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/unary/f32_conversion.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/unary/i32_arithmetic.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/unary/i32_conversion.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/unary/u32_conversion.cache.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/memory_layout.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/memory_model/texture_intra_invocation_coherence.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/shader_io/fragment_builtins.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/shader_io/user_io.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/shader_io/workgroup_size.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/stage.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/statement/compound.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/statement/discard.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/decl/compound_statement.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/decl/context_dependent_resolution.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/decl/let.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/decl/var.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/binary/add_sub_mul.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/binary/and_or_xor.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/binary/comparison.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/binary/div_rem.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/all.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/any.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/arrayLength.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/barriers.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/countLeadingZeros.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/countOneBits.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/countTrailingZeros.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/cross.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/derivatives.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/determinant.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/distance.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/dot4I8Packed.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/dot4U8Packed.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/extractBits.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/faceForward.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/firstLeadingBit.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/firstTrailingBit.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/floor.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/fract.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/frexp.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/insertBits.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/max.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/min.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/normalize.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/pack2x16snorm.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/pack2x16unorm.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/pack4x8snorm.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/pack4x8unorm.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/pack4xI8.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/pack4xI8Clamp.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/pack4xU8.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/pack4xU8Clamp.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/quantizeToF16.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/reflect.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/reverseBits.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/select.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/shader_stage_utils.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/smoothstep.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/step.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/tanh.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/textureGather.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/textureGatherCompare.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/textureLoad.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/textureSample.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/textureSampleBaseClampToEdge.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/textureSampleBias.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/textureSampleCompare.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/textureSampleCompareLevel.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/textureSampleGrad.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/textureSampleLevel.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/textureStore.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/trunc.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/unpack2x16float.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/unpack2x16snorm.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/unpack2x16unorm.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/unpack4x8snorm.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/unpack4x8unorm.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/unpack4xI8.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/unpack4xU8.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/call/builtin/workgroupUniformLoad.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/overload_resolution.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/precedence.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/unary/address_of_and_indirection.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/unary/arithmetic_negation.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/unary/bitwise_complement.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/expression/unary/logical_negation.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/extension/pointer_composite_access.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/extension/readonly_and_readwrite_storage_textures.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/parse/break_if.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/parse/compound.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/parse/continuing.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/parse/requires.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/parse/shadow_builtins.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/parse/statement_behavior.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/shader_io/layout_constraints.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/types/array.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/types/atomics.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/types/matrix.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/types/textures.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/util/texture/color_space_conversions.spec.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/web_platform/reftests/delay_get_texture.html.ts create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/web_platform/reftests/delay_get_texture.https.html create mode 100644 dom/webgpu/tests/cts/checkout/src/webgpu/web_platform/reftests/ref/delay_get_texture-ref.html delete mode 100755 dom/webgpu/tests/cts/checkout/tools/gen_listings create mode 100644 dom/webgpu/tests/cts/checkout/tools/gen_listings_and_webworkers create mode 100644 dom/webgpu/tests/cts/checkout/tools/server create mode 100644 dom/webidl/CSSMarginRule.webidl (limited to 'dom') diff --git a/dom/base/AbstractRange.cpp b/dom/base/AbstractRange.cpp index c9138a19d2..f5d584599b 100644 --- a/dom/base/AbstractRange.cpp +++ b/dom/base/AbstractRange.cpp @@ -49,6 +49,8 @@ template nsresult AbstractRange::SetStartAndEndInternal( const RawRangeBoundary& aEndBoundary, StaticRange* aRange); template bool AbstractRange::MaybeCacheToReuse(nsRange& aInstance); template bool AbstractRange::MaybeCacheToReuse(StaticRange& aInstance); +template bool AbstractRange::MaybeCacheToReuse( + CrossShadowBoundaryRange& aInstance); bool AbstractRange::sHasShutDown = false; @@ -209,6 +211,12 @@ void AbstractRange::Shutdown() { cachedRanges->Clear(); delete cachedRanges; } + if (nsTArray>* cachedRanges = + CrossShadowBoundaryRange::sCachedRanges) { + CrossShadowBoundaryRange::sCachedRanges = nullptr; + cachedRanges->Clear(); + delete cachedRanges; + } } // static diff --git a/dom/base/BodyConsumer.cpp b/dom/base/BodyConsumer.cpp index 754586a08b..81c9bb113d 100644 --- a/dom/base/BodyConsumer.cpp +++ b/dom/base/BodyConsumer.cpp @@ -74,7 +74,7 @@ class ContinueConsumeBodyRunnable final : public MainThreadWorkerRunnable { ContinueConsumeBodyRunnable(BodyConsumer* aBodyConsumer, WorkerPrivate* aWorkerPrivate, nsresult aStatus, uint32_t aLength, uint8_t* aResult) - : MainThreadWorkerRunnable(aWorkerPrivate, "ContinueConsumeBodyRunnable"), + : MainThreadWorkerRunnable("ContinueConsumeBodyRunnable"), mBodyConsumer(aBodyConsumer), mStatus(aStatus), mLength(aLength), @@ -97,7 +97,7 @@ class AbortConsumeBodyControlRunnable final public: AbortConsumeBodyControlRunnable(BodyConsumer* aBodyConsumer, WorkerPrivate* aWorkerPrivate) - : MainThreadWorkerControlRunnable(aWorkerPrivate), + : MainThreadWorkerControlRunnable("AbortConsumeBodyControlRunnable"), mBodyConsumer(aBodyConsumer) { MOZ_ASSERT(NS_IsMainThread()); } @@ -131,7 +131,7 @@ class MOZ_STACK_CLASS AutoFailConsumeBody final { RefPtr r = new AbortConsumeBodyControlRunnable(mBodyConsumer, mWorkerRef->Private()); - if (!r->Dispatch()) { + if (!r->Dispatch(mWorkerRef->Private())) { MOZ_CRASH("We are going to leak"); } return; @@ -159,8 +159,7 @@ class ContinueConsumeBlobBodyRunnable final : public MainThreadWorkerRunnable { ContinueConsumeBlobBodyRunnable(BodyConsumer* aBodyConsumer, WorkerPrivate* aWorkerPrivate, BlobImpl* aBlobImpl) - : MainThreadWorkerRunnable(aWorkerPrivate, - "ContinueConsumeBlobBodyRunnable"), + : MainThreadWorkerRunnable("ContinueConsumeBlobBodyRunnable"), mBodyConsumer(aBodyConsumer), mBlobImpl(aBlobImpl) { MOZ_ASSERT(NS_IsMainThread()); @@ -182,7 +181,7 @@ class AbortConsumeBlobBodyControlRunnable final public: AbortConsumeBlobBodyControlRunnable(BodyConsumer* aBodyConsumer, WorkerPrivate* aWorkerPrivate) - : MainThreadWorkerControlRunnable(aWorkerPrivate), + : MainThreadWorkerControlRunnable("AbortConsumeBlobBodyControlRunnable"), mBodyConsumer(aBodyConsumer) { MOZ_ASSERT(NS_IsMainThread()); } @@ -227,7 +226,7 @@ class ConsumeBodyDoneObserver final : public nsIStreamLoaderObserver, RefPtr r = new ContinueConsumeBodyRunnable( mBodyConsumer, mWorkerRef->Private(), aStatus, aResultLength, nonconstResult); - if (r->Dispatch()) { + if (r->Dispatch(mWorkerRef->Private())) { // The caller is responsible for data. return NS_SUCCESS_ADOPTED_DATA; } @@ -239,7 +238,7 @@ class ConsumeBodyDoneObserver final : public nsIStreamLoaderObserver, RefPtr r = new AbortConsumeBodyControlRunnable(mBodyConsumer, mWorkerRef->Private()); - if (NS_WARN_IF(!r->Dispatch())) { + if (NS_WARN_IF(!r->Dispatch(mWorkerRef->Private()))) { return NS_ERROR_FAILURE; } @@ -620,14 +619,14 @@ void BodyConsumer::DispatchContinueConsumeBlobBody( new ContinueConsumeBlobBodyRunnable(this, aWorkerRef->Private(), aBlobImpl); - if (r->Dispatch()) { + if (r->Dispatch(aWorkerRef->Private())) { return; } } else { RefPtr r = new ContinueConsumeBodyRunnable( this, aWorkerRef->Private(), NS_ERROR_DOM_ABORT_ERR, 0, nullptr); - if (r->Dispatch()) { + if (r->Dispatch(aWorkerRef->Private())) { return; } } @@ -638,7 +637,7 @@ void BodyConsumer::DispatchContinueConsumeBlobBody( RefPtr r = new AbortConsumeBlobBodyControlRunnable(this, aWorkerRef->Private()); - Unused << NS_WARN_IF(!r->Dispatch()); + Unused << NS_WARN_IF(!r->Dispatch(aWorkerRef->Private())); } /* @@ -673,12 +672,14 @@ void BodyConsumer::ContinueConsumeBody(nsresult aStatus, uint32_t aResultLength, if (NS_WARN_IF(NS_FAILED(aStatus))) { // Per - // https://fetch.spec.whatwg.org/#concept-read-all-bytes-from-readablestream + // https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes // Decoding errors should reject with a TypeError if (aStatus == NS_ERROR_INVALID_CONTENT_ENCODING) { localPromise->MaybeRejectWithTypeError(); } else if (aStatus == NS_ERROR_DOM_WRONG_TYPE_ERR) { localPromise->MaybeRejectWithTypeError(); + } else if (aStatus == NS_ERROR_NET_PARTIAL_TRANSFER) { + localPromise->MaybeRejectWithTypeError(); } else { localPromise->MaybeReject(NS_ERROR_DOM_ABORT_ERR); } diff --git a/dom/base/ContentIterator.cpp b/dom/base/ContentIterator.cpp index 0b405f0348..80c795d137 100644 --- a/dom/base/ContentIterator.cpp +++ b/dom/base/ContentIterator.cpp @@ -715,7 +715,7 @@ nsIContent* ContentIteratorBase::GetNextSibling( // For shadow root, instead of getting to the sibling of the parent // directly, we need to get into the light tree of the parent to handle // slotted contents. - if (ShadowRoot* shadowRoot = ShadowRoot::FromNode(aNode)) { + if (aNode->IsShadowRoot()) { if (nsIContent* child = parent->GetFirstChild()) { return child; } diff --git a/dom/base/CrossShadowBoundaryRange.cpp b/dom/base/CrossShadowBoundaryRange.cpp new file mode 100644 index 0000000000..33fa9760e6 --- /dev/null +++ b/dom/base/CrossShadowBoundaryRange.cpp @@ -0,0 +1,115 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "mozilla/dom/CrossShadowBoundaryRange.h" +#include "nsContentUtils.h" +#include "nsINode.h" + +namespace mozilla::dom { +template already_AddRefed +CrossShadowBoundaryRange::Create(const RangeBoundary& aStartBoundary, + const RangeBoundary& aEndBoundary); +template already_AddRefed +CrossShadowBoundaryRange::Create(const RangeBoundary& aStartBoundary, + const RawRangeBoundary& aEndBoundary); +template already_AddRefed +CrossShadowBoundaryRange::Create(const RawRangeBoundary& aStartBoundary, + const RangeBoundary& aEndBoundary); +template already_AddRefed +CrossShadowBoundaryRange::Create(const RawRangeBoundary& aStartBoundary, + const RawRangeBoundary& aEndBoundary); + +template void CrossShadowBoundaryRange::DoSetRange( + const RangeBoundary& aStartBoundary, const RangeBoundary& aEndBoundary, + nsINode* aRootNode); +template void CrossShadowBoundaryRange::DoSetRange( + const RangeBoundary& aStartBoundary, const RawRangeBoundary& aEndBoundary, + nsINode* aRootNode); +template void CrossShadowBoundaryRange::DoSetRange( + const RawRangeBoundary& aStartBoundary, const RangeBoundary& aEndBoundary, + nsINode* aRootNode); +template void CrossShadowBoundaryRange::DoSetRange( + const RawRangeBoundary& aStartBoundary, + const RawRangeBoundary& aEndBoundary, nsINode* aRootNode); + +template nsresult CrossShadowBoundaryRange::SetStartAndEnd( + const RangeBoundary& aStartBoundary, const RangeBoundary& aEndBoundary); +template nsresult CrossShadowBoundaryRange::SetStartAndEnd( + const RangeBoundary& aStartBoundary, const RawRangeBoundary& aEndBoundary); +template nsresult CrossShadowBoundaryRange::SetStartAndEnd( + const RawRangeBoundary& aStartBoundary, const RangeBoundary& aEndBoundary); +template nsresult CrossShadowBoundaryRange::SetStartAndEnd( + const RawRangeBoundary& aStartBoundary, + const RawRangeBoundary& aEndBoundary); + +nsTArray>* + CrossShadowBoundaryRange::sCachedRanges = nullptr; + +NS_IMPL_CYCLE_COLLECTING_ADDREF(CrossShadowBoundaryRange) + +NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_INTERRUPTABLE_LAST_RELEASE( + CrossShadowBoundaryRange, + DoSetRange(RawRangeBoundary(), RawRangeBoundary(), nullptr), + AbstractRange::MaybeCacheToReuse(*this)) + +NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(CrossShadowBoundaryRange) +NS_INTERFACE_MAP_END_INHERITING(CrossShadowBoundaryRange) + +NS_IMPL_CYCLE_COLLECTION_CLASS(CrossShadowBoundaryRange) + +NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(CrossShadowBoundaryRange, + StaticRange) + NS_IMPL_CYCLE_COLLECTION_UNLINK(mCommonAncestor) +NS_IMPL_CYCLE_COLLECTION_UNLINK_END + +NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(CrossShadowBoundaryRange, + StaticRange) + NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCommonAncestor) +NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END + +NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(CrossShadowBoundaryRange, + StaticRange) +NS_IMPL_CYCLE_COLLECTION_TRACE_END + +/* static */ +template +already_AddRefed CrossShadowBoundaryRange::Create( + const RangeBoundaryBase& aStartBoundary, + const RangeBoundaryBase& aEndBoundary) { + RefPtr range; + if (!sCachedRanges || sCachedRanges->IsEmpty()) { + range = new CrossShadowBoundaryRange(aStartBoundary.Container()); + } else { + range = sCachedRanges->PopLastElement().forget(); + } + + range->Init(aStartBoundary.Container()); + range->DoSetRange(aStartBoundary, aEndBoundary, nullptr); + return range.forget(); +} + +template +void CrossShadowBoundaryRange::DoSetRange( + const RangeBoundaryBase& aStartBoundary, + const RangeBoundaryBase& aEndBoundary, nsINode* aRootNode) { + // aRootNode is useless to CrossShadowBoundaryRange because aStartBoundary + // and aEndBoundary could have different roots. + StaticRange::DoSetRange(aStartBoundary, aEndBoundary, nullptr); + + nsINode* startRoot = RangeUtils::ComputeRootNode(mStart.Container()); + nsINode* endRoot = RangeUtils::ComputeRootNode(mEnd.Container()); + + if (startRoot == endRoot) { + // This should be the case when Release() is called. + MOZ_ASSERT(!startRoot && !endRoot); + mCommonAncestor = startRoot; + } else { + mCommonAncestor = + nsContentUtils::GetClosestCommonShadowIncludingInclusiveAncestor( + mStart.Container(), mEnd.Container()); + } +} +} // namespace mozilla::dom diff --git a/dom/base/CrossShadowBoundaryRange.h b/dom/base/CrossShadowBoundaryRange.h new file mode 100644 index 0000000000..3ad4fa1793 --- /dev/null +++ b/dom/base/CrossShadowBoundaryRange.h @@ -0,0 +1,89 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef mozilla_dom_CrossShadowBoundaryRange_h +#define mozilla_dom_CrossShadowBoundaryRange_h + +#include "mozilla/RangeBoundary.h" +#include "mozilla/RangeUtils.h" +#include "mozilla/dom/AbstractRange.h" +#include "mozilla/dom/StaticRange.h" +#include "nsTArray.h" + +namespace mozilla { +class ErrorResult; + +namespace dom { + +class CrossShadowBoundaryRange final : public StaticRange { + public: + NS_DECL_ISUPPORTS_INHERITED + NS_IMETHODIMP_(void) DeleteCycleCollectable(void) override; + NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED( + CrossShadowBoundaryRange, StaticRange) + + CrossShadowBoundaryRange() = delete; + explicit CrossShadowBoundaryRange(const StaticRange& aOther) = delete; + + template + static already_AddRefed Create( + const RangeBoundaryBase& aStartBoundary, + const RangeBoundaryBase& aEndBoundary); + + void NotifyNodeBecomesShadowHost(nsINode* aNode) { + if (aNode == mStart.Container()) { + mStart.NotifyParentBecomesShadowHost(); + } + + if (aNode == mEnd.Container()) { + mEnd.NotifyParentBecomesShadowHost(); + } + } + + nsINode* GetCommonAncestor() const { return mCommonAncestor; } + + // CrossShadowBoundaryRange should have a very limited usage. + nsresult SetStartAndEnd(nsINode* aStartContainer, uint32_t aStartOffset, + nsINode* aEndContainer, uint32_t aEndOffset) = delete; + + template + nsresult SetStartAndEnd(const RangeBoundaryBase& aStartBoundary, + const RangeBoundaryBase& aEndBoundary) { + return StaticRange::SetStartAndEnd(aStartBoundary, aEndBoundary); + } + + private: + explicit CrossShadowBoundaryRange(nsINode* aNode) : StaticRange(aNode) {} + virtual ~CrossShadowBoundaryRange() = default; + + /** + * DoSetRange() is called when `AbstractRange::SetStartAndEndInternal()` sets + * mStart and mEnd. + * + * @param aStartBoundary Computed start point. This must equals or be before + * aEndBoundary in the DOM tree order. + * @param aEndBoundary Computed end point. + * @param aRootNode The root node of aStartBoundary or aEndBoundary. + * It's useless to CrossShadowBoundaryRange. + */ + template + void DoSetRange(const RangeBoundaryBase& aStartBoundary, + const RangeBoundaryBase& aEndBoundary, + nsINode* aRootNode); + + // This is either NULL if this CrossShadowBoundaryRange has been + // reset by Release() or the closest common shadow-including ancestor + // of mStart and mEnd. + nsCOMPtr mCommonAncestor; + + static nsTArray>* sCachedRanges; + + friend class AbstractRange; +}; +} // namespace dom +} // namespace mozilla + +#endif // #ifndef mozilla_dom_CrossShadowBoundaryRange_h diff --git a/dom/base/DOMIntersectionObserver.cpp b/dom/base/DOMIntersectionObserver.cpp index 12f7ee3029..37d17ddcd3 100644 --- a/dom/base/DOMIntersectionObserver.cpp +++ b/dom/base/DOMIntersectionObserver.cpp @@ -323,7 +323,8 @@ static Maybe ComputeTheIntersection( // // `intersectionRect` is kept relative to `target` during the loop. auto inflowRect = nsLayoutUtils::GetAllInFlowRectsUnion( - target, target, nsLayoutUtils::RECTS_ACCOUNT_FOR_TRANSFORMS); + target, target, + nsLayoutUtils::GetAllInFlowRectsFlag::AccountForTransforms); // For content-visibility, we need to observe the overflow clip edge, // https://drafts.csswg.org/css-contain-2/#close-to-the-viewport if (aIsForProximityToViewport == diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp index 8cbf8b8075..68e4100540 100644 --- a/dom/base/Document.cpp +++ b/dom/base/Document.cpp @@ -16423,47 +16423,33 @@ WindowContext* Document::GetWindowContextForPageUseCounters() const { return wc; } -void Document::UpdateIntersectionObservations(TimeStamp aNowTime) { - if (mIntersectionObservers.IsEmpty()) { - return; - } - - DOMHighResTimeStamp time = 0; - if (nsPIDOMWindowInner* win = GetInnerWindow()) { - if (Performance* perf = win->GetPerformance()) { - time = perf->TimeStampToDOMHighResForRendering(aNowTime); +void Document::UpdateIntersections(TimeStamp aNowTime) { + if (!mIntersectionObservers.IsEmpty()) { + DOMHighResTimeStamp time = 0; + if (nsPIDOMWindowInner* win = GetInnerWindow()) { + if (Performance* perf = win->GetPerformance()) { + time = perf->TimeStampToDOMHighResForRendering(aNowTime); + } } - } - - const auto observers = ToTArray>>( - mIntersectionObservers); - for (const auto& observer : observers) { - if (observer) { + for (DOMIntersectionObserver* observer : mIntersectionObservers) { observer->Update(*this, time); } + Dispatch(NewRunnableMethod("Document::NotifyIntersectionObservers", this, + &Document::NotifyIntersectionObservers)); } -} - -void Document::ScheduleIntersectionObserverNotification() { - if (mIntersectionObservers.IsEmpty()) { - return; - } - MOZ_RELEASE_ASSERT(NS_IsMainThread()); - nsCOMPtr notification = - NewRunnableMethod("Document::NotifyIntersectionObservers", this, - &Document::NotifyIntersectionObservers); - Dispatch(notification.forget()); + EnumerateSubDocuments([aNowTime](Document& aDoc) { + aDoc.UpdateIntersections(aNowTime); + return CallState::Continue; + }); } void Document::NotifyIntersectionObservers() { const auto observers = ToTArray>>( mIntersectionObservers); for (const auto& observer : observers) { - if (observer) { - // MOZ_KnownLive because the 'observers' array guarantees to keep it - // alive. - MOZ_KnownLive(observer)->Notify(); - } + // MOZ_KnownLive because the 'observers' array guarantees to keep it + // alive. + MOZ_KnownLive(observer)->Notify(); } } @@ -18647,6 +18633,13 @@ nsICookieJarSettings* Document::CookieJarSettings() { if (!mCookieJarSettings) { Document* inProcessParent = GetInProcessParentDocument(); + auto shouldInheritFrom = [this](Document* aDoc) { + return aDoc && (this->NodePrincipal()->Equals(aDoc->NodePrincipal()) || + this->NodePrincipal()->GetIsNullPrincipal()); + }; + RefPtr opener = + GetBrowsingContext() ? GetBrowsingContext()->GetOpener() : nullptr; + if (inProcessParent) { mCookieJarSettings = net::CookieJarSettings::Create( inProcessParent->CookieJarSettings()->GetCookieBehavior(), @@ -18674,6 +18667,18 @@ nsICookieJarSettings* Document::CookieJarSettings() { ->SetTopLevelWindowContextId( net::CookieJarSettings::Cast(inProcessParent->CookieJarSettings()) ->GetTopLevelWindowContextId()); + } else if (opener && shouldInheritFrom(opener->GetDocument())) { + mCookieJarSettings = net::CookieJarSettings::Create(NodePrincipal()); + + nsTArray randomKey; + nsresult rv = opener->GetDocument() + ->CookieJarSettings() + ->GetFingerprintingRandomizationKey(randomKey); + + if (NS_SUCCEEDED(rv)) { + net::CookieJarSettings::Cast(mCookieJarSettings) + ->SetFingerprintingRandomizationKey(randomKey); + } } else { mCookieJarSettings = net::CookieJarSettings::Create(NodePrincipal()); @@ -18933,8 +18938,7 @@ void Document::AddPendingFrameStaticClone(nsFrameLoaderOwner* aElement, } bool Document::ShouldAvoidNativeTheme() const { - return StaticPrefs::widget_non_native_theme_enabled() && - (!IsInChromeDocShell() || XRE_IsContentProcess()); + return !IsInChromeDocShell() || XRE_IsContentProcess(); } bool Document::UseRegularPrincipal() const { diff --git a/dom/base/Document.h b/dom/base/Document.h index 0b0d0ca3d0..e919f19be0 100644 --- a/dom/base/Document.h +++ b/dom/base/Document.h @@ -3709,8 +3709,9 @@ class Document : public nsINode, return !mIntersectionObservers.IsEmpty(); } - void UpdateIntersectionObservations(TimeStamp aNowTime); - void ScheduleIntersectionObserverNotification(); + // Update intersection observers in this document and all + // same-process subdocuments. + void UpdateIntersections(TimeStamp aNowTime); MOZ_CAN_RUN_SCRIPT void NotifyIntersectionObservers(); DOMIntersectionObserver* GetLazyLoadObserver() { return mLazyLoadObserver; } diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp index b6f5d5c3be..758134990b 100644 --- a/dom/base/Element.cpp +++ b/dom/base/Element.cpp @@ -1088,7 +1088,7 @@ already_AddRefed Element::GetClientRects() { nsLayoutUtils::RectListBuilder builder(rectList); nsLayoutUtils::GetAllInFlowRects( frame, nsLayoutUtils::GetContainingBlockForClientRect(frame), &builder, - nsLayoutUtils::RECTS_ACCOUNT_FOR_TRANSFORMS); + nsLayoutUtils::GetAllInFlowRectsFlag::AccountForTransforms); return rectList.forget(); } @@ -1353,7 +1353,7 @@ already_AddRefed Element::AttachShadowWithoutNameChecks( for (const AbstractRange* range : *ranges) { if (range->MayCrossShadowBoundary()) { MOZ_ASSERT(range->IsDynamicRange()); - StaticRange* crossBoundaryRange = + CrossShadowBoundaryRange* crossBoundaryRange = range->AsDynamicRange()->GetCrossShadowBoundaryRange(); MOZ_ASSERT(crossBoundaryRange); // We may have previously selected this node before it diff --git a/dom/base/EventSource.cpp b/dom/base/EventSource.cpp index def3c90ec0..9e73f31fc6 100644 --- a/dom/base/EventSource.cpp +++ b/dom/base/EventSource.cpp @@ -1827,14 +1827,14 @@ nsresult EventSourceImpl::ParseCharacter(char16_t aChr) { namespace { -class WorkerRunnableDispatcher final : public WorkerRunnable { +class WorkerRunnableDispatcher final : public WorkerThreadRunnable { RefPtr mEventSourceImpl; public: WorkerRunnableDispatcher(RefPtr&& aImpl, WorkerPrivate* aWorkerPrivate, already_AddRefed aEvent) - : WorkerRunnable(aWorkerPrivate, "WorkerRunnableDispatcher"), + : WorkerThreadRunnable("WorkerRunnableDispatcher"), mEventSourceImpl(std::move(aImpl)), mEvent(std::move(aEvent)) {} @@ -1928,7 +1928,7 @@ EventSourceImpl::Dispatch(already_AddRefed aEvent, RefPtr event = new WorkerRunnableDispatcher( this, mWorkerRef->Private(), event_ref.forget()); - if (!event->Dispatch()) { + if (!event->Dispatch(mWorkerRef->Private())) { return NS_ERROR_FAILURE; } return NS_OK; diff --git a/dom/base/FocusModel.h b/dom/base/FocusModel.h new file mode 100644 index 0000000000..588c0503a2 --- /dev/null +++ b/dom/base/FocusModel.h @@ -0,0 +1,41 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef mozilla_FocusModel_h +#define mozilla_FocusModel_h + +#include "mozilla/StaticPrefs_accessibility.h" +#include "mozilla/TypedEnumBits.h" + +namespace mozilla { + +enum class IsFocusableFlags : uint8_t { + WithMouse = 1 << 0, + // Whether to treat an invisible frame as not focusable + IgnoreVisibility = 1 << 1, +}; + +MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(IsFocusableFlags); + +enum class TabFocusableType : uint8_t { + TextControls = 1, // Textboxes and lists always tabbable + FormElements = 1 << 1, // Non-text form elements + Links = 1 << 2, // Links + Any = TextControls | FormElements | Links, +}; + +class FocusModel final { + public: + static bool AppliesToXUL() { + return StaticPrefs::accessibility_tabfocus_applies_to_xul(); + } + + static bool IsTabFocusable(TabFocusableType aType) { + return StaticPrefs::accessibility_tabfocus() & int32_t(aType); + } +}; + +} // namespace mozilla + +#endif diff --git a/dom/base/FragmentOrElement.cpp b/dom/base/FragmentOrElement.cpp index 87fd81bfa3..8338fc6b9e 100644 --- a/dom/base/FragmentOrElement.cpp +++ b/dom/base/FragmentOrElement.cpp @@ -105,8 +105,6 @@ using namespace mozilla; using namespace mozilla::dom; -int32_t nsIContent::sTabFocusModel = eTabFocus_any; -bool nsIContent::sTabFocusModelAppliesToXUL = false; uint64_t nsMutationGuard::sGeneration = 0; NS_IMPL_CYCLE_COLLECTION_CLASS(nsIContent) @@ -1022,7 +1020,7 @@ void nsIContent::GetEventTargetParent(EventChainPreVisitor& aVisitor) { } } -Element* nsIContent::GetAutofocusDelegate(bool aWithMouse) const { +Element* nsIContent::GetAutofocusDelegate(IsFocusableFlags aFlags) const { for (nsINode* node = GetFirstChild(); node; node = node->GetNextNode(this)) { auto* descendant = Element::FromNode(*node); if (!descendant || !descendant->GetBoolAttr(nsGkAtoms::autofocus)) { @@ -1030,14 +1028,14 @@ Element* nsIContent::GetAutofocusDelegate(bool aWithMouse) const { } nsIFrame* frame = descendant->GetPrimaryFrame(); - if (frame && frame->IsFocusable(aWithMouse)) { + if (frame && frame->IsFocusable(aFlags)) { return descendant; } } return nullptr; } -Element* nsIContent::GetFocusDelegate(bool aWithMouse) const { +Element* nsIContent::GetFocusDelegate(IsFocusableFlags aFlags) const { const nsIContent* whereToLook = this; if (ShadowRoot* root = GetShadowRoot()) { if (!root->DelegatesFocus()) { @@ -1055,7 +1053,7 @@ Element* nsIContent::GetFocusDelegate(bool aWithMouse) const { return {}; } - return frame->IsFocusable(aWithMouse); + return frame->IsFocusable(aFlags); }; Element* potentialFocus = nullptr; @@ -1097,7 +1095,7 @@ Element* nsIContent::GetFocusDelegate(bool aWithMouse) const { if (auto* shadow = el->GetShadowRoot()) { if (shadow->DelegatesFocus()) { - if (Element* delegatedFocus = shadow->GetFocusDelegate(aWithMouse)) { + if (Element* delegatedFocus = shadow->GetFocusDelegate(aFlags)) { if (autofocus) { // This element has autofocus and we found an focus delegates // in its descendants, so use the focus delegates @@ -1114,7 +1112,7 @@ Element* nsIContent::GetFocusDelegate(bool aWithMouse) const { return potentialFocus; } -Focusable nsIContent::IsFocusableWithoutStyle(bool aWithMouse) { +Focusable nsIContent::IsFocusableWithoutStyle(IsFocusableFlags) { // Default, not tabbable return {}; } diff --git a/dom/base/Highlight.cpp b/dom/base/Highlight.cpp index cd0efccce5..0bac8193d7 100644 --- a/dom/base/Highlight.cpp +++ b/dom/base/Highlight.cpp @@ -101,24 +101,36 @@ already_AddRefed Highlight::CreateHighlightSelection( } void Highlight::Add(AbstractRange& aRange, ErrorResult& aRv) { + // Manually check if the range `aKey` is already present in this highlight, + // because `SetlikeHelpers::Add()` doesn't indicate this. + // To keep the setlike and the mirrored array in sync, the range must not + // be added to `mRanges` if it was already present. + // `SetlikeHelpers::Has()` is much faster in checking this than + // `nsTArray<>::Contains()`. + if (Highlight_Binding::SetlikeHelpers::Has(this, aRange, aRv) || + aRv.Failed()) { + return; + } Highlight_Binding::SetlikeHelpers::Add(this, aRange, aRv); if (aRv.Failed()) { return; } - if (!mRanges.Contains(&aRange)) { - mRanges.AppendElement(&aRange); - AutoFrameSelectionBatcher selectionBatcher(__FUNCTION__, - mHighlightRegistries.Count()); - for (const RefPtr& registry : - mHighlightRegistries.Keys()) { - auto frameSelection = registry->GetFrameSelection(); - selectionBatcher.AddFrameSelection(frameSelection); - // since this is run in a context guarded by a selection batcher, - // no strong reference is needed to keep `registry` alive. - MOZ_KnownLive(registry)->MaybeAddRangeToHighlightSelection(aRange, *this); - if (aRv.Failed()) { - return; - } + + MOZ_ASSERT(!mRanges.Contains(&aRange), + "setlike and DOM mirror are not in sync"); + + mRanges.AppendElement(&aRange); + AutoFrameSelectionBatcher selectionBatcher(__FUNCTION__, + mHighlightRegistries.Count()); + for (const RefPtr& registry : + mHighlightRegistries.Keys()) { + auto frameSelection = registry->GetFrameSelection(); + selectionBatcher.AddFrameSelection(frameSelection); + // since this is run in a context guarded by a selection batcher, + // no strong reference is needed to keep `registry` alive. + MOZ_KnownLive(registry)->MaybeAddRangeToHighlightSelection(aRange, *this); + if (aRv.Failed()) { + return; } } } diff --git a/dom/base/HighlightRegistry.cpp b/dom/base/HighlightRegistry.cpp index 035aadb78a..755977286f 100644 --- a/dom/base/HighlightRegistry.cpp +++ b/dom/base/HighlightRegistry.cpp @@ -133,18 +133,28 @@ void HighlightRegistry::AddHighlightSelectionsToFrameSelection() { void HighlightRegistry::Set(const nsAString& aKey, Highlight& aValue, ErrorResult& aRv) { + // manually check if the highlight `aKey` is already registered to be able to + // provide a fast path later that avoids calling `std::find_if()`. + const bool highlightAlreadyPresent = + HighlightRegistry_Binding::MaplikeHelpers::Has(this, aKey, aRv); + if (aRv.Failed()) { + return; + } HighlightRegistry_Binding::MaplikeHelpers::Set(this, aKey, aValue, aRv); if (aRv.Failed()) { return; } RefPtr frameSelection = GetFrameSelection(); RefPtr highlightNameAtom = NS_AtomizeMainThread(aKey); - auto foundIter = - std::find_if(mHighlightsOrdered.begin(), mHighlightsOrdered.end(), - [&highlightNameAtom](auto const& aElm) { - return aElm.first() == highlightNameAtom; - }); - if (foundIter != mHighlightsOrdered.end()) { + if (highlightAlreadyPresent) { + // If the highlight named `aKey` was present before, replace its value. + auto foundIter = + std::find_if(mHighlightsOrdered.begin(), mHighlightsOrdered.end(), + [&highlightNameAtom](auto const& aElm) { + return aElm.first() == highlightNameAtom; + }); + MOZ_ASSERT(foundIter != mHighlightsOrdered.end(), + "webIDL maplike and DOM mirror are not in sync"); foundIter->second()->RemoveFromHighlightRegistry(*this, *highlightNameAtom); if (frameSelection) { frameSelection->RemoveHighlightSelection(highlightNameAtom); diff --git a/dom/base/MimeType.cpp b/dom/base/MimeType.cpp index da61489c1f..1e6d6a7cd4 100644 --- a/dom/base/MimeType.cpp +++ b/dom/base/MimeType.cpp @@ -328,13 +328,13 @@ template template void TMimeType::Serialize(nsTSubstring& aOutput) const { aOutput.Assign(mType); - aOutput.AppendLiteral("/"); + aOutput.Append('/'); aOutput.Append(mSubtype); for (uint32_t i = 0; i < mParameterNames.Length(); i++) { auto name = mParameterNames[i]; - aOutput.AppendLiteral(";"); + aOutput.Append(';'); aOutput.Append(name); - aOutput.AppendLiteral("="); + aOutput.Append('='); GetParameterValue(name, aOutput, true); } } @@ -342,7 +342,7 @@ void TMimeType::Serialize(nsTSubstring& aOutput) const { template void TMimeType::GetEssence(nsTSubstring& aOutput) const { aOutput.Assign(mType); - aOutput.AppendLiteral("/"); + aOutput.Append('/'); aOutput.Append(mSubtype); } @@ -366,17 +366,17 @@ bool TMimeType::GetParameterValue( } if (aWithQuotes && (value.mRequiresQuoting || value.IsEmpty())) { - aOutput.AppendLiteral("\""); + aOutput.Append('"'); const char_type* vcur = value.BeginReading(); const char_type* vend = value.EndReading(); while (vcur < vend) { if (*vcur == '"' || *vcur == '\\') { - aOutput.AppendLiteral("\\"); + aOutput.Append('\\'); } aOutput.Append(*vcur); vcur++; } - aOutput.AppendLiteral("\""); + aOutput.Append('"'); } else { aOutput.Append(value); } diff --git a/dom/base/RadioGroupContainer.cpp b/dom/base/RadioGroupContainer.cpp index 3bb4d7da20..988c8186f9 100644 --- a/dom/base/RadioGroupContainer.cpp +++ b/dom/base/RadioGroupContainer.cpp @@ -8,6 +8,7 @@ #include "mozilla/dom/RadioGroupContainer.h" #include "mozilla/dom/TreeOrderedArrayInlines.h" #include "mozilla/Assertions.h" +#include "nsIFrame.h" #include "nsIRadioVisitor.h" #include "nsRadioVisitor.h" @@ -125,7 +126,9 @@ nsresult RadioGroupContainer::GetNextRadioButton( index = 0; } radio = radioGroup->mRadioButtons->ElementAt(index); - } while (radio->Disabled() && radio != currentRadio); + } while ((radio->Disabled() || !radio->GetPrimaryFrame() || + !radio->GetPrimaryFrame()->IsVisibleConsideringAncestors()) && + radio != currentRadio); radio.forget(aRadioOut); return NS_OK; @@ -135,7 +138,8 @@ HTMLInputElement* RadioGroupContainer::GetFirstRadioButton( const nsAString& aName) { nsRadioGroupStruct* radioGroup = GetOrCreateRadioGroup(aName); for (HTMLInputElement* radio : radioGroup->mRadioButtons.AsList()) { - if (!radio->Disabled()) { + if (!radio->Disabled() && radio->GetPrimaryFrame() && + radio->GetPrimaryFrame()->IsVisibleConsideringAncestors()) { return radio; } } diff --git a/dom/base/ResizeObserver.h b/dom/base/ResizeObserver.h index eaa0e1726d..2fd630c66c 100644 --- a/dom/base/ResizeObserver.h +++ b/dom/base/ResizeObserver.h @@ -121,7 +121,6 @@ class ResizeObservation final : public LinkedListElement { * https://drafts.csswg.org/resize-observer/#api */ class ResizeObserver final : public nsISupports, public nsWrapperCache { - public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(ResizeObserver) diff --git a/dom/base/Selection.h b/dom/base/Selection.h index 08563993ac..101bada49f 100644 --- a/dom/base/Selection.h +++ b/dom/base/Selection.h @@ -386,6 +386,30 @@ class Selection final : public nsSupportsWeakReference, return mStyledRanges.mRanges[0].mRange->Collapsed(); } + // Returns whether both normal range and cross-shadow-boundary + // range are collapsed. + // + // If StaticPrefs::dom_shadowdom_selection_across_boundary_enabled is + // disabled, this method always returns result as nsRange::IsCollapsed. + bool AreNormalAndCrossShadowBoundaryRangesCollapsed() const { + if (!IsCollapsed()) { + return false; + } + + size_t cnt = mStyledRanges.Length(); + if (cnt == 0) { + return true; + } + + AbstractRange* range = mStyledRanges.mRanges[0].mRange; + MOZ_ASSERT_IF( + range->MayCrossShadowBoundary(), + !range->AsDynamicRange()->CrossShadowBoundaryRangeCollapsed()); + // Returns false if nsRange::mCrossBoundaryRange exists, + // true otherwise. + return !range->MayCrossShadowBoundary(); + } + // *JS() methods are mapped to Selection.*(). // They may move focus only when the range represents normal selection. // These methods shouldn't be used by non-JS callers. diff --git a/dom/base/StaticRange.h b/dom/base/StaticRange.h index af7054f843..249c938b2f 100644 --- a/dom/base/StaticRange.h +++ b/dom/base/StaticRange.h @@ -19,7 +19,7 @@ class ErrorResult; namespace dom { -class StaticRange final : public AbstractRange { +class StaticRange : public AbstractRange { public: StaticRange() = delete; explicit StaticRange(const StaticRange& aOther) = delete; @@ -71,16 +71,6 @@ class StaticRange final : public AbstractRange { */ bool IsValid() const; - void NotifyNodeBecomesShadowHost(nsINode* aNode) { - if (aNode == mStart.Container()) { - mStart.NotifyParentBecomesShadowHost(); - } - - if (aNode == mEnd.Container()) { - mEnd.NotifyParentBecomesShadowHost(); - } - } - private: // Whether the start and end points are in the same tree. // They could be in different trees, i.e, cross shadow boundaries. diff --git a/dom/base/crashtests/1419902.html b/dom/base/crashtests/1419902.html index b0742b5be0..a0aa1b0698 100644 --- a/dom/base/crashtests/1419902.html +++ b/dom/base/crashtests/1419902.html @@ -1,23 +1 @@ - - - - - + diff --git a/dom/base/crashtests/1741957.html b/dom/base/crashtests/1741957.html new file mode 100644 index 0000000000..56b695052e --- /dev/null +++ b/dom/base/crashtests/1741957.html @@ -0,0 +1,22 @@ + + + + + + +
diff --git a/dom/base/crashtests/crashtests.list b/dom/base/crashtests/crashtests.list index 22aaf50e6b..7aa5e6a92a 100644 --- a/dom/base/crashtests/crashtests.list +++ b/dom/base/crashtests/crashtests.list @@ -220,7 +220,7 @@ load 1406109-1.html load 1411473.html load 1413815.html load 1419799.html -skip-if(geckoview) skip-if(geckoview&&isDebugBuild) skip-if(AddressSanitizer) skip-if(ThreadSanitizer) pref(dom.disable_open_during_load,false) load 1419902.html # skip Bug 1419902. Bug 1563013 for GV+WR. Bug 1524493 GV+debug. Bug 1573281 asan +# load 1419902.html # this test is run at the very end in testing/crashtest/final/crashtests.list load 1422883.html load 1428053.html load 1441029.html @@ -265,6 +265,7 @@ load 1757923.html load 1766472.html pref(dom.enable_web_task_scheduling,true) load 1780790.html load 1700237.html +load 1741957.html load 1811939.html load 1822717.html load 1835886.html diff --git a/dom/base/fragmentdirectives/lib.rs b/dom/base/fragmentdirectives/lib.rs index 0003849eb7..5f9d5ebdd8 100644 --- a/dom/base/fragmentdirectives/lib.rs +++ b/dom/base/fragmentdirectives/lib.rs @@ -96,9 +96,7 @@ pub extern "C" fn parse_fragment_directive( &url_as_rust_string, ) { - result - .url_without_fragment_directive - .assign(&stripped_url); + result.url_without_fragment_directive.assign(&stripped_url); result.fragment_directive.assign(&fragment_directive); result.text_directives.extend( text_directives diff --git a/dom/base/fragmentdirectives/test.rs b/dom/base/fragmentdirectives/test.rs index d4509cb033..e5479d8022 100644 --- a/dom/base/fragmentdirectives/test.rs +++ b/dom/base/fragmentdirectives/test.rs @@ -145,13 +145,16 @@ mod test { ), ( "http://example.com/page.html?query=irrelevant:~:#bar:~:text=foo", - "http://example.com/page.html?query=irrelevant:~:#bar" - ) + "http://example.com/page.html?query=irrelevant:~:#bar", + ), ] { let (stripped_url, fragment_directive, _) = parse_fragment_directive_and_remove_it_from_hash(&url) .expect("The parser must find a result"); - assert_eq!(stripped_url, stripped_url_ref, "The stripped url is not correct."); + assert_eq!( + stripped_url, stripped_url_ref, + "The stripped url is not correct." + ); assert_eq!(fragment_directive, "text=foo"); } } @@ -195,9 +198,8 @@ mod test { #[test] fn test_parse_multiple_text_fragments() { let url = "#:~:text=prefix-,start,-suffix&text=foo&text=bar,-suffix"; - let (_, _, text_directives) = - parse_fragment_directive_and_remove_it_from_hash(&url) - .expect("The parser must find a result."); + let (_, _, text_directives) = parse_fragment_directive_and_remove_it_from_hash(&url) + .expect("The parser must find a result."); assert_eq!( text_directives.len(), 3, @@ -339,8 +341,7 @@ mod test { "text=prefix-,start", "#:~:text=foo-,bar,-baz:~:text=foo", ] { - let text_directives = - parse_fragment_directive_and_remove_it_from_hash(&url); + let text_directives = parse_fragment_directive_and_remove_it_from_hash(&url); assert!( text_directives.is_none(), "The fragment `{}` does not contain a valid or known fragment directive.", @@ -369,8 +370,7 @@ mod test { "#:~:text=,prefix,start", "#:~:text=", ] { - let text_directives = - parse_fragment_directive_and_remove_it_from_hash(&url); + let text_directives = parse_fragment_directive_and_remove_it_from_hash(&url); assert!( text_directives.is_none(), "The fragment directive `{}` does not contain a valid text directive.", diff --git a/dom/base/moz.build b/dom/base/moz.build index ffcfb0aaf6..e2cf2dfb78 100644 --- a/dom/base/moz.build +++ b/dom/base/moz.build @@ -126,6 +126,7 @@ EXPORTS.mozilla += [ "ContentIterator.h", "CORSMode.h", "FlushType.h", + "FocusModel.h", "FullscreenChange.h", "GlobalTeardownObserver.h", "IdentifierMapEntry.h", @@ -166,6 +167,7 @@ EXPORTS.mozilla.dom += [ "CompressionStream.h", "ContentFrameMessageManager.h", "ContentProcessMessageManager.h", + "CrossShadowBoundaryRange.h", "CustomElementRegistry.h", "DecompressionStream.h", "DirectionalityUtils.h", @@ -336,6 +338,7 @@ UNIFIED_SOURCES += [ "ContentFrameMessageManager.cpp", "ContentIterator.cpp", "ContentProcessMessageManager.cpp", + "CrossShadowBoundaryRange.cpp", "Crypto.cpp", "CustomElementRegistry.cpp", "DirectionalityUtils.cpp", diff --git a/dom/base/nsAttrValue.cpp b/dom/base/nsAttrValue.cpp index 01efef2eb9..e4bf977f56 100644 --- a/dom/base/nsAttrValue.cpp +++ b/dom/base/nsAttrValue.cpp @@ -141,7 +141,7 @@ bool MiscContainer::GetString(nsAString& aString) const { } if (isString) { auto* buffer = static_cast(ptr); - buffer->ToString(buffer->StorageSize() / sizeof(char16_t) - 1, aString); + aString.Assign(buffer, buffer->StorageSize() / sizeof(char16_t) - 1); } else { static_cast(ptr)->ToString(aString); } @@ -280,11 +280,9 @@ void nsAttrValue::Shutdown() { void nsAttrValue::Reset() { switch (BaseType()) { case eStringBase: { - nsStringBuffer* str = static_cast(GetPtr()); - if (str) { + if (auto* str = static_cast(GetPtr())) { str->Release(); } - break; } case eOtherBase: { @@ -320,8 +318,7 @@ void nsAttrValue::SetTo(const nsAttrValue& aOther) { switch (aOther.BaseType()) { case eStringBase: { ResetIfSet(); - nsStringBuffer* str = static_cast(aOther.GetPtr()); - if (str) { + if (auto* str = static_cast(aOther.GetPtr())) { str->AddRef(); SetPtrValueAndType(str, eStringBase); } @@ -623,18 +620,16 @@ void nsAttrValue::ToString(nsAString& aResult) const { switch (Type()) { case eString: { - nsStringBuffer* str = static_cast(GetPtr()); - if (str) { - str->ToString(str->StorageSize() / sizeof(char16_t) - 1, aResult); + if (auto* str = static_cast(GetPtr())) { + aResult.Assign(str, str->StorageSize() / sizeof(char16_t) - 1); } else { aResult.Truncate(); } break; } case eAtom: { - nsAtom* atom = static_cast(GetPtr()); + auto* atom = static_cast(GetPtr()); atom->ToString(aResult); - break; } case eInteger: { @@ -895,8 +890,7 @@ nsAtom* nsAttrValue::AtomAt(int32_t aIndex) const { uint32_t nsAttrValue::HashValue() const { switch (BaseType()) { case eStringBase: { - nsStringBuffer* str = static_cast(GetPtr()); - if (str) { + if (auto* str = static_cast(GetPtr())) { uint32_t len = str->StorageSize() / sizeof(char16_t) - 1; return HashString(static_cast(str->Data()), len); } @@ -1208,8 +1202,7 @@ bool nsAttrValue::SubstringCheck(const nsAString& aValue, nsCaseTreatment aCaseSensitive) const { switch (BaseType()) { case eStringBase: { - auto str = static_cast(GetPtr()); - if (str) { + if (auto* str = static_cast(GetPtr())) { return F::Check(static_cast(str->Data()), str->StorageSize() / sizeof(char16_t) - 1, aValue, aCaseSensitive); @@ -1217,7 +1210,7 @@ bool nsAttrValue::SubstringCheck(const nsAString& aValue, return aValue.IsEmpty(); } case eAtomBase: { - auto atom = static_cast(GetPtr()); + auto* atom = static_cast(GetPtr()); return F::Check(atom->GetUTF16String(), atom->GetLength(), aValue, aCaseSensitive); } @@ -2107,12 +2100,11 @@ already_AddRefed nsAttrValue::GetStringBuffer( if (!len) { return nullptr; } - - RefPtr buf = nsStringBuffer::FromString(aValue); - if (buf && (buf->StorageSize() / sizeof(char16_t) - 1) == len) { + if (nsStringBuffer* buf = aValue.GetStringBuffer(); + buf && (buf->StorageSize() / sizeof(char16_t) - 1) == len) { // We can only reuse the buffer if it's exactly sized, since we rely on // StorageSize() to get the string length in ToString(). - return buf.forget(); + return do_AddRef(buf); } return nsStringBuffer::Create(aValue.Data(), aValue.Length()); } diff --git a/dom/base/nsAttrValue.h b/dom/base/nsAttrValue.h index 4ef63c287f..b32dfc98fb 100644 --- a/dom/base/nsAttrValue.h +++ b/dom/base/nsAttrValue.h @@ -108,7 +108,9 @@ const uintptr_t NS_ATTRVALUE_BASETYPE_MASK = 3; class nsCheapString : public nsString { public: explicit nsCheapString(nsStringBuffer* aBuf) { - if (aBuf) aBuf->ToString(aBuf->StorageSize() / sizeof(char16_t) - 1, *this); + if (aBuf) { + Assign(aBuf, aBuf->StorageSize() / sizeof(char16_t) - 1); + } } }; diff --git a/dom/base/nsContentAreaDragDrop.cpp b/dom/base/nsContentAreaDragDrop.cpp index 3ca21e725a..b2ccc8cb1c 100644 --- a/dom/base/nsContentAreaDragDrop.cpp +++ b/dom/base/nsContentAreaDragDrop.cpp @@ -295,7 +295,7 @@ nsContentAreaDragDropDataProvider::GetFlavorData(nsITransferable* aTransferable, bool isPrivate = aTransferable->GetIsPrivateData(); - nsCOMPtr principal = aTransferable->GetRequestingPrincipal(); + nsCOMPtr principal = aTransferable->GetDataPrincipal(); nsContentPolicyType contentPolicyType = aTransferable->GetContentPolicyType(); nsCOMPtr cookieJarSettings = diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index d2c863bd65..e4f4fadf9c 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -3010,6 +3010,18 @@ nsINode* nsContentUtils::GetCommonAncestorHelper(nsINode* aNode1, aNode1, aNode2, [](nsINode* aNode) { return aNode->GetParentNode(); }); } +/* static */ +nsINode* nsContentUtils::GetClosestCommonShadowIncludingInclusiveAncestor( + nsINode* aNode1, nsINode* aNode2) { + if (aNode1 == aNode2) { + return aNode1; + } + + return GetCommonAncestorInternal(aNode1, aNode2, [](nsINode* aNode) { + return aNode->GetParentOrShadowHostNode(); + }); +} + /* static */ nsIContent* nsContentUtils::GetCommonFlattenedTreeAncestorHelper( nsIContent* aContent1, nsIContent* aContent2) { @@ -6998,25 +7010,6 @@ bool nsContentUtils::PlatformToDOMLineBreaks(nsString& aString, return true; } -void nsContentUtils::PopulateStringFromStringBuffer(nsStringBuffer* aBuf, - nsAString& aResultString) { - MOZ_ASSERT(aBuf, "Expecting a non-null string buffer"); - - uint32_t stringLen = NS_strlen(static_cast(aBuf->Data())); - - // SANITY CHECK: In case the nsStringBuffer isn't correctly - // null-terminated, let's clamp its length using the allocated size, to be - // sure the resulting string doesn't sample past the end of the the buffer. - // (Note that StorageSize() is in units of bytes, so we have to convert that - // to units of PRUnichars, and subtract 1 for the null-terminator.) - uint32_t allocStringLen = (aBuf->StorageSize() / sizeof(char16_t)) - 1; - MOZ_ASSERT(stringLen <= allocStringLen, - "string buffer lacks null terminator!"); - stringLen = std::min(stringLen, allocStringLen); - - aBuf->ToString(stringLen, aResultString); -} - already_AddRefed nsContentUtils::GetElementsByClassName( nsINode* aRootNode, const nsAString& aClasses) { MOZ_ASSERT(aRootNode, "Must have root node"); @@ -7442,8 +7435,12 @@ int32_t nsContentUtils::GetAdjustedOffsetInTextControl(nsIFrame* aOffsetFrame, // static bool nsContentUtils::IsPointInSelection( const mozilla::dom::Selection& aSelection, const nsINode& aNode, - const uint32_t aOffset) { - if (aSelection.IsCollapsed()) { + const uint32_t aOffset, const bool aAllowCrossShadowBoundary) { + const bool selectionIsCollapsed = + !aAllowCrossShadowBoundary + ? aSelection.IsCollapsed() + : aSelection.AreNormalAndCrossShadowBoundaryRangesCollapsed(); + if (selectionIsCollapsed) { return false; } @@ -7457,7 +7454,8 @@ bool nsContentUtils::IsPointInSelection( } // Done when we find a range that we are in - if (range->IsPointInRange(aNode, aOffset, IgnoreErrors())) { + if (range->IsPointInRange(aNode, aOffset, IgnoreErrors(), + aAllowCrossShadowBoundary)) { return true; } } @@ -8211,7 +8209,7 @@ nsresult nsContentUtils::IPCTransferableToTransferable( aTransferable->SetCookieJarSettings(cookieJarSettings); } aTransferable->SetReferrerInfo(aIPCTransferable.referrerInfo()); - aTransferable->SetRequestingPrincipal(aIPCTransferable.requestingPrincipal()); + aTransferable->SetDataPrincipal(aIPCTransferable.dataPrincipal()); aTransferable->SetContentPolicyType(aIPCTransferable.contentPolicyType()); return NS_OK; @@ -8302,7 +8300,7 @@ nsresult nsContentUtils::CalculateBufferSizeForImage( } static already_AddRefed BigBufferToDataSurface( - BigBuffer& aData, uint32_t aStride, const IntSize& aImageSize, + const BigBuffer& aData, uint32_t aStride, const IntSize& aImageSize, SurfaceFormat aFormat) { if (!aData.Size() || !aImageSize.width || !aImageSize.height) { return nullptr; @@ -8325,22 +8323,13 @@ static already_AddRefed BigBufferToDataSurface( nsresult nsContentUtils::DeserializeTransferableDataImageContainer( const IPCTransferableDataImageContainer& aData, imgIContainer** aContainer) { - const IntSize size(aData.width(), aData.height()); - size_t maxBufferSize = 0; - size_t usedBufferSize = 0; - nsresult rv = CalculateBufferSizeForImage( - aData.stride(), size, aData.format(), &maxBufferSize, &usedBufferSize); - NS_ENSURE_SUCCESS(rv, rv); - if (usedBufferSize > aData.data().Size()) { - return NS_ERROR_FAILURE; - } - RefPtr surface = - CreateDataSourceSurfaceFromData(size, aData.format(), aData.data().Data(), - static_cast(aData.stride())); + RefPtr surface = IPCImageToSurface(aData.image()); if (!surface) { return NS_ERROR_FAILURE; } - RefPtr drawable = new gfxSurfaceDrawable(surface, size); + + RefPtr drawable = + new gfxSurfaceDrawable(surface, surface->GetSize()); nsCOMPtr imageContainer = image::ImageOps::CreateFromDrawable(drawable); imageContainer.forget(aContainer); @@ -8472,23 +8461,16 @@ void nsContentUtils::TransferableToIPCTransferableData( if (!dataSurface) { continue; } - size_t length; - int32_t stride; - Maybe surfaceData = - GetSurfaceData(*dataSurface, &length, &stride); - if (surfaceData.isNothing()) { + auto imageData = nsContentUtils::SurfaceToIPCImage(*dataSurface); + if (!imageData) { continue; } IPCTransferableDataItem* item = aTransferableData->items().AppendElement(); item->flavor() = flavorStr; - - mozilla::gfx::IntSize size = dataSurface->GetSize(); - item->data() = IPCTransferableDataImageContainer( - std::move(*surfaceData), size.width, size.height, stride, - dataSurface->GetFormat()); + item->data() = IPCTransferableDataImageContainer(std::move(*imageData)); continue; } @@ -8569,8 +8551,7 @@ void nsContentUtils::TransferableToIPCTransferable( aIPCTransferable->data() = std::move(ipcTransferableData); aIPCTransferable->isPrivateData() = aTransferable->GetIsPrivateData(); - aIPCTransferable->requestingPrincipal() = - aTransferable->GetRequestingPrincipal(); + aIPCTransferable->dataPrincipal() = aTransferable->GetDataPrincipal(); aIPCTransferable->cookieJarSettings() = std::move(cookieJarSettingsArgs); aIPCTransferable->contentPolicyType() = aTransferable->GetContentPolicyType(); aIPCTransferable->referrerInfo() = aTransferable->GetReferrerInfo(); @@ -8617,7 +8598,7 @@ Maybe nsContentUtils::SurfaceToIPCImage(DataSourceSurface& aSurface) { } already_AddRefed nsContentUtils::IPCImageToSurface( - IPCImage&& aImage) { + const IPCImage& aImage) { return BigBufferToDataSurface(aImage.data(), aImage.stride(), aImage.size().ToUnknownSize(), aImage.format()); } diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h index 4291d2c5d1..a1f466fa8d 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h @@ -115,7 +115,6 @@ class nsNodeInfoManager; class nsParser; class nsPIWindowRoot; class nsPresContext; -class nsStringBuffer; class nsTextFragment; class nsView; class nsWrapperCache; @@ -501,6 +500,9 @@ class nsContentUtils { return GetCommonAncestorHelper(aNode1, aNode2); } + static nsINode* GetClosestCommonShadowIncludingInclusiveAncestor( + nsINode* aNode1, nsINode* aNode2); + /** * Returns the common flattened tree ancestor, if any, for two given content * nodes. @@ -2443,14 +2445,6 @@ class nsContentUtils { [[nodiscard]] static bool PlatformToDOMLineBreaks(nsString& aString, const mozilla::fallible_t&); - /** - * Populates aResultString with the contents of the string-buffer aBuf, up - * to aBuf's null-terminator. aBuf must not be null. Ownership of the string - * is not transferred. - */ - static void PopulateStringFromStringBuffer(nsStringBuffer* aBuf, - nsAString& aResultString); - static bool IsHandlingKeyBoardEvent() { return sIsHandlingKeyBoardEvent; } static void SetIsHandlingKeyBoardEvent(bool aHandling) { @@ -2778,9 +2772,13 @@ class nsContentUtils { * check. aNode and aOffset can be computed with * UIEvent::GetRangeParentContentAndOffset() if you want to * check the click point. + * @param aAllowCrossShadowBoundary If true, this method allows the selection + * to have boundaries that cross shadow + * boundaries. */ static bool IsPointInSelection(const mozilla::dom::Selection& aSelection, - const nsINode& aNode, const uint32_t aOffset); + const nsINode& aNode, const uint32_t aOffset, + const bool aAllowCrossShadowBoundary = false); /** * Takes a selection, and a text control element ( or