Commit Graph

2772 Commits

Author SHA1 Message Date
Anthony Ramine
a1c9a0bed1 servo: Merge #9686 - Move util::logical_geometry to style (from nox:mv-logical_geometry); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: eee0d4efeba1ee77e864a495b6e1992c8ad088cc
2016-02-18 14:21:29 +05:00
Ms2ger
d90b0bab5f servo: Merge #9678 - Derive the Debug trait for WebIDL-generated enums (from servo:debug-enum); r=KiChjang
Source-Repo: https://github.com/servo/servo
Source-Revision: 07cb6599d0829d2eccdd8a2a0cf46ff657901593
2016-02-18 09:21:57 +05:00
Paul Rouget
a50c6d0d91 servo: Merge #9529 - Implement focus, blur, focusin and focusout events (from paulrouget:focusEvents); r=asajeffrey
Based on https://github.com/servo/servo/pull/7985

Fixes https://github.com/servo/servo/issues/7981

Source-Repo: https://github.com/servo/servo
Source-Revision: d8ffa3d0b85815a5ff62491f9f3bc7445834fc0e
2016-02-18 08:33:42 +05:00
Nikki
1d89edaa19 servo: Merge #9608 - Implementation of HTTP Redirect Fetch step (from nikkisquared:implement_http_redirect_fetch); r=jdm
I've made a first draft of a complete implementation of HTTP Redirect Fetch, most of which is just refactored out of HTTP Fetch. I've also made some minor changes in a few other steps, all collected in the second commit, based on recent changes to the Fetch Standard. Since HTTP Redirect Fetch is so new, I figured now would be a fine time to make those other changes.

The biggest thing on my mind right now is how the spec says[1] "This algorithm will be used by HTML's "navigate" algorithm in addition to HTTP fetch above." This makes me think that this function, as well as HTTP Fetch, need to public, or at least have a public-facing function- since each Fetch function takes an Rc<Request>, which might be weird to require callers to supply.

[1] https://fetch.spec.whatwg.org/#http-redirect-fetch

Source-Repo: https://github.com/servo/servo
Source-Revision: 88afe38092b9bb6320d01c94a9a239e8be284933
2016-02-18 05:24:51 +05:00
Kamil Muszyński
66afed6092 servo: Merge #9683 - Issue #9561 continued - renamed *_thread_source to *_task_source (from kmuszyn:9561-more-thread-source-renamings); r=jdm
components/script/dom/bindings/global.rs modified -> all *_thread_source occurrences renamed to *_task_source to comply with spec

Source-Repo: https://github.com/servo/servo
Source-Revision: 63dc161b773775c6755a604ec04b81c0bc479bf3
2016-02-18 04:29:32 +05:00
Rebecca
114769dd9e servo: Merge #9662 - Add support for websocket cookies (from rebstar6:websocket_cookies); r=jdm
Addresses both cookies in request and response. Resolves #9540.

Source-Repo: https://github.com/servo/servo
Source-Revision: bc034845b7e543e4e71fa21d6bf99e9f10ddb6c5
2016-02-18 02:14:01 +05:00
Anthony Ramine
6ebe6b0385 servo: Merge #9676 - Support [ExceptionClass] (from nox:domexception); r=KiChjang
Use it on DOMException.

Source-Repo: https://github.com/servo/servo
Source-Revision: 61f09cce4e7c1681fd1f7fbefada596316f06809
2016-02-17 18:21:47 +05:00
Daniel Robertson
1522ccd40e servo: Merge #9664 - Implement RootedReference<T> for Option<JS<T>> (from danlrobertson:i9654); r=KiChjang
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

