Commit graph

15610 commits

Author SHA1 Message Date
bors-servo
c193f0f3a2 Auto merge of #9643 - paulrouget:resolveSymlink, r=larsbergstrom
Follow executable symlink to resolve resources directory

We need this if we ever want to be able to install Servo, for example: https://github.com/paulrouget/homebrew-servo

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9643)
<!-- Reviewable:end -->
2016-02-17 03:39:28 +05:30
bors-servo
c388c83dcd Auto merge of #9625 - danlrobertson:i9547, r=KiChjang
Implement step 9 of XHR Open method

Implement step 9 of the [XMLHttpRequest Open](https://xhr.spec.whatwg.org/#dom-xmlhttprequest-open) method. Thanks to @KiChjang for all the help!

As always, comments and critiques are welcomed!

Fix: #9547

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9625)
<!-- Reviewable:end -->
2016-02-17 02:51:44 +05:30
bors-servo
7aedb9c7cd Auto merge of #9600 - danlrobertson:opts_parser_err, r=ecoal95
Add informative error messages when parsing command line options returns an error

The background behind why I'm submitting this PR is slightly embarrassing. After running `./mach` with some servo options I got the following stack backtrace.

```
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { kind: InvalidDigit }', ../src/libcore/result.rs:746
stack backtrace:
   1:     0x56459001b0b0 - sys::backtrace::tracing:👿:write::hb120982054a416e35nu
   2:     0x56459001e02b - panicking::default_handler::_$u7b$$u7b$closure$u7d$$u7d$::closure.42840
   3:     0x56459001dc96 - panicking::default_handler::h7ae2e4523ef4c187IFy
   4:     0x56459000760c - sys_common::unwind::begin_unwind_inner::h5fb19481d14902dbDgt
   5:     0x564590007cf8 - sys_common::unwind::begin_unwind_fmt::hd62d57279546b0f2Jft
   6:     0x56459001a701 - rust_begin_unwind
   7:     0x56459004c01f - panicking::panic_fmt::h27f7225e08792f40qYL
   8:     0x56458f393901 - result::unwrap_failed::h18215968003310890981
                        at ../src/libcore/macros.rs:29
   9:     0x56458f3937b9 - result::Result<T, E>::unwrap::h10319050269194353824
                        at ../src/libcore/result.rs:687
  10:     0x56458f383701 - opts::from_cmdline_args::h8ea8d8c87dc6ee726lg
                        at /home/drobertson/git/servo/components/util/opts.rs:599
  11:     0x56458d1f8cdf - main::h8517eb49d15e90fbNaa
                        at /home/drobertson/git/servo/components/servo/main.rs:53
  12:     0x56459001d8f4 - sys_common::unwind::try::try_fn::h9076850075504893162
  13:     0x56459001a68b - __rust_try
  14:     0x56459001d36e - rt::lang_start::h58a22f304b0c1e19Oxy
  15:     0x56458d2f4aa9 - main
  16:     0x7f370496360f - __libc_start_main
  17:     0x56458d1c04a8 - _start
  18:                0x0 - <unknown>
Servo exited with return value 101
```

I immediately opened up `gdb` and got to work only to realize that the error was due to a typo in an option that had been `unwrap`ed at [components/util/opts.rs:599](https://github.com/servo/servo/blob/master/components/util/opts.rs#L599). Perhaps some more informative error messages will help prevent some future face-palm moments like mine 😄

I couldn't think of a good way to add tests for this. Please let me know if I missed something. Comments and critiques are welcome!

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9600)
<!-- Reviewable:end -->
2016-02-16 23:13:55 +05:30
bors-servo
8199bbaf0e Auto merge of #9653 - servo:bump-regex, r=KiChjang
Bump 'regex', 'regex-syntax' to pick up perf improvements.

Generated using:

```
./mach cargo-update -p regex
./mach cargo-update -p regex-syntax
```

Diff:

https://github.com/rust-lang-nursery/regex/compare/8ca7815092d05c9e1e9d3eff6d324babb99aedd3...0.1.51

More info about performance improvements:

https://www.reddit.com/r/rust/comments/45yxcz/psa_regex_got_a_lazy_dfa_its_fast/

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9653)
<!-- Reviewable:end -->
2016-02-16 19:12:26 +05:30
Corey Farwell
5962bc9f95 Bump 'regex', 'regex-syntax' to pick up perf improvements.
Generated using:

```
./mach cargo-update -p regex
./mach cargo-update -p regex-syntax
```

Diff:

https://github.com/rust-lang-nursery/regex/compare/8ca7815092d05c9e1e9d3eff6d324babb99aedd3...0.1.51

More info about performance improvements:

https://www.reddit.com/r/rust/comments/45yxcz/psa_regex_got_a_lazy_dfa_its_fast/
2016-02-16 08:40:47 -05:00
bors-servo
f0d4c03bd9 Auto merge of #9636 - nox:mv-cursor, r=Ms2ger
Move util::cursor to style_traits

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9636)
<!-- Reviewable:end -->
2016-02-16 16:50:20 +05:30
Paul Rouget
76f63c3569 Follow executable symlink to resolve resources directory 2016-02-16 19:12:55 +08:00
Anthony Ramine
290694b27e Move util::cursor to style_traits 2016-02-16 00:50:01 +01:00
bors-servo
5f8cfcd512 Auto merge of #9647 - Jayflux:hotfix/9638, r=nox
refactor, moving functions into attr and htmlfontelemend fixes #9639 …

…#9638

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9647)
<!-- Reviewable:end -->
2016-02-16 04:33:01 +05:30
Jayflux
d169d7bd9e refactor, moving functions into attr and htmlfontelemend fixes #9639 #9638 2016-02-15 22:33:14 +00:00
bors-servo
3ef0bb4b37 Auto merge of #9648 - psdh:fixnodeiseual, r=Manishearth
fix Node-isEqualNode.html test failure

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9648)
<!-- Reviewable:end -->
2016-02-16 02:35:47 +05:30
Prabhjyot Singh Sodhi
ae80b9bcf0 fix Node-isEqualNode.html test failure 2016-02-16 00:24:35 +05:30
bors-servo
5ee5ce07ba Auto merge of #9621 - KiChjang:xhr-response-json, r=Ms2ger
Cache XHR JSON responses

Fixes #3919.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9621)
<!-- Reviewable:end -->
2016-02-15 21:52:49 +05:30
bors-servo
87c6889f44 Auto merge of #9645 - nox:fix-has-instance, r=Ms2ger
Fix the hasInstance hook of interface objects

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9645)
<!-- Reviewable:end -->
2016-02-15 19:13:02 +05:30
Anthony Ramine
ae72d1dfbe Fix the hasInstance hook of interface objects
Step 2 wasn't properly implemented.
2016-02-15 14:12:53 +01:00
Anthony Ramine
e08f817058 Clean up imports in script::dom::bindings::interface 2016-02-15 12:59:18 +01:00
Daniel Robertson
4d15b02dde Handle credentials in modify_request_headers
Handle credentials and set the apropriate header in
`modify_request_headers`.
2016-02-15 06:47:47 +00:00
Daniel Robertson
10e7af50fe Implement step 9 of XHR open method
Implement step 9 of the Open method for XMLHttpRequest.
2016-02-15 04:57:24 +00:00
Keith Yeung
6be5218d3c Cache XHR JSON responses 2016-02-14 23:55:43 -05:00
bors-servo
c9b2ef5c7f Auto merge of #9634 - craftytrickster:issue/9564, r=Manishearth
Adding warning to properties.mako.rs regarding the Mako parser mangling

https://github.com/servo/servo/issues/9564#issuecomment-183765401

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9634)
<!-- Reviewable:end -->
2016-02-15 10:15:35 +05:30
bors-servo
e8ae7e4773 Auto merge of #9629 - danlrobertson:i9623, r=KiChjang
Implement Blob response for XMLHttpRequest: #9623

My first attempt at implementing the Blob response for XMLHttpRequest. The expected result for the response `tests/wpt/web-platform-test/HMLHttpRequest/response-blob-data.htm` is also changed to `PASS`. Please let me know if you see any areas in which I can improve this PR!

Fixes #9623

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9629)
<!-- Reviewable:end -->
2016-02-15 08:53:27 +05:30
bors-servo
024d106f78 Auto merge of #9635 - nox:mv-bezier, r=jdm
Move util::bezier to style

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9635)
<!-- Reviewable:end -->
2016-02-15 07:47:27 +05:30
bors-servo
4f07aa7a3a Auto merge of #9642 - peterjoel:issue_9640_move_util_str_is_token, r=nox
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9642)
<!-- Reviewable:end -->
2016-02-15 04:27:55 +05:30
Peter
f374e8f420 #9640 Refactor: Move util::str::is_token to script::dom::bindings::str 2016-02-14 22:47:52 +00:00
Daniel Robertson
0b0e1473cd Implement Blob response for XMLHttpRequest: #9623
In response to #9623 implement the Blob response for XML HttpRequest and
change the expected result for the script test.
2016-02-14 20:00:30 +00:00
Anthony Ramine
09f865919d Move util::bezier to style 2016-02-14 19:45:24 +01:00
David Raifaizen
8fa82f611c Adding warning to properties.mako.rs regarding the Mako parser mangling Rust code 2016-02-14 12:23:53 -05:00
bors-servo
c929dbe253 Auto merge of #9576 - kmuszyn:9561-rename-thread-to-task, r=jdm
Issue #9561 Renamed *_thread_source to *_task_source window.rs

Related to: https://github.com/servo/servo/issues/9561

Renamed *thread_source to *_task_source in components/script/dom/window.rs and files that use window methods.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9576)
<!-- Reviewable:end -->
2016-02-14 20:02:58 +05:30
Kamil Muszyński
076cc409e6 Issue #9561 Renamed *_thread_source to *_task_source and ThreadSource to TaskSource 2016-02-14 15:29:44 +01:00
bors-servo
3f74c07e20 Auto merge of #9627 - Jayflux:addWindowsOptionInTriple, r=larsbergstrom
Now we use python for os_type, we need to catch 'windows' as well as …

…'mingw65_nt- fixes #9597

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9627)
<!-- Reviewable:end -->
2016-02-14 05:47:05 +05:30
Jason Williams
cf2e0c0f4c Now we use python for os_type, we need to catch 'windows' as well as 'mingw65_nt- fixes #9597' 2016-02-13 22:43:39 +00:00
bors-servo
c11844cbf2 Auto merge of #9567 - ecoal95:general-pseudo-element-parsing, r=bholley,SimonSapin
style: Make the whole style crate independent of the implementation

This allows, among other things, having different implementations for parsing pseudo{elements, classes} in both `ports/geckolib` and in servo.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9567)
<!-- Reviewable:end -->
2016-02-14 03:59:59 +05:30
bors-servo
2fd8cbccdd Auto merge of #9588 - Jayflux:hotfix/9499, r=Wafflespeanut
add check for win32 or msys before running rustc-with-gold fixes #9499

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9588)
<!-- Reviewable:end -->
2016-02-13 23:32:49 +05:30
Emilio Cobos Álvarez
04d2db5747 layout: Stop parameterizing on N for RecalcStyleAndConstructFlows
This is unfortunate, but making that useful would require parameterizing
`SharedLayoutContext` and `LayoutContext` depending on the
`SelectorImpl` (which is a **huge** work right now).

Probably the easier way to do it, and probably the one that keeps the
layout code more legible, and since there won't be multiple
implementations at the same compilation unit, would be "defining" a
default implementation for layout via feature flags.

That should allow us to remove the components/style/servo.rs file.
2016-02-13 16:05:17 +01:00
Emilio Cobos Álvarez
61e04df266 style: Refactor the per_pseudo map from StyleData to avoid having an option value type.
This make the layout code way clearer.
2016-02-13 16:05:17 +01:00
Emilio Cobos Álvarez
a604d605ed style: Prevent a crash when push_applicable_declarations is called with a non eagerly-cascaded pseudo-element
This actually didn't happen, but this should be done sooner than later.
2016-02-13 16:05:16 +01:00
Emilio Cobos Álvarez
dad1738ba7 geckolib: Fix :link and :any-link pseudo-element matching
The logic was switched between them.
2016-02-13 16:05:15 +01:00
Emilio Cobos Álvarez
eddec5cc06 style: Use fnv hashing for pseudo-elements 2016-02-13 16:05:14 +01:00
Emilio Cobos Álvarez
dd503dfacb Refactor style to be completely backend-independent
This commit refactors the style crate to be completely independent of
the actual implementation and pseudo-elements supported.

This also adds a gecko backend which introduces parsing for the
anonymous box pseudo-elements[1], although there's still no way of
querying them.

https://mxr.mozilla.org/mozilla-central/source/layout/style/nsCSSAnonBoxList.h
2016-02-13 16:05:14 +01:00
bors-servo
80e55c7ce4 Auto merge of #9624 - Jayflux:hotfix/9597, r=KiChjang
use python's built in platform module for detection, for more accurac…

…y and cross platform support
Fixes #9597.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9624)
<!-- Reviewable:end -->
2016-02-13 19:44:03 +05:30
Jason Williams
939f409042 use python's built in platform module for detection, for more accuracy and cross platform support 2016-02-13 13:24:04 +00:00
bors-servo
a164176876 Auto merge of #9622 - nox:heapsize, r=ecoal95
Bump heapsize to 0.3

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9622)
<!-- Reviewable:end -->
2016-02-13 18:50:41 +05:30
Jayflux
45c9521dc9 add check for win32 or msys before running rustc-with-gold fixes #9499 2016-02-13 13:05:15 +00:00
Anthony Ramine
966da85791 Derive HeapSizeOf for GradientDisplayItem 2016-02-13 11:13:20 +01:00
Anthony Ramine
55dcee94be Bump heapsize to 0.3 2016-02-13 11:13:19 +01:00
Anthony Ramine
26a82a6338 Bump layers to 0.2.1 2016-02-13 00:08:14 +01:00
Anthony Ramine
77dd83562e Bump azure to 0.4.1 2016-02-13 00:08:13 +01:00
Anthony Ramine
680c817d53 Bump url to 0.5.5 2016-02-13 00:08:12 +01:00
Anthony Ramine
899a5bbfa4 Bump selectors to 0.4.1 2016-02-13 00:08:11 +01:00
Anthony Ramine
a4a5d847c4 Bump html5ever to 0.5.1 2016-02-13 00:08:10 +01:00