Commit graph

175 commits

Author SHA1 Message Date
Manish Goregaokar
c73eaefc47 Audit and reduce unstable usage in net
Reasons behind existing unstable features:

std_misc:

 - `Handle` usage (API will be replaced and is perhaps broken)

path_ext:

 - Checking if a file exists. This is doable from the File directly, but slightly longer

core:

 - `FnBox`

alloc:

 - `boxed::into_raw()` (naming)
2015-06-10 00:15:09 +05:30
Eduard Burtescu
00e8e5f77d Use the correct log crate and setup env_logger in main. 2015-06-06 23:20:40 +03:00
Corey Farwell
a14c745a6a Bump rust-url version: 0.2.16 → 0.2.35 2015-06-04 16:45:15 -04:00
bors-servo
20f63459ef Auto merge of #6254 - servo:rustup_20150601, r=SimonSapin
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6254)
<!-- Reviewable:end -->
2015-06-02 12:53:37 -05:00
Manish Goregaokar
f80f99fe1e Move to latest hyper everywhere 2015-06-02 20:12:14 +05:30
Corey Farwell
435e551753 Remove get_ prefix on getters
Part of #6224

I certainly didn't remove all of them; I avoided `unsafe` areas and also `components/script`
2015-06-02 08:54:44 -04:00
Mike Blumenkrantz
68fc51205f add error enum for chromium net errors, create window method for error propagation 2015-05-27 14:45:50 -04:00
bors-servo
be6c251e4c Auto merge of #6171 - eleweek:fix-4184-ok, r=Manishearth
I tried fixing #4184 , here is the code I have right now. 

I haven't tested it, because I don't know what is the best way to test this part of code. Would like some help with testing this. Should I write an autotest or should I just test manually?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6171)
<!-- Reviewable:end -->
2015-05-25 23:10:18 -05:00
Alexander Putilin
f5a0285833 Fix issues with PR #6171 2015-05-26 01:04:05 +03:00
Corey Farwell
8e3f4bba85 Reduce max line length from 150 to 120 characters
Part of https://github.com/servo/servo/issues/6041
2015-05-24 00:01:49 -04:00
Alexander Putilin
e840698d4a fixes 4184: no-sniff and check-for-apache-bug for mime sniffing 2015-05-24 04:02:34 +03:00
Patrick Walton
7e7675c1dc net: Don't load the placeholder image for background images, only for
image fragments.

This also changes the way the placeholder is handled in the image cache
task to decode it up front instead of each time an image fails to load,
both because it was more convenient to implement that way and because
it saves CPU cycles to do so.

This matches the behavior of Gecko and WebKit. It improves the look of
our cached copy of Wikipedia.
2015-05-20 12:00:33 -07:00
bors-servo
79ed6250f0 Auto merge of #6129 - KiChjang:fetch-spec, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6129)
<!-- Reviewable:end -->
2015-05-19 23:08:41 -05:00
Keith Yeung
3351ddf213 Implement fetch (partial #4576) 2015-05-19 23:35:27 -04:00
Ms2ger
fa4fe01757 Use snake case in fetch. 2015-05-19 17:41:31 +02:00
Ms2ger
4ca6325bad Remove an unwrap() call in HTTP fetch. 2015-05-19 17:38:56 +02:00
Keith Yeung
450931a171 Implemented http fetch (partial #4576) 2015-05-18 10:23:28 -04:00
Simon Sapin
8292f5749e Upgrade to Hyper 0.4.0 2015-05-12 16:48:21 +02:00
bors-servo
892a740426 Auto merge of #5985 - zmike:embedding-woodenbikeshed, r=larsbergstrom
Some small changes.

@larsbergstrom or whoever cares the most at this exact moment.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5985)
<!-- Reviewable:end -->
2015-05-08 15:03:52 -05:00
Adenilson Cavalcanti
2aa95f6928 This was done already on #5783, maybe was reintroduced by mistake. 2015-05-08 11:39:02 -07:00
Mike Blumenkrantz
f588c0be73 image_cache_task::new_image_cache_task() should not panic when placeholder fails to load
now we just print a message and continue
2015-05-08 12:54:06 -04:00
Simon Sapin
0d226722b7 Deduplicate some dependencies.
This uses some dependencies from crates.io instead of git
where the crates.io copy was already used in some other part
of the dependency tree, so we had two copies of the same library.

The `android_glue` crate is the only one left where we have two copies,
but solving that is more tricky since we hard-code a path in
`components/servo/.cargo/config`.
2015-05-07 01:56:49 +02:00
bors-servo
e779e8905b Auto merge of #5952 - Ms2ger:cleanup, r=saneyuki
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5952)
<!-- Reviewable:end -->
2015-05-05 14:26:37 -05:00
Ms2ger
d62e1c9afb Remove unused feature gates and an unused import. 2015-05-05 19:05:23 +02:00
Himaja
01eb31ae8a 1. Add an Option<Pipeline_id> field to the LoadData struct, and a corresponding parameter to LoadData::new()
2. Change addEvent in the NetworkEventActor to add_request and add_response
2015-05-05 12:31:40 -04:00
Himaja
6e91ebb1fe 1. Add an enum type NetworkEventMessage for handling both HttpRequest and HttpResponse messages
2. Change run_server to handle network events
3. Add a unique id to track request-actor associations
4. Update the network event actor
2015-05-05 11:50:00 -04:00
Himaja
9f4a88bc48 Initial changes for devtools support for logging HTTP requests.
Add a NetworkEventActor to devtools/actors/

