Commit graph

287 commits

Author SHA1 Message Date
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
Ms2ger
cfe240d117 Remove reference counting from the Runtime implementation. 2015-05-10 18:09:09 +02:00
Ms2ger
4ed94629a2 Use Runtime in Window. 2015-05-10 17:16:15 +02:00
Patrick Walton
be8a5a2939 layout: Don't rerun selector matching unless we need to when resizing
the window.
2015-05-07 15:48:14 -07:00
bors-servo
5e59e77c41 Auto merge of #5753 - JIoJIaJIu:timeline, r=jdm
RequestAnimationFrame
[Task](https://github.com/servo/servo/issues/5681)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5753)
<!-- Reviewable:end -->
2015-05-06 00:50:13 -05:00
Guro Bokum
be2cb665de Start using on_refresh_driver_tick #5681
Final
2015-05-06 02:08:39 +07:00
Simon Sapin
8b522f2e7d Rename Au methods with f32/f64 instead of frac32/frac/subpx 2015-05-05 18:23:29 +02:00
Simon Sapin
32d5e24922 Replace Au-related free functions in util::geometry with Au methods. 2015-05-05 17:36:03 +02:00
Simon Sapin
ef8edd4e87 Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8. 2015-05-05 10:07:34 -04:00
Anthony Ramine
7197052c0d Uniformise root() methods
They now live in traits Rootable, OptionalOptionalRootable, OptionalRootable
and ResultRootable.
2015-04-28 09:22:45 +02:00
Anthony Ramine
afafde5191 Change MutNullableJS<T> to MutNullableHeap<JS<T>> 2015-04-27 10:45:38 +02:00
Ms2ger
a862479ca8 Remove as_slice() calls from script. 2015-04-26 10:52:55 +02:00
bors-servo
43d666f94b Auto merge of #5802 - mmatyas:indentfix, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5802)
<!-- Reviewable:end -->
2015-04-22 19:49:30 -05:00
Glenn Watson
d8aef7208e Refactored image cache task - details below.
* Simpler image cache API for clients to use.
 * Significantly fewer threads.
   * One thread for image cache task (multiplexes commands, decoder threads and async resource requests).
   * 4 threads for decoder worker tasks.
 * Removed ReflowEvent hacks in script and layout tasks.
   * Image elements pass a Trusted<T> to image cache, which is used to dirty nodes via script task. Previous use of Untrusted addresses was unsafe.
   * Image requests such as background-image on layout / paint threads trigger repaint only rather than full reflow.
 * Add reflow batching for when multiple images load quickly.
   * Reduces the number of paints loading wikipedia from ~95 to ~35.
 * Reasonably simple to add proper prefetch support in a follow up PR.
 * Async loaded images always construct Image fragments now, instead of generic.
   * Image fragments support the image not being present.
 * Simpler implementation of synchronous image loading for reftests.
 * Removed image holder.
 * image.onload support.
 * image NaturalWidth and NaturalHeight support.
 * Updated WPT expectations.
2015-04-23 09:40:24 +10:00
Mátyás Mustoha
91b4246e1b Fix some irregular indentation. 2015-04-22 21:57:58 +02:00
Josh Matthews
01e66035ff Implement sync XHR by creating and spinning on-demand event loops. 2015-04-16 11:46:40 -04:00
Ms2ger
49393a8762 Update some URLs.
The HTML spec's division into pages is not stable, so it is safer to use the
URL without a specific page (which will redirect).
2015-04-14 10:44:51 +02:00
Corey Farwell
5eaa922045 Update WHATWG links to use HTTPS
Extracted this out of #5649

This commit was created with the following commands:

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

```
find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```
2015-04-13 21:34:27 -07:00
Adenilson Cavalcanti
a233cb5ef9 Using unwrap() as suggested in review. 2015-04-13 14:45:14 -07:00
Adenilson Cavalcanti
d2b7cbd4ef Squashing a few compiler warnings. 2015-04-13 14:25:42 -07:00
Guro Bokum
97714ec5ed Firefox timeline integration #4957 2015-04-13 21:08:07 +07:00
Gilles Leblanc
ba36a108c1 Split out shared networking code into net_traits crate
Fixes #4476
2015-04-03 13:38:10 -04:00
aditya
a3eaacccf6 Move iframe and url fields from Reflow to LayoutTask and LayoutTaskFactory
* Fix #5466
2015-04-02 16:09:48 -04:00
bors-servo
6bedf4a229 auto merge of #5459 : jdm/servo/reflowquery, r=saneyuki 2015-04-01 14:03:43 -06:00
Josh Matthews
a3c13d8a40 Make reflow queries always perform reflow. Fixes #5458. 2015-04-01 11:56:47 -04:00
Patrick Walton
66dd8c8a6c layout: Implement CSS transitions per CSS-TRANSITIONS § 2.
Transition events are not yet supported, and the only animatable
properties are `top`, `right`, `bottom`, and `left`. However, all other
features of transitions are supported. There are no automated tests at
present because I'm not sure how best to test it, but three manual tests
are included.
2015-03-31 08:46:11 -07:00
Corey Farwell
d838fcce30 Remove some unnecessary uses of as_slice
For the majority of these cases, `as_slice` can be removed due to
`Deref`. In particular, `Deref` for:

* `String` -> `str`
* `Atom` -> `str`

The latter of those two requires, a bump of the locked `string-cache`
library
2015-03-29 14:42:19 -04:00
Ms2ger
54c006d159 Use u32 for reflow ids. 2015-03-28 15:36:36 +01:00
Thiago Pontes
1244f9e016 Notify devtools about new worker globals 2015-03-27 16:04:53 -03:00
Glenn Watson
7163a3c580 Add mozbrowser events for location + title change. 2015-03-26 05:19:03 +10:00
Corey Farwell
605e21c406 Add links for script::dom::window to whatwg HTML spec 2015-03-24 23:34:22 -04:00
Corey Farwell
0f2fd77bb1 Clean up a few things in script::dom::window 2015-03-24 09:43:50 -04:00
Josh Matthews
48b151948f Fix double-panic when the script task panics. 2015-03-23 19:19:18 +01:00