Commit graph

147 commits

Author SHA1 Message Date
Anthony Ramine
784fbb2bc1 Merge some byte swap/premultiply functions in their own crate 2018-10-06 01:11:55 +02:00
Simon Sapin
2a996fbc8f Replace mpsc with crossbeam/servo channel, update ipc-channel
Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
2018-09-12 13:33:32 +08:00
Bastien Orivel
2e11bc10fb Replace servo-websocket by ws
This is heavily based on previous work done in #16012.

Fixes #14517
2018-08-15 16:53:48 +02:00
Gregory Terzian
d438240772 move msg to embedder_traits, use in script, handle send error in embedder 2018-05-23 21:45:57 +08:00
OJ Kwon
2fab94785b
refactor(filemanager): uses embedderproxy directly 2018-04-27 12:23:25 -07:00
OJ Kwon
f69b124444
refactor(filemanager): remove awareness to ui behavior 2018-04-27 12:21:18 -07:00
OJ Kwon
1c465bcd66
refactor(resourcethread): expose constellationmsg channel 2018-04-27 12:21:16 -07:00
Paul Rouget
9fb5795f37 delegate resource reading to embedder 2018-04-27 15:34:52 +08:00
modal-d17
af445a357d Measure cache memory usage (#19251):
Made the memory cache data structure derive MallocSizeOf, along with
manual size_of() implementations in malloc_size_of.

Added a Measurable struct that acts as a container for fields size_of() can be called for.

Added a new IpcReceiver used for listening to messages from the memory profiler,
and used run_with_memory reporting to register a memory reporter in the thread.
Now when a message from the memory profiler arrives, report includes sizes of public and private http caches.

Updated test file.
2018-04-01 13:30:57 -04:00
Simon Sapin
eb3652b3c6 Replace parse-hosts crate with 10 lines of code.
This removes 3927 lines of Rust code in 6 crates from the dependency graph:
parse-hosts, multistr, bow, extra-default, len-trait, and push-trait.

One of these crates doesn’t build in today’s Nightly:
https://github.com/rust-lang/rust/issues/46328
2017-11-28 16:19:29 +01:00
Josh Matthews
f674cba612 Beginnings of a http cache
Doom cache entries based on the initial response, and prevent matching against doomed cache enties.

Evict cache entries that have passed their expiry date instead of matching them.

Document the cache. Refactor incomplete entries to lessen Option-itis.

Revalidate expired cache entries instead of unconditionally evicting them.

Forbid missing docs in cache code.

Revalidate must-revalidate entries.

Fetch content tests from a local HTTP server.

Track requests made to the test HTTP server.

Add a simple test that a cached resource with no expiry is not revalidated. Correct inverted expiry check in revalidation code.

Fix incorrect revalidation logic that dropped the consumer channels on the floor.

Ensure that requests are cached based on their request headers.

Run a separate http server instance for each test to avoid intermittent failures due to concurrent cache tests.

Add a test for uncacheable responses.

Address review comments.
2017-11-14 17:20:39 +08:00
Simon Sapin
aa5761a5fb Remove usage of unstable box syntax, except in the script crate
… because there’s a lot of it,
and script still uses any other unstable features anyway.
2017-10-12 12:10:56 +02:00
Simon Sapin
cbcc7d0802 Remove usage of unstable feature iterator_step_by 2017-10-11 20:17:16 +02:00
Martin Robinson
e58e8ab42e Upgrade to the latest version of WebRender 2017-07-13 07:44:08 +10:00
Simon Sapin
605ef8b7ec Remove explicit dependencies on serde_derive 2017-06-16 13:58:21 +02:00
Anthony Ramine
4c8a0f0626 Update Rust nightly to 1.19.0-nightly (2416e222e 2017-06-09) 2017-06-09 11:12:42 +02:00
Anthony Ramine
56c961af5a Revert "Update Rust nightly to 1.19.0-nightly (6165203c4 2017-06-03)"
This reverts commit f081380dc0.
2017-06-03 14:37:17 +02:00
Anthony Ramine
f081380dc0 Update Rust nightly to 1.19.0-nightly (6165203c4 2017-06-03) 2017-06-03 13:35:55 +02:00
Nikhil Shagrithaya
541baafe1c Redirect document loads manually 2017-05-31 17:28:53 +05:30
Josh Matthews
6f590a87bf Move hosts module into net crate. Remove obsolete functions. 2017-04-06 19:25:47 +09:00
Anthony Ramine
016fee016b Move the HTTP connector to FetchContext 2017-04-03 12:47:33 +02:00
ddh
e527c9a991 Update Hyper and OpenSSL 2017-03-31 16:32:21 +02:00
Fernando Jiménez Moreno
166c4e8bb2 Move image cache implementation to the net crate 2017-03-27 19:54:15 +02:00
Fernando Jiménez Moreno
72d7ee613b Make image cache per-document rather than global 2017-03-27 19:54:13 +02:00
Anthony Ramine
0ed4df28b5 Replace use of rustc_serialize::base64 by base64 2017-03-26 14:15:31 +02:00
Jamie Nicol
ec3142e811 Premultiply RGBA image data before sending to webrender 2017-03-10 11:06:44 +10:00
Ms2ger
5a61d8b2ea Remove unused content blocker code.
I don't know what it is for, so I believe it would be better to remove it
entirely until and unless we start using it.
2017-03-07 10:29:27 +01:00
Anthony Ramine
fd9cd33892 Use serde_json to persist cookies in the net crate 2017-02-22 12:33:10 +01:00
Anthony Ramine
63c4490e73 Kill the plugins crate and its clippy support
Sometimes clippy gets outdated by months, and its current support setup
means that each Servo component need to opt into it by depending on
the plugins crate manually, and not all components do that.
2017-02-21 11:50:36 +01:00
Ms2ger
14fe337866 Update rustc to 1.16.0-nightly (7821a9b99 2017-01-23). 2017-01-24 11:02:51 +01:00
mrnayak
a3026499f4 Implement Subresource Integrity
Implemented response validation part of
https://w3c.github.io/webappsec-subresource-integrity/.
Implemented step eighteen of the main fetch. If a request has integrity
metadata, then following steps are performed
*Wait for response body
*If the response does not have a termination reason and response does not
match request’s integrity metadata, set response to a
network error.# Please enter the commit message for your changes. Lines starting
2017-01-08 08:52:18 +05:30
Simon Sapin
67aea3bba4 Upgrade to rustc 1.16.0-nightly (6f1ae663e 2017-01-06) 2017-01-06 17:43:31 +01:00
Alan Jeffrey
9be4fd56ce Removed util. 2016-12-14 18:04:37 -06:00
Ms2ger
fb1279ec3a Remove CoreResourceMsg::Load.
Also remove now-dead code that rustc warns about.

It turns out that we lost support for some of our custom URL schemes; I intend
to reimplement them, but I believe this will be significantly easier to do
once the legacy code is out of the way.
2016-11-24 11:46:24 +01:00
Ms2ger
2dc73d8789 Rewrite test_redirect_from_x_to_x_provides_x_with_cookie_from_first_response. 2016-11-23 22:35:33 +01:00
Anthony Ramine
7a8c5ae8e3 Use FnvHasher in http_loader::load
Should help with #11100.
2016-11-19 14:10:37 +01:00
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often. 2016-11-17 18:34:23 +01:00
Ms2ger
88285b6534 Privatize the chrome_loader module. 2016-11-06 12:18:40 +01:00
Ms2ger
a888f075a1 Privatize the http_loader module. 2016-11-06 12:18:39 +01:00
Ms2ger
697275dea3 Privatize some net modules. 2016-11-06 12:18:37 +01:00
bors-servo
738f0eb974 Auto merge of #14044 - servo:bluetooth, r=emilio
Split the bluetooth code out from the net crates.

<!-- 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/14044)
<!-- Reviewable:end -->
2016-11-03 15:04:43 -05:00
bors-servo
05f4512433 Auto merge of #14042 - servo:fetch-unit-data, r=nox
Rewrite the data_loader test with fetch.

<!-- 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/14042)
<!-- Reviewable:end -->
2016-11-03 13:04:48 -05:00
Ms2ger
4fbe415e80 Split the bluetooth code out from the net crates. 2016-11-03 16:45:07 +01:00
Ms2ger
6fcbc5b3ea Make the data_loader module private. 2016-11-03 11:54:11 +01:00
Anthony Ramine
a9767333eb Remove #![feature(custom_attribute)] 2016-11-03 11:24:13 +01:00
Anthony Ramine
c4f27e42b7 Remove #![feature(custom_derive)] 2016-11-03 10:14:21 +01:00
Anthony Ramine
0a48c69061 Remove use of serde custom derive plugin in net 2016-11-03 10:10:00 +01:00
Rohit Burra
32ba45ab6f Fix tidy issues 2016-11-01 11:35:40 +05:30
Alan Jeffrey
a74fe58563 Moved pub_domains to net_traits and did a spring clean. 2016-09-29 17:28:47 -05:00
Anthony Ramine
7ad51dcd7a Update serde to 0.8 (fixes #12659) 2016-08-12 18:37:27 +02:00