aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/headers.rs
Commit message (Collapse)AuthorAgeFilesLines
* Update rustfmt to the 2024 style edition (#35764)Simon Wülker2025-03-031-5/+6
| | | | | | | | | | | | | * 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>
* script: Limit public exports. (#34915)Josh Matthews2025-01-101-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Generate a trait abstracting over all known DOM interfaces (#34357)Josh Matthews2024-11-241-1/+1
| | | | | | | | | | | | | | | | | * 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>
* More CanGc fixes: Range, Event, gpu error, Header (#33774)webbeef2024-10-101-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Propagate CanGc parameter in Range Signed-off-by: webbeef <me@webbeef.org> * Propagate CanGc parameter in gpu code and dependencies Signed-off-by: webbeef <me@webbeef.org> * Propagate CanGc parameter in Header and dependencies Signed-off-by: webbeef <me@webbeef.org> * Propagate CanGc parameter in Event and dependencies Signed-off-by: webbeef <me@webbeef.org> * Propagate CanGc parameter in rtcdatachannel Signed-off-by: webbeef <me@webbeef.org> * Propagate CanGc parameter in servoparser Signed-off-by: webbeef <me@webbeef.org> --------- Signed-off-by: webbeef <me@webbeef.org>
* script: Include constructors and static methods in generated DOM traits (#33665)Josh Matthews2024-10-081-4/+3
| | | | | | | | | | | | | | | | | * 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>
* Improve spec conformance around request header validation (#33418)shanehandley2024-09-141-17/+74
| | | | | | | | | | | | | | | | | * fix: improve spec conformance around request header validation Signed-off-by: Shane Handley <shanehandley@fastmail.com> * account for additional test passes Signed-off-by: Shane Handley <shanehandley@fastmail.com> * fix: remove redundant .to_vec call Signed-off-by: Shane Handley <shanehandley@fastmail.com> --------- Signed-off-by: Shane Handley <shanehandley@fastmail.com>
* Start marking functions that can transitively trigger a GC (#33144)Josh Matthews2024-08-221-4/+10
| | | | | | | | | | | | | | | | | * 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>
* script: dont unwrap in header set (#32973)ToBinio2024-08-081-4/+14
| | | Signed-off-by: tobinio <tobias.frischmann1@gmail.com>
* clippy: Fix a bunch of warnings in `script` (#32680)Martin Robinson2024-07-041-1/+1
| | | This is just a portion of the errors that are remaining to be fixed.
* clippy: Fix various clippy problems in `components/scripts/dom` (#31910)Rosemary Ajayi2024-03-311-1/+1
| | | | | | | | | | | | | | | | | * boxing is unnecessary * boxing is unnecessary * boxing is unnecessary * boxing is unnecessary * fix * fix * fix * Update globalscope.rs
* fix redundant closures in component/script/dom (#31917)Ekta Siwach2024-03-281-1/+1
| | | | | | | | | | | | | * fixed unnecessary conversions * resolved conflicts * resolved conflicts * fix redundant closures in component/script/dom * resolved conflicts * fixed formatting
* fixes dereferencing on an immutable reference (#31864)Aarya Khandelwal2024-03-261-1/+1
|
* changed `match` to 'matches!' (#31850)Aarya Khandelwal2024-03-251-12/+3
|
* Clippy: Fixed some clippy warnings (#31818)Aarya Khandelwal2024-03-231-1/+1
| | | | | | | | | | | * Fixed clippy warnings * made changes for lowercase characters. * changed is_lowercase() to is_ascii_lowercase() * added std library function `is_ascii_uppercase()` and `is_ascii_lowercase()` * made recommended changes
* clippy: Fix `explicit_auto_deref` warnings in `components/script` (#31837)Oluwatobi Sofela2024-03-231-1/+1
| | | | | | | | | * clippy: Fix explicit auto-deref warnings * clippy: Fix explicit auto-deref warnings * refactor: Tidy up code * refactor: Fix method not found errors
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-9/+10
| | | | | * strict imports formatting * Reformat all imports
* No tracing of nop traceable fields (#29926)Samson2023-08-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add `no_trace` option to JSTraceable derive * NoTrace wrapper * Port some types to no_trace schematics * Fixing my unsafe mistakes (not tracing traceables) * Add docs & safety guards for no_trace Safety guards (trait shenanigans) guarantees safety usage of `no_trace` * Port canvas_traits to no_trace * Port servo_media to no_trace * Port net_traits to no_trace * Port style to no_trace * Port webgpu to no_trace * Port script_traits to no_trace * Port canvas_traits, devtools_traits, embedder_traits, profile_traits to no_trace * unrooted_must_root lint in seperate file * Add trace_in_no_trace_lint as script_plugin * Composable types in must_not_have_traceable * Introduced HashMapTracedValues wrapper * `HashMap<NoTrace<K>,V>`->`HashMapTracedValues<K,V>` * Port rest of servo's types to no_trace * Port html5ever, euclid, mime and http to no_trace * Port remaining externals to no_trace * Port webxr and Arc<Mutex<_>> * Fix spelling in notrace doc
* Rename reflect_dom_object2.Josh Matthews2023-05-311-2/+2
|
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-281-3/+9
|
* Update steps comment to match latest (2023-04-14) speccybai2023-04-141-4/+0
|
* Fix return value of concept-header-list-get to Option<Vec<u8>>2shiori172023-03-261-7/+6
|
* Fix concept-headers-append2shiori172023-03-261-1/+1
|
* Add comments for concept-headers-append2shiori172023-03-211-9/+32
|
* Remove net from dependencies2shiori172023-03-201-2/+3
|
* Fix dom-headers-get2shiori172023-03-111-5/+4
|
* Fix header ordering2shiori172023-03-111-5/+8
|
* Fix concept-headers-append2shiori172023-03-111-38/+22
|
* Implement concept-header-list-sort-and-combine2shiori172023-03-061-11/+21
|
* Implement Headers.prototype.getSetCookie2shiori172023-03-051-0/+10
|
* Use data_url::Mime to parse the MIME TypesVincent Ricard2020-11-181-5/+72
| | | | | This commit follows the spectification https://fetch.spec.whatwg.org/#concept-header-extract-mime-type
* Fix the webidl for HeadersBastien Orivel2020-05-301-11/+10
| | | | | | Make the HeadersInit type match the spec. Fixes #26441
* Separate values in Headers with ", ", not ","Bastien Orivel2020-05-061-1/+1
| | | | | Tests expect header values to be separated by that so this fixes a few of them.
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-4/+2
|
* Modify `script` to prevent further violations of snake_caseKunal Mohan2020-01-181-3/+4
|
* Headers no longer have to be ASCII or UTF-8, though there is some ↵Patrick Shaughnessy2019-12-241-74/+56
| | | | disagreement with http::header::HeaderValue
* Now just one is_cors_safelisted_request_header, with closer spec alignmentPatrick Shaughnessy2019-12-161-32/+12
|
* Support WebIDL `record<>`Kagami Sascha Rosylight2019-10-151-4/+2
|
* Fix some new warningsSimon Sapin2019-06-221-2/+2
|
* Rustfmt has changed its default style :/Simon Sapin2018-12-281-3/+4
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Reorder importsPyfisch2018-11-061-3/+5
|
* Format remaining filesPyfisch2018-11-061-20/+29
|
* `cargo fix --edition`Simon Sapin2018-11-061-8/+8
|
* Update hyper to 0.12Bastien Orivel2018-11-011-34/+29
|
* Format script componentchansuke2018-09-191-42/+69
|
* copy headers from script request to net requestGregory Terzian2017-11-151-0/+6
|
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* Remove use of unstable box syntax.Simon Sapin2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | 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.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-5/+5
| | | | | | | 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.
* Rename DOMRefCell<T> to DomRefCell<T>Anthony Ramine2017-09-261-3/+3
| | | | | | | | 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.