add a new command line flag --profile-dir [path]
add a new command line flag --profile-dir [path] that stores an optional directory path in the Opts struct in opts.rs, creating the directory if it does not exist.
For the Implement HTTP authorization UI and persistent sessions student project.
<!-- 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/10087)
<!-- Reviewable:end -->
Optimize flat display lists
Flat display lists were a 2x regression on the spheres demo. This patch series fixes that.
See the individual commits for more details.
r? @mrobinson
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9843)
<!-- Reviewable:end -->
Instead of producing a tree of stacking contexts, display list
generation now produces a flat list of display items and a tree of
stacking contexts. This will eventually allow display list construction
to produce and modify WebRender vertex buffers directly, removing the
overhead of display list conversion. This change also moves
layerization of the display list to the paint thread, since it isn't
currently useful for WebRender.
To accomplish this, display list generation now takes three passes of
the flow tree:
1. Calculation of absolute positions.
2. Collection of a tree of stacking contexts.
3. Creation of a list of display items.
After collection of display items, they are sorted based upon the index
of their parent stacking contexts and their position in CSS 2.1
Appendeix E stacking order.
This is a big change, but it actually simplifies display list generation.
Remove parallel display list construction
Parallel display list construction hasn't been shown to give any
performance gains. It is also incompatible with the current flat display
list implementation. Once flat display lists have landed, we can explore
possible benefits of parallel construction once again.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9706)
<!-- Reviewable:end -->
Parallel display list construction hasn't been shown to give any
performance gains. It is also incompatible with the current flat display
list implementation. Once flat display lists have landed, we can explore
possible benefits of parallel construction once again.
Add WebRender integration to Servo.
WebRender is an experimental GPU accelerated rendering backend for Servo.
The WebRender backend can be specified by running Servo with the -w option (otherwise the default rendering backend will be used).
WebRender has many bugs, and missing features - but it is usable to browse most websites - please report any WebRender specific rendering bugs you encounter!
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9589)
<!-- Reviewable:end -->
WebRender is an experimental GPU accelerated rendering backend for Servo.
The WebRender backend can be specified by running Servo with the -w option (otherwise the default rendering backend will be used).
WebRender has many bugs, and missing features - but it is usable to browse most websites - please report any WebRender specific rendering bugs you encounter!
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 -->
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