Commit graph

33 commits

Author SHA1 Message Date
Richard Dushime
01ca220f83
clippy: Fix many warnings in components/script (#31717)
* Fix Several clippy warnings

* Fix Build errors

* Fix Unused import

* Fix requested changes

* Fix rustfmt

* Minor fixes

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2024-03-19 16:05:56 +00:00
Taym Haddadi
d0b663800f
WedIDL: bring dom/bindings/typedarray further in line with spec (#31375)
* WedIDL: bring dom/bindings/typedarray further in line with spec

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Rename HeapBufferSourceTypes to HeapBufferSource

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* fmt code

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

---------

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
2024-02-25 12:13:17 +00:00
Taym Haddadi
742d3ed97f
Make HeapFloat32Array generic (#31167)
* Make HeapFloat32Array generic

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Define all the methods defaults on the HeapTypedArray trait

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Use generic type instead of trait

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

---------

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
2024-01-29 11:57:50 +00:00
Martin Robinson
5c1723c983
rustdoc: Fix many rustdoc errors (#31147)
This fixes many rustdoc errors that occur due to raw URLs in rustdoc
comments as well as unescaped Rust code that should be in backticks.
2024-01-22 13:13:48 +00:00
tannal
8c53a8c745
use FLoat32Array in XRView (#31077)
* use FLoat32Array in XRView

* handle error when calling set_data

Yes, we should handle this.

Co-authored-by: Taym Haddadi <haddadi.taym@gmail.com>

* fix: error handling

* chore: error message

---------

Co-authored-by: Taym Haddadi <haddadi.taym@gmail.com>
2024-01-16 15:56:32 +00:00
Samson
aad2dccc9c
Strict import formatting (grouping and granularity) (#30325)
* strict imports formatting

* Reformat all imports
2023-09-11 19:16:54 +00:00
Samson
9514f670d1
No tracing of nop traceable fields (#29926)
* Add `no_trace` option to JSTraceable derive

* NoTrace wrapper

* Port some types to no_trace schematics

* Fixing my unsafe mistakes (not tracing traceables)

* Add docs & safety guards for no_trace

Safety guards (trait shenanigans) guarantees safety usage of `no_trace`

* Port canvas_traits to no_trace

* Port servo_media to no_trace

* Port net_traits to no_trace

* Port style to no_trace

* Port webgpu to no_trace

* Port script_traits to no_trace

* Port canvas_traits, devtools_traits, embedder_traits, profile_traits to no_trace

* unrooted_must_root lint in seperate file

* Add trace_in_no_trace_lint as script_plugin

* Composable types in must_not_have_traceable

* Introduced HashMapTracedValues wrapper

* `HashMap<NoTrace<K>,V>`->`HashMapTracedValues<K,V>`

* Port rest of servo's types to no_trace

* Port html5ever, euclid, mime and http to no_trace

* Port remaining externals to no_trace

* Port webxr and Arc<Mutex<_>>

* Fix spelling in notrace doc
2023-08-04 10:17:43 +00:00
Josh Matthews
f79e1e327d Make GlobalScope.get_cx a static method. 2023-05-20 11:05:09 -04:00
Martin Robinson
423cc34cb0 Bump euclid to 0.22
- Also updates raqote to latest with an upgrade of font-kit to 0.11
  applied on as a patch
- Update lyon_geom to the latest version

Major change:

- All matrices are now stored in row major order. This means that
  parameters to rotation functions no longer should be negated.
- `post_...()` functions are now named `then()`. `pre_transform()` is removed,
  so `then()` is used and the order of operations changed.
2023-01-26 08:59:21 +01:00
Manish Goregaokar
d627476893 Update to treat view transforms as native-relative 2020-05-18 08:20:54 -07:00
Manish Goregaokar
794624b42b Move viewports to being per-session, not per-frame 2020-05-18 08:20:19 -07:00
Manish Goregaokar
eaad692c0b Use cached projection matrix 2020-05-18 08:19:42 -07:00
Manish Goregaokar
708824700f Make views a per-frame deal 2020-05-18 08:19:42 -07:00
daemon1024
a79f97b180 handle detached array in XRView 2020-04-15 10:07:36 +05:30
Alan Jeffrey
c611e46381 Remove WebVR 2020-04-08 20:23:41 -05:00
YUAN LYU
3ea6d87bcc
Add trait DomObjectWrap to provide WRAP function 2020-03-20 22:16:56 -04:00
marmeladema
88cacfb009 Modify *::get_cx methods to return a safe JSContext instead of a raw one 2019-07-24 09:53:10 +01:00
marmeladema
2c5d0a6ebc Convert CGTraitInterface to use safe JSContext instead of raw JSContext 2019-07-24 08:24:50 +01:00
Emilio Cobos Álvarez
3d57c22e9c Update euclid.
There are a few canvas2d-related dependencies that haven't updated, but they
only use euclid internally so that's not blocking landing the rest of the
changes.

Given the size of this patch, I think it's useful to get this landed as-is.
2019-07-23 23:09:55 +02:00
Manish Goregaokar
b818af794a Add a viewer typed reference space 2019-07-11 11:12:59 -07:00
Manish Goregaokar
8780edb165 Hook webxr data into XRFrame/XRView/XRSpace 2019-07-11 11:12:59 -07:00
Manish Goregaokar
d55ed4240c Hook requestSession() into new XR crate 2019-07-11 11:12:59 -07:00
Josh Matthews
57d2b5a92d Remove mozjs dep from malloc_size_of. 2019-05-02 09:30:03 -04:00
Manish Goregaokar
e055884564 Remove viewMatrix
Users are supposed to use `view.transform.inverse.matrix`

The view matrix was incorrect anyway, we had forgotten to invert it, but that was okay since we transposed it by accident (due to euclid's use of the row-vector convention), and for 3DOF devices these transforms are mostly rotations so  transposing instead of inverting doesn't lead to visible effects.
2019-04-03 23:55:33 -07:00
Manish Goregaokar
646647e8d9 Add XRView.transform 2019-04-03 23:55:33 -07:00
Manish Goregaokar
f9c25c612a Add XRPose.transform 2019-04-03 23:55:33 -07:00
Manish Goregaokar
08079c4d28 Switch XRSpace code to using rigid transforms 2019-04-03 23:55:33 -07:00
Manish Goregaokar
2e48606569 Compute view matrix from viewer pose 2019-03-26 00:09:15 -07:00
Vladimir Iacob
8a615fc880 mark create_type_array as unsafe in vrframedata component 2019-01-06 19:05:39 +02:00
Manish Goregaokar
4d73eac27c NonNull::new() 2019-01-03 23:53:50 -08:00
Manish Goregaokar
28dff81dbf Fill in XR frame/pose/view implementations 2018-12-21 15:47:28 -08:00
Manish Goregaokar
7e043a33f1 Support fetching viewport info 2018-12-21 14:43:41 -08:00
Manish Goregaokar
73c530344c Basic XRView interface 2018-12-19 16:48:44 -08:00