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
Ms2ger
26d191f068
Remove the unused Window::control_chan() method.
2015-08-12 15:32:30 +02:00
bors-servo
54300a9c73
Auto merge of #7170 - Ms2ger:unwrap-constellation, r=jdm
...
Avoid unwrap calls in handle_navigate_msg.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7170 )
<!-- Reviewable:end -->
2015-08-12 07:29:47 -06:00
Ms2ger
c05f0906d5
Store a Sender<ConstellationControlMsg> in ScriptTask.
2015-08-12 15:25:31 +02:00
Ms2ger
1ef10550b1
Avoid unwrap calls in handle_navigate_msg.
2015-08-12 15:10:03 +02:00
Josh Matthews
c81c3a2f70
Document DevtoolScriptControlMsg variants.
2015-08-12 09:05:36 -04:00
Josh Matthews
aac53344b8
fixup! Simplify devtools frame marker notification. Record each frame tick based on a single message sent from the script task that ticked.
2015-08-12 09:05:05 -04:00
Ms2ger
38ed3a46d6
Disallow unsafe code in the devtools and devtools_traits crates.
2015-08-12 13:16:31 +02:00
Josh Matthews
56475676e4
Warning police.
2015-08-12 01:07:50 -04:00
Josh Matthews
e59de75608
Simplify devtools frame marker notification. Record each frame tick based on a single message sent from the script task that ticked.
2015-08-12 00:59:58 -04:00
Josh Matthews
47b9e89c66
Document the use and meaning of the devtools control messages. Fixes #6922 .
2015-08-12 00:59:28 -04:00
bors-servo
fa83cfb4b5
Auto merge of #7164 - g-k:one-serde-macros-0.5.1, r=mbrubeck
...
Use one version of serde_macros
Refs: https://github.com/servo/servo/issues/7130
Ran `./mach update-cargo -a` and only seeing version 0.5.1:
```
$ git grep serde_macros
components/canvas_traits/Cargo.toml:serde_macros = "0.5"
components/canvas_traits/lib.rs:#![plugin(serde_macros)]
components/devtools/Cargo.toml:serde_macros = "0.5"
components/devtools/lib.rs:#![plugin(serde_macros)]
components/devtools_traits/Cargo.toml:serde_macros = "0.5"
components/devtools_traits/lib.rs:#![plugin(serde_macros)]
components/gfx/Cargo.toml:serde_macros = "0.5"
components/gfx/lib.rs:#![plugin(serde_macros)]
components/layout/Cargo.toml:serde_macros = "0.5"
components/layout_traits/Cargo.toml:serde_macros = "0.5"
components/layout_traits/lib.rs:#![plugin(serde_macros)]
components/msg/Cargo.toml:serde_macros = "0.5"
components/msg/lib.rs:#![plugin(serde_macros, plugins)]
components/net_traits/Cargo.toml:serde_macros = "0.5"
components/net_traits/lib.rs:#![plugin(serde_macros)]
components/profile_traits/Cargo.toml:serde_macros = "0.5"
components/profile_traits/lib.rs:#![plugin(serde_macros)]
components/script_traits/Cargo.toml:serde_macros = "0.5"
components/script_traits/lib.rs:#![plugin(serde_macros)]
components/servo/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
components/servo/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
components/servo/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
components/servo/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
components/servo/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
components/servo/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
components/servo/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
components/servo/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
components/servo/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
components/servo/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
components/servo/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
components/servo/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
components/servo/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
components/servo/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
components/servo/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
components/servo/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
components/servo/Cargo.lock:name = "serde_macros"
components/servo/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
components/servo/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
components/style/Cargo.toml:serde_macros = "0.5"
components/style/lib.rs:#![plugin(serde_macros)]
components/style/lib.rs:#![plugin(serde_macros)]
components/util/Cargo.toml:serde_macros = "0.5"
components/util/lib.rs:#![plugin(serde_macros)]
ports/cef/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/cef/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/cef/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/cef/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/cef/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/cef/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/cef/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/cef/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/cef/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/cef/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/cef/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/cef/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/cef/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/cef/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/cef/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/cef/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/cef/Cargo.lock:name = "serde_macros"
ports/cef/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/cef/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/gonk/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/gonk/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/gonk/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/gonk/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/gonk/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/gonk/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/gonk/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/gonk/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/gonk/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/gonk/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/gonk/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/gonk/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/gonk/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/gonk/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/gonk/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/gonk/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/gonk/Cargo.lock:name = "serde_macros"
ports/gonk/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
ports/gonk/Cargo.lock: "serde_macros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index )",
```
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7164 )
<!-- Reviewable:end -->
2015-08-11 16:43:09 -06:00
Greg Guthe
513e4eff01
Use one version of serde_macros
...
Refs: https://github.com/servo/servo/issues/7130
And don't update everything else.
2015-08-11 18:39:35 -04:00
Corey Farwell
df79c8f8fa
Utilize match guard; make methods more similar
...
Make the structure for the `stretchiness` and `boldness` methods more
similar
2015-08-11 18:28:50 -04:00
bors-servo
0c5158587d
Auto merge of #6757 - mskrzypkows:document_hasFocus, r=jdm
...
Implementing document.hasFocus method, needs tests. #6475
I'm not sure if I have to implement some test for a new document method. As I remember there were tests for document methods, is it changed now? Where should I add tests?
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6757 )
<!-- Reviewable:end -->
2015-08-11 15:35:21 -06:00
bors-servo
7dc83e7820
Auto merge of #7024 - pcwalton:whitespace-stripping, r=mbrubeck
...
layout: Rewrite whitespace stripping.
This patch makes Servo unconditionally strip whitespace before text run
scanning (assuming that the `white-space` property allows it). Whitespace
stripping during reflow is now only used for handling whitespace at the ends of
lines; reflow now never attempts to handle ignorable whitespace.
Many CSS tests pass now. There are some new failures, however.
The following reference tests now fail due to a pre-existing bug whereby
whitespace is used to calculate the position of inline hypothetical boxes for
elements with `display: inline; position: absolute`:
* `absolute-replaced-height-036.htm`
* `vertical-align-sub-001.htm`
* `vertical-align-super-001.htm`
The following reference tests fail due to a pre-existing bug whereby we don't
handle `font-size: 0` properly in inline reflow:
* `font-size-zero-1.htm`
* `font-size-zero-2.htm`
The following reference test fails due to the fact that it relied on our
incorrect insertion of whitespace to make room for the black background:
* `inline-formatting-context-007.htm`
r? @mbrubeck
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7024 )
<!-- Reviewable:end -->
2015-08-11 12:57:02 -06:00