Commit graph

263 commits

Author SHA1 Message Date
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
bors-servo
1f682d878d auto merge of #5281 : glennw/servo/mozbrowser, r=jdm 2015-03-22 21:36:51 -06:00
Glenn Watson
bf9b8f7050 Experimental implementation of (a small subset of) mozbrowser APIs. 2015-03-23 13:26:55 +10:00
Manish Goregaokar
3479d3fa7f Replace unsafe_blocks by unsafe_code. 2015-03-21 10:27:32 +01:00
Ms2ger
1604515fd9 Fix various build warnings. 2015-03-20 17:57:49 +01:00
Ms2ger
5f15eb5fbf Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev. 2015-03-18 13:18:31 -04:00
Glenn Watson
939a89568e First part of refactoring constellation to support iframe navigation.
The history is now recorded per frame, but needs to be exposed in a followup PR.

Also fixes a race condition that occurs loading iframes under heavy CPU load.

This ensures that iframes never do a reflow / layout until they have a valid
window size set from their parent frame.
2015-03-17 09:35:41 +10:00
Zack Slayton
323baf92db localStorage shim, fixes #5195 2015-03-16 13:33:55 -07:00
Glenn Watson
33829c0254 Perform reflow if load events dirty any nodes.
This fixes some test failures that begin occurring when other events (such as resize) are fixed to only occur when needed.
2015-03-11 08:43:47 +10:00
Adenilson Cavalcanti
618f56410d Implements reflow events debugging.
Start servo with -Z relayout-event and you should have
reflow events printed to the terminal.
2015-03-06 12:27:18 -08:00
Adenilson Cavalcanti
a31d3d7f70 Due to changes on Page/Window interfaces, we no longer have use
for flush_layout().
2015-03-04 11:39:29 -08:00
Josh Matthews
4972b623e1 Separate disposing of layout data from the GCing of the DOM object reflectors. Change the order of operations when shutting down the script task to ensure that Window globals aren't used after they've been GCed. 2015-03-03 16:25:40 -05:00
Josh Matthews
c816975750 Documentation and cleanup. 2015-03-03 16:25:40 -05:00
Josh Matthews
e2c4f5ed67 Move everything unrelated to the frame tree out of Page and into Document or Window. Reduce the API surface of Page to a bare minimum to allow for easier future removal. 2015-03-03 16:25:40 -05:00
bors-servo
a3ea3eed47 auto merge of #4960 : pkondzior/servo/add-script-timers-suspend-resume-functionality, r=jdm
Adds free/thaw methods to script_task that let you send suspend/resume messages to web content timers. Fixes #4907
2015-02-23 21:45:46 -07:00
Pawel Kondzior
c2961c94b4 Add thaw/freeze messages that can suspend/resume webcontent timers #4907 2015-02-24 05:33:27 +01:00
bors-servo
99617557d4 auto merge of #4996 : jdm/servo/reportpending, r=Ms2ger
I believe this problem was introduced with the mozjs error reporting changes, since we don't see errors reported from `<script>` blocks any more.
2015-02-23 20:30:48 -07:00
Josh Matthews
880c7189b3 Eagerly report errors when evaluating JS on a global scope. Fixes #4966. 2015-02-23 22:28:06 -05:00
Prabhjyot Singh Sodhi
cc48797999 Fixing Intermittent failure in pages with timers
Fixes #4923
2015-02-22 00:27:16 +05:30
Ms2ger
aaed4a54c7 Use rustc-serialize rather than the built-in deprecated serialize. 2015-02-17 13:24:15 +01:00
Ms2ger
e921ce859e Fix some warnings in script. 2015-02-12 20:05:14 +01:00
bors-servo
29d24a5049 auto merge of #4866 : KiChjang/servo/trigger-fragment-string, r=jdm
Fixes #4863
2015-02-12 10:18:45 -07:00
Simon Sapin
d5dd1d658e Upgrade to rustc ba2f13ef0 2015-02-04 2015-02-11 14:48:34 -08:00
Ms2ger
aa8e01af2a Use base64 from rustc-serialize (fixes #4747). 2015-02-10 14:19:13 +01:00
Ms2ger
a09a912178 Import net as net rather than servo_net. 2015-02-10 12:55:24 +01:00