Oluwatobi Sofela
2789e98876
clippy: Fix redundant field names warnings ( #31793 )
2024-03-20 23:05:29 +00:00
Taym Haddadi
a9a7e8a5cf
Rename buffer_source_type to buffer_source ( #31426 )
...
* Rename buffer_source_type to buffer_source
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Code format
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
---------
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
2024-02-26 14:21:46 +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
328c376ff1
WebIDL: Use Uint8ClampedArray instead of raw JSObject in bindings ( #31317 )
...
* WebIDL: Use Uint8ClampedArray instead of raw JSObject in bindings
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* fmt
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* introduce new_initialized_heap_typed_array function
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Remove unsed unsafe_code
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Use doc comments for ImageData
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Use get_internal instead of acquire_data
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Handle JS errors in ImageData GetData and new_initialized_heap_typed_array
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Fix wrong assert that causes CRASH in test
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Early return for error
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Address review comments
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
---------
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
2024-02-16 16:40:45 +00:00
Ennui Langeweile
26a3dffd95
Clean up and merge some canvas-related WebIDLs ( #30606 )
...
* Clean up and merge some canvas-related WebIDLs
* Apply `./mach fmt`
* WebIDL has `test-tidy` support???
2023-10-26 12:45:53 +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
Josh Matthews
cc07e27864
Rename reflect_dom_object2.
2023-05-31 23:03:32 -04:00
Josh Matthews
0e8ac3fdac
Formatting.
2023-05-28 23:54:02 -04:00
Josh Matthews
dbff26bce0
Support arbitrary protos when wrapping DOM objects with constructors.
2023-05-28 23:23:12 -04:00
Josh Matthews
f79e1e327d
Make GlobalScope.get_cx a static method.
2023-05-20 11:05:09 -04:00
sagu
3ef3ee5a62
Fix warning
2021-03-30 12:09:18 +02:00
sagudev
5f91ab07da
fmt
2021-03-30 11:38:33 +02:00
sagu
61d7775673
Update imagedata.rs
2021-03-30 06:21:05 +02:00
sagudev
b921cd14df
Fix errors
2021-03-19 07:01:46 +01:00
Manish Goregaokar
fccfff11c5
Update euclid
2020-04-07 08:51:08 -07:00
YUAN LYU
3ea6d87bcc
Add trait DomObjectWrap to provide WRAP function
2020-03-20 22:16:56 -04:00
Kunal Mohan
f7db4b7f80
Modify script
to prevent further violations of snake_case
2020-01-18 14:22:15 +05:30
Bailey Blankenship
ec2961920b
Addresses issues raised in #24465 ; removes redundancy in set_bitmap_dimensions
...
Removed passing test .ini files and moved euclid extensions to euclidext.rs to factor out redundant code
2019-11-10 18:37:14 -05:00
Isaiah Inuwa
7cd6a8c682
Refactor constructor code to align with spec.
2019-09-26 13:23:34 -05:00
Isaiah Inuwa
7d7c46cbc9
Add check for empty data on ImageData constructor.
2019-09-23 22:27:30 -05: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
Josh Matthews
57d2b5a92d
Remove mozjs dep from malloc_size_of.
2019-05-02 09:30:03 -04:00
Anthony Ramine
804d964b7d
Send an IpcSharedMemory in tex_image_2d and tex_sub_image_2d
...
This avoids a copy in the case of textures coming from HTMLImageElement.
2018-11-20 10:14:52 +01:00
Jan Andre Ikenmeyer
a1a14459c1
Update MPL license to https (part 3)
2018-11-19 14:47:12 +01:00
Anthony Ramine
a5779ad372
Prefix some pixels functions with rgba8_
2018-11-16 12:37:34 +01:00
Simon Sapin
9f977c5287
Remove useless use crate_name;
imports.
...
A `crate_name::foo` path always works in 2018
2018-11-08 09:29:52 +01:00
Pyfisch
9e92eb205a
Reorder imports
2018-11-06 22:35:07 +01:00
Simon Sapin
45f7199eee
cargo fix --edition
2018-11-06 15:26:02 +01:00
Anthony Ramine
e62dbabb46
Handle some transparent black cases in ctx.getImageData
2018-10-07 02:52:06 +02:00
Anthony Ramine
75e6f5dfaa
Avoid copying pixels in ctx.putImageData sometimes
2018-10-06 02:59:25 +02:00
Anthony Ramine
19f40cdf0b
Introduce ImageData::get_rect
...
We use that to send only the pixels that will be actually drawn to the
canvas thread in CanvasRenderingContext2d::PutImageData.
We also make the canvas thread byte swap and premultiply colours in-place.
2018-10-06 01:12:05 +02:00
Anthony Ramine
a3392610c3
Make HTMLCanvasElement::get_size return a Size2D<u32>
...
The changes keep trickling down.
2018-10-02 14:21:06 +02:00
chansuke
c37a345dc9
Format script component
2018-09-19 17:40:47 -04:00
Simon Sapin
1333b6ee45
Fix the build for NLL
...
Test with `RUSTFLAGS="-Zborrowck=mir -Ztwo-phase-borrows" cargo build`
https://internals.rust-lang.org/t/help-us-get-non-lexical-lifetimes-nll-over-the-finish-line/7807/7
2018-08-24 17:49:58 +02:00
Josh Matthews
7c32ad7c3d
Revert "Fix the build for NLL"
...
This reverts commit d1733aa502
.
2018-08-07 20:24:55 -04:00
Simon Sapin
d1733aa502
Fix the build for NLL
...
Test with `RUSTFLAGS="-Zborrowck=mir -Ztwo-phase-borrows" cargo build`
https://internals.rust-lang.org/t/help-us-get-non-lexical-lifetimes-nll-over-the-finish-line/7807/7
2018-08-08 00:09:56 +02:00
Simon Sapin
b78ac6ba6a
Use safe NonZero constructor instead of an explicit null check
2018-01-22 17:41:26 +01:00
Simon Sapin
52eda6082f
Replace NonNullJSObjectPtr with std::ptr::NonNull<JSObject>
2018-01-22 17:41:25 +01:00
Simon Sapin
4d459bce32
Fix tyvar_behind_raw_pointer warnings
...
https://github.com/rust-lang/rust/issues/46906
2018-01-10 20:54:35 +01:00
Simon Sapin
e2fafd2dfc
Replace NonZero<*mut JSObject> with a wrapper to enable local trait impls.
2017-10-16 20:19:56 +02:00
Simon Sapin
aa15dc269f
Remove use of unstable box syntax.
...
http://www.robohornet.org gives a score of 101.36 on master,
and 102.68 with this PR. The latter is slightly better,
but probably within noise level.
So it looks like this PR does not affect DOM performance.
This is expected since `Box::new` is defined as:
```rust
impl<T> Box<T> {
#[inline(always)]
pub fn new(x: T) -> Box<T> {
box x
}
}
```
With inlining, it should compile to the same as box syntax.
2017-10-16 17:16:20 +02:00
Anthony Ramine
f87c2a8d76
Rename Root<T> to DomRoot<T>
...
In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>,
where Root<T> will be able to handle all the things that need to be
rooted that have a stable traceable address that doesn't move for the
whole lifetime of the root. Stay tuned.
2017-09-26 09:49:10 +02:00
Anthony Ramine
0e3c54c191
Rename dom::bindings::js to dom::bindings::root
2017-09-26 02:19:05 +02:00
Simon Sapin
a205c82264
Upgrade to rustc 1.21.0-nightly (599be0d18 2017-07-26)
2017-07-27 02:21:01 +02:00
Simon Sapin
7af5a7fd54
Untry script
2017-06-18 13:21:49 +02:00
Nicolas Silva
8617320500
Bump euclid to 0.14.
2017-06-14 16:00:59 +02:00
Lucjan Suski
c83ac31e71
Make ImageData::new return Fallible instead of panic
2017-03-20 21:16:55 +01:00
montrivo
46a25d621c
Implement ImageData constructors #15671
2017-03-14 23:16:17 +01:00