Commit graph

317 commits

Author SHA1 Message Date
Manish Goregaokar
ce5586f74a Update euclid to 0.3 2015-10-28 21:34:23 +05:30
bors-servo
4f767430a4 Auto merge of #7894 - Yoric:image-url, r=glennw
Rework image_cache_task to avoid using `url` as key during the loadin…

…g of an image.

A `url` can be very large, in particular if it is a data: url, so using it as a key for lookups whenever we load a few bytes is not a very good idea. This patch introduces an intermediate `LoadKey` (internally, an u64) that makes hashmap lookups faster. Somewhere along the way, we also get rid of a few calls to `url.clone()`.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7894)
<!-- Reviewable:end -->
2015-10-14 17:26:48 -06:00
bors-servo
f35f809938 Auto merge of #7984 - eefriedman:net-send-error, r=jdm
Refactor resource loaders to use send_error utility.

No substantial functional change.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7984)
<!-- Reviewable:end -->
2015-10-14 13:28:14 -06:00
bors-servo
7308d0dd0d Auto merge of #7967 - eefriedman:mime-handling, r=jdm
MIMEClassifier::classify always succeeds; fix the type to reflect this.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7967)
<!-- Reviewable:end -->
2015-10-14 08:46:32 -06:00
David Rajchenbach-Teller
b7f59691ec Rework image_cache_task to avoid using url as key during the loading of an image.
A `url` can be very large, in particular if it is a data: url, so using it as a key for lookups whenever we load a few bytes is not a very good idea. This patch introduces an intermediate `LoadKey` (internally, an u64) that makes hashmap lookups faster. Somewhere along the way, we also get rid of a few calls to `url.clone()`.
2015-10-14 08:08:31 +02:00
Eli Friedman
1c4962288c MIMEClassifier::classify always succeeds; fix the type to reflect this. 2015-10-13 18:03:40 -07:00
Eli Friedman
10664cf3f4 Refactor resource loaders to use send_error utility.
No substantial functional change.
2015-10-13 16:37:12 -07:00
David Raifaizen
43a0651761 Removed user agent parameter from being unnecessarily passed 2015-10-13 18:17:26 -04:00
bors-servo
eb7039d04d Auto merge of #7987 - frewsxcv:clippy, r=Manishearth
Fix issues found by rust-clippy



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7987)
<!-- Reviewable:end -->
2015-10-12 18:33:30 -06:00
Corey Farwell
20beaf5af3 Fix issues found by rust-clippy 2015-10-12 20:21:49 -04:00
bors-servo
0f597d3890 Auto merge of #7933 - mbrubeck:piston-image, r=glennw
Replace libpng and stb_image with PistonDevelopers/image

Fixes #3368. r? @glennw 

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7933)
<!-- Reviewable:end -->
2015-10-12 15:06:31 -06:00
bors-servo
ac1b595609 Auto merge of #7976 - frewsxcv:clippy, r=jdm
Cleanup code that was warned by rust-clippy

[whitespace agnostic diff](https://github.com/servo/servo/pull/7976/files?w=1)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7976)
<!-- Reviewable:end -->
2015-10-12 04:37:42 -06:00
Rahul Sharma
4b363d2a0e convert match to if let for location header check #7969 2015-10-12 10:27:20 +05:30
Corey Farwell
e3aabd0bc5 DRY out conditional logic in CORS header matching 2015-10-11 20:55:01 -04:00
Corey Farwell
81e034885b Cleanup code that was warned by rust-clippy 2015-10-11 20:47:45 -04:00
bors-servo
7b904ef6fb Auto merge of #7971 - gkbrk:fix_7970, r=nox
Use typed header API instead of set_raw in set_default_accept_encoding

Fixes #7970

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7971)
<!-- Reviewable:end -->
2015-10-11 03:20:14 -06:00
Gökberk Yaltıraklı
5eeca1f037 Use typed header API instead of set_raw in set_default_accept_encoding 2015-10-11 11:00:03 +03:00
Matt Brubeck
e2e142aae8 Replace libpng with image everywhere. 2015-10-10 07:43:11 -07:00
David Raifaizen
de2060e6a1 Making map+clone more succinct with cloned 2015-10-10 09:31:21 -04:00
Louis Chan
fb45b0e691 Implement a quota of 5MB per origin for localstorage and sessionstorage 2015-10-09 03:55:27 +08:00
Mathieu Rheaume
e7a3220bc1 Implement Storage::SupportedPropertyNames 2015-10-04 10:22:13 -04:00
minimus
d4ebec6496 make mediatype default to text/plain in data URIs
change `data:charset=` to `data:;charset=` and set US-ASCII as default encoding

