| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than creating unique types for each pipeline-namespaced index
type (eg. MessagePortId, DomExceptionId, etc.), we can create a generic
common type that uses a marker to prevent type confusion. This change
allows us to reduce the boilerplate code required when implementing
serializable/transferable interfaces, since the structured clone
implementation can rely on the common type.
Testing: Existing WPT tests for serialization and transferring provide
coverage.
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
| |
Follow the implementation of making DOMPoint and DOMPointReadOnly
serializable in PR #35989
Testing: Passed a test previously expected to fail.
Fixes: #36463
---------
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- [x] our [DataClone
error](https://github.com/servo/servo/blob/d733abfca02cdb9fd2af4f0d82ff050e25f71829/components/script/dom/bindings/error.rs#L80)
needs to support an optional message
- [x] we need to add support to our DOMException implementation to allow
an optional message to replace the default message
- [x] we need to create a new struct used by both StructuredDataReader
and StructuredDataWriter for storing the error message in the
report_error_callback
- [x] report_error_callback needs to cast the closure pointer to the new
struct
- [x] the code that [throws a DataClone
error](https://github.com/servo/servo/blob/5d1c64dba9cf3e65f770370eb17f00ad4114edce/components/script/dom/bindings/structuredclone.rs#L542)
needs to use the stored error message if it's available
Testing: *Describe how this pull request is tested or why it doesn't
require tests*
Fixes: #36191
---------
Signed-off-by: jerensl <54782057+jerensl@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
| |
Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add support for raw importKey with AES-CBC
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Support JWK import/export, importKey for AES-CBC
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Implement encrypt/decrypt for AES-CBC
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update expectations
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update Cargo.lock
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Pass MutableHandleObject as arg instead of returning raw pointer
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Swap order of checks in generate_key_aes_cbc
- Fixes WPT tests that expect to error on algorithm first before usages
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Avoid potential GC hazard with array_buffer_ptr
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update expectations for discards context
Signed-off-by: Daniel Adams <msub2official@gmail.com>
---------
Signed-off-by: Daniel Adams <msub2official@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fixed some clippy warnings in components/script/dom
Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com>
* Incorporated review suggestions
Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com>
---------
Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add all constructors, special operations, and static methods to generated DOM interface traits.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Move all constructors and static methods defined in bare impl blocks inside FooMethods trait impls.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Add missing doc links.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Mark JS reflector wrappers as CanGc.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Propagate CanGc from reflect_dom_object_with_proto.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Mark DOM constructors as GC operations.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add GPUPipelineError
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Proper GetBindGroupLayout
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Proper Create*PipelineAsync
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Expectations
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* fixups
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* more good expectations
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement HTMLImageElement decode
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Fix Decode doc link
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Temp
* Decode HTML Image
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Fix doc link
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Move image decode to process_image_response_for_environment_change
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Update some wpt test result
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Handle multiple image decode promises
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Remove unnecessary promise calls
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Update more wpt test result
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Undo body-size-cross-origin.https.html.ini changes
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Reject decode when src and srcset are missing
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Revert "Reject decode when src and srcset are missing"
This reverts commit 1b57ab978f9fc24facafc8af97ee8851d5142533.
* Drain promises vec and run update_the_image_data when element is created
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* resolve decode promise in abort_request when request is CompletelyAvailable
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Update wpt test
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Move storing promise in decode task
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Remove the resolve logic from decode task
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Revert "Remove the resolve logic from decode task"
This reverts commit eee6096d50dbe46a22a5bbfd7f15c03988ed2f4b.
* reject or reject current promise before storing it
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Add comment to explain why resolve promise when state is CompletelyAvailable
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
---------
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
|
|
|
|
|
| |
* strict imports formatting
* Reformat all imports
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Ignoring :
- **generated**.rs
- python/tidy/servo_tidy_tests/rust_tidy.rs
|
| |
|
| |
|
| |
|
|
|
|
| |
This entirely removes the 'non-geckolib' feature of the util crate.
|
| |
|
|
|
|
|
|
| |
Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
|
|
|
|
|
|
|
|
|
|
| |
This should make it somewhat easier to experiment with alternative
representations in the future. To reduce churn, this commit leaves the String
field public, though.
Also, this will allow us to use the default String type to represent the IDL
USVString type, which explicitly forbids unpaired surrogates, ans as such is
a better match to the Rust String type.
|
| |
|
| |
|
|
|
|
| |
This merges import blocks that were reported by tidy as unmerged.
|
| |
|
|
|
|
| |
closes #7357
|
| |
|
| |
|
|
|
|
| |
fixes #6524
|
| |
|