Commit graph

2161 commits

Author SHA1 Message Date
David Zbarsky
9e5c2e22d8 Clean up some methods in CanvasRendeingContext2D 2015-08-03 23:32:11 -04:00
Josh Matthews
8620fe5995 Start reporting memory usage for Window and all nodes in all DOM trees for frame treese in script tasks. 2015-08-03 23:05:00 -04:00
bors-servo
d66c59a152 Auto merge of #6784 - glennw:offset-ext, r=pcwalton
Implement offsetParent/Top/Left/Width/Height.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6784)
<!-- Reviewable:end -->
2015-08-03 18:39:43 -06:00
bors-servo
3c5d24dbf4 Auto merge of #6926 - Ms2ger:dwgs-args, r=jdm
Implement a WorkerGlobalScopeInit struct to pass arguments to WorkerGlobalScope::new_inherited more easily.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6926)
<!-- Reviewable:end -->
2015-08-03 17:42:15 -06:00
Glenn Watson
39972a174e Fix panic when called on root node, and update test expectations.
The three tests that are marked as failures are because they use offsetWidth as a dummy to force a layout flush. Now that these exist, they expose an unrelated bug with reflow.
2015-08-04 08:59:27 +10:00
bors-servo
ae3aadd656 Auto merge of #6920 - Wafflespeanut:NIT, r=jdm
Removed an invalid FIXME and fixed some doc comments...

There are some bad module-level doc comments in `flow.rs` which has directly affected [Servo's docs](http://doc.servo.org/layout/flow/index.html) and so, this fixes that. Oh, and #6728 is having a hard time getting closed and so I've also removed the `FIXME` comment related to it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6920)
<!-- Reviewable:end -->
2015-08-03 16:46:12 -06:00
bors-servo
5922ac606c Auto merge of #6721 - mbrubeck:unicode-bidi, r=pcwalton
Implement the unicode-bidi CSS property

r? @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6721)
<!-- Reviewable:end -->
2015-08-03 15:37:12 -06:00
Matt Brubeck
f8e92b2b01 Implement the unicode-bidi property 2015-08-03 14:12:33 -07:00
bors-servo
86476804ca Auto merge of #6917 - Ms2ger:lock-alert, r=metajack
Lock and flush stdout in Window#alert.

We use alert() to communicate test results to wptrunner. Unfortunately,
sometimes the alert output is interleaved with other output on stdout,
causing wptrunner to classify the test result as a timeout. I hope this will
avoid that scenario.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6917)
<!-- Reviewable:end -->
2015-08-03 13:17:47 -06:00
Ms2ger
6b61564f6d Pass WorkerGlobalScopeInit to DedicatedWorkerGlobalScope::run_worker_scope. 2015-08-03 19:54:04 +02:00
Ms2ger
0da0fcbe9b Implement a WorkerGlobalScopeInit struct to pass arguments to WorkerGlobalScope::new_inherited more easily. 2015-08-03 19:53:57 +02:00
bors-servo
028707f5cd Auto merge of #6903 - glennw:fix-height-again, r=pcwalton
Fix percentage height calculation, absolute containing block height calculations.

It's not possible to correctly determine during the css cascade whether the container height
is explicitly specified. Additionally, the spec https://drafts.csswg.org/css2/visudet.html#the-height-property says this should affect the *used* height, rather than the computed height.

This significantly improves the layout in #6643.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6903)
<!-- Reviewable:end -->
2015-08-03 10:38:21 -06:00
Ms2ger
bd04cecceb Take WorkerGlobalScope's worker_id out of its Option.
Unsurprisingly, every worker has an id, so there is no need to wrap it in an
Option.
2015-08-03 18:28:48 +02:00
Ravi Shankar
5260e64847 Removed an invalid FIXME and fixed a doc comment 2015-08-03 21:51:35 +05:30
bors-servo
2ce811ffb8 Auto merge of #6902 - khflab:master, r=jdm
[FIX] Bug fix #6756

fixes #6756 waiting for review.