Source-Repo: https://github.com/servo/servo
Source-Revision: ab381cf951f3e556d0f4c1f2107a311b0d275f91
2016-02-17 17:24:15 +05:00
Peter
ba40dfb3c2 servo: Merge #9632 - Addresses Issue #1716. Indicated part of the document (from peterjoel:issue_1716); r=KiChjang
Fixes #1716.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8d63eff463417cdc739dd291d0ae4ab225b8dce5
2016-02-17 14:53:21 +05:00
zakorgyula
bc09c20121 servo: Merge #9657 - Move parse_integer and parse_unsigned_integer from util::str to style::attr (from zakorgy:refactor); r=KiChjang
Fixes #9637

Source-Repo: https://github.com/servo/servo
Source-Revision: c075092fe067292b58a781169da937d1f047b62e
2016-02-17 14:05:26 +05:00
Ben
7afd6178a1 servo: Merge #9667 - CORS Preflight Logic Fix (from Tycheon:9472); r=KiChjang
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 949a2d3d11d41912fb30e2d152045beb8c2aeebc
2016-02-17 12:26:05 +05:00
Paul Rouget
804f23e3fa servo: Merge #9643 - Follow executable symlink to resolve resources directory (from paulrouget:resolveSymlink); r=larsbergstrom
We need this if we ever want to be able to install Servo, for example: https://github.com/paulrouget/homebrew-servo

Source-Repo: https://github.com/servo/servo
Source-Revision: c193f0f3a2f7a3ef57b51df67529756c209563a9
2016-02-17 03:09:28 +05:00
Daniel Robertson
7af3549f07 servo: Merge #9625 - Implement step 9 of XHR Open method (from danlrobertson:i9547); r=KiChjang
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
Source-Repo: https://github.com/servo/servo
Source-Revision: c388c83dcdab0f4c7c8026a9ba1a123e0b59fad9
2016-02-17 02:21:44 +05:00
Daniel Robertson
c5d99c3aee servo: Merge #9600 - Add informative error messages when parsing command line options returns an error (from danlrobertson:opts_parser_err); r=ecoal95
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!

Source-Repo: https://github.com/servo/servo
Source-Revision: 7aedb9c7cdcc1b67c1d6d01f36f2fe7c1a17ddac
2016-02-16 22:43:55 +05:00
Corey Farwell
b4778cbf2b servo: Merge #9653 - Bump 'regex', 'regex-syntax' to pick up perf improvements (from servo:bump-regex); r=KiChjang
Generated using:

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

Diff:

8ca7815092...0.1.51

More info about performance improvements:

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 8199bbaf0e2fd702631efd227c1eda785f970abe
2016-02-16 18:42:26 +05:00
Anthony Ramine
cca9a4d4c7 servo: Merge #9636 - Move util::cursor to style_traits (from nox:mv-cursor); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: f0d4c03bd9c9e181aa1225aec978c2f539e9aeb0
2016-02-16 16:20:20 +05:00
Jayflux
af38fc2eb5 servo: Merge #9647 - refactor, moving functions into attr and htmlfontelemend fixes #9639 … (from Jayflux:hotfix/9638); r=nox
…#9638

Source-Repo: https://github.com/servo/servo
Source-Revision: 5f8cfcd512bddba306def79aaec6cae6cdbff76b
2016-02-16 04:03:01 +05:00
Prabhjyot Singh Sodhi
857b545b86 servo: Merge #9648 - fix Node-isEqualNode.html test failure (from psdh:fixnodeiseual); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 3ef0bb4b374e45fe8e9fb1192307c1b0224a0006
2016-02-16 02:05:47 +05:00
Keith Yeung
3c1b7d8eb7 servo: Merge #9621 - Cache XHR JSON responses (from KiChjang:xhr-response-json); r=Ms2ger
Fixes #3919.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5ee5ce07baa10906a357bfb24e4f0c164bd36e26
2016-02-15 21:22:49 +05:00
Anthony Ramine
41c81d644d servo: Merge #9645 - Fix the hasInstance hook of interface objects (from nox:fix-has-instance); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 87c6889f44f67e9c8a186e1b4d95066a4e67ecd3
2016-02-15 18:43:02 +05:00
David Raifaizen
2a9274bab2 servo: Merge #9634 - Adding warning to properties.mako.rs regarding the Mako parser mangling (from craftytrickster:issue/9564); r=Manishearth
https://github.com/servo/servo/issues/9564#issuecomment-183765401

