WaterWhisperer
2a759ed6de
Replace allow(crown::unrooted_must_root) with expect(crown::unrooted_must_root) ( #41815 )
...
Testing: `./mach build -d --use-crown` with no warnings
Fixes : #41761
Signed-off-by: WaterWhisperer <waterwhisperer24@qq.com >
2026-01-10 08:05:49 +00:00
Simon Wülker
c4ae451612
Turn all commented links before functions into doccomments ( #40331 )
...
Servo has a lot of comments like this:
```rust
// https://example-spec.com/#do-the-thing
fn do_the_thing() {}
```
and I keep turning these into doc comments whenever I'm working close to
one of them. Doing so allows me to hover over a function call in an IDE
and open its specification without having to jump to the function
definition first. This change fixes all of these comments at once.
This was done using `find components -name '*.rs' -exec perl -i -0777
-pe 's|^([ \t]*)// (https?://.*)\n\1(fn )|\1/// <$2>\n\1$3|mg' {} +`.
Note that these comments should be doc comments even within trait `impl`
blocks, because rustdoc will use them as fallback documentation when the
method definition on the trait does not have documentation.
Testing: Comments only, no testing required
Preparation for https://github.com/servo/servo/pull/39552
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de >
2025-11-01 05:32:45 +00:00
Simon Wülker
3d320fa96a
Update rustfmt to the 2024 style edition ( #35764 )
...
* Use 2024 style edition
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de >
* Reformat all code
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de >
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de >
2025-03-03 11:26:53 +00:00
Yerkebulan Tulibergenov
31199076ec
refactor: add CanGc as argument to Promise::reject_native ( #35640 )
...
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com >
2025-02-25 03:58:36 +00:00
Yerkebulan Tulibergenov
0383ba9a5b
refactor: add CanGc as argument to Promise::resolve ( #35616 )
...
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com >
2025-02-23 12:12:21 +00:00
Auguste Baum
863d2ce871
Propagate CanGc arguments through callers in constructors ( #35541 )
...
Signed-off-by: Auguste Baum <auguste.apple@gmail.com >
2025-02-20 16:17:45 +00:00
Josh Matthews
c94ac5bccb
Move various reflector types and traits to script_bindings ( #35279 )
...
* script: Move Reflector to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
* script: Extract global() helper from DomObject into new trait. Move DomObject and related traits to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
2025-02-04 06:58:08 +00:00
Josh Matthews
875e387004
script: Feature-gate all crown support. ( #35055 )
...
* script: Feature-gate all crown support.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
* script: Use cfg(crown) instead of a cargo feature.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
2025-01-18 21:36:15 +00:00
Josh Matthews
c94d909a86
script: Limit public exports. ( #34915 )
...
* script: Restrict reexport visibility of DOM types.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
* script: Mass pub->pub(crate) conversion.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
* script: Hide existing dead code warnings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
* Formatting.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
* Fix clippy warnings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
* Formatting.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
* Fix unit tests.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
* Fix clippy.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
* More formatting.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
2025-01-10 08:19:19 +00:00
Domenico Rizzo
0e9746fbbe
Add CanGc argument to reflect_dom_object ( #34606 )
...
* applied mach fmt
Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com >
Refinements
Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com >
Modified reflect_dom_object signature and all its calls
Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com >
* fix function calls when parameter is passed up
Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com >
---------
Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com >
2024-12-13 15:51:59 +00:00
Josh Matthews
e956f3124c
Generate a trait abstracting over all known DOM interfaces ( #34357 )
...
* script: Generate trait for all DOM interfaces and parameterize generated Methods traits over it.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
* script: Update trait implementations with new generic type.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
* Formatting.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
2024-11-24 07:35:14 +00:00
Josh Matthews
575e885529
Mark promise creation methods with CanGc ( #33928 )
...
* Add CanGc annotations to promise constructor.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
* Propagate CanGc arguments for Promise::new_in_current_realm.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
* Fix out-of-order entries.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
* Propagate CanGc from Promise::new.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
* Suppress clippy warning.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
* Formatting.
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net >
2024-10-22 09:35:20 +00:00
Oluwatobi Sofela
a53632c0e5
clippy: Fix collapsible_if warnings ( #31852 )
2024-03-25 13:55:45 +00:00
Ekta Siwach
d8adeb1b44
clippy: Fix some warnings in components/script ( #31849 )
...
* clippy: fixed some warnings in components/script
* fixed formatting
* fix formatting
2024-03-25 10:22:21 +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
fca5833e21
Remove global argument from Promise::new_in_current_realm.
2023-05-20 11:05:09 -04:00
Gregory Terzian
89eb7c2aa2
serviceworker: make job queue unique per origin
2020-05-21 13:21:21 +08:00
YUAN LYU
3ea6d87bcc
Add trait DomObjectWrap to provide WRAP function
2020-03-20 22:16:56 -04:00
Kunal Mohan
5a3e1b8e69
rename compartment to realm
2020-01-24 20:52:36 +05:30
Bastien Orivel
292d468cd1
Use the newly added inCompartments option everywhere it can be
2019-05-25 17:28:07 +02:00
Jan Andre Ikenmeyer
97deef4e19
Update MPL license to https
2019-05-10 15:03:19 +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
Manish Goregaokar
611dc4bc70
Remove now-unnecessary must_root and allow(unrooted_must_root) annotations
2019-01-04 15:05:07 -08:00
CYBAI
235fb5952d
Introduce NavigationPreloadManager for ServiceWorkerRegistration
2018-12-08 16:50:18 +08:00