Commit graph

4270 commits

Author SHA1 Message Date
bors-servo
13e7de482c Auto merge of #7195 - servo:rustup_20150814, r=Ms2ger
Upgrade Rust to nightly 2015-08-10

Still needs snapshot.

Snapshot probably could also work as today's nightly (I wasn't able to download the latest one due to choppy internet), there isn't any plugins churn I know of

r? @larsbergstrom

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7195)
<!-- Reviewable:end -->
2015-08-14 12:53:54 -06:00
Manish Goregaokar
91bc14711d Upgrade Rust to nightly 2015-08-10 2015-08-15 00:21:33 +05:30
bors-servo
d4d18f51f2 Auto merge of #7215 - Ms2ger:ticks, r=jdm
Use external mutability for FramerateActor::ticks.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7215)
<!-- Reviewable:end -->
2015-08-14 07:16:19 -06:00
Ms2ger
2126301c2d Use external mutability for FramerateActor::ticks. 2015-08-14 14:45:46 +02:00
bors-servo
38c5fb80d3 Auto merge of #7213 - nnethercote:tweak-system-heap-allocated, r=Ms2ger
Tweak how the "system-heap-allocated" memory report is gathered.

To handle potential overflow because mallinfo() is ancient.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7213)
<!-- Reviewable:end -->
2015-08-14 06:41:58 -06:00
Nicholas Nethercote
77fadb7054 Tweak how the "system-heap-allocated" memory report is gathered. 2015-08-14 00:05:17 -07:00
bors-servo
85022a4c34 Auto merge of #7208 - jxs:master, r=Ms2ger
replace .len() == 0 with is_empty()

closes #7198

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7208)
<!-- Reviewable:end -->
2015-08-14 00:51:59 -06:00
bors-servo
a35360aa31 Auto merge of #7119 - fabricedesre:devtools, r=jdm
Tentative fix for  issue #7110



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7119)
<!-- Reviewable:end -->
2015-08-13 21:05:34 -06:00
João Oliveira
9c11781880 replace .len() == 0 with is_empty()
closes #7198
2015-08-14 04:00:33 +01:00
bors-servo
7a9458e530 Auto merge of #7206 - glennw:fix-debug-panic, r=pcwalton
Fix "'PaintWorker' panicked at 'index 0 and/or 4 in `*` do not lie on…

… character boundary" when printing display list.

This whole piece of code seems a bit fragile, but it fixes the immediate problem for now.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7206)
<!-- Reviewable:end -->
2015-08-13 20:07:56 -06:00
Glenn Watson
8218ead707 Fix "'PaintWorker' panicked at 'index 0 and/or 4 in * do not lie on character boundary" when printing display list.
This whole piece of code seems a bit fragile, but it fixes the immediate problem for now.
2015-08-14 11:48:36 +10:00
Fabrice Desré
c7b48240b0 Actor::handle_message should return an enum instad of a boolean #7110 r=jdm 2015-08-13 18:14:34 -07:00
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
Jack Moffitt
c04c413d5a Update skia to get NEON fixes
The other lockfile changes are bustage from previous PRs that didn't
update the other Cargo.locks.
2015-08-13 16:59:31 -06:00
bors-servo
2e1ca10eea Auto merge of #7199 - frewsxcv:codegen-if-let, r=Manishearth
Prefer if..let over if..is_some..unwrap in codegen



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7199)
<!-- Reviewable:end -->
2015-08-13 15:35:21 -06:00
bors-servo
289decb064 Auto merge of #7196 - frewsxcv:double-unsafe, r=jdm
Avoid marking codegen method bodies as unsafe twice

`CGAbstractMethod` takes a couple boolean parameters, among others:

* `extern`: will mark the method as `unsafe` and `extern`
* `unsafe`: will wrap the method body in an `unsafe` block

Passing both as `True` should not mark it as `unsafe` twice.

Example from a generated `HTMLCollectionBinding.rs`:

Before:

```
unsafe extern fn get_length(..) -> u8 {
    unsafe {
        // code here
    }
}
```

After

```
unsafe extern fn get_length(..) -> u8 {
    // code here
}
```

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7196)
<!-- Reviewable:end -->
2015-08-13 15:00:37 -06:00
Corey Farwell
43429abce4 Avoid marking codegen method bodies as unsafe twice
`CGAbstractMethod` takes a couple boolean parameters, among others:

* `extern`: will mark the method as `unsafe` and `extern`
* `unsafe`: will wrap the method body in an `unsafe` block

Passing both as `True` should not mark it as `unsafe` twice.

Example from a generated `HTMLCollectionBinding.rs`:

Before:

```
unsafe extern fn get_length(..) -> u8 {
    unsafe {
        // code here
    }
}
```

After

```
unsafe extern fn get_length(..) -> u8 {
    // code here
}
```
2015-08-13 16:50:17 -04:00
Corey Farwell
7a774a198c Prefer if..let over if..is_some..unwrap in codegen 2015-08-13 16:35:21 -04:00
bors-servo
07716780fc Auto merge of #7192 - Ms2ger:profiler, r=jdm
Implement a ProfilerActor struct.

This is sufficient to make the profiler tab show up in Firefox's devtools.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7192)
<!-- Reviewable:end -->
2015-08-13 14:25:38 -06:00
bors-servo
42d74324e2 Auto merge of #7190 - Ms2ger:node-clone, r=jdm
Correct the default value for Node#cloneNode's deep argument.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7190)
<!-- Reviewable:end -->
2015-08-13 13:51:06 -06:00
bors-servo
a03616f379 Auto merge of #7097 - boghison:memtypes, r=jdm
Measure heap memory usage for more types. Fixes #6951

Also adds HeapSizeOf implementations/derive for some types. I've used "Cannot calculate Heap size" as a reason everywhere, because my imagination is rather limited. If you'd like me to change this message for specific types, please write something like this: "Trusted - Cannot calculate Heap size for Trusted" so that it would be easier for me to replace them through a script :)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7097)
<!-- Reviewable:end -->
2015-08-13 13:16:14 -06:00
Bogdan Cuza
45145108da Measure heap memory usage for more types. Fixes #6951 2015-08-13 21:44:41 +03:00
bors-servo
f3b7c5cb4b Auto merge of #7132 - jdm:docenum, r=ms2ger
Document the use and meaning of the devtools control messages. Fixes …

…#6922.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7132)
<!-- Reviewable:end -->
2015-08-13 12:41:48 -06:00
bors-servo
94c8dcd575 Auto merge of #7181 - pcwalton:input-button-margins, r=mbrubeck
layout: Stop double-counting inline margins on `<input type=button>` and friends.

Improves the Google home page.

r? @mbrubeck

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7181)
<!-- Reviewable:end -->
2015-08-13 11:45:20 -06:00
Josh Matthews
820c74649b Improve documentation for devtools messages a bit more. 2015-08-13 13:44:54 -04:00
Greg Guthe
cf8e2a6f89 Fail on unrecognized debug option
Refs: https://github.com/servo/servo/issues/7142
2015-08-13 13:16:45 -04:00
Patrick Walton
8fe2f8930c layout: Make inline margins on <input type=button> and friends apply
only to the button and not to the text inside.

Improves the Google home page.
2015-08-13 09:51:17 -07:00
Simon Sapin
39ce15f20d Fix Element::set_inline_style_property_priority’s handling of priority
Thanks to mwu for pointing out a copy-paste error.
2015-08-13 17:07:17 +02:00
Ms2ger
c10bf0dcaa Implement a ProfilerActor struct.
This is sufficient to make the profiler tab show up in Firefox's devtools.
2015-08-13 16:58:15 +02:00
bors-servo
7f0e62b6fb Auto merge of #7189 - Ms2ger:unsafe-compositing, r=larsbergstrom
Deny unsafe code in compositing.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7189)
<!-- Reviewable:end -->
2015-08-13 07:14:22 -06:00
Ms2ger
c007b66d97 Correct the default value for Node#cloneNode's deep argument. 2015-08-13 12:12:45 +02:00
bors-servo
9fda72d60f Auto merge of #7187 - Ms2ger:use-any, r=SimonSapin
Use Iterator::any in collect_old_layers.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7187)
<!-- Reviewable:end -->
2015-08-13 02:55:10 -06:00
Ms2ger
1abc7a6dab Deny unsafe code in compositing. 2015-08-13 10:52:29 +02:00
Ms2ger
ee702a7135 Use Iterator::any in collect_old_layers. 2015-08-13 10:02:33 +02:00
Glenn Watson
be8864ae5c Enable item clipping on normal transform layers. Fixes rounded corners on layers with 2d transforms.
Needed for #6643.
2015-08-13 16:03:25 +10:00
bors-servo
8f55af1190 Auto merge of #7183 - glennw:scroll-clipping, r=pcwalton
Add fix / hack for compositor repainting tiles on scroll layers that have stale clipping results.

Needed for #6643. Fixes #7153.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7183)
<!-- Reviewable:end -->
2015-08-12 22:56:01 -06:00
bors-servo
55a9abdf35 Auto merge of #6867 - frewsxcv:match-guard-and-similar, r=jdm
Utilize match guard; make methods more similar

Make the structure for the `stretchiness` and `boldness` methods more
similar

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6867)
<!-- Reviewable:end -->
2015-08-12 22:13:16 -06:00
Glenn Watson
04581660b3 Add fix for compositor repainting tiles on scroll layers that have stale clipping results.
Needed for #6643. Fixes #7153.
2015-08-13 13:53:03 +10:00
Glenn Watson
6506468e19 Ensure compositor layers are collected when removed from layout. 2015-08-13 09:46:58 +10:00
Ms2ger
f62e7be168 Merge the fragment handling into handle_navigate.
This is handled in the 'navigate' algorithm in the specification.
2015-08-12 20:03:18 +02:00
Patrick Walton
8640cf5588 layout: Take relative position offsets for inlines and inline-blocks
into account only once.

There were two bugs here: (1) relative position applied to
scanned/unscanned text fragments independently of the container element
that applied that relative position, causing double-counting; (2)
relative position applied to inline block fragments independently of the
wrapped block itself, causing double-counting.

This commit also removes the `cascade_anonymous` function and the
related `Fragment` constructor. They were unused, and their
functionality has been replaced by the `modify_style_for_*` series of
functions.

Closes #7067.
2015-08-12 08:28:35 -07:00
bors-servo
3ad49fc689 Auto merge of #7171 - Ms2ger:ScriptControlChan, r=jdm
Remove ScriptControlChan.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7171)
<!-- Reviewable:end -->
2015-08-12 08:28:29 -06:00
Ms2ger
2cdc043fcf Remove ScriptControlChan. 2015-08-12 16:24:09 +02:00
Ms2ger
0aae98e9c0 Pass a Sender<ConstellationControlMsg> to Pipeline::new. 2015-08-12 16:19:30 +02:00
Ms2ger
250fdc33f4 Store a Sender<ConstellationControlMsg> in Pipeline. 2015-08-12 16:15:21 +02:00
Ms2ger
fafcc0a5da Store a Sender<ConstellationControlMsg> in CompositionPipeline. 2015-08-12 16:03:38 +02:00
Ms2ger
9476474267 Store a Sender<ConstellationControlMsg> in PipelineContent. 2015-08-12 15:58:10 +02:00
Ms2ger
fdafc5c360 Store a Sender<ConstellationControlMsg> in LayoutTask. 2015-08-12 15:55:16 +02:00
Ms2ger
4f9ec8915d Store a Sender<ConstellationControlMsg> in ScriptReflow. 2015-08-12 15:47:35 +02:00
Ms2ger
41ac66112a Store a Sender<ConstellationControlMsg> in Window. 2015-08-12 15:34:41 +02:00