Source-Repo: https://github.com/servo/servo
Source-Revision: c9b2ef5c7f5b23d815e8c3c78f972f6f880d6dbd
2016-02-15 09:45:35 +05:00
Daniel Robertson
e17f1929c0 servo: Merge #9629 - Implement Blob response for XMLHttpRequest: #9623 (from danlrobertson:i9623); r=KiChjang
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

Source-Repo: https://github.com/servo/servo
Source-Revision: e8ae7e47731eb20ea36dbc55deda84b664c3aab4
2016-02-15 08:23:27 +05:00
Anthony Ramine
2713c3d1d7 servo: Merge #9635 - Move util::bezier to style (from nox:mv-bezier); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 024d106f78e0e37adc3ddc24a56a0597c2bacf98
2016-02-15 07:17:27 +05:00
Peter
b72010af2d servo: Merge #9642 - #9640 Refactor: Move util::str::is_token to script::dom::bindings::str (from peterjoel:issue_9640_move_util_str_is_token); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 4f07aa7a3a69b312def2ca1085d92378ec523bf9
2016-02-15 03:57:55 +05:00
Kamil Muszyński
c067ddc84f servo: Merge #9576 - Issue #9561 Renamed *_thread_source to *_task_source window.rs (from kmuszyn:9561-rename-thread-to-task); r=jdm
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: c929dbe2530f979ce6e84d5a25ea47318ff0910e
2016-02-14 19:32:58 +05:00
Emilio Cobos Álvarez
32bca467e0 servo: Merge #9567 - style: Make the whole style crate independent of the implementation (from emilio:general-pseudo-element-parsing); r=bholley,SimonSapin
This allows, among other things, having different implementations for parsing pseudo{elements, classes} in both `ports/geckolib` and in servo.

Source-Repo: https://github.com/servo/servo
Source-Revision: c11844cbf28054784c8d65781cff20045d8ee48b
2016-02-14 03:29:59 +05:00
Anthony Ramine
361e9b1a9e servo: Merge #9622 - Bump heapsize to 0.3 (from nox:heapsize); r=ecoal95
Source-Repo: https://github.com/servo/servo
Source-Revision: a164176876bb6abccf729eb5d6334e3c22230103
2016-02-13 18:20:41 +05:00
Jonathan Giddy
054becb2de servo: Merge #9618 - Calculate correct mp4 header length (from jongiddy:fix-mp4-size); r=jdm
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 520ca258d4f979500f839e13a278bee35bfcc00a
2016-02-13 00:50:58 +05:00
Anthony Ramine
79d11b6e44 servo: Merge #9606 - Bump js to get fix from servo/rust-mozjs#237 (from servo:bump-js); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: a746522b58d31e14fe509d2f11fcb01b2089fdb0
2016-02-12 21:15:51 +05:00
Paul Rouget
c85a6afb33 servo: Merge #9614 - input event should bubble (from paulrouget:inputEventBubbles); r=mbrubeck
No test because: https://github.com/servo/servo/issues/9574#issuecomment-181558144

Fix #9574

Source-Repo: https://github.com/servo/servo
Source-Revision: a24e86e76fb2bebc1ded68d17cda10aa10417364
2016-02-12 11:30:31 +05:00
Josh Matthews
95672c93bf servo: Merge #8987 - Report CSS errors to script task for further processing (from jdm:devtoolsreport); r=glennw
This was a missing piece from #8838.

Source-Repo: https://github.com/servo/servo
Source-Revision: b870aa90878acf97074fa55260beb8acfd125f22
2016-02-12 01:15:58 +05:00
Josh Matthews
591304b185 servo: Merge #8491 - Compile raw inline event handlers lazily. Resolves #8489 (from jdm:lazycompile); r=Ms2ger
Per https://html.spec.whatwg.org/multipage/webappapis.html#getting-the-current-value-of-the-event-handler and https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-attributes:event-handlers-2 .

