Commit graph

7383 commits

Author SHA1 Message Date
Josh Matthews
13fe502cd6 Don't abort the sniffer task whenever an error occurs. Also, switch to blocking recv_opt vs. non-blocking try_recv. 2014-11-29 00:40:03 -05:00
bors-servo
1ac79c64da auto merge of #4000 : t29/servo/mime-sniffing, r=jdm
Issue: #3144

This PR addresses the second step of the ticket. i.e. move from a 1:1 sniffer:request task model to a shared sniffer task.
2014-11-28 10:51:44 -07:00
Kshitij Parajuli
f5e9ae17cf Shared Sniffer Task
- Added TargetedLoadResponse and ResponseSenders
- LoadData constructor contains the next consumer which means
  SnifferManager doesn't need the next consumer to start
- New SnifferTask is created at new resource_task creation
- Update Unit Tests
2014-11-28 12:35:49 -05:00
bors-servo
2d904f7080 auto merge of #4132 : jtuchsen/servo/issue-4131, r=jdm
A slight refactor.
2014-11-28 10:27:43 -07:00
bors-servo
82050d1e53 auto merge of #4130 : saneyuki/servo/cast, r=Manishearth
Fix #4124

This also introduce `BarCast::from_actual()` which is used for up-cast for dom's actual data types (non JS pointer values).
2014-11-28 09:24:44 -07:00
bors-servo
fafd3fd8ba auto merge of #4135 : murphm8/servo/mach_doc, r=SimonSapin
This should fix  #4134
2014-11-28 08:54:45 -07:00
Matt Murphy
b4171b41e1 Remove default value for params in mach doc #4134 2014-11-28 08:57:07 -06:00
bors-servo
12ae541302 auto merge of #4129 : aakashjain/servo/HTMLElement#hidden, r=Manishearth 2014-11-28 05:33:48 -07:00
aakashjain
5a30bd00cb Implemented hidden, removed corresponding passed tests 2014-11-28 17:39:30 +05:30
bors-servo
02c2f53ccd auto merge of #4102 : pcwalton/servo/cef-autogeneration, r=larsbergstrom
This replaces hand-implemented CEF bindings with proper Rust wrappers
automatically generated from the C++ headers. This means that, whenever
CEF's C++ headers change, we can easily generate both the appropriate C
API and the appropriate Rust API. It eliminates much of the hand-written
unsafe code within the CEF port, because the CEF translator tool now
knows how to generate Rust smart pointer wrappers for each class that
corrently perform reference counting.

Additionally, this commit adds utility macros (located in `macros.rs`)
that make it easier to correctly expose Rust objects as CEF objects.
They handle the marshaling of objects between Rust and CEF properly.
The net result of this is that you can write mostly-natural-looking Rust
in the CEF port and interact with it with a natural-looking C++ API on
the embedding side.

This setup relies on the branch of CEF located here:

    https://github.com/pcwalton/chromium-embedded-framework

To regenerate, follow the instructions in `ports/cef/README.md`. For
convenience, and because I don't anticipate the API to change much, I
have vendored in all of the appropriate interfaces.