Signed-off-by: Kayo Hamid <kayo@bvcupons.com.br>

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6902)
<!-- Reviewable:end -->
2015-08-03 09:18:05 -06:00
Ms2ger
2a7f262b7d Lock and flush stdout in Window#alert.
We use alert() to communicate test results to wptrunner. Unfortunately,
sometimes the alert output is interleaved with other output on stdout,
causing wptrunner to classify the test result as a timeout. I hope this will
avoid that scenario.
2015-08-03 15:01:23 +02:00
Glenn Watson
9e5687e3e7 Implement offsetParent/Top/Left/Width/Height. 2015-08-03 11:55:38 +10:00
Glenn Watson
b9fea3deb3 Fix percentage height calculation, absolute containing block height calculations.
It's not possible to correctly determine during the css cascade whether the container height
is explicitly specified. Additionally, the spec https://drafts.csswg.org/css2/visudet.html#the-height-property
says this should affect the *used* height, rather than the computed height.

This significantly improves the layout in #6643.
2015-08-03 10:47:56 +10:00
Kayo Hamid
c6ccb85378 [FIX] Bug fix #6756
Signed-off-by: Kayo Hamid <kayo@bvcupons.com.br>
2015-08-02 19:31:41 -04:00
Harrison G
49c5408e65 Fixes issue #6866 2015-08-02 16:55:42 -04:00
Patrick Walton
9bd8edea4a script: Use Arc::make_unique instead of Arc::get_mut when updating
inline styles.

Transitions make the reasoning in the comment in the relevant sections
not true.
2015-08-02 09:10:17 -07:00
bors-servo
92cbb93684 Auto merge of #6894 - pcwalton:double-precision-timestamps, r=metajack
style: Switch animation timestamps to be doubles instead of floats.

32-bit floats are not enough to hold timestamps since the epoch and
result in jank.

r? @metajack

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6894)
<!-- Reviewable:end -->
2015-08-01 22:01:39 -06:00
bors-servo
b7261a2073 Auto merge of #6714 - boghison:filelist, r=jdm
Implement a FileList



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6714)
<!-- Reviewable:end -->
2015-08-01 20:16:14 -06:00
Patrick Walton
cac01edf80 style: Switch animation timestamps to be doubles instead of floats.
32-bit floats are not enough to hold timestamps since the epoch and
result in jank.
2015-08-01 17:46:39 -07:00
bors-servo
c6b043582b Auto merge of #6741 - servo:fix-setpropertypriority, r=pcwalton
Fix CSSStyleDeclaration::setPropertyPriority and some refactoring

r? @Ms2ger

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6741)
<!-- Reviewable:end -->
2015-08-01 15:00:06 -06:00
Bogdan Cuza
8bc66f97f8 Implement the FileList interface. Fixes #6708 2015-08-01 19:31:20 +02:00
Ravi Shankar
79b65402d7 Persuading devtools to communicate with the workers; r=jdm 2015-08-01 21:25:49 +05:30
bors-servo
9a2f28ae33 Auto merge of #6839 - dzbarsky:atoms, r=jdm
Use static atoms in HTMLFormElement

Need to update to new string-cache first, which I think requires a rustup?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6839)
<!-- Reviewable:end -->
2015-07-31 17:07:36 -06:00
David Zbarsky
d5f8cb3330 Use static atoms in HTMLFormElement 2015-07-31 19:05:51 -04:00
bors-servo
2eb122f394 Auto merge of #6586 - pcwalton:resource-task-ipc, r=jdm
script: Make the resource task communication use IPC channels.

This change makes Servo use serialized messages over IPC channels for resource loading. The goal is to make it easier to make Servo multiprocess in the future. This patch does not make Servo multiprocess now; there are many other channels that need to be changed to IPC before that can happen. It does introduce a dependency on https://github.com/serde-rs/serde and https://github.com/pcwalton/ipc-channel for the first time.

At the moment, `ipc-channel` uses JSON for serialization. This is because serde does not yet have official support for bincode. When serde gains support for bincode, I'll switch to that. For now, however, the JSON encoding and decoding will constitute a significant performance regression in resource loading.

To avoid having to send boxed `AsyncResponseTarget` trait objects across process boundaries, this series of commits changes `AsyncResponseTarget` to wrap a sender only. It is then the client's responsibility to spawn a thread to proxy calls from that sender to the consumer of the resource data. This only had to be done in a few places. In the future, we may want to collapse those threads into one per process to reduce overhead. (It is impossible to continue to use `AsyncResponseTarget` as a boxed trait object across processes, regardless of how much work is done on `ipc-channel`. Vtables are fundamentally incompatible with IPC across mutually untrusting processes.)