style change
2015-10-03 12:02:04 -04:00
Keith Yeung
ecf02a3656 Initial fetch refactor 2015-09-28 12:24:15 -07:00
Jaydeep
2a99915188 Check for Extra pointer dereferencing. Issue #7640. 2015-09-26 19:33:29 -07:00
Prabhjyot Singh Sodhi
920bb5e4b8 tests for devtools integration with network requests/responses 2015-09-25 22:07:01 +05:30
Ravi Shankar
889eec364b sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
Maciej Skrzypkowski
88815d21ba Add plugins for compositing and net crates #7699
Changed to_string calls to to_owned calls
where was a need.
2015-09-22 13:51:21 +02:00
Brandon Fairchild
de3547e401 Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Sam Gibson
6d20b388f6 General cleanup for HSTS/Cookie Arc 2015-09-19 18:30:38 +12:00
Sam Gibson
6f573d5d44 Move HSTS/CookieStorage to Arc<RwLock> from Ipc
servo/servo#7421
2015-09-19 18:30:37 +12:00
Hugo Thiessard
6565e7b02f Issue #7390 correct the order of mod declaration 2015-09-18 22:02:04 +02:00
bors-servo
8a8204ffc8 Auto merge of #7447 - ddrmanxbxfr:master, r=jdm
Issue #7382 Use descriptive enums instead of booleans for MIMEClassifier::classifer

Hi guys i've done a small pass of refactor in the MIMEClassifier implementation. (See issue #7382 )
   - Moved the predicates to separate functions
   - Added a mimetype enum so we can compare them easily after calling MIMEClassifier::get_media_type

I hope it follows rust good pratices (care it's my first time doing rust).

Improvements and tips are welcome :).

Thanks for looking at it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7447)
<!-- Reviewable:end -->
2015-09-18 07:22:59 -06:00
bors-servo
6a12f00d6d Auto merge of #7605 - nox:skew, r=mbrubeck
Implement "transform: skew()"

Thanks to @Jinwoo-Song for the original commit, which I just rebased and cleaned up. Fixes #6237.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7605)
<!-- Reviewable:end -->
2015-09-16 06:31:48 -06:00
bors-servo
e107f112d8 Auto merge of #7633 - aidanhs:aphs-remove-sslprovider, r=jdm
Remove SslProvider, fixes #7627



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7633)
<!-- Reviewable:end -->
2015-09-14 14:57:55 -06:00
Aidan Hobson Sayers
7632e89a04 Remove unsupported SslProvider, fixes #7627 2015-09-14 21:30:05 +01:00
João Oliveira
813cdaa012 Move setting UserAgent header into http_loader::load,
closes #7541
2015-09-14 15:35:34 +01:00
bors-servo
b05f4aa3aa Auto merge of #7559 - ddrmanxbxfr:RFC-0344-Work, r=nox
Remove 'get_*' on getters as per RFC 0344 on canevas, compositing, devtools, gfx, layout, net, profile, servo and webdriver_server

Hi guys,

I just gave a big pass of RFC-0344 as per issue #6224 .

Pretty much renamed all the get_* fn that were used to fetch values. 

I hope I didn't rename too much. 

As said in the issue discussion, I didn't touch at the scripts folder so we keep the unsafe ones pretty explicit.

I've ran the whole pass of test, everything seems to be still working right :).

Please give feedback on this PR.

Thanks for looking into it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7559)
<!-- Reviewable:end -->
2015-09-12 18:29:56 -06:00
Mathieu Rheaume
7320433cca Remove 'get_*' on getters as per RFC 0344 on various components 2015-09-12 20:14:01 -04:00
Mathieu Rheaume
cc44448b09 Fix BinaryOrPLaintextClassifier bug with utf16-be & utf16-le and correct tests 2015-09-12 19:59:20 -04:00
Mathieu Rheaume
ff608de781 fixup! Issue #7382 Use descriptive enums instead of booleans for MIMEClassifier::classifer 2015-09-12 17:44:16 -04:00
Mathieu Rheaume
5c807311de Remove unused import in components/net/resource_task.rs 2015-09-12 17:44:15 -04:00
Mathieu Rheaume
8525495265 Issue #7382 Use descriptive enums instead of booleans for MIMEClassifier::classifer 2015-09-12 17:44:14 -04:00
Anthony Ramine
f11fcebd9c Bump euclid to 0.2 2015-09-12 01:06:26 +02:00
Eli Friedman
94dec69247 Fix up some unnecessary uses of unsafe. 2015-09-02 15:50:17 -07:00
Sean McArthur
a1a9db8ffd net: use connection pooling 2015-09-02 12:46:53 -04:00
bors-servo
9f85370885 Auto merge of #7449 - simartin:issue_7393, r=metajack
Issue #7393: Properly sniff mislabeled feeds.

Hi,

This patch is an attempt to fix https://github.com/servo/servo/issues/7393, where the code detecting mislabeled feeds (see https://mimesniff.spec.whatwg.org/#sniffing-a-mislabeled-feed) had spurious space in the URLs we need to match.

Note that my testing (in particular rdf_rss_ko_2.xml) highlighted a flaw in "matches", that failed to check that there were more bytes in the string being checked than in the string we're checking against, which completely broke the whole step 5.2.7.

Thanks in advance for your review.

Cheers,
  Simon

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7449)
<!-- Reviewable:end -->
2015-09-01 11:22:52 -06:00
Prabhjyot Singh Sodhi
afcda46cbe Removing unnecessary url clones 2015-09-01 13:44:54 +05:30
Prabhjyot Singh Sodhi
849ee8fbdf removing unnecessary clones 2015-09-01 08:38:42 +05:30
Sam Gibson
43e0c4ac89 Prevents unwrapping invalid location url domains 2015-08-31 13:47:35 +12:00
Sam Gibson
9d0f418ee0 Resolves merge conflict without wonky cloning 2015-08-31 08:54:12 +12:00