r? @zmike or @larsbergstrom
2014-11-27 23:18:44 -07:00
Jesse Tuchsen
db885f04ee Fixes #4131
A slight refactor.
2014-11-27 15:16:09 -08:00
Tetsuharu OHZEKI
1305ac4dd0 Remove Element.node(). 2014-11-28 06:05:45 +09:00
Tetsuharu OHZEKI
d53ce7f8d2 Remove Node.eventtarget(). 2014-11-28 06:02:21 +09:00
Tetsuharu OHZEKI
106b7a3924 Remove HTMLElement.element(). 2014-11-28 06:02:03 +09:00
Tetsuharu OHZEKI
2502c692f3 Remove UIEvent.event(). 2014-11-28 06:01:43 +09:00
Tetsuharu OHZEKI
3681628936 Make callers of ${Derived}::${base}() use casts instead. 2014-11-28 06:00:23 +09:00
bors-servo
b56bab4e40 auto merge of #4128 : jtuchsen/servo/issue-3962, r=jdm
Bad HTTP responses now have a 0 status code instead of 200 OK.
2014-11-27 13:42:41 -07:00
Jesse Tuchsen
b664ee88e7 Fixes #3962
Bad HTTP responses now have a 0 status code instead of 200 OK.
2014-11-27 11:55:31 -08:00
Patrick Walton
c52f550367 Update to get the reference counting correct 2014-11-27 10:31:32 -06:00
Patrick Walton
1ac5bfe830 Add mostly-correct (albeit leaky) string marshaling 2014-11-27 10:31:32 -06:00
Patrick Walton
14ef53cf57 Add back API hashes 2014-11-27 10:31:32 -06:00
Jack Moffitt
e4362dad73 Fixes for Linux. 2014-11-27 10:31:32 -06:00
Patrick Walton
3bf779cd21 ports/cef: Use the CEF translator tool to generate the full set of CEF
bindings.

This replaces hand-implemented CEF bindings with proper Rust wrappers
automatically generated from the C++ headers. This means that, whenever
CEF's C++ headers change, we can easily generate both the appropriate C
API and the appropriate Rust API. It eliminates much of the hand-written
unsafe code within the CEF port, because the CEF translator tool now
knows how to generate Rust smart pointer wrappers for each class that
corrently perform reference counting.

Additionally, this commit adds utility macros (located in `macros.rs`)
that make it easier to correctly expose Rust objects as CEF objects.
They handle the marshaling of objects between Rust and CEF properly.
The net result of this is that you can write mostly-natural-looking Rust
in the CEF port and interact with it with a natural-looking C++ API on
the embedding side.

This setup relies on the branch of CEF located here:

    https://github.com/pcwalton/chromium-embedded-framework

To regenerate, follow the instructions in `ports/cef/README.md`. For
convenience, and because I don't anticipate the API to change much, I
have vendored in all of the appropriate interfaces.
2014-11-27 10:31:32 -06:00
bors-servo
431644bfc8 auto merge of #4114 : glennw/servo/table-layout-fix, r=pcwalton 2014-11-26 18:39:38 -07:00
bors-servo
184a3346ab auto merge of #4113 : payload/servo/issue-4110, r=jdm
The attribute `value` and the underlying model `TextInput` are not connected to each other, so I just pulled the value out of `TextInput`.
2014-11-26 16:15:38 -07:00
Glenn Watson
59cdce3001 Fix layout on google search results. 2014-11-27 09:10:58 +10:00
Gilbert Röhrbein
b3f9c8667c fixes #4110, can input text without 'value' attribute present 2014-11-26 23:39:10 +01:00
bors-servo
b5d6864de1 auto merge of #4099 : SimonSapin/servo/cargo-config, r=mbrubeck
This allows using `.cargo/config` at the root of the repository for local path override, without risk of accidentally committing it.

However I don’t have the environment to test the Android build. Would this break it?
2014-11-25 10:01:32 -07:00
bors-servo
7b72ffcbaf auto merge of #4097 : orteipid/servo/fix_deprecation, r=SimonSapin
selector_matching.rs:1263:44: 1263:63 warning: use of deprecated item: Renamed to `get`, #[warn(deprecated)] on by default
    selector_matching.rs:1263         assert_eq!(1, selector_map.id_hash.find(&atom!("top")).unwrap()[0].declarations.source_order);
                                                                         ^~~~~~~~~~~~~~~~~~~
    selector_matching.rs:1265:47: 1265:79 warning: use of deprecated item: Renamed to `get`, #[warn(deprecated)] on by default
    selector_matching.rs:1265         assert_eq!(0, selector_map.class_hash.find(&Atom::from_slice("intro")).unwrap()[0].declarations.source_order);
                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    selector_matching.rs:1266:41: 1266:71 warning: use of deprecated item: Renamed to `get`, #[warn(deprecated)] on by default
    selector_matching.rs:1266         assert!(selector_map.class_hash.find(&Atom::from_slice("foo")).is_none());
                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The 'find' function was changed to 'get'. Updated to remove this warning given when running the tests.