Authors:
Ashritha Mohan Ram <amohanr@ncsu.edu>
Himaja Valavala <hsvalava@ncsu.edu>
Anand Chandrasekar <achandr9@ncsu.edu>
Yiyang Wang <ywang95@ncsu.edu>
2015-05-05 11:49:26 -04:00
Simon Sapin
ef8edd4e87 Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8. 2015-05-05 10:07:34 -04:00
Nicholas Nethercote
092507d23c Add a profile_traits crate to reduce compile times.
A rebuild after touching components/profile/mem.rs now takes 48 seconds (and
only rebuilds `profile` and `servo`) which is much lower than it used to be.
In comparison, a rebuild after touching components/profile_traits/mem.rs takes
294 seconds and rebuilds many more crates.

This change also removes some unnecessary crate dependencies in `net` and
`net_traits`.
2015-04-30 17:58:47 -07:00
Glenn Watson
786e24bde0 Handle gzip decompression failure (encountered during jquery test suite work) without panic. 2015-04-30 10:10:21 +10:00
Ms2ger
903305416a Implement Clone for Copy types. 2015-04-28 23:31:10 +02:00
bors-servo
21c38d0de8 Auto merge of #5424 - bdero:bdero/accept-header, r=jdm
The value of the header is: `text/html;q=0.9,*/*;q=0.8`

Closes #5399

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5424)
<!-- Reviewable:end -->
2015-04-26 22:13:30 -05:00
Brandon DeRosier
0a7a853a01 Add Accept header to HTTP loader
The value of the header is the same as that of Firefox 35.0.1:
`text/html, application/xhtml+xml, application/xml; q=0.9, */*; q=0.8`

Closes #5399
2015-04-26 22:39:23 -04:00
Ms2ger
9185c3de79 Remove as_mut_slice() calls. 2015-04-26 11:09:03 +02:00
Ms2ger
6a55ae06d7 Remove some as_slice calls. 2015-04-24 17:44:47 +02:00
bors-servo
43d666f94b Auto merge of #5802 - mmatyas:indentfix, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5802)
<!-- Reviewable:end -->
2015-04-22 19:49:30 -05:00
Glenn Watson
d8aef7208e Refactored image cache task - details below.
* Simpler image cache API for clients to use.
 * Significantly fewer threads.
   * One thread for image cache task (multiplexes commands, decoder threads and async resource requests).
   * 4 threads for decoder worker tasks.
 * Removed ReflowEvent hacks in script and layout tasks.
   * Image elements pass a Trusted<T> to image cache, which is used to dirty nodes via script task. Previous use of Untrusted addresses was unsafe.
   * Image requests such as background-image on layout / paint threads trigger repaint only rather than full reflow.
 * Add reflow batching for when multiple images load quickly.
   * Reduces the number of paints loading wikipedia from ~95 to ~35.
 * Reasonably simple to add proper prefetch support in a follow up PR.
 * Async loaded images always construct Image fragments now, instead of generic.
   * Image fragments support the image not being present.
 * Simpler implementation of synchronous image loading for reftests.
 * Removed image holder.
 * image.onload support.
 * image NaturalWidth and NaturalHeight support.
 * Updated WPT expectations.
2015-04-23 09:40:24 +10:00
Mátyás Mustoha
91b4246e1b Fix some irregular indentation. 2015-04-22 21:57:58 +02:00
Adenilson Cavalcanti
0f5b5a5cd4 Using FF broken image icon.
Got it from:
https://mxr.mozilla.org/mozilla-central/source/layout/generic/broken-image.png
2015-04-21 16:04:28 -07:00
Marcus Klaas
c1f25bbfe4 Replace usage of ResponseSenders by LoadConsumer 2015-04-19 13:26:56 +02:00
Josh Matthews
7b3043a59b Warning fixes. 2015-04-16 11:46:42 -04:00
Josh Matthews
1b9684634f Document async networking interfaces. 2015-04-16 11:46:41 -04:00
Josh Matthews
7517aac9e9 Completely abstract sending responses over channels vs. listeners. 2015-04-16 11:46:39 -04:00
Josh Matthews
1644436557 Start switching net/ to use abstractions over channels to allow introducing non-channel communication in the future. 2015-04-16 11:46:39 -04:00
Bogdan Cuza
ce4b8a0af7 Reduce duplication 2015-04-14 22:03:22 +03:00
Bogdan Cuza
19ffab82f1 Make Metadata use ContentType 2015-04-14 22:03:21 +03:00
bors-servo
4997d3a112 Auto merge of #5677 - frewsxcv:https, r=Ms2ger
Extracted this out of #5649

This commit was created with the following commands:

```
find . -iname "*.webidl" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```

```
find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```
2015-04-14 02:57:41 -05:00
bors-servo
b7f59a3646 Auto merge of #5642 - aneeshusa:arc-box-image-to-arc-image, r=Ms2ger
Image used to be a trait, but no longer is, so boxing it is no longer
necessary. Fixes #5639.
2015-04-14 01:57:07 -05:00
Corey Farwell
5eaa922045 Update WHATWG links to use HTTPS
Extracted this out of #5649

This commit was created with the following commands:

```
find . -iname "*.webidl" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```

```
find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```
2015-04-13 21:34:27 -07:00
Aneesh Agrawal
395e8a5981 Make minor syntax simplification to address review. 2015-04-13 17:23:03 -04:00