Source-Repo: https://github.com/servo/servo
Source-Revision: 5942e9e3cb2fb588eb82198fd5548a42303a559f
2016-02-11 19:45:11 +05:00
Brandon Fairchild
31a3354b10 servo: Merge #9602 - Use JS_GetOwnPropertyDescriptorById in BrowserContext (fixes #6984) (from servo:bc-prop); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 3703e6d4f644ca97d1f5e012ce8edd8cfaa2c407
2016-02-11 17:52:59 +05:00
Josh Matthews
ab2b9e2470 servo: Merge #6677 - Make iframes block the enclosing document's load event (from jdm:iframeblockonload); r=Ms2ger
It occurs to me as I write this that this doesn't handle the case of removing the iframe from the document before it's finished loading. Consider this an early feedback release!

Source-Repo: https://github.com/servo/servo
Source-Revision: a31f31e81977be5215f31851885e8ab46890c556
2016-02-10 19:20:29 +05:00
Ms2ger
ac35fa25e2 servo: Merge #9590 - Update dlib (from Ms2ger:dlib); r=KiChjang
Source-Repo: https://github.com/servo/servo
Source-Revision: fc3f93235e9264a6379e370b635ae8a98e41a1be
2016-02-10 14:09:31 +05:00
Nikki
1d928dfbfb servo: Merge #9525 - Test filtered responses and implement Cors Check Fetch step (from nikkisquared:test_filtered_responses); r=asajeffrey
I've been writing tests for creating filtered responses. So far I have three of the four types being made (namely, Basic, CORS, and Opaque), and just need to figure out how to make an OpaqueRedirect filtered response, since it's handled separately from the others. I will also add more tests to ensure the content of the filtered responses matches the limitations placed by the specification.

Along the way I implemented Cors Check, since it's required for the CORS filtered response. @jdm suggested I handle it in here, since it's such a small step, compared to other parts of Fetch.

Since all the tests currently pass, and I've spent a while adding the Cors Check and other pieces, I figured now would be a good time to start having it reviewed.

Source-Repo: https://github.com/servo/servo
Source-Revision: f1018b84a838ec8505f6a0bcb6e13286ce80a95c
2016-02-10 02:41:22 +05:00
Tim van der Meij
969449c2ec servo: Merge #9565 - Remove dead function Overflow::union_rect (from timvandermeij:dead-function); r=jdm
Fixes #9556.

This makes Servo compile with one warning less.

Source-Repo: https://github.com/servo/servo
Source-Revision: cb8be1434f61e6bfe4639d42b1422329b0451a47
2016-02-10 01:50:54 +05:00
Ms2ger
cabf837890 servo: Merge #9584 - Give WindowProxy objects an innerObject hook (from Ms2ger:WindowProxy); r=jdm
This ensures that UncheckedUnwrap(obj, /* stopAtOuter = */ true) will indeed
stop at the WindowProxy ("outer window", in older SpiderMonkey jargon), which
is necessary to prevent raw Window ("inner window") objects becoming visible
to JavaScript code, or tripping assertions that we don't do that.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2d1293d54d58e6aa72312edd53aac4e9af5892b6
2016-02-09 21:12:23 +05:00
Ms2ger
930c3dca25 servo: Merge #9581 - Stop importing XMLHttpRequestResponseType variants (from Ms2ger:xhr-enum); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: b9ec889c44f29bffe4a914afe630835853babeaa
2016-02-09 14:18:58 +05:00
Paul Rouget
5633e74066 servo: Merge #9244 - mozbrowsersecuritychange event (from paulrouget:securitychange); r=jdm
Fixes #8544

No test yet. Is there a way to mock a https connection?

