servo/components/util
bors-servo f5e97ef1b5 Auto merge of #7165 - g-k:refactor-debug-options, r=ms2ger
Fail on unrecognized debug option

Refs: https://github.com/servo/servo/issues/7142

Ran some basic functional tests:

```
 $ ./mach run -d -Z bubble-widths,disable-canvas-aa,trace-layout tests/ref/blur_ref.html
 $ ./mach run -d -Z help
Usage: /Users/greg/servo/target/debug/servo debug option,[options,...]
	where options include

Options:
	bubble-widths                       Bubble intrinsic widths separately like other engines.
	disable-text-aa                     Disable antialiasing of rendered text.
	disable-canvas-aa                   Disable antialiasing on the HTML canvas element.
	dump-flow-tree                      Print the flow tree after each layout.
	dump-display-list                   Print the display list after each layout.
	dump-display-list-json              Print the display list in JSON form.
	dump-display-list-optimized         Print optimized display list (at paint time).
	relayout-event                      Print notifications when there is a relayout.
	profile-tasks                       Instrument each task, writing the output to a file.
	show-compositor-borders             Paint borders along layer and tile boundaries.
	show-fragment-borders               Paint borders along fragment boundaries.
	show-parallel-paint                 Overlay tiles with colors showing which thread painted them.
	show-parallel-layout                Mark which thread laid each flow out with colors.
	paint-flashing                      Overlay repainted areas with a random color.
	trace-layout                        Write layout trace to an external file for debugging.
	validate-display-list-geometry      Display an error when display list geometry escapes overflow region.
	disable-share-style-cache           Disable the style sharing cache.
	parallel-display-list-building      Build display lists in parallel.
	replace-surrogates                  Replace unpaires surrogates in DOM strings with U+FFFD. See https://github.com/servo/servo/issues/6564
	gc-profile                          Log GC passes and their durations.

$ ./mach run -d -Z blah
error: unrecognized debug option: blah
Servo exited with return value 1
```

Didn't check that setting debug flags actually did anything.
Haven't written much Rust so this feels more verbose than necessary.
Added `disable-canvas-aa` to debug options help.

Should DebugOptions struct derive Clone like Opts does?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7165)
<!-- Reviewable:end -->
2015-08-13 18:11:57 -06:00
..
deque Fix build warnings. 2015-07-04 14:33:18 +02:00
bezier.rs style: Switch animation timestamps to be doubles instead of floats. 2015-08-01 17:46:39 -07:00
cache.rs Move away from the repeat().take().collect() pattern. 2015-07-14 16:19:30 +02:00
Cargo.toml Measure heap memory usage for more types. Fixes #6951 2015-08-13 21:44:41 +03:00
cursor.rs gfx: Make display lists serializable using serde. 2015-07-15 19:04:17 -07:00
debug_utils.rs Move to new io in util. 2015-03-28 20:02:23 +01:00
geometry.rs Support transforms for display list optimization. Prevents clipping in #6643. 2015-08-05 11:48:07 +10:00
ipc.rs compositing: Use an OptionalIpcSender for communication between the 2015-07-31 08:42:30 -07:00
lib.rs Measure heap memory usage for more types. Fixes #6951 2015-08-13 21:44:41 +03:00
linked_list.rs util: Remove the old broken SerializableLinkedList code in favor of 2015-07-31 08:42:29 -07:00
logical_geometry.rs Basic support for bidirectional text 2015-07-23 20:05:55 -07:00
mem.rs Measure heap memory usage for more types. Fixes #6951 2015-08-13 21:44:41 +03:00
opts.rs Fail on unrecognized debug option 2015-08-13 13:16:45 -04:00
persistent_list.rs Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev. 2015-03-18 13:18:31 -04:00
range.rs gfx: Make display lists serializable using serde. 2015-07-15 19:04:17 -07:00
resource_files.rs Use Cargo's target directory sharing. 2015-06-15 11:48:47 -06:00
str.rs Use local slice_chars 2015-07-31 12:23:13 -06:00
task.rs Fix several hangs / panics during pipeline cleanup of in progress loads. 2015-05-19 16:14:25 +10:00
task_state.rs Move to latest hyper everywhere 2015-06-02 20:12:14 +05:30
taskpool.rs Stop using the deprecated Thunk API. 2015-06-26 22:45:32 +02:00
tid.rs Remove uint/int inside components/util (partial #4745). 2015-02-28 15:03:07 +01:00
vec.rs Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8. 2015-05-05 10:07:34 -04:00
workqueue.rs Require that WorkQueue's QueueData is Sync rather than Send. 2015-07-07 11:11:46 +02:00