Commit graph

6494 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
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
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
Kamil Muszyński
076cc409e6 Issue #9561 Renamed *_thread_source to *_task_source and ThreadSource to TaskSource 2016-02-14 15:29:44 +01:00
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
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
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
Anthony Ramine
874fa5595f Bump euclid to 0.6.2 2016-02-13 00:08:08 +01:00
Anthony Ramine
d0ab28a735 Bump cssparser to 0.5.3 2016-02-13 00:08:07 +01:00
Anthony Ramine
e2d9734609 Bump string_cache to 0.2.9 2016-02-13 00:08:06 +01:00
Anthony Ramine
2d6ac4da97 Bump app_units to 0.2.1 2016-02-13 00:08:05 +01:00
Anthony Ramine
c6262c368f Reorder dependencies in some Cargo.toml files 2016-02-13 00:08:04 +01:00
bors-servo
520ca258d4 Auto merge of #9618 - jongiddy:fix-mp4-size, r=jdm
Calculate correct mp4 header length.

The calculation of MP4 frame length is incorrect, shifting values by 1 bit instead of 8 bits.  It works for the test MP4 file because the length of the frame is less than 256 bytes, so the shifted values are all zero.

This PR changes the code to calculate the length correctly. It adds a test to check a fake long stream. Still not long enough to test completely, but at least detects the problem with the original code.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9618)
<!-- Reviewable:end -->
2016-02-13 01:20:58 +05:30
Jonathan Giddy
ec0ea465ec Calculate mp4 header length correctly. 2016-02-12 17:39:34 +00:00
bors-servo
a746522b58 Auto merge of #9606 - servo:bump-js, r=Ms2ger
Bump js to get fix from servo/rust-mozjs#237

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9606)
<!-- Reviewable:end -->
2016-02-12 21:45:51 +05:30
Anthony Ramine
71092e142d Bump js to get fix from servo/rust-mozjs#237 2016-02-12 17:15:09 +01:00
bors-servo
a24e86e76f Auto merge of #9614 - paulrouget:inputEventBubbles, r=mbrubeck
input event should bubble

No test because: https://github.com/servo/servo/issues/9574#issuecomment-181558144

Fix #9574

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9614)
<!-- Reviewable:end -->
2016-02-12 12:00:31 +05:30
Paul Rouget
54e737c2b0 input event should bubble 2016-02-12 07:27:27 +01:00
bors-servo
b870aa9087 Auto merge of #8987 - jdm:devtoolsreport, r=glennw
Report CSS errors to script task for further processing.

This was a missing piece from #8838.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8987)
<!-- Reviewable:end -->
2016-02-12 01:45:58 +05:30