Commit graph

605 commits

Author SHA1 Message Date
bors-servo
be9dfb2786 Auto merge of #11209 - evrimoztamur:patch-1, r=Ms2ger
Remove misleading nonexistant flag hint

`./mach build -d` does not report any errors.
`./mach test-tidy --faster` does not report any errors.
The change fixes #11197.

The change does not require tests because it is a small change that doesn't change any core functionality.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11209)
<!-- Reviewable:end -->
2016-05-19 06:34:10 -07:00
Ms2ger
6ad7f3cd91 Remove unnecessary bounds on arc_ptr_eq. 2016-05-17 23:17:52 -07:00
Matt Brubeck
aa8e214e34 Use num_traits in util 2016-05-17 17:05:18 -07:00
Anthony Ramine
b9cda99ca5 Update internal crates to bitflags 0.7 2016-05-17 23:34:04 +02:00
Anthony Ramine
d580226a9c Reorder dependencies in many Cargo.toml files 2016-05-17 23:34:02 +02:00
Evrim Öztamur
b9d3310d00 Remove misleading nonexistant flag hint 2016-05-16 21:27:15 +02:00
Matt Brubeck
dc6be7bba5 Remove unnecessary clone in LRUCache::touch 2016-05-13 18:20:59 -07:00
Matt Brubeck
d2717c4475 Eliminate unneeded clones in find_or_create
...and use it to eliminate duplicate hash lookups and string copies in shape_text.
2016-05-13 18:20:25 -07:00
bors-servo
695a2559a8 Auto merge of #11132 - mbrubeck:workqueue-panic, r=larsbergstrom
Fix integer overflow in next_power_of_two

This causes a panic (debug) or incorrect results (release) when initializing a work queue with thread_count = 1.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11132)
<!-- Reviewable:end -->
2016-05-12 00:35:05 -07:00
Rohit Zambre
ca3084d241 added infrastructure to handle interval and CSV time profiling alongside html-timeline-profiling 2016-05-11 11:27:07 -07:00
Matt Brubeck
56e927a9e4 Fix integer overflow in next_power_of_two 2016-05-11 09:06:26 -07:00
Matt Brubeck
a2b0585ffd Update lazy_static, selectors, string_cache, futf, quickersort 2016-05-02 16:05:31 -07:00
Matt Brubeck
1e23d90631 Upgrade to bitflags 0.6.0 and selectors 0.5.6
Types generated by `bitflags!` are now private by default.  This PR marks them
`pub` where necessary.
2016-04-30 10:14:03 -07:00
bors-servo
cf121ad8df Auto merge of #10895 - mbrubeck:byteindex, r=pcwalton
Use byte indices instead of char indices for text runs

Replace character indices with UTF-8 byte offsets throughout all code dealing with text runs.  This eliminates a lot of complexity when converting from one to the other, and interoperates better with the rest of the Rust ecosystem.

For most code this is just a simple replacement of char indices with byte indices.  In a few places like glyph storage and text fragment scanning, it also lets us get rid of code that existed only to map between bytes and chars.

Also includes some related fixes to text shaping, discovered while working on this conversion.  See the commit messages for details.

r? @pcwalton

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10895)
<!-- Reviewable:end -->
2016-04-28 20:22:09 -07:00
Matt Brubeck
659305fe0a Use byte indices instead of char indices for text runs
Replace character indices with UTF-8 byte offsets throughout the code dealing
with text shaping and breaking.  This eliminates a lot of complexity when
converting from one to the other, and interoperates better with the rest of
the Rust ecosystem.
2016-04-28 14:32:14 -07:00
Nick Fitzgerald
9fbb5c720e Add a method for dumping self-contained HTML timeline profiles
This commit adds the `--profiler-trace-path` flag. When combined with `-p` to
enable profiling, it dumps a profile as a self-contained HTML file to the given
path. The profile visualizes the traced operations as a gant-chart style
timeline.
2016-04-27 18:35:17 -07:00
bors-servo
2729864af7 Auto merge of #10857 - servo:toml, r=nox
Simplify TOML syntax

* Sections like `[dependencies.foo]` can be entries in a `[dependencies]` section with the `{key = value}` syntax.
* Per-target dependencies can be expressed with more general `cfg(…)` conditions instead of exact target triples: https://github.com/rust-lang/cargo/pull/2328

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10857)
<!-- Reviewable:end -->
2016-04-26 15:46:37 -07:00
Simon Sapin
83b3ebf6ac Simplify TOML syntax
* Sections like `[dependencies.foo]` can be entries in a `[dependencies]`
  section with the `{key = value}` syntax.
