Commit graph

88 commits

Author SHA1 Message Date
cybai
c4882aab7e Update steps comment to match latest (2023-04-14) spec 2023-04-14 14:32:28 +09:00
cybai
445c90e5c5 Respect MIME type from headers instead of caching it 2023-04-13 00:31:49 +09:00
Matthias Deiml
47355766ed Fix invalid use of ReferrerUrl 2020-06-17 19:07:15 +02:00
Matthias Deiml
fa18cf620f Make url for "client" referrer mandatory 2020-06-17 19:07:14 +02:00
Gregory Terzian
bd5796c90b integrate readablestream with fetch and blob 2020-06-04 11:38:35 +08:00
Bastien Orivel
c4273d86f2 Fix the webidl for Headers
Make the HeadersInit type match the spec.

Fixes #26441
2020-05-30 12:46:51 +02:00
Alexandrov Sergey
a7c5c97616 check http_state in determine_request_referrer 2020-05-19 20:06:59 +03:00
YUAN LYU
3ea6d87bcc
Add trait DomObjectWrap to provide WRAP function 2020-03-20 22:16:56 -04:00
Tipowol
6b0b90767e Add missing same-origin referrer policy 2020-03-20 21:15:52 +01:00
Kunal Mohan
f7db4b7f80
Modify script to prevent further violations of snake_case 2020-01-18 14:22:15 +05:30
Kunal Mohan
02c1612cb0
Add accountable-refcell as optional build time feature 2020-01-08 09:44:41 +05:30
Patrick Shaughnessy
b9c4b64978 Autocomputed content-type header now reaches net request 2019-12-21 19:37:38 -05:00
Patrick Shaughnessy
67827debd8 Now just one is_cors_safelisted_request_header, with closer spec alignment 2019-12-16 09:07:02 -05:00
Michael Howell
b8f3e8bb2e Add simple implementation of content-security-policy on scripts / styles
This needs a lot more hooks before it'll actually be a good
implementation, but for a start it can help get some feedback on if this
is the right way to go about it.

Part of servo/servo#4577
2019-10-16 19:46:45 +00:00
Kagami Sascha Rosylight
b697621b05 Support WebIDL record<> 2019-10-15 17:14:00 +09:00
Russell Cousineau
2440e0f98a set referrer in window.load_url
- this conforms to follow-hyperlinks spec step 13
- this conforms to window-open spec step 14.3
- replace uses of `referrer_url` with `referrer`
- in Request class, change "no-referrer" to ""
- set websocket fetch referrer to "no-referrer"
2019-04-19 16:50:38 -07:00
Manish Goregaokar
611dc4bc70 Remove now-unnecessary must_root and allow(unrooted_must_root) annotations 2019-01-04 15:05:07 -08:00
Simon Sapin
be69f9c3e6 Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
Jan Andre Ikenmeyer
a1a14459c1
Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Pyfisch
cb07debcb6 Format remaining files 2018-11-06 22:30:31 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
Bastien Orivel
024b40b39d Update hyper to 0.12 2018-11-01 19:17:36 +01:00
chansuke
c37a345dc9 Format script component 2018-09-19 17:40:47 -04:00
tigercosmos
af3741ab26 Make fetch() API use same-origin credentials by default 2018-07-17 10:28:24 +08:00
OJ Kwon
c0b5eeef57
feat(webidl): expose arraybuffer overload in body idl 2018-03-23 23:12:21 -07:00
Gregory Terzian
b98635f212 allow unknown HTTP methods 2017-11-16 13:36:22 +08:00
Gregory Terzian
d196f3de62 copy headers from script request to net request 2017-11-15 19:28:03 +08:00
Keith Yeung
99f9696a24 Merge functionality of WebsocketConnect into Fetch 2017-10-24 20:54:19 -07:00
Keith Yeung
c6bb1cb9d5 Merge request type and destination 2017-10-23 11:19:35 -07:00
Nicholas Nethercote
4506f0d30c Replace all uses of the heapsize crate with malloc_size_of.
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`.
2017-10-18 22:20:37 +11:00
Simon Sapin
aa15dc269f Remove use of unstable box syntax.
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.
2017-10-16 17:16:20 +02:00
bors-servo
1282e0d808 Auto merge of #18635 - servo:RENAME-ALL-THE-THINGS, r=emilio
Rename JS<T> to Dom<T>, Root<T> to DomRoot<T>, and other things

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18635)
<!-- Reviewable:end -->
2017-09-26 03:20:05 -05:00
Anthony Ramine
f87c2a8d76 Rename Root<T> to DomRoot<T>
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.
2017-09-26 09:49:10 +02:00
Anthony Ramine
577370746e Rename DOMRefCell<T> to DomRefCell<T>
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.
2017-09-26 09:49:08 +02:00
Anthony Ramine
c52fd0a780 Rename MutNullableJS<T> to MutNullableDom<T> 2017-09-26 09:49:02 +02:00
Anthony Ramine
7be32fb237 Rename JS<T> to Dom<T> 2017-09-26 09:48:55 +02:00
Anthony Ramine
0e3c54c191 Rename dom::bindings::js to dom::bindings::root 2017-09-26 02:19:05 +02:00
Daniel Kolsoi
96f9cc77e6 Removed integrity check and test for no-cors requests
Also updated request-headers.html manifest hash
2017-09-25 19:11:30 -04:00
Corey Farwell
befe538472 Utilize match_ignore_ascii_case! in more places. 2017-07-29 09:58:09 +00:00
Keith Yeung
6adc653083 Introduce service-worker mode 2017-06-22 23:48:07 -07:00
Simon Sapin
7af5a7fd54 Untry script 2017-06-18 13:21:49 +02:00
Anthony Ramine
e566bc7b1c Update the WebIDL parser 2017-06-09 13:57:30 +02:00
Anthony Ramine
9394469ede Kill Request::omit_origin_header 2017-04-07 12:52:50 +02:00
Anthony Ramine
cb2eb81208 Remove all internal mutability from Request 2017-04-03 12:39:07 +02:00
bors-servo
a204c4176d Auto merge of #15715 - nox:custom-derive, r=SimonSapin
Make #[dom_struct] a proc_macro attribute

The rustup is needed for https://github.com/rust-lang/rust/pull/40039.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15715)
<!-- Reviewable:end -->
2017-02-24 05:56:30 -08:00
Anthony Ramine
31e9d81c0f Make #[dom_struct] a proc_macro attribute 2017-02-24 01:50:51 +01:00
Mathieu Hordesseaux
6f97ce826b Make Request throw less often (fixes #13457) 2017-02-23 18:55:52 -05:00
Ms2ger
f7e2f0e641 Use RootedTraceableBox for dictionaries. 2017-02-16 11:03:26 +01:00
Ms2ger
8ce9ca6243 Use Heap for dictionary and union members. 2017-02-16 11:03:21 +01:00