| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update to rust 1.85
This is needed for cargo-deny
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Upgrade crown
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Clippy fixes
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Re-upgrade cargo-deny to 0.18
Keeping it locked to 0.18 just in case they
update their required rustc version again
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
| |
Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
|
|
|
| |
Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
|
|
|
|
|
|
|
|
|
| |
In addition to some small API changes, this downstream version of
WebRender no longer depends on a very old version of time. This is the
last step toward removing the dependency on `time0.1`.
The review for this commit should also include: https://github.com/servo/webrender/commit/9f552bebab81a73e62068c42d94be2f9c0586ce4
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
No longer hide errors while queueing tasks on the main thread. This
requires creating two types of `TaskSource`s: one for the main thread
and one that can be sent to other threads. This makes queueing a bit
more efficient on the main thread and more importantly, no longer hides
task queue errors.
Fixes #25688.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a simplification of the internal `TaskQueue` API that moves the
`TaskManager` to the `GlobalScope` itself. In addition, the handling of
cancellers is moved to the `TaskManager` as well. This means that no
arguments other than the `task` are necessary for queueing tasks, which
makes the API a lot easier to use and cleaner.
`TaskSource` now also keeps a copy of the canceller with it, so that
they always know the proper way to cancel any tasks queued on them.
There is one complication here. The event loop `sender` for dedicated
workers is constantly changing as it is set to `None` when not handling
messages. This is because this sender keeps a handle to the main
thread's `Worker` object, preventing garbage collection while any
messages are still in flight or being handled. This change allows
setting the `sender` on the `TaskManager` to `None` to allow proper
garbabge collection.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of creating a type for each `TaskSource` variety have each `TaskSource`
hold the same kind of sender (this was inconsistent before, but each
sender was effectively the same trait object), a pipeline, and a
`TaskSourceName`. This elminates the need to reimplement the same
queuing code for every task source.
In addition, have workers hold their own `TaskManager`. This allows just
exposing the manager on the `GlobalScope`. Currently the `TaskCanceller`
is different, but this will also be eliminated in a followup change.
This is a the first step toward having a shared set of `Sender`s on
`GlobalScope`.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Upgrade rustc to 1.83
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Fix crown (change copied from linked clippy function)
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Fix named lifetime lint
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Bump shell.nix
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Fix non-local impl warnings
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Format with 1.83 formatting changes
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Fix manual non-local impl
Signed-off-by: Nico Burns <nico@nicoburns.com>
* More fixes for crown
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Fix tidy
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Fix needless_return lints
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Fix doc comment lint
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Fix missing wait lint
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Allow needless_lifetimes lint
Signed-off-by: Nico Burns <nico@nicoburns.com>
* more doc comments
Signed-off-by: Nico Burns <nico@nicoburns.com>
* More needless_returns
Signed-off-by: Nico Burns <nico@nicoburns.com>
* is_empty lint
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Fix needless_lifetime lints
Signed-off-by: Nico Burns <nico@nicoburns.com>
* fix div_ceil lint
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Allow non-minimal bool
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Non-local impl in constellation
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Missing wait in constellation
Signed-off-by: Nico Burns <nico@nicoburns.com>
* fmt
Signed-off-by: Nico Burns <nico@nicoburns.com>
* remove useless lints table
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Fixup comments
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Allow non-local definition in sandboxing code to simplify feature flagging
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Remove wait calls and allow zombie_processes lint
Signed-off-by: Nico Burns <nico@nicoburns.com>
---------
Signed-off-by: Nico Burns <nico@nicoburns.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
| |
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
|
|
|
| |
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#33282)
Up until now, Servo was using a very old version of time to get a
cross-process monotonic timestamp (using `time::precise_time_ns()`).
This change replaces the usage of old time with a new serializable
monotonic time called `CrossProcessInstant` and uses it where `u64`
timestamps were stored before. The standard library doesn't provide this
functionality because it isn't something you can do reliably on all
platforms. The idea is that we do our best and then fall back
gracefully.
This is a big change, because Servo was using `u64` timestamps all over
the place some as raw values taken from `time::precise_time_ns()` and
some as relative offsets from the "navigation start," which is a concept
similar to DOM's `timeOrigin` (but not exactly the same). It's very
difficult to fix this situation without fixing it everywhere as the
`Instant` concept is supposed to be opaque. The good thing is that this
change clears up all ambiguity when passing times as a `time::Duration`
is unit agnostic and a `CrossProcessInstant` represents an absolute
moment in time.
The `time` version of `Duration` is used because it can both be negative
and is also serializable.
Good things:
- No need too pass around `time` and `time_precise` any longer.
`CrossProcessInstant` is also precise and monotonic.
- The distinction between a time that is unset or at `0` (at some kind
of timer epoch) is now gone.
There still a lot of work to do to clean up timing, but this is the
first step. In general, I've tried to preserve existing behavior, even
when not spec compliant, as much as possible. I plan to submit followup
PRs fixing some of the issues I've noticed.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes several tests in
[wpt/user-timing](https://wpt.fyi/results/user-timing?label=master&product=chrome%5Bexperimental%5D&product=firefox%5Bexperimental%5D&product=safari%5Bexperimental%5D&product=servo&aligned)
by fixing some logic errors in how marks/measures are cleared (via
[`clearMarks`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/clearMarks)
and
[`clearMeasures`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/clearMeasures)).
There are two changes:
1. Fix the boolean logic in `clear_entries_by_name_and_type` so that,
when `clearMarks('foo')` or `clearMeasures('foo')` is called, the
presence of the entry name correctly filters based on existing entry
names.
2. Make the `entry_name` param a `DOMString` rather than an
`Option<DOMString>` since every API call has it as `Some` anyway, and
I'm not aware of any [Performance
APIs](https://developer.mozilla.org/en-US/docs/Web/API/Performance)
where you can clear all entries regardless of type. (This is not
strictly required for the fix, but I think it makes the code easier to
read.)
~~I also considered adding the expected WPT results using `mach
update-wpt`. But I'm not sure if you want these changes, since the
expectations are currently missing (i.e. `tests/wpt/meta/user-timing`
does not exist).~~ (_Update: added!_)
For the record, this PR fixes the following tests:
- `clearMarks.html.ini`
- `clearMeasures.html.ini`
- `clear_non_existent_mark.any.js.ini`
- `clear_non_existent_measure.any.js.ini`
- `clear_one_mark.any.js.ini`
- `clear_one_measure.any.js.ini`
~~In case you do want these meta files, here they are:
https://github.com/nolanlawson/servo/commit/510e6146ba01bae4f4aafda8754718e24ce6e868~~
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)
<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because ___
<!-- Also, please make sure that "Allow edits from maintainers" checkbox
is checked, so that we can help you if you get stuck somewhere along the
way.-->
<!-- Pull requests that do not address these steps are welcome, but they
will require additional verification as part of the review process. -->
|
| |
|
|
|
|
|
|
|
| |
* clippy: fixed some warnings in components/script
* fixed formatting
* fix formatting
|
| |
|
| |
|
|
|
|
| |
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.
|
|
|
|
|
| |
* strict imports formatting
* Reformat all imports
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make performance observers take "type" and "buffered" options without panicking.
<!-- Please describe your changes on the following line: -->
I updated the observe() method to align with spec, and fixed the borrow duration bug @jdm pointed out in #25589 so it wouldn't cause a hard crash. Some tests go from failing to passing, but others go from early failing to later timeout; performance observers still aren't doing the right thing in all cases.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #24781 and fix #25589 and fix #23225
<!-- Either: -->
- [X] There are tests for these changes
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
| |
entry
|
|
|
|
| |
use existing buffer max size
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
refactoring with ResourceFetchMetadata
implemented deprecated window.timing functionality
created ResourceTimingListener trait
fixed w3c links in navigation timing
updated include.ini to run resource timing tests on ci
|
| |
|
|
|
|
| |
A `crate_name::foo` path always works in 2018
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`.
`malloc_size_of` is better -- it handles various cases that `heapsize` does not
-- so this patch changes Servo to use `malloc_size_of`.
This patch makes the following changes to the `malloc_size_of` crate.
- Adds `MallocSizeOf` trait implementations for numerous types, some built-in
(e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`).
- Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't
support that operation.
- For `HashSet`/`HashMap`, falls back to a computed estimate when
`enclosing_size_of_op` isn't available.
- Adds an extern "C" `malloc_size_of` function that does the actual heap
measurement; this is based on the same functions from the `heapsize` crate.
This patch makes the following changes elsewhere.
- Converts all the uses of `heapsize` to instead use `malloc_size_of`.
- Disables the "heapsize"/"heap_size" feature for the external crates that
provide it.
- Removes the `HeapSizeOf` implementation from `hashglobe`.
- Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of`
doesn't derive those types, unlike `heapsize`.
|
|
|
|
|
|
|
|
| |
Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is
passed to rustdoc.
This is mostly a global find-and-replace for bare URIs on lines by
themselves in doc comments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
I don't want to do such a gratuitous rename, but with all the other types
now having "Dom" as part of their name, and especially with "DomOnceCell",
I feel like the other cell type that we already have should also follow
the convention. That argument loses weight though when we realise there
is still DOMString and other things.
|