* Per-target dependencies can be expressed with more general `cfg(…)`
  conditions instead of exact target triples:
  https://github.com/rust-lang/cargo/pull/2328
2016-04-26 23:51:36 +02:00
bors-servo
caba731da1 Auto merge of #10847 - servo:rustup-20160424, r=nox
Update rustc.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10847)
<!-- Reviewable:end -->
2016-04-26 14:41:54 -07:00
bors-servo
f773dc182b Auto merge of #10824 - asajeffrey:communicate-backtrace-on-panic, r=Manishearth
Communicate a backtrace to the constellation when panicking.

Send a representation of the backtrace from a pipeline thread to the constellation in the case of panic. This is the next step in communicating the backtrace to the browser chrome (#10334).

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10824)
<!-- Reviewable:end -->
2016-04-26 13:17:33 -07:00
Alan Jeffrey
9153333f62 Communicate a backtrace to the constellation when panicking. 2016-04-26 11:31:36 -05:00
Ms2ger
40fdf450c8 Update rustc. 2016-04-26 09:52:09 +02:00
Keith Yeung
48b2e9c055 Add parsing of double values in style attributes 2016-04-25 01:09:30 -04:00
Simon Sapin
7932ab6ac2 Upgrade to rust-url 1.0 and hyper 0.9 2016-04-23 20:27:58 +02:00
bors-servo
0a3a50a129 Auto merge of #10706 - zwn:unused-extern-crates, r=nox
Turn on unused-extern-crates warning.

As discussed in #9256. It should solve second half of the issue.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10706)
<!-- Reviewable:end -->
2016-04-22 13:40:38 -07:00
Zbynek Winkler
41c293293b Remove references to unused crates.
The cleanup is based on info from using "-W unused-extern-crates".
2016-04-22 22:20:06 +02:00
Zbynek Winkler
b021874ba0 Silence unused-extern-crates false positives.
Added #[allow(unused_extern_crates)] to silence false positives

 * bitflags, lazy_static and matches because macro_use
 * alloc_jemalloc because builtin crate

See https://github.com/rust-lang/rust/issues/30849
2016-04-22 22:20:05 +02:00
zakorgyula
95bebb9945 Remove extra definition of WHITESPACE under components/util/str.rs 2016-04-20 10:40:57 +02:00
Alan Jeffrey
cfb066ef20 Added a dedicated panic channel. 2016-04-19 09:08:44 -05:00
Corey Farwell
c37ab1facd Make read_resource_file param simpler and more idiomatic.
`<P: AsRef<Path>>` is also what `File::open` uses as a generic type for
the parameter.
2016-04-16 23:06:59 -04:00
Manish Goregaokar
f02fd6330f
Remove watcher threads; replace with more panic handler goodness 2016-04-15 01:52:33 +05:30
Alan Jeffrey
941093d983 Make add_panic_object in thread.rs borrow rather than own the object. 2016-04-14 10:24:20 -05:00
bors-servo
2b910678db Auto merge of #10587 - asajeffrey:add-failure-panic-message, r=Manishearth
Added panic message to failures.

Added the panic message to failures. This is a step towards #10334, since it gives us access to the panic error message when we fire a `mozbrowsererror` event. The remaining steps are also to record the backtrace, and to report the failure in the event.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10587)
<!-- Reviewable:end -->
2016-04-14 19:55:17 +05:30
Simon Sapin
6889f37d9e Remove the url! plugin.
In rust-url 1.0 the `Url` struct is going to have private fields, and there
is no way to to create an aribitrary one without going through the parser.

The plugin never had a clear demonstrated performance benefit,
it was made mostly because it was possible and relatively easy at the time.
2016-04-14 15:35:28 +02:00
Alan Jeffrey
8c0fa01884 Added panic message to failures. 2016-04-13 16:09:48 -05:00
Ulf Nilsson
d433fb01ed Share prefs to content processes
Without this `./mach run -b -- -M` would start fine but navigating to a site would fail with:

`thread 'ScriptThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }' panicked at 'assertion failed: mozbrowser_enabled()', /Users/ulf/Documents/Code/servo/components/script/dom/htmliframeelement.rs:163`
2016-04-12 09:26:30 +02:00
Arnaud Marant
9b8f183cba Issue #10491 add HTMLInputElement attributes that reflect content identically
it uses a new version of string-cache https://github.com/servo/string-cache/pull/148
2016-04-12 00:15:57 +02:00
bors-servo
bc2237ea2b Auto merge of #10445 - metajack:enable-asmjs, r=jdm
Use better JS engine defaults

This adds in preferences for all the SM 39 available options (as
retrieved from Gecko), and uses the same defaults as Gecko. A few
properties are not supported yet, and incremental GC is still always
disabled regardless of the preference setting.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10445)
<!-- Reviewable:end -->
2016-04-12 02:37:05 +05:30
Ulf Nilsson
b631202e66 Fix sandboxing on OS X
The main issue was resources_dir_path. Every time it was called it would start from the executable's path and walk up the hierarchy to find a directory named "resources". The sandbox was granted permission to read from the found resources dir, but after the sandbox had been activated resources_dir_path would again start from the executable's path and try to find the resources dir. It would then fail with "Operation not permitted" when trying to canonicalize the path because it didn't have permissions to read metadata under ./target.

To fix this the resources dir path is now cached between resources_dir_path calls.
2016-04-09 11:32:50 +02:00
Jack Moffitt
1bec193415 Use better JS engine defaults
This adds in preferences for all the SM 39 available options (as
retrieved from Gecko), and uses the same defaults as Gecko. A few
properties are not supported yet, and incremental GC is still always
disabled regardless of the preference setting.

This also adds back in the options that were accidentally deleted when
\#10342 was rebased, which moved things from script_thread.rs to
script_runtime.rs.
2016-04-08 08:46:22 -06:00
UK992
7896a05543 Rename handler to hook 2016-04-08 13:10:30 +02:00
Manish Goregaokar
efa84862af
Remove str_to_string lint
Specialization makes all of the options equally efficient.
2016-04-08 06:44:57 +05:30
bors-servo
1a6245828a Auto merge of #10420 - asajeffrey:add-soft-fail-option, r=KiChjang
Added --soft-fail option.

At the moment, wptrunner always runs the WPT tests with `servo --hard-fail`. To test hardening, we need to switch off `--hard-fail`. This PR introduces a `--soft-fail` option to do that.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10420)
<!-- Reviewable:end -->
2016-04-07 10:48:10 +05:30
Ms2ger
c34578ca16 Remove some unused dependencies from util. 2016-04-06 11:15:57 +02:00
bors-servo
05a4dcdc3b Auto merge of #10329 - Manishearth:skip-backtrace, r=asajeffrey
Skip printing the backtrace for RecvError/SendError

We currently get tons of useless backtraces clogging up the output when we have a panic cascade. This adds a handler that outputs a single line when a thread panics due to a sender or receiver hanging up, since this is almost always due to a panic cascade.

We could add a commandline arg that gets us back the old behavior, though I'm not sure if this is necessary.

r? @asajeffrey

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10329)
<!-- Reviewable:end -->
2016-04-05 13:02:01 +05:30
Manish Goregaokar
a2c82a03ba Add option for printing full backtraces 2016-04-05 06:23:17 +05:30
Alan Jeffrey
8cc04913f7 Added --soft-fail option. 2016-04-04 19:23:06 -05:00
bors-servo
f6c2924936 Auto merge of #10360 - mbrubeck:die-opt, r=emilio
Remove unused -Z dump-display-list-optimized flag

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10360)
<!-- Reviewable:end -->
2016-04-03 18:35:01 +05:30
bors-servo
ea24389b85 Auto merge of #10114 - matthewbentley:master, r=Manishearth
Load prefs.json from profile-dir if --profile-dir is specified at launch

In response to #10098
Tries to load `prefs.json` from the profile-dir and merge them into the preferences if `--profile-dir` is specified at launch.  The profile-dir preferences take precedence over the default preferences, but command line preferences still take precedence over everything.

Also adds some tests for `prefs.rs`.  These rely on the contents of `resources/prefs.json` (at least `test_get_set_reset_extend()` does), so they may need to be re-worked a bit.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10114)
<!-- Reviewable:end -->
2016-04-02 08:33:42 +05:30
Matt Brubeck
9e66aa5465 Remove unused -Z dump-display-list-optimized flag 2016-04-01 19:47:12 -07:00