Also, I wish I could use the `HTTPSState` enum instead of a `String` when calling `trigger_mozbrowser_event` (https://github.com/servo/servo/compare/master...paulrouget:securitychange?expand=1#diff-30a18e04d7e0b66aafdf192e416cad44R306) but that would require `constellation_msg.rs` to know about `HTTPSState`, which is defined in `document.rs`, which would add a dependency to `components/msg`. I could define `HTTPSState` somewhere else maybe? Or maybe it's fine to use a `String`. But then, should I use the HTTPSState strings (`"modern/deprecated/none"`) or the mozbrowser strings (`"secure/insecure/broken"`) (as it is now)

Source-Repo: https://github.com/servo/servo
Source-Revision: 3d63f09361afa80b9d5c4f6b192c9bd8936094b7
2016-02-09 12:30:29 +05:00
Michael Wu
cd8f20b763 servo: Merge #9577 - Update html5ever to 0.5.0 (from michaelwu:h5e-update); r=Manishearth
r? @Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 93cad4afd33ee59df1a0328ac41b8cebd657ec7b
2016-02-09 10:38:27 +05:00
Ms2ger
9cb9f27dde servo: Merge #9571 - Remove the global argument to EventTarget::{fire_event, fire_simple_event} (from Ms2ger:fire); r=asajeffrey
Source-Repo: https://github.com/servo/servo
Source-Revision: 0124d90a6d1fb17a986b06825f8b3d2af0055144
2016-02-09 04:38:00 +05:00
Alexander Lopatin
cc7eaf2638 servo: Merge #9543 - Fix #9508: Beautify our union enums constructors (from alopatindev:enums_constructors_codingstyle_fix); r=KiChjang
Solves #9508
@jdm Please review. Thanks!

Source-Repo: https://github.com/servo/servo
Source-Revision: 28ecb0bba3fa395ed56bb2448a21e02c3ff88c8b
2016-02-07 05:29:57 +05:00
Tim van der Meij
03dc8b6298 servo: Merge #9562 - Make step 3 of XHR's SetResponseType method match the specification (from timvandermeij:setresponsetype-spec); r=KiChjang
Fixes #9552.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2f52a168caa28fcbdcd84e31f093a866ac12955e
2016-02-07 02:45:31 +05:00
Tim van der Meij
b03c496cda servo: Merge #9542 - Update immeta dependency to resolve ImageCacheThread panic (from timvandermeij:immeta); r=jdm
Fixes #9501.

Before this patch, a website such as http://www.universiteitleiden.nl would consistently crash Servo. After this patch, the website loads just fine.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3498deca39309fe919be203aad9a5f2c0cc6f098
2016-02-06 03:32:47 +05:00
peterkort
1702383f30 servo: Merge #9471 - fix #8461 (from peterkort:patch-1); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 5505bf1de50bb0b19c393739d29dadd2b2079171
2016-02-06 02:21:21 +05:00
Ms2ger
94abe85b6c servo: Merge #9554 - Remove some unused dependencies from the util crate (from Ms2ger:util-deps); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 289232ef61ee928014f5c88fcaff4187865769e8
2016-02-06 00:27:35 +05:00
Anthony Ramine
e79681df8d servo: Merge #9537 - Remove the casing plugin (from nox:rm-casing-plugin); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 3701edbf2b8be80ec5be08dd4392845fa2fb5cab
2016-02-05 17:58:57 +05:00
Anthony Ramine
8f36edef2e servo: Merge #9538 - Specify android_glue version in android_glue/Cargo.toml (from nox:android-glue-version); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 8327ab86e002712c603d56ddaadaccddf2290b3b
2016-02-05 12:12:03 +05:00
Patrick Walton
ff81f6ae4e servo: Merge #9522 - layout: Separate out overflow-for-scrolling from overflow-for-paint (from pcwalton:two-overflows); r=mbrubeck
Closes #9484.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: fb3fe3d784c24cdfd8040af0282e5c2182ee2051
2016-02-05 10:28:50 +05:00