Commit graph

185 commits

Author SHA1 Message Date
石蕊 (Pi-Cla)
f29dd64a7b
Fix more clippy (#32740) 2024-07-09 04:47:43 +00:00
Ngo Iok Ui (Wu Yu Wei)
63889b732f
fix: codegen on callback (#32537)
* Fix codegen on callback

* Add test callbacks to testbinding.rs
2024-06-18 16:00:14 +00:00
Ngo Iok Ui (Wu Yu Wei)
8eed3b442b
Update WebIDL.py (#32495)
* Update WebIDL.py

* Update WebIDL.py

* Add builtin-array.patch

* Fix CodegenRust.py and Configuration.py

* Fix missing downcasts

* mach fmt

* Update check and comment to explain why we need this check

* Update Global of DissimilarOriginWindow.webidl
2024-06-15 04:22:42 +00:00
Rosemary Ajayi
00c4d798c9
clippy: Fix a few problems in components/script/dom (#31955)
* fixed various clippy warnings

* fixed various clippy warnings

* fixed various clippy warnings
2024-03-31 23:15:13 +00:00
Aarya Khandelwal
9b26dca141
Fixed the .clone() warnings. (#31819) 2024-03-22 05:41:17 +00:00
Oluwatobi Sofela
2789e98876
clippy: Fix redundant field names warnings (#31793) 2024-03-20 23:05:29 +00:00
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
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
Martin Robinson
7e82c5c957
Compile Servo with the latest version of rust stable (#30831)
This completes the transition to compiling Servo with rust stable. Some
nightly-only features are still used when compiling the `script` and
`crown` crates, as well as for some style unit tests. These will likely
break with newer compiler versions, but `crown` can be disabled for them
conditionally. This is just the first step.

This has some caveats:

1. We need to disable setting up the special linker on Linux. The -Z
   option isn't supported with stable rust so using this is out --
   meanwhile we can't be sure that lld is installed on most systems.
2. `cargo fmt` still uses some unstable options, so we need to rely on
   the unstable toolchain just for running `fmt`. The idea is to fix this
   gradually.
2023-12-06 17:36:07 +00:00
Samson
604979e367
Replace script_plugins with a clippy like rustc driver (named crown) (#30508)
* Remove script_plugins

* Use crown instead of script_plugins

* crown_is_not_used

* Use crown in command base

* bootstrap crown

* tidy happy

* disable sccache

* Bring crown in tree

* Install crown from tree

* fix windows ci

* fix warning

* fix mac

libscript_plugins.dylib is not available anymore

* Update components/script/lib.rs

Co-authored-by: Martin Robinson <mrobinson@igalia.com>

* Update for nightly-2023-03-18

Mostly just based off https://github.com/servo/servo/pull/30630

* Always install crown

it's slow only when there is new version

* Run crown test with `mach test-unit`

* Small fixups; better trace_in_no_trace tests

* Better doc

* crown in config.toml

* Fix tidy for real

* no sccache on rustc_wrapper

* document rustc overrides

* fixup of compiletest

* Make a few minor comment adjustments

* Fix a typo in python/servo/platform/base.py

Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>

* Proper test types

* Ignore tidy on crown/tests

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2023-12-01 15:50:52 +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
fca5833e21 Remove global argument from Promise::new_in_current_realm. 2023-05-20 11:05:09 -04:00
Josh Matthews
edf86d1bdc dom: Convert parent dictionary values when converting dictionaries to JS. 2020-06-16 17:34:30 -04:00
Gregory Terzian
48d4aec5b6 require entered realm, use aes, to append native promise handler 2020-06-04 11:38:37 +08:00
Gregory Terzian
bd5796c90b integrate readablestream with fetch and blob 2020-06-04 11:38:35 +08:00
Martin Robinson
b585ce5b1f Use a restyle for animation ticks
This change corrects synchronization issues with animations, by
reworking the animation processing model to do a quick restyle and
incremental layout when ticking animations.

While this change adds overhead to animation ticks, the idea is that
this will be the fallback when synchronous behavior is required to
fulfill specification requirements. In the optimistic case, many
animations could be updated and applied off-the-main-thread and then
resynchronized when style information is queried by script.

Fixes #13865.
2020-05-05 15:13:35 +02:00
Manish Goregaokar
58bab8a7e9 Add test for overloading with interface and dict 2020-04-09 12:31:13 -07:00
Tipowol
8a3bf880e9 Add InRealm argument to Callback trait 2020-04-05 19:54:30 +02:00
YUAN LYU
3ea6d87bcc
Add trait DomObjectWrap to provide WRAP function 2020-03-20 22:16:56 -04:00
CYBAI
403ffcf1eb Always pass InRealm to GlobalScope::from_context to avoid getting null global 2020-02-16 09:55:10 +09:00
Kunal Mohan
5a3e1b8e69
rename compartment to realm 2020-01-24 20:52:36 +05:30
Kunal Mohan
f7db4b7f80
Modify script to prevent further violations of snake_case 2020-01-18 14:22:15 +05:30
Gregory Terzian
6e8a85482c re-structure blob, structured serialization 2019-12-11 22:46:50 +08:00
Kagami Sascha Rosylight
b697621b05 Support WebIDL record<> 2019-10-15 17:14:00 +09:00
marmeladema
78034a90d0 Use safe JSContext when possible in interface.rs 2019-08-09 00:43:24 +01:00
marmeladema
51e22fbc26 Remove some usage of unsafe code in Promise 2019-08-09 00:02:07 +01:00
marmeladema
2c5d0a6ebc Convert CGTraitInterface to use safe JSContext instead of raw JSContext 2019-07-24 08:24:50 +01:00
sreeise
871239a3e3 Change bindings generation to make Exposed annotation aware of members/partial interfaces 2019-07-14 09:24:43 -04:00
Bastien Orivel
292d468cd1 Use the newly added inCompartments option everywhere it can be 2019-05-25 17:28:07 +02:00
Bastien Orivel
0b29caa554 Add support for attributes to the inCompartments binding parameter 2019-05-25 14:43:44 +02:00
Aron Zwaan
e2e6e2ac94 Pass InCompartment by value 2019-04-25 11:37:35 +02:00
Aron Zwaan
1b6949d4cf Add proof parameter to Promise::new_in_current_compartment 2019-04-24 19:46:10 +02:00
Aron Zwaan
782b58587a Rename Promise::new to Promise::new_in_current_compartment 2019-04-03 20:45:30 +02:00
Peter Hall
8bfd4dc1e2 #8539 Config preferences backend restructure 2019-03-20 15:01:26 +00:00
Manish Goregaokar
611dc4bc70 Remove now-unnecessary must_root and allow(unrooted_must_root) annotations 2019-01-04 15:05:07 -08:00
Jan Andre Ikenmeyer
a1a14459c1
Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
Simon Sapin
2012be4a8b cargo fix --edition-idioms 2018-11-08 09:28:00 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Simon Sapin
76e59a46d3 Sort use statements 2018-11-06 15:26:02 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
Keith Yeung
99589d2f2a Handle default empty sequence values 2018-11-01 14:54:23 -07:00
chansuke
c37a345dc9 Format script component 2018-09-19 17:40:47 -04:00
Marcin Mielniczuk
356c57e628 Adapt Servo for mozjs 0.6 and the changes introduced in servo/rust-mozjs#393 2018-03-28 21:28:30 +02:00
Igor Matuszewski
fbfcc762e1 Add codegen test for function overloads taking typed array args 2018-03-23 19:25:20 +01:00
Igor Matuszewski
64dc0c4b9e Root any members in dictionaries 2018-03-16 16:53:38 +01:00