2014-11-25 08:15:49 -07:00
Simon Sapin
99e8358305 Add .cargo/config to .gitignore, move content to ports/android
This allows using .cargo/config at the root of the repository
for local path override, without risk of accidentally committing it.
2014-11-25 15:04:01 +00:00
bors-servo
62edb842c7 auto merge of #4096 : servo/servo/websocket, r=Ms2ger
Closes #3813.
2014-11-25 07:45:42 -07:00
Paul DiPietro
adcf194bf7 Fix deprecation in selector matching test
The 'find' function was changed to 'get'. Changed to reflect this
warning given when running the tests.
2014-11-25 09:45:00 -05:00
Hinali Marfatia
b1d6041420 Implement a basic WebSocket interface. 2014-11-25 15:43:22 +01:00
bors-servo
10f8fe0067 auto merge of #4090 : mttr/servo/mach_infer_test, r=jdm
Fixes #4086

Lets `./mach test` take a file or directory as an argument, and infers `test-content`, `test-wpt`, or `test-ref` from the file's path. 

Usage Example:
```
$ ./mach test tests/wpt/web-platform-tests/dom/interfaces.html
 0:00.27 LOG: MainThread INFO Using 1 client processes
 ...
```
Note that while there is no functionality for `test-ref` to accept individual files, `./mach test tests/ref` will still trigger `test-ref`.

Passing arguments properly through python would have been ugly (though maybe there are some mach internals I could have taken advantage of), so this instead runs a new mach process and lets the individual test suites manage their arguments like normal.
2014-11-24 13:42:39 -07:00
Matthew Rasmus
8f4f6407d4 Lets ./mach test infer testsuite from file
Usage Example:
```
$ ./mach test tests/wpt/web-platform-tests/dom/interfaces.html
 0:00.27 LOG: MainThread INFO Using 1 client processes
 ...
```

Note that while there is no functionality for `test-ref` to accept
individual files, `./mach test tests/ref` will still trigger `test-ref`.
2014-11-24 12:01:21 -08:00
bors-servo
51aa2fde10 auto merge of #4084 : Ms2ger/servo/tokenlist-robust, r=jdm
Previously, if the attribute was not parsed into a token list, and the
tokens() method returned None, DOMTokenList#contains would silently return
false. This issue was encountered in
<https://github.com/servo/servo/pull/4076> and took quite some time to
figure out.
2014-11-24 10:39:35 -07:00
bors-servo
989efd5a28 auto merge of #4083 : mttr/servo/mach_debugger_flag, r=mbrubeck
Borrows two python modules from mozilla-central to give mach the ability to detect and pass arguments to a system's preferred debugger, and adds `--debug` and `--debugger` flags to `./mach run`. This works almost like the functionality described [here](https://developer.mozilla.org/en-US/docs/Debugging_Mozilla_with_gdb), but at the moment it lacks a `--debugparams`  argument.

Links to borrowed files:
http://hg.mozilla.org/mozilla-central/file/c9cfa9b91dea/testing/mozbase/mozinfo/mozinfo/mozinfo.py
http://hg.mozilla.org/mozilla-central/file/c9cfa9b91dea/testing/mozbase/mozdebug/mozdebug/mozdebug.py
2014-11-24 10:15:46 -07:00
Ms2ger
449aaec5c2 Panic if DOMTokenList#contains is called for an unparsed attribute.
Previously, if the attribute was not parsed into a token list, and the
tokens() method returned None, DOMTokenList#contains would silently return
false. This issue was encountered in
<https://github.com/servo/servo/pull/4076> and took quite some time to
figure out.
2014-11-24 11:11:05 +01:00
bors-servo
6e19955129 auto merge of #4081 : achals/servo/master, r=jdm
https://github.com/servo/servo/issues/3994
2014-11-24 02:03:34 -07:00
Achal Shah
23ed1f705b Implement HTML{Anchor,Area,Link}Element.relList.
https://github.com/servo/servo/issues/3994
2014-11-23 23:37:13 -08:00
Matthew Rasmus
c0eca8f4c0 Adds --debug and --debugger flags to ./mach run 2014-11-23 23:36:32 -08:00
Matthew Rasmus
f0d5083557 mozilla-central modules for debugger detection
Borrows two python modules from mozilla-central to give mach the ability
to detect and pass arguments to a system's preferred debugger.

Links to borrowed files:
http://hg.mozilla.org/mozilla-central/file/c9cfa9b91dea/testing/mozbase/mozinfo/mozinfo/mozinfo.py
http://hg.mozilla.org/mozilla-central/file/c9cfa9b91dea/testing/mozbase/mozdebug/mozdebug/mozdebug.py
2014-11-23 23:21:28 -08:00
bors-servo
4a257bc271 auto merge of #4080 : mttr/servo/mach_update, r=jdm
Updates the way mach mixes unrecognized arguments and predefined arguments (see [mozilla bug 1076649](https://bugzilla.mozilla.org/show_bug.cgi?id=1076649) for details on this change), and also adds support for argument groupings (see [1077272](https://bugzilla.mozilla.org/show_bug.cgi?id=1077272)).

I was running into some annoyances when trying to implement a change that would allow a `--debug` flag to be used in `./mach run` for running Servo through a debugger (basically, the same behavior described under "How do I run Mozilla under gdb?" [here](https://developer.mozilla.org/en-US/docs/Debugging_Mozilla_with_gdb)). This change should make those annoyances go away, and as far as I can tell, it doesn't have an impact on the way any of the existing commands are used.
2014-11-23 22:48:32 -07:00
bors-servo
65350bb225 auto merge of #4070 : kparaju/servo/master-mime-sniffer-failing-4046, r=jdm
Fixes #4046

I tested it by:

    ./mach test-wpt --include=XMLHttpRequest > old.log
    # make code changes
    ./mach test-wpt --include=XMLHttpRequest > new.log
    grep panic old.log # SnifferManager panics
    grep panic new.log # No SnifferManager panics
2014-11-23 22:24:34 -07:00
bors-servo
60dfb65ab2 auto merge of #4068 : Manishearth/servo/atomify, r=jdm 2014-11-23 22:00:40 -07:00
bors-servo
90007ee781 auto merge of #4064 : trevorriles/servo/isintervalenum, r=jdm
Created an `IsInterval` enum to improve readability and remove the need for `true // is_interval`

I'm still fairly new to rust. I briefly looked for a way to implement boolean comparisons of the enum but didn't figure out a way. 

Also I'm not attached to any of the names. Let me know what I can fix :)
2014-11-23 21:36:37 -07:00
Matthew Rasmus
8cb7a6842f Remove allow_all_args from mach commands 2014-11-23 16:45:40 -08:00
Matthew Rasmus
850da49846 Update mach to latest changes from mozilla-central
Updates the way mach mixes unrecognized arguments and predefined
arguments (see [mozilla bug
1076649](https://bugzilla.mozilla.org/show_bug.cgi?id=1076649) for
details on this change).
2014-11-23 16:29:29 -08:00
bors-servo
a1a268ce1d auto merge of #4077 : mttr/servo/mach_build_cef_release, r=kmcallister
Requested by kmc in IRC.

```
11:36 < kmc> while you're mach-ing about, can you modify build-cef to
accept --release like build does?
```
2014-11-23 12:57:36 -07:00
Matthew Rasmus
d300469bbd Adds --release flag to ./mach build-cef
Requested by kmc in IRC.

```
11:36 < kmc> while you're mach-ing about, can you modify build-cef to
accept --release like build does?
```
2014-11-23 11:44:53 -08:00