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
Anthony Ramine
31e9d81c0f
Make #[dom_struct] a proc_macro attribute
2017-02-24 01:50:51 +01:00
Ms2ger
67c572af37
Update js.
...
Fixes #15553 .
2017-02-15 16:27:29 +01:00
Alan Jeffrey
fc67878edf
Remove warnings about unnecessary mutability.
2017-01-28 21:48:07 -06:00
Ms2ger
2839bca065
Use the typed array APIs in ImageData.
2017-01-09 14:00:54 +01:00
Abelardo E. Mendoza
b372e7c98f
script creates methods taking '*mut JSContext' unsafe
...
rebase + marked the necessary new code as unsafe
2016-11-14 11:06:17 +01:00
Anthony Ramine
fcb59d3057
Make reflect_dom_object take a &GlobalScope
2016-10-06 20:59:09 +02:00
Anthony Ramine
6e1523f4ae
Compile WebIDL return type "object" to NonZero<*mut JSObject>
2016-08-30 19:07:13 +02:00
Anthony Ramine
2400b91d05
Don't bother with the global in ImageData::get_image_data
2016-08-30 19:06:41 +02:00
Anthony Ramine
854a3dff68
Assert that ImageData::data is not null
2016-08-30 19:06:40 +02:00
Anthony Ramine
eb94f1a918
Update SpiderMonkey
2016-05-03 18:36:11 +02:00
Brandon Fairchild
341e66f66d
Remove #[allow(raw_pointer_derive)]
attributes
...
The attributes are unused.
Fixes #8699 .
2015-11-27 14:32:57 -05:00
rohan.prinja
45224028db
more refactoring
2015-10-30 20:26:29 +09:00
Ravi Shankar
889eec364b
sorted the extern crate, mod & use declarations
2015-09-24 02:12:45 +05:30
Corey Farwell
5ccb0d43ef
Merge adjacent identical impl
sections
...
Prior to #7416 and #7401 , many of these `impl` sections were not
identical
2015-08-28 10:30:42 -04:00