aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
Commit message (Collapse)AuthorAgeFilesLines
* Remove many explicit reflow calls (#33067)Josh Matthews2024-08-153-27/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove explicit reflow for iframe content updates. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Remove explicit reflow for timers. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Remove explicit reflow for MouseEvent. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Remove explicit reflow for key events. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Remove explicit reflow for document load. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Remove explicit reflow for iframe load. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Remove unused reflow reasons. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* fix(clippy): Clippy suggestions in components/script/dom/* (#33072)Jose Monagas2024-08-156-15/+16
| | | | Signed-off-by: Jose T. Monagas <josetmonagas@proton.me> Co-authored-by: Jose T. Monagas <josetmonagas@proton.me>
* Update codegen for GetOpener:inRealms in Bindings.conf (#33062)Taym Haddadi2024-08-153-9/+6
| | | Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* webxr: Update hand input to match latest spec (#32958)Daniel Adams2024-08-146-80/+308
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update IDLs Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update XRHand and XRJointSpace methods/bindings Signed-off-by: Daniel Adams <msub2official@gmail.com> * Implement fillJointRadii Signed-off-by: Daniel Adams <msub2official@gmail.com> * Implement fillPoses Signed-off-by: Daniel Adams <msub2official@gmail.com> * Formatting Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update test expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Tidy, missing spec link Signed-off-by: Daniel Adams <msub2official@gmail.com> * Remove idlharness expectation files, update hands pref Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update interfaces Signed-off-by: Daniel Adams <msub2official@gmail.com> * XRJointPose interface Signed-off-by: Daniel Adams <msub2official@gmail.com> * XRHand interface Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Fix warnings after latest rust upgrade (#33043)Martin Robinson2024-08-145-15/+15
| | | | | | | This fixes various unused code warnings after the recent rust upgrade. Some of the dead code is maintained, as it is quite likely that it will be used in future changes. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Dedupliate `syn` (#33038)Martin Robinson2024-08-133-12/+25
| | | | | | | | | | | | | | This is the last step toward removing our use of `syn` version 1. It does three things: 1. Upgrades `async-recursion` to a newer version that uses `syn` 2. 2. Removes the use of `enum-iterator` that was only used to produce a trivial list of enum names. This reduces the number of crates we dependo on by 2. 3. Upgrades `media` to a version which no longer uses `syn` 1 Fixes #33034. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* clippy: Fix missing indentation in comments and remove on unecessary cast ↵danik2922024-08-132-4/+3
| | | | | | | | | | | | | | | (#33026) * Add missing indendations in comments. Signed-off-by: Daniel Frantes <danfrantes@seznam.cz> * Fix test tidy error Signed-off-by: Daniel Frantes <danfrantes@seznam.cz> --------- Signed-off-by: Daniel Frantes <danfrantes@seznam.cz>
* webxr: Add missing IDL members from AR Module (#33007)Daniel Adams2024-08-134-9/+35
| | | | | | | | | | | | | | | | | * Add missing IDL members from AR module Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update test expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * ./mach fmt Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Fix: Return error and avoid panicking in SetOpener function (#33002)Taym Haddadi2024-08-123-17/+22
| | | | | | | | | | | | | | | | | * Fix: Return error and avoid panicking in SetOpener function Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * eturn JSFailed onstead of InvalidState Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Update wpt test result Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Replace the lazy_static crate whth `std::sync::LazyLock` in ↵Hayashi Mikihiro2024-08-128-103/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | components/script (#33004) * replace in str.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace navigator.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace htmlmetaelement.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace document.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace cssstyledeclaration.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace script_runtime.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace window_named_properties.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * reduce dependency lazy_static Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * reduce lazy in script_runtime.rs `Mutex::new()` is const contexts. I think that `JS_ENGINE` is need not lazy initialize. Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> --------- Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
* Allow navigations that include cross-origin redirects to succeed. (#32996)Josh Matthews2024-08-121-1/+4
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* webaudio: Implement IIRFilterNode (#33001)Daniel Adams2024-08-126-2/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Basic IIRFIlterNode bindings Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add constructor to BaseAudioContext Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update IDL and use statements Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update non-crashing test expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Tidy Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add missing spec link Signed-off-by: Daniel Adams <msub2official@gmail.com> * Optimize error checks Signed-off-by: Daniel Adams <msub2official@gmail.com> * Pass context channel count to servo-media Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update test expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update legacy expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add IIRFilterNode in interfaces.html Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update MANIFEST Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Fix ordering of documents (#32574)Taym Haddadi2024-08-091-8/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix ordering of documents Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com> * order pipeline ids, get document later, avoid use of document_from_node on iframe because it returns the owner doc Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com> * Fix build issue Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Use iter::once to avoid allocation Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * scope batches of rendering opportunities by pipeline Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com> --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com> Co-authored-by: gterzian <2792687+gterzian@users.noreply.github.com>
* script: dont unwrap in header set (#32973)ToBinio2024-08-081-4/+14
| | | Signed-off-by: tobinio <tobias.frischmann1@gmail.com>
* webgpu: Implement proper async pipeline creation and GPUPipelineError (#32636)Samson2024-08-087-161/+343
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add GPUPipelineError Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Proper GetBindGroupLayout Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Proper Create*PipelineAsync Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fixups Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * more good expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Initial structuredClone implementation (#32960)Taym Haddadi2024-08-0813-16/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | * Initial structuredClone implementation Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Rename PostMessageOptions to StructuredSerializeOptions Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Update wpt test 2020 layout result Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Remove dublicated StructuredClone implementation Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Remove comment from StructuredSerializeOptions webidl Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* separate Queue&Device Id (#32966)Samson2024-08-084-5/+30
| | | Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Refine crown annotations for HTML parser. (#32956)Josh Matthews2024-08-081-1/+9
| | | | | | | | | | | | | * Refine crown annotations for HTML parser. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Add missing annotation. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Properly handle removed iframes in `GlobalScope::get_referrer` (#32782)newmoneybigbucks2024-08-071-8/+12
| | | | Signed-off-by: newmoneybigbucks <newmoneybigbucks@protonmail.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Add exception to rejection logic in `generic_call` (#32950)Samson2024-08-064-29/+54
| | | | | | | | | | | | | | | | | | | | | * exception in JS Promise Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * EXCEPTION_TO_REJECTION on generic_call Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * PromiseRejectionEvent should handle promise as object Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* DevTools: Allow modification of attributes (#32888)eri2024-08-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | * feat: allow modification of attributes Signed-off-by: eri <eri@inventati.org> * fix: tidiness Signed-off-by: eri <eri@inventati.org> * feat: clean walker name generation Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: eri <eri@inventati.org> * fix: missed out parameter Signed-off-by: eri <eri@inventati.org> --------- Signed-off-by: eri <eri@inventati.org> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* webgpu: Use wgpu's instead of string errors and update limits handling (#32925)Samson2024-08-045-93/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use wgpu specific errors Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fixup expect Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * WIP Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Fix records erasing enforcerange Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * page can already be destroyed Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Support more limits Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set good results Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set OK (not PASS) expect CRASH Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fixup expectation Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * bad expectations https://github.com/gfx-rs/wgpu/issues/6075 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * set bad expectation render bundleencoder needs to be rewritten Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* bindings: Convert certain Exceptions into Promise rejections (#32923)Samson2024-08-035-16/+220
| | | | | | | | | | | | | | | | | | | | | | | | | * Impl promise exception to rejection for methods Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Impl promise exception to rejection for getters Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Impl promise exception to rejection for static methods Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Add tests for exception to rejection Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Implement WebXR Gamepads Module (#32860)Daniel Adams2024-08-035-24/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Expose gamepad attribute on XRInputSource Signed-off-by: Daniel Adams <msub2official@gmail.com> * Tidy, add spec links Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update WPT test expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update gamepad state on InputChanged event Signed-off-by: Daniel Adams <msub2official@gmail.com> * Pin webxr commit Signed-off-by: Daniel Adams <msub2official@gmail.com> * Apply gamepad updates during frame updates Signed-off-by: Daniel Adams <msub2official@gmail.com> * Drain input frame map Signed-off-by: Daniel Adams <msub2official@gmail.com> * Don't store gamepad as option Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* script: Fix two build warnings about unused imports (#32910)Martin Robinson2024-08-022-2/+1
| | | Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* fix: Memory leak from CreateProxyWindowHandler (#32773)Erik Hennig2024-08-014-40/+101
| | | | | | | | | | | | | | | | | * fix: Memory leak from CreateProxyWindowHandler Signed-off-by: ede1998 <online@erik-hennig.me> * fix: memory leak in WindowProxy Signed-off-by: ede1998 <online@erik-hennig.me> * fix: Memory leak in WindowProxyHandler through static Signed-off-by: ede1998 <online@erik-hennig.me> --------- Signed-off-by: ede1998 <online@erik-hennig.me>
* enhance: Add support for `unsafe-eval` and `wasm-unsafe-eval` (#32893)Chocolate Pie2024-08-0122-15/+608
| | | Signed-off-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com>
* DevTools: Inline text and clean whitespace (#32884)eri2024-07-302-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: inline text contents Signed-off-by: eri <eri@inventati.org> * feat: filter whitespace only nodes Signed-off-by: eri <eri@inventati.org> * chore: cleanup Signed-off-by: eri <eri@inventati.org> * fix: url fix Signed-off-by: eri <eri@inventati.org> * fix: review fixes Signed-off-by: eri <eri@inventati.org> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: eri <eri@inventati.org> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Fix debugmozjs compilation (#32875)Samson2024-07-291-3/+4
| | | Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Update mozjs (SpiderMonkey) to 128.0 (#32769)Samson2024-07-297-46/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update mozjs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Fix changed readTransfer callback https://bugzilla.mozilla.org/show_bug.cgi?id=1842713 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Use NewExternalArrayBuffer from glue https://github.com/servo/mozjs/pull/474/commits/d33454be74ec5b8d8faf51fab3ed477b8913898b Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Fix columnorigin and filename being in latin1 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fixup newexternalarray Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Float16 (this might require more work for codegen support) https://bugzilla.mozilla.org/show_bug.cgi?id=1833647 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * js.strict is removed https://bugzilla.mozilla.org/show_bug.cgi?id=1621603 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * asm options are now somewhere else https://hg.mozilla.org/mozilla-central/rev/26045c88e3972957087d535e7f259e08857bd2a2 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Comment out offthread compilation Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set NDK to 26 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Fix 1-origin handling Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Expect `FinalizationRegistry` interface Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Good expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * more expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Add `WeakRef` to interfaces expectation Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * mozjs upgrade: fixes for Android Android NDK's layout has changed in r26 and 'lib64' no longer exists under `toolchain/llvm/prebuilt/linux-x86_64`. The libraries that used to be it are now present in `lib` folder itself. This patch updates the build configuration to use the `lib` folder instead when configuring the LIBCLANG_PATH environment variable. This patch also updates to a newer mozjs version that includes fixes for linker errors faced on Android (see #32769). Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * Patch libz-sys & update mozjs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * update NDK version in README Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * Use servo/mozjs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update mozjs again Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Add the type IDL attribute to htmlfieldsetelement (#32869)shanehandley2024-07-282-1/+6
| | | | | | | | | | | | | * Add the type IDL attribute to htmlfieldsetelement Signed-off-by: Shane Handley <shanehandley@fastmail.com> * Fix missing idlharness test expectations Signed-off-by: Shane Handley <shanehandley@fastmail.com> --------- Signed-off-by: Shane Handley <shanehandley@fastmail.com>
* Remove treatment of whitespace in the construction of a for data entry list, ↵shanehandley2024-07-281-49/+42
| | | | | move it to the encoding stage (#32868) Signed-off-by: Shane Handley <shanehandley@fastmail.com>
* Partially implement dialog.show() (#32681)Luke Warlow2024-07-262-3/+28
| | | Signed-off-by: Luke Warlow <lwarlow@igalia.com>
* DevTools: Show HTML tree (#32655)eri2024-07-261-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: watch root node Signed-off-by: eri <eri@inventati.org> * reafactor: divide inspector in components Signed-off-by: eri <eri@inventati.org> * feat: add css properties actor Signed-off-by: eri <eri@inventati.org> * feat: accesibility actor Signed-off-by: eri <eri@inventati.org> * feat: layout actor Signed-off-by: eri <eri@inventati.org> * feat: network parent and refactor Signed-off-by: eri <eri@inventati.org> * feat: progress on the inspector messages Signed-off-by: eri <eri@inventati.org> * feat: more progress on inspector Signed-off-by: eri <eri@inventati.org> * feat: try to fix nodes showing Signed-off-by: eri <eri@inventati.org> * feat: initial dom tree Signed-off-by: eri <eri@inventati.org> * feat: some more messages Signed-off-by: eri <eri@inventati.org> * feat: clean and add documentation Signed-off-by: eri <eri@inventati.org> * refactor: add more docs and clean Signed-off-by: eri <eri@inventati.org> * fix: restore deleted node attributes field Signed-off-by: eri <eri@inventati.org> * Apply suggestions from code review Fix a few nits in comments Signed-off-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: eri <eri@inventati.org> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Remove the WebXR dependency on ancient `time@0.1` crate (#32862)Martin Robinson2024-07-263-32/+5
| | | | | | | | | | | `webxr` depends on a very old verison of `time`, which allowed serializing monotonic clock output. This isn't possible on all platforms, so newer versions of `time` do not allow this. In order to stop using the old 0.1 versions of `time` we have to stop relying on times passed from `webxr` to Servo. This change does that, at the cost of removing the XR profiling feature. It has to be rewritten in another way in the `webxr` crate. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* clippy: components/script/realms (#32859)Rémy SAISSY2024-07-264-4/+4
| | | Signed-off-by: Rémy Saissy <remy.saissy@gmail.com>
* webgpu: Update wgpu to 22.0 (#32827)Samson2024-07-252-16/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update wgpu to https://github.com/gfx-rs/wgpu/commit/c0e7c1ef945a7dd61c81fb951ea554213811aee0 This is few commits ahead of wgpu 22.0 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Make it compile Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Move usage checking to device timeline as per spec Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Add logging (trace) of WEBGPU messages This is very useful when debugging Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * update wgpu again Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * set good Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * skip `webgpu:api,operation,memory_sync,texture,same_subresource` for flakyness Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * rm r.json Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Upgrade stylo to 2024-07-16 (#32812)Martin Robinson2024-07-2415-14/+15
| | | | | | | | | | | | | | * Upgrade stylo to 2024-07-16 Signed-off-by: Martin Robinson <mrobinson@igalia.com> * Use the new `dom` crate from stylo Signed-off-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Implement URL::parse() (#32819)shanehandley2024-07-222-1/+25
| | | | | | | | | | | | | * Implement URL::parse() Signed-off-by: Shane Handley <shanehandley@fastmail.com> * fix: Make handling more idiomatic Signed-off-by: Shane Handley <shanehandley@fastmail.com> --------- Signed-off-by: Shane Handley <shanehandley@fastmail.com>
* Remove a comment related to a TODO which has already been done. (#32822)shanehandley2024-07-211-2/+0
| | | Signed-off-by: Shane Handley <shanehandley@fastmail.com>
* Gamepad: Implement GamepadHapticActuator (#32046)Daniel Adams2024-07-208-6/+481
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement Servo side of GamepadHapticActuator Signed-off-by: Daniel Adams <msub2official@gmail.com> * Get build working Signed-off-by: Daniel Adams <msub2official@gmail.com> * Create effect handling on embedder side Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update tracing for GamepadHapticEffect Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update gilrs to point to commit with effect complete event Signed-off-by: Daniel Adams <msub2official@gmail.com> * Implement playing and preempting haptic effects Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update IDL to add trigger rumble Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update WPT expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Handle stopping haptic effects from reset() Signed-off-by: Daniel Adams <msub2official@gmail.com> * ./mach fmt, fix test-tidy issues Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add extra validity checks for trigger rumble Signed-off-by: Daniel Adams <msub2official@gmail.com> * Retrieve supported haptic effects from embedder Signed-off-by: Daniel Adams <msub2official@gmail.com> * Fix test expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add missing spec link, pin gilrs commit Signed-off-by: Daniel Adams <msub2official@gmail.com> * servoshell cargo formatting Signed-off-by: Daniel Adams <msub2official@gmail.com> * Fix Cargo.toml Signed-off-by: Daniel Adams <msub2official@gmail.com> * Additional comments, realm proof, naming Signed-off-by: Daniel Adams <msub2official@gmail.com> * ./mach fmt Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update gilrs rev to gilrs-core 0.5.12 release Signed-off-by: Daniel Adams <msub2official@gmail.com> * Implement sequence ids for gamepad haptic promises Signed-off-by: Daniel Adams <msub2official@gmail.com> * Take playing effect promise instead of cloning Signed-off-by: Daniel Adams <msub2official@gmail.com> * Implement listener for reset function Signed-off-by: Daniel Adams <msub2official@gmail.com> * Fix Cargo.lock Signed-off-by: Daniel Adams <msub2official@gmail.com> * Restructure IPC listeners, add comments, handle visibility change Signed-off-by: Daniel Adams <msub2official@gmail.com> * Check that haptic effect still exists before handling ff completion event Signed-off-by: Daniel Adams <msub2official@gmail.com> * Visibility steps, add InRealm bindings for promises Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add Gamepad EmbedderMsg arms to egl servo_glue Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Less nesting in webgpu response (#32799)Samson2024-07-176-97/+77
| | | | | | | | | | | | | * Remove Option wrap of WebGPUResponse Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Replace WebGPUResponseResult with WebGPUResponse Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* enhance: Implement `CanvasRenderingContext2D.measureText` (#32704)Chocolate Pie2024-07-173-7/+32
| | | | Signed-off-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* [clippy] Rename enum FormSubmitter and its elements (#32791)Danila Matveev2024-07-173-44/+44
| | | | | | | | | | | | | * [clippy] Renames enum FormSubmitter and its elements Signed-off-by: Danila Matveev <usurname.r@gmail.com> * fmt Signed-off-by: Danila Matveev <usurname.r@gmail.com> --------- Signed-off-by: Danila Matveev <usurname.r@gmail.com>
* clippy: Fix four warnings (#32789)Danila Matveev2024-07-173-3/+6
| | | | | | | | | | | | | | | | | * Fixes 4 clippy rules Signed-off-by: Danila Matveev <usurname.r@gmail.com> * Rollbacks changes in range.rs and silences clippy::neg_cmp_op_on_partial_ord Signed-off-by: Danila Matveev <usurname.r@gmail.com> * Fixes a fmt issue Signed-off-by: Danila Matveev <usurname.r@gmail.com> --------- Signed-off-by: Danila Matveev <usurname.r@gmail.com>
* Fixes typo in clippy::enum_variant_names (#32784)Danila Matveev2024-07-161-1/+1
| | | | Signed-off-by: Danila Matveev <optician_owl@fastmail.com> Signed-off-by: Danila Matveev <usurname.r@gmail.com>
* script: `document.visibilityState` and `document.hidden` (#32635)Ngo Iok Ui (Wu Yu Wei)2024-07-125-8/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Squashed commit of the following: commit 5e0ea9996cb0d8137c3e1cd04487a1065b61289d Author: Wu Yu Wei <yuweiwu@pm.me> Date: Thu Jul 11 13:37:51 2024 +0900 Move lint to new_inherited Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> commit a8cbfb1eef2650d153ef41c232d9e80e1118fc37 Merge: b819968f3e 7a33f8f008 Author: Wu Yu Wei <yuweiwu@pm.me> Date: Thu Jul 11 13:32:18 2024 +0900 Merge branch 'main' into visibility commit b819968f3eaa361c8a2cf3af679943ae2065ab32 Merge: eda2ec4c22 1c6b74e1f1 Author: Wu Wayne <yuweiwu@pm.me> Date: Tue Jul 9 14:26:43 2024 +0900 Merge branch 'main' into visibility commit eda2ec4c225c63236d6851ea525455cad8874ce5 Author: Wu Wayne <yuweiwu@pm.me> Date: Thu Jul 4 14:25:05 2024 +0900 Include page-visibility tests to wpt commit 9da7b4ee39b141e59e4a21a64445c4b08499463f Author: Wu Yu Wei <yuweiwu@pm.me> Date: Thu Jul 4 12:50:40 2024 +0900 Add TODO comment for future update commit 11f55fea3ead0c8fa07f16557a63cc6a77c15c3f Author: Wu Yu Wei <yuweiwu@pm.me> Date: Wed Jul 3 11:01:51 2024 +0900 Add spaces between steps commit 408c3e51f25867e85f894cd77a6355bc32f2aa00 Author: Wu Wayne <yuweiwu@pm.me> Date: Tue Jul 2 18:33:53 2024 +0900 Update MANIFEST.json commit 679fe4ffdd28554b11b4018395fac22a08ccbc34 Author: Wu Wayne <yuweiwu@pm.me> Date: Tue Jul 2 18:27:02 2024 +0900 Add VisibilityStateEntry to mozilla/interfaces.html commit 4a456a2b4a473fa795274edf56ecf660616f90eb Author: Wu Wayne <yuweiwu@pm.me> Date: Tue Jul 2 14:28:11 2024 +0900 Update meta results commit cd191447ff61de392526e00c13f765c2df7a269e Merge: 7ff480a698 ad01342f00 Author: Ngo Iok Ui (Wu Yu Wei) <yuweiwu@pm.me> Date: Tue Jul 2 13:47:49 2024 +0900 Merge branch 'main' into visibility commit 7ff480a698413ac5526edfb1b8731373bb9d04ae Author: Wu Yu Wei <yuweiwu@pm.me> Date: Tue Jul 2 13:12:44 2024 +0900 Update description text of update_visibility_state commit 0e496b7bce4fd5476a1919737b00e8f0c9e2fdc8 Author: Wu Yu Wei <yuweiwu@pm.me> Date: Tue Jul 2 12:59:40 2024 +0900 Add specification link to VisibilityStateEntry methods commit 3e4a061450621bd17f19ff81099dd4daaeaea478 Author: Wu Yu Wei <yuweiwu@pm.me> Date: Tue Jul 2 12:31:53 2024 +0900 Add descriptive text to each step commit 8bbdfcae97db5002b09e5f5ecec6ae80d080dc95 Author: Wu Wayne <yuweiwu@pm.me> Date: Fri Jun 28 19:15:34 2024 +0900 mach fmt commit dc1c7a4aec6aba56af7afcfee6feadbee242a643 Author: Wu Wayne <yuweiwu@pm.me> Date: Fri Jun 28 19:01:00 2024 +0900 Add update_visibility_state commit 6aa18143319044dc084a9585ab064cd853bccc21 Author: Wu Wayne <yuweiwu@pm.me> Date: Fri Jun 28 16:06:25 2024 +0900 Add VisibilityStateEntry.webidl commit 638ae3cd563004334d35cc3fbdc1f918d29833d0 Author: Wu Yu Wei <yuweiwu@pm.me> Date: Fri Jun 28 13:39:29 2024 +0900 Add visibilityState and hidden in Document.webidl Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> * Move creation into reflect call Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> --------- Signed-off-by: Wu Yu Wei <yuweiwu@pm.me>
* script: Use the new C string literal in the DOM bindings (#32741)Bumsoo Kim2024-07-116-63/+60
| | | | | | | | | | | | | | | | | * simple conversion to cstrings using as_ptr() Signed-off-by: Bum Kim <bumcrystlbum@gmail.com> * replaced byte strings with c strings using new helper functions Signed-off-by: Bum Kim <bumcrystlbum@gmail.com> * changed &[u8] type parameters to &CStr Signed-off-by: Bum Kim <bumcrystlbum@gmail.com> --------- Signed-off-by: Bum Kim <bumcrystlbum@gmail.com>
* DevTools: Display console messages and errors (#32727)eri2024-07-091-3/+9
| | | | | | | | | | | | | | | | | * feat: add streams to browsing context * feat: console now works! * feat: order console messages * feat: add streams to new browsing contexts * fix: apply suggestions Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Remove media element state changes triggered by network responses (#32643)Josh Matthews2024-07-091-29/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Do not change media element ready state when network response is complete. * Do not fire multiple error events for the same media content. * Inform media backend when media response is complete. * Continue delaying the load event when a complete media response is received. * Only mark a media response as complete when the response is the active one. * Update expectations for imagebitmap tests using video element. * Update fetch ORB video test expectations. * Update media CSS selector test expectation for non-implemented feature. * Update expectations for media element tests that now work. * Updat expected result for failing reftest. * Update expected failure for test that loads an audio file in a video element. * Update media test expectation for unimplemented track feature. * Do not process media element ready state changes that are unchanged. * Reset media element ready state to Current when playback finishes. * Set media element ready state to Enough when appropriate player event is received. * Update test expectations.