In general, I was pretty pleased with how this turned out. The main changes are adding serialization functionality to various objects that `serde` does not know how to serialize natively—the most complicated being Hyper objects—and reworking `AsyncResponseTarget`. The overall structure of the code is unchanged, and other than `AsyncResponseTarget` no functionality was lost in moving to serialization and IPC.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6586)
<!-- Reviewable:end -->
2015-07-31 16:06:36 -06:00
Patrick Walton
61e3a9545e script: Fix test failures. 2015-07-31 15:03:39 -07:00
bors-servo
a54404c921 Auto merge of #6876 - metajack:slice_chars-layout, r=pcwalton
Use local slice_chars

StrExt::slice_chars is deprecated and will be removed in Rust. This
lifts the implementation from Rust libstd and puts it in util::str.

This fixes a bunch of deprecation warnings in Servo.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6876)
<!-- Reviewable:end -->
2015-07-31 12:54:49 -06:00
Patrick Walton
024c4df912 script: Fix merge fallout. 2015-07-31 11:28:09 -07:00
Patrick Walton
2aa5174246 script: Make the resource task communication use IPC channels. 2015-07-31 11:28:09 -07:00
Patrick Walton
44d13f7fd4 net: Use a thread for each AsyncResponseTarget to avoid having to send
trait objects across process boundaries.
2015-07-31 11:27:49 -07:00
Patrick Walton
9c9d7dc93b net: Make most of the resource task messages serializable. 2015-07-31 11:27:49 -07:00
Jack Moffitt
dae1a398a4 Use local slice_chars
StrExt::slice_chars is deprecated and will be removed in Rust. This
lifts the implementation from Rust libstd and puts it in util::str.

This fixes a bunch of deprecation warnings in Servo.
2015-07-31 12:23:13 -06:00
Simon Sapin
9d4ee559e5 Update html5ever and enable unstable features. 2015-07-31 16:41:08 +02:00
Simon Sapin
06ba62b012 Remove some PropertyDeclaration cloning. 2015-07-31 08:09:25 +02:00
Simon Sapin
d2bd070dc3 Refactor CSSStyleDeclaration::setProperty to not synthesize a name: value string to parse. 2015-07-31 08:09:24 +02:00
Simon Sapin
1033886409 Fix CSSStyleDeclaration.setPropertyPriority
Before, it was a complicated no-op. (`parse_style_attribute` expects
input like `a: b; c: d;`, when given just a name it return an empty
vector.)
2015-07-31 08:08:36 +02:00
bors-servo
e42fddd9cc Auto merge of #6851 - dzbarsky:gCS, r=jdm
Return None as style for elements not in a document



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6851)
<!-- Reviewable:end -->
2015-07-30 16:30:57 -06:00
bors-servo
4837dd9a1c Auto merge of #6850 - servo:rustup_2015-07-30, r=SimonSapin
Upgrade to rustc 1.3.0-dev (87055a68c 2015-07-30)

This builds and passes unit tests.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6850)
<!-- Reviewable:end -->
2015-07-30 14:46:13 -06:00
David Zbarsky
36145d0686 Return None as style for elements not in a document 2015-07-30 12:36:08 -04:00
Simon Sapin
2b62041997 Remove usage of the deprecated box () (expr) syntax. 2015-07-30 18:01:44 +02:00
Simon Sapin
6737be1fb1 Remove usage of the deprecated OwnedAsciiExt 2015-07-30 18:01:41 +02:00
Simon Sapin
47b07ae2e4 Enable unstable feature in string-cache.
See https://github.com/servo/string-cache/pull/95
2015-07-30 17:16:30 +02:00
bors-servo
82e476fd07 Auto merge of #6181 - brunoabinader:mouseover-status, r=larsbergstrom
Implement Msg::Status with serialized url upon mouseover

Credits for Mike Blumenkrantz (@zmike), I just rebased against trunk and
fixed the url serialization.

Fixes #6178.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6181)
<!-- Reviewable:end -->
2015-07-30 08:45:31 -06:00
Bruno de Oliveira Abinader
b3927d5a2d Implement Msg::Status with serialized url upon mouseover
Credits for Mike Blumenkrantz (@zmike), I just rebased against trunk and
fixed the url serialization.

Fixes #6178.
2015-07-30 16:37:54 +03:00
bors-servo
c5060fce9f Auto merge of #6846 - Ms2ger:2661-comment, r=jdm
Remove an obsolete comment I missed in #6804.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6846)
<!-- Reviewable:end -->
2015-07-30 06:10:56 -06:00