Commit graph

369 commits

Author SHA1 Message Date
Johann Tuffe
ec07178b6f sort all uses 2015-08-20 20:47:12 +08:00
Manish Goregaokar
5c4f91c0f1 Cleanup Window, XHR 2015-08-18 18:38:32 +05:30
wartman4404
8d665008f8 Remove the DOMRefCell wrapper around Window::compositor. 2015-08-16 17:28:21 -05:00
Josh Matthews
8bb853f643 Fix existing syntactics nits. 2015-08-16 10:30:43 -04:00
vectorijk
14ac1ef75a remove ScriptListener
ref #7175
2015-08-16 01:34:55 -07:00
Ravi Shankar
89153116fb Splitting ScriptMsg into various enums; r=jdm 2015-08-15 02:00:48 +05:30
Bogdan Cuza
45145108da Measure heap memory usage for more types. Fixes #6951 2015-08-13 21:44:41 +03: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
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
Ms2ger
40b5c4586e Push the url parsing out of Window::load_url.
This will allow the two callers to decide on the base url independently.
2015-08-07 15:19:16 +02:00
Ms2ger
c98d35ea6b Lock stderr while printing the alert() message.
2a7f262b7d was unsufficient for the case where
the interleaved output was actually on stderr rather than stdout, such as
output from the error macro.
2015-08-06 20:11:37 +02:00
Ms2ger
d2077dd245 Update Animation Timing links and terminology to the HTML specification. 2015-08-05 09:21:08 +02: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
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
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
Patrick Walton
61e3a9545e script: Fix test failures. 2015-07-31 15:03:39 -07:00
David Zbarsky
e484d6b5e3 Implement getComputedStyle 2015-07-29 20:17:50 -04:00
Bogdan Cuza
233a769c67 Add spec links 2015-07-28 13:28:41 +02:00
bors-servo
e0bd80f807 Auto merge of #6662 - tschneidereit:client-geometry, r=glennw,pcwatson
Implement Element.client{Top,Left,Width,Height}

This isn't done, but contains a working implementation of at least `clientTop`. Feedback would be much appreciated: it's probably far from ideal.

Implementing `clientLeft` is straight-forward, I think, but `clientWidth` and `clientHeight` require accessing the `border_box` - and I don't know how that works, yet.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6662)
<!-- Reviewable:end -->
2015-07-27 20:45:05 -06:00
Patrick Walton
164e10202c devtools: Convert the developer tools to run over IPC. 2015-07-27 09:10:01 -07:00
Ms2ger
f57ed72d95 Remove unused method Window::handle_resize_inactive_msg. 2015-07-26 17:30:45 +02:00
Tetsuharu OHZEKI
eb47185d58 Implement Window.trap() to trigger a breakpoint trap 2015-07-21 00:53:17 +09:00
Ms2ger
6d7bc2cffe Rename browser_context identifiers to browsing_context. 2015-07-20 15:56:32 +02:00
Ms2ger
7491728a9c Rename BrowserContext to BrowsingContext. 2015-07-20 15:41:16 +02:00
Till Schneidereit
162ecd0aac Implement client{Top, Left, Height, Width} element properties 2015-07-19 15:04:50 +02:00
Patrick Walton
b6485a9eaf compositing: Make the constellation messages serializable. 2015-07-18 12:43:08 -07:00
Nicholas Nethercote
7429b90e02 Wire up the JS engine's memory reporting.
SpiderMonkey provides an extremely fine-grained breakdown of memory
usage, but for Servo we aggregate the measurements into a small number
of coarse buckets, which seems appropriate for the current level of
detail provided by Servo's memory profiler. Sample output:
```
|   10.99 MiB -- pages
|       7.75 MiB -- url(http://html5demos.com/worker)
|          4.63 MiB -- js
|             2.00 MiB -- gc-heap
|                0.94 MiB -- decommitted
|                0.92 MiB -- used
|                0.09 MiB -- unused
|                0.05 MiB -- admin
|             1.44 MiB -- malloc-heap
|             1.19 MiB -- non-heap
|          [...]
|       3.24 MiB -- url(http://html5demos.com/js/worker-cruncher.js)
|          3.24 MiB -- js
|             1.17 MiB -- malloc-heap
|             1.06 MiB -- non-heap
|             1.00 MiB -- gc-heap
|                0.69 MiB -- used
|                0.19 MiB -- decommitted
|                0.09 MiB -- unused
|                0.03 MiB -- admin
```
Most of the changes are plumbing to get the script and worker tasks
communicating with the memory profiler task.
2015-07-15 21:58:20 -07:00
Patrick Walton
e841065351 compositing: Move messages that go over the ScriptListener to go over
an IPC channel instead.

Because this used a boxed trait object to invoke messages across a
process boundary, and boxed trait objects are not supported across IPC,
we spawn a helper thread inside the compositor to perform the marshaling
for us.
2015-07-14 12:12:19 -07:00
Ms2ger
8b45f9f51c Implement Window#top. 2015-07-11 18:00:59 +02:00
bors-servo
c022262826 Auto merge of #6505 - ttaubert:issue/4666-crypto-getRandomValues, r=Ms2ger
Implement crypto.getRandomValues()

Didn't touch mozjs or rust-mozjs because implementing that in the code generator didn't seem too easy. I'm using the same workaround that the TextDecoder does.

Using the OsRng should be the right choice here? As the OS keeps state for us we wouldn't need to have a global rng instance to keep around.

Fixes #4666.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6505)
<!-- Reviewable:end -->
2015-07-05 22:16:19 -06:00
David Zbarsky
861ddedaef Remove some redundant let bindings 2015-07-04 13:12:49 -04:00
Tim Taubert
92874a89d2 Implement window.crypto.getRandomValues() 2015-07-03 18:34:00 +02:00
David Winslow
4cf46bff2d Refactor #[jstraceable] to #[derive(JSTraceable)]
fixes #6524
2015-07-01 18:27:06 -04:00
Corey Farwell
109e3219a4 Prefer HTTPS when linking to GitHub Pages
This commit was generated using the following commands:

```
find . -iname "*.webidl" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)github.io/https:\1github.io/g'
```

```
find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)github.io/https:\1github.io/g'
```
2015-06-28 23:16:47 -07:00
Glenn Watson
4b3962e6c7 Trigger reflow after rAF callbacks. 2015-06-25 05:40:23 +10:00
Michael Wu
675267b782 Upgrade to SM 39 2015-06-19 18:42:48 -04:00
ecoal95
8cbfb3482c Use euclid from crates.io 2015-06-19 00:04:24 +02:00
Simon Sapin
5428226e04 Remove usage of String::from_str, deprecated in #6377 2015-06-15 15:37:14 +02:00
Corey Farwell
5c408d2be9 rust-geom API changes
https://github.com/servo/rust-geom/pull/81
2015-06-13 12:28:21 -07:00
James Graham
49f1b13ad9 Add support for switching frames with the webdriver API.
This moves webdriver_traits into msg to avoid a circular dependency.
2015-06-01 23:18:55 +01:00
Patrick Walton
9e34e82aec script: Reflow 200 milliseconds after the <body> is parsed, like Gecko
does.
2015-05-26 10:38:47 -07:00
Corey Farwell
8e3f4bba85 Reduce max line length from 150 to 120 characters
Part of https://github.com/servo/servo/issues/6041
2015-05-24 00:01:49 -04:00
Glenn Watson
b84c6fa5db Fix document load event firing after pipeline is closed. 2015-05-21 08:39:09 +10:00
Glenn Watson
35a570ab66 Fix several hangs / panics during pipeline cleanup of in progress loads.
This fixes a hang found while testing the jQuery test suite.
2015-05-19 16:14:25 +10:00
James Graham
50f59c8255 Add support for timing out scripts 2015-05-14 10:59:20 +01:00
James Graham
8d10fa1f2d Add basic support for executeAsyncScript.
This relies on a global webdriverCallback function, which is visible to content.
Obviously that's not a long term solution for a number of reasons, but it allows
us to experiment for now
2015-05-14 10:59:17 +01:00