Commit graph

223 commits

Author SHA1 Message Date
Simon Sapin
6fd46b5e6a Update cssparser.
https://github.com/servo/rust-cssparser/pull/91
2016-01-21 17:58:03 +01:00
Nikki
5426df32de tests for boundary conditions on redirect_count in fetch 2016-01-20 13:03:08 -07:00
Nikki
4165786767 Test setting response.body by fetching on a server 2016-01-18 15:12:31 -07:00
Keith Yeung
a53661f6c8 Rename net/fetch/request.rs to net/fetch/methods.rs and move Request to net_traits 2016-01-18 00:57:19 -05:00
bors-servo
9c713cb468 Auto merge of #9298 - nikkisquared:test_fetch, r=KiChjang
Implement a basic test for Fetch

As per @jdm's suggestion that I start minimally testing the Fetch protocol to catch any errors, I wrote a very simple test that just calls Fetch and checks that the response isn't a network error. I've made changes as necessary for every failure I encountered, although this doesn't mean the implementation is faultless yet.

As always, I look forward to any feedback for improvements regarding the test itself, the changes to the fetch files I've made, and anything that I missed and should update.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9298)
<!-- Reviewable:end -->
2016-01-14 08:20:05 +05:30
Nikki
5a8c533755 Implement a basic test for Fetch and fix errors it finds 2016-01-13 16:45:57 -07:00
Bobby Holley
384cdfcfff Hoist ParseErrorReporter into style and remove the dependency on msg.
The pipeline id stuff is currently unused. If someone needs it, they can add
an additional trait bound on their css error reporter to get the pipeline id.
2016-01-11 18:01:48 -08:00
rohan.prinja
1f02c4ebbb task -> thread 2016-01-10 17:58:13 +09:00
bors-servo
8e75a05e6b Auto merge of #9149 - adrianheine:webFonts, r=glennw
Correctly handle local sources for CSS3 fonts

Currently, servo panics for me when loading something like this:

```
@font-face {
  font-family: "test family";
  src: local(test font face);
}
```

That's due to a bug in `FontCacheTask`. `FontCacheTask` tries to get the value for the key
"test font face" from `self.web_families`, but previously initialized a value for the key "test family".

These two commits add an awkward test and fix the bug by not shadowing the variable `family_name`. Since the argument to `local()` should explicitly not be the name of a font family, the previous variable name was wrong and misleading anyways.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9149)
<!-- Reviewable:end -->
2016-01-08 04:47:55 +05:30
David Raifaizen
76f689cd06 Changed blob to use DataSlice with Arc in order to limit wasteful copying of byte vector 2016-01-06 19:41:52 -05:00
Adrian Heine
3f61d63e72 Add failing test for FontCacheTask::add_web_font
This test tries to add a web font to the `FontCacheTask`. The added web font
corresponds to the following CSS font definition:

```
@font-face {
  font-family: "test family";
  src: local(test font face);
}
```

This test fails, since `FontCacheTask` tries to get the value for the key
"test font face" from `self.web_families`, but previously initialized
a value for the key "test family".
2016-01-04 15:23:26 +01:00
bors-servo
61314f5253 Auto merge of #9104 - vwvww:issue_9098, r=nox
Refactor AssertRequestsMustNotHaveHeaders

Improve correctness of AssertRequestMustNotHaveHeaders tests
 - Changed AssertRequestsMustNotHaveHeaders to AssertRequestMustNotIncudeHeaders
 - Added an assertion that headers_not_expected is not empty

tested by command
./mach test unit
and all passed.

resolves #9098

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9104)
<!-- Reviewable:end -->
2016-01-01 02:20:05 +05:30
David Rajchenbach-Teller
1e81b8c133 Resolves #4183 - Implemementing context-based MIME type sniffing
The version of the standard is not finalized at the time of this writing.
Specifications may be found here: https://mimesniff.spec.whatwg.org/#context-specific-sniffing .
2015-12-31 07:45:03 -05:00
Beomjin Kim
b90a836071 Refactor AssertRequestsMustNotHaveHeaders to AssertRequestMustNotIncludeHeaders
Improve correctness of AssertRequestMustNotHaveHeaders tests
resolves #9098
2015-12-31 13:05:09 +09:00
Bobby Holley
47059d2d26 Separate style+layout and layout-specific wrapper functionality.
This patch does a number of things, unfortunately all at once:
* Hoists a large subset of the layout wrapper functionality into the style system.
* Merges TElementAttributes into the newly-created TElement.
* Reorganizes LayoutData by style vs layout, and removes LayoutDataShared.
* Simplifies the API for borrowing style/layout data.

There's still more to do to make the style system usable standalone, but
this is a good start.
2015-12-29 11:50:03 -08:00
bors-servo
89ab368258 Auto merge of #8506 - nox:finish-ranges, r=dzbarsky
Properly propagate changes when range or trees are mutated

Does the same thing as #6817, but storing Range instances directly in their start and end containers.

Cc @dzbarsky

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8506)
<!-- Reviewable:end -->
2015-12-26 04:08:15 +05:30
Anthony Ramine
3c76835615 Properly propagate changes when range or trees are mutated 2015-12-25 23:35:57 +01:00
Abhishek Kumar
f889b1ccd7 Support responseCookies, responseContent, responseHeaders, requestCookies, getResponseHeaders,
getResponseContent, getRequestPostData, getRequestCookies, getResponseCookies, getEventTimings and
getSecurityInfo message for network devtools

Fixing Indentation
2015-12-21 10:28:40 -05:00
Mathieu Agopian
11234f5370 Use Url.join instead of UrlParser.base_url(...).parse (#9002) 2015-12-18 17:02:41 +01:00
GauriGNaik
fc81276c8e Add pipeline information to CSS error reporting. 2015-12-14 11:18:30 -05:00
bors-servo
8b95d7b8d8 Auto merge of #8757 - servo:skia, r=mbrubeck
Use skia and deps from crates.io.

This makes the initial download for skia go from a 300 MB git repository to a 5 MB tarball. This should help with issues like #6132 and #7687.

Fix https://github.com/servo/skia/issues/70

This builds, but the at the moment causes a number of tidy errors for duplicated crates.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8757)
<!-- Reviewable:end -->
2015-12-03 12:58:29 +05:30
Sam Gibson
4befd2cfb0 Fixes typo in test literal 2015-12-03 14:10:25 +11:00
Sam Gibson
9668500e97 Makes setting negative values to maxLength throw an IndexSize exception 2015-12-03 14:00:59 +11:00
Sam Gibson
2ba1750c40 Resolves long-running merge conflicts 2015-12-03 14:00:53 +11:00
Sam Gibson
419a26e619 Adds a test for set_content to ignore max_length 2015-12-03 14:00:53 +11:00
Sam Gibson
d26c555e2a Adds support for input element's maxlength attr
servo/servo#7320
servo/servo#7004
2015-12-03 14:00:51 +11:00
Simon Sapin
aa1eba4f5a Use skia and deps from crates.io.
Fix https://github.com/servo/skia/issues/70
2015-12-02 19:07:59 +01:00
bors-servo
595bda478e Auto merge of #8752 - Manishearth:om-nom, r=metajack
Make `path_matches` match the spec (fixes cookies)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8752)
<!-- Reviewable:end -->
2015-11-30 23:18:39 +05:30
Manish Goregaokar
d332557d69 Add path_match tests 2015-11-30 22:56:13 +05:30
bors-servo
dbff1ab336 Auto merge of #8692 - GuillaumeGomez:patch-1, r=Wafflespeanut
Ensure crate are alphabetically sorted

cc @nox

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8692)
<!-- Reviewable:end -->
2015-11-28 19:34:11 +05:30
Guillaume Gomez
6e7de62b38 Add check up on extern crate order and sort extern crates alphabetically 2015-11-28 03:11:08 +01:00
Manish Goregaokar
dc0e467945 Upgrade to rustc 1.6.0-nightly (d5fde83ae 2015-11-12)
… and libc 0.2 and many other dependencies
2015-11-27 00:15:29 -05:00
GauriGNaik
996e9e06b2 Defined new trait ParseErrorReporter and added error_reporter member to ParserContext 2015-11-25 18:28:30 -05:00
Alan Jeffrey
3dec6edd10 Update string_cache to 0.2.
Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced atom!(foo) by atom!("foo").
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.
2015-11-25 10:13:21 -06:00
bors-servo
13a96fcaf7 Auto merge of #8660 - pcwalton:ipc-channel-errors, r=larsbergstrom
Update `ipc-channel` to pick up the improved error reporting.

Intended to help diagnose intermittent failures.

r? @jdm or @larsbergstrom (or whoever)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8660)
<!-- Reviewable:end -->
2015-11-25 07:31:15 +05:30
Simon Sapin
45ec900745 Remove dependency on regex_macros
This reduces the amount of code using unstable features that we depend on.
The hand-written IP address parser is probably just as fast.
2015-11-24 22:07:14 +01:00
Simon Sapin
0dfdc94cb2 Remove IPv6 subnet parsing in host files like ::1/64
The host replacement code doesn’t do anything useful with it.
(It only compares strings.)
2015-11-24 22:07:06 +01:00
Patrick Walton
2843000810 Update ipc-channel to pick up the improved error reporting.
Intended to help diagnose intermittent failures.
2015-11-23 16:38:39 -08:00
Corey Farwell
f34da4120d Implement 'url!(..)' macro
https://github.com/servo/rust-url/issues/136

https://github.com/servo/rust-url/pull/137
2015-11-21 08:15:56 -05:00
Aleksandr Likhanov
4bf21ab15e reduce node.unique_id size
fix sizeof unittest
update Cargo.lock
2015-11-19 00:48:20 +05:00
bors-servo
f17f89059a Auto merge of #8503 - craftytrickster:8406/limit-suppported-format, r=mbrubeck
Adding method to detect if image formats should be supported by servo

https://github.com/servo/servo/issues/8406

Please let me know if I need to make any changes.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8503)
<!-- Reviewable:end -->
2015-11-17 07:14:25 +05:30
bors-servo
3ef0a9a79d Auto merge of #8526 - frewsxcv:parse-length, r=eefriedman
Fix parse_length 0 values, implement <hr> 'width'

Follow-up to https://github.com/servo/servo/issues/8424

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8526)
<!-- Reviewable:end -->
2015-11-15 03:30:46 +05:30
Corey Farwell
30ea772939 Make util::str::parse_length work with floats 2015-11-14 16:47:10 -05:00
rohan.prinja
337066063a fix impl of parse_length() 2015-11-14 10:02:26 -05:00
Ravi Shankar
afb9b0707b Testing cancellation during redirects 2015-11-14 10:04:32 +05:30
David Raifaizen
aa601be329 Adding method to detect if image formats should be supported by servo 2015-11-13 19:01:44 -05:00
Alan Jeffrey
84bde75b42 Replaced DOMString constructor by conversion functions.
Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
2015-11-12 17:52:59 -06:00
bors-servo
e394c0d859 Auto merge of #7646 - jxs:master, r=jdm
Write unit tests for cookie isolation

closes #7624

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7646)
<!-- Reviewable:end -->
2015-11-12 20:20:32 +05:30
João Oliveira
79fcd1da95 Write unit tests for cookie isolation 2015-11-12 14:12:08 +00:00
bors-servo
4848e37e2e Auto merge of #7844 - Wafflespeanut:requests, r=jdm
Cancelable network requests!

fixes #4974

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7844)
<!-- Reviewable:end -->
2015-11-12 18:59:58 +05:30