Commit graph

4748 commits

Author SHA1 Message Date
Sam Gibson
d8acb893de Inverts conditional and returns 2015-08-30 12:14:11 +10:00
Sam Gibson
1811ffa178 Uses and_then instead of more complicated matching 2015-08-30 12:14:10 +10:00
Sam Gibson
84ae53e011 Indents arguments to be more readable 2015-08-30 12:14:10 +10:00
Sam Gibson
6de61301f4 Removes inline'ing 2015-08-30 12:14:09 +10:00
Sam Gibson
94284fc47f Fixes new tidy problems 2015-08-30 12:14:09 +10:00
Sam Gibson
d53af0d9ed Fixes merge errors 2015-08-30 12:14:08 +10:00
Sam Gibson
979382650f Removes nossl 2015-08-30 12:14:08 +10:00
Sam Gibson
9322954f15 Moves devtools messaging to functions 2015-08-30 12:14:06 +10:00
Sam Gibson
04b7ce0afa Tests rewriting redirects of POST as GET 2015-08-30 12:14:06 +10:00
Sam Gibson
2eaac7e3f9 Adds tests for gzip/deflate response decoding 2015-08-30 12:14:05 +10:00
Sam Gibson
6064ee8756 Eliminates need to box response reader
I don't know how idiomatic this is for rust, but the only way I could think of to do this is with a union enum and generics. As the number of decoders should never be more than a few, this shouldn't really be a problem.
2015-08-30 12:14:05 +10:00
Sam Gibson
879b058be2 Returns LoadResponse struct instead of a tuple
Still boxes the reader, but at least is a step in the right direction
2015-08-30 12:14:05 +10:00
Sam Gibson
3c756d254b Avoids sending a request body on a redirect 2015-08-30 12:14:04 +10:00
Sam Gibson
15d82091c5 Fixes tidy overlong lines 2015-08-30 12:14:04 +10:00
Sam Gibson
ea2d7f4dd5 Uses the correct url when reporting http errors 2015-08-30 12:14:03 +10:00
Sam Gibson
d6e1fab278 Uses hyper's ContentEncoding instead of get_raw 2015-08-30 12:14:03 +10:00
Sam Gibson
5a60fdf4ca Moves STS update code to a function 2015-08-30 12:14:02 +10:00
Sam Gibson
c093ce8a5a Only use the resource manager's HSTS list.
Simplifies a bunch of stuff.
2015-08-30 12:14:02 +10:00
Sam Gibson
ffc3877deb Adds tests for setting/getting cookies from load 2015-08-30 12:13:35 +10:00
Sam Gibson
26a6e058e7 Adds more tests for checking request headers 2015-08-30 12:13:34 +10:00
Sam Gibson
7a09c2d924 Shifts to a series of traits/associated types instead of having a requester 2015-08-30 12:13:34 +10:00
Sam Gibson
06f09f6cdb Adds tests for redirecting
servo/servo#6727
2015-08-30 12:13:34 +10:00
Sam Gibson
81fe5938bf Removes HttpRequest, adds HttpResponse wrapper
The HttpRequest trait doesn't make sense, on further reflection. Rather,
just modify the method signature on the requester. The hyper request was
only being used to mutate it's headers anyway.

servo/servo#6727
2015-08-30 12:13:33 +10:00
Sam Gibson
7633cd54c2 Abstract everything but the response from hyper
Because we're using unsized types not for requesting, there's not a
satisfactory way of doing this without boxing the request...

Once unsized stuff lands in rust 1.2/1.3(???) then this should be
implemented with Rc's instead of Box's.

For the time being I'm not sure what else to do.

servo/servo#6727
2015-08-30 12:13:33 +10:00
Sam Gibson
6cba33a50b Abstracts the hyper connection to a servo HttpRequester trait
servo/servo#6727
2015-08-30 12:13:32 +10:00
Sam Gibson
67aa11323b Adds simple POC unit test for load
servo/servo#6727
2015-08-30 12:13:32 +10:00
Sam Gibson
9ac250c62c Abstracts out initial client connection and SSL errors (which I don't think are working?)
servo/servo#6727
2015-08-30 12:13:31 +10:00
Sam Gibson
c8c36f4490 Injects the network connector as a dependency into http_loader::load
servo/servo#6727
2015-08-30 12:13:30 +10:00
Sam Gibson
610ef40105 Refactors http_loader::load to be synchronous w/ an async wrapper
This simplifies the arguments that are passed in and should make testing
errors/responses easier once they're mocked

servo/servo#6727
2015-08-30 12:13:29 +10:00
Corey Farwell
8f876a179a Prefer JSTrue/JSFalse to 1/0 2015-08-28 22:03:01 -04:00
Corey Farwell
b0d2194a4a Cleanup, refactor FormDataMethods::Get 2015-08-28 16:29:11 -04:00
bors-servo
b68b31a062 Auto merge of #7435 - Ms2ger:markers, r=jdm
Send the start and end half of a TimelineMarker to the devtools …

…PullTimelineMarkers thread together.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7435)
<!-- Reviewable:end -->
2015-08-28 13:51:32 -06:00
bors-servo
645dd7ba03 Auto merge of #7436 - jdm:netthreadname, r=Manishearth
Improve debuggability of http_loader panics.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7436)
<!-- Reviewable:end -->
2015-08-28 13:14:28 -06:00
Josh Matthews
2360db68b1 Improve debuggability of http_loader panics. 2015-08-28 15:11:30 -04:00
Ms2ger
cf55d3191d Send the start and end half of a TimelineMarker to the devtools PullTimelineMarkers thread together. 2015-08-28 20:48:07 +02:00
Matt Brubeck
5f126ff301 Remove unnecessary adapt_character_flags call 2015-08-28 11:14:52 -07:00
Matt Brubeck
4d32e8b20e Rearrange remaining bits of GlyphEntry 2015-08-28 11:14:50 -07:00
Matt Brubeck
9d4f5880d3 Remove unused glyph flags 2015-08-28 11:14:49 -07:00
Matt Brubeck
998bec30cf Remove no-op Drop implementation from FontTable
This is no longer necessary for opting out of the Copy trait.
2015-08-28 10:43:04 -07:00
bors-servo
064b72ac97 Auto merge of #7417 - glennw:headless-raf, r=pcwalton
Fix requestAnimationFrame in headless mode. Fixes #7296.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7417)
<!-- Reviewable:end -->
2015-08-28 11:26:09 -06:00
Josh Matthews
b62d1a1c43 Add dashed CSS properties to CSSStyleDeclaration. 2015-08-28 13:15:17 -04:00
Josh Matthews
40806977b5 Add infrastructure for supporting dashed CSS property names on CSSStyleDeclaration. 2015-08-28 13:15:16 -04:00
bors-servo
72125f070d Auto merge of #7391 - jdm:prefs, r=Ms2ger
Replace catch-all experimental flag with fine-grained boolean prefere…

…nces initialized from a JSON document.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7391)
<!-- Reviewable:end -->
2015-08-28 10:08:32 -06:00
bors-servo
9708c63b9c Auto merge of #7227 - tafia:tafia-mime_classifier, r=jdm
rewrite of mime_classifier.rs to use more iterators

Rewrite few parts of the file to use more iterators.

Note that I have **no idea** what the code is actually doing functionally, I just tried to mimic exactly what was being done. All tests are ok

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7227)
<!-- Reviewable:end -->
2015-08-28 09:35:47 -06:00
Josh Matthews
6e26fefad1 Allow setting preferences from the reftest manifest. Add a command-line arg to enable a given preference. 2015-08-28 10:50:55 -04:00
bors-servo
2f227a034a Auto merge of #7431 - frewsxcv:dom-methods-cleanup, r=Ms2ger
Merge adjacent identical `impl` sections

Prior to #7416 and #7401, many of these `impl` sections were not
identical

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7431)
<!-- Reviewable:end -->
2015-08-28 08:49:00 -06:00
Johann Tuffe
dd1c8c826e Refactor mime_classifier
Use more iterators in particular.
2015-08-28 22:47:41 +08:00
Corey Farwell
5ccb0d43ef Merge adjacent identical impl sections
Prior to #7416 and #7401, many of these `impl` sections were not
identical
2015-08-28 10:30:42 -04:00
Josh Matthews
a3ee9b5dd9 Replace catch-all experimental flag with fine-grained boolean preferences initialized from a JSON document. 2015-08-28 10:30:04 -04:00
Simon Sapin
006dd1002f Fix CharacterDataMethods to count UTF-16 code units, not code points. 2015-08-28 11:58:38 +02:00