Commit graph

6509 commits

Author SHA1 Message Date
Anthony Ramine
db8d502f41 Move util::logical_geometry to style 2016-02-18 10:17:13 +01:00
bors-servo
63dc161b77 Auto merge of #9683 - kmuszyn:9561-more-thread-source-renamings, r=jdm
Issue #9561 continued - renamed *_thread_source to *_task_source

components/script/dom/bindings/global.rs modified -> all *_thread_source occurrences renamed to *_task_source to comply with spec

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9683)
<!-- Reviewable:end -->
2016-02-18 04:59:32 +05:30
bors-servo
bc034845b7 Auto merge of #9662 - rebstar6:websocket_cookies, r=jdm
Add support for websocket cookies

Addresses both cookies in request and response. Resolves #9540.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9662)
<!-- Reviewable:end -->
2016-02-18 02:44:01 +05:30
Kamil Muszyński
c6dfd7e2fa Issue #9561 continued - renamed *_thread_source to *_task_source in global.rs and related files 2016-02-17 21:25:12 +01:00
Rebecca
cf6fd6dafe Add support for websocket request and response cookies
Also change expected behavior to pass for all in tests/wpt/web-platform-tests/websockets/cookies
2016-02-17 14:50:52 -05:00
bors-servo
61f09cce4e Auto merge of #9676 - nox:domexception, r=KiChjang
Support [ExceptionClass]

Use it on DOMException.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9676)
<!-- Reviewable:end -->
2016-02-17 18:51:47 +05:30
Anthony Ramine
c21a164396 Support [ExceptionClass]
Use it on DOMException.
2016-02-17 13:58:58 +01:00
bors-servo
ab381cf951 Auto merge of #9664 - danlrobertson:i9654, r=KiChjang
Implement RootedReference<T> for Option<JS<T>>

A basic implementation of `RootedReference for Option<JS<T>>` based off of
other implementations of `RootedReference` for `Option` wrapped types.

Really I just wanted an excuse to read more in `bindings` 😄 Let me know
if you have any comments or critiques.

Fixes  #9654

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9664)
<!-- Reviewable:end -->
2016-02-17 17:54:15 +05:30
bors-servo
8d63eff463 Auto merge of #9632 - peterjoel:issue_1716, r=KiChjang
Addresses Issue #1716. Indicated part of the document.

Fixes #1716.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9632)
<!-- Reviewable:end -->
2016-02-17 15:23:21 +05:30
bors-servo
c075092fe0 Auto merge of #9657 - zakorgy:refactor, r=KiChjang
Move parse_integer and parse_unsigned_integer from util::str to style::attr

Fixes #9637

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9657)
<!-- Reviewable:end -->
2016-02-17 14:35:26 +05:30
bors-servo
949a2d3d11 Auto merge of #9667 - Tycheon:9472, r=KiChjang
CORS Preflight Logic Fix

Fix check to set flag if any header is not a simple header, rather than only if all
headers are simple headers.
Fix failing tests to allow merge in advance of @nikkibee's changes
as per @jdm's direction via IRC.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9667)
<!-- Reviewable:end -->
2016-02-17 12:56:05 +05:30
zakorgyula
43d527fcc8 Move parse_integer and parse_unsigned_integer from util::str to style::attr 2016-02-17 07:05:39 +01:00
Peter
e39e59ef18 #1716 The indicated part of the document.
Interactive test for fragid resolution.

    Added HTML tests for scrolling to fragid

    Applied algorithm from whatwg spec
    https://html.spec.whatwg.org/multipage/#the-indicated-part-of-the-document

    Changes following code review
2016-02-17 00:51:46 +00:00
Ben
1ccb642ee4 CORS Preflight Logic Fix
Fix check to set flag if any header is a simple header.
Fix failing tests to allow merge in advance of @nikkibee's changes
as per @jdm's direction via IRC
2016-02-16 15:42:07 -07:00
Daniel Robertson
7a35ef1555 Implement RootedReference<T> for Option<JS<T>>
An implementation of RootedReference for Option<JS<T>> based off of
other implementations of RootedReference for Option wrapped types.
2016-02-16 22:40:03 +00:00
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