Commit graph

127 commits

Author SHA1 Message Date
bors-servo
2b9590c5a5 Auto merge of #6778 - nox:childnodes, r=jdm
Optimise Node.childNodes



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6778)
<!-- Reviewable:end -->
2015-08-10 14:05:02 -06:00
Anthony Ramine
4e8922a53a Optimise Node.childNodes
We use the virtual method children_changed() to propagate changes in the children
list to the NodeList tied to Node.childNodes.
2015-08-09 00:10:21 +02:00
Lars Bergstrom
38286246df Update submodules and don't call setrlimit on Android 2015-08-07 15:08:07 -05: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
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
Ravi Shankar
79b65402d7 Persuading devtools to communicate with the workers; r=jdm 2015-08-01 21:25:49 +05:30
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
06ba62b012 Remove some PropertyDeclaration cloning. 2015-07-31 08:09:25 +02: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
Simon Sapin
6737be1fb1 Remove usage of the deprecated OwnedAsciiExt 2015-07-30 18:01:41 +02:00
Matt Brubeck
e0eed0a48e Remove unused script -> layout_traits dependency 2015-07-28 10:27:08 -07:00
Anthony Ramine
7b40cc9fd7 Introduce VirtualMethods::children_changed()
This virtual method mimics the behaviour of mutation observers and make it more
viable than the older child_inserted(), which didn't cover removed nodes and
was called as many times as there were inserted nodes.

A few other shortcomings where remove_child() was called directly instead of
Node::remove() were also fixed while at it.
2015-07-25 19:09:40 +02:00
Patrick Walton
2c21c942da script: Increase our file descriptor limit on Linux.
We've had problems with this before, and I think it's starting to cause
problems again.
2015-07-23 00:17:58 -07:00
Josh Matthews
d385cb701b Reject websocket protocol requests that don't match https://tools.ietf.org/html/rfc6455#section-4.1 . 2015-07-22 09:35:07 -04: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
e5b1ec4078 script: Split Pipeline::create into chrome process and content
process parts.

This will make it easier to adapt to IPC.

The trickiest part here was to make script tasks spawn new layout tasks
directly instead of having the pipeline do it for them. The latter
approach will not work in multiprocess mode, because layout and script
must run in the same address space and the pipeline cannot inject tasks
into another process.
2015-07-14 15:09:16 -07:00
Patrick Walton
9ce65c08a5 layout: Make the LayoutControlChan use IPC. 2015-07-14 13:45:52 -07:00
Simon Sapin
90dbd86ed7 Add a -Z replace-surrogates command-line option.
See #6564.
2015-07-13 20:41:57 +02:00
Glenn Watson
83301ebb75 Add servo Image type. Remove rust-png dependency from script, gfx, layout. 2015-07-07 08:45:01 +10:00
Tim Taubert
92874a89d2 Implement window.crypto.getRandomValues() 2015-07-03 18:34:00 +02:00
Ms2ger
24f6122073 Check the result of JS_Init. 2015-07-02 22:17:41 +02:00
David Winslow
4cf46bff2d Refactor #[jstraceable] to #[derive(JSTraceable)]
fixes #6524
2015-07-01 18:27:06 -04:00
Ms2ger
c9f50f41b5 Stop using position_elem.
It is unstable and not really better than the stable alternative.
2015-06-27 23:39:21 +02:00
Ms2ger
a72c6ec8b6 Stop using Vec::from_raw_buf. 2015-06-26 21:20:13 +02:00
Simon Sapin
34bfa16517 Update to zero-copy* HTML parsing
html5ever now uses the Tendril string type to minimize copying internally,
but Servo still converts from/to `String` at the boundary
(which involves copying).
2015-06-25 20:40:38 -07:00
Ms2ger
73a7e92bfd Update to rustc 2d0cbf3e3e25e092bd9e4c94d08e446b680869f0. 2015-06-25 20:02:36 +02: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
Mátyás Mustoha
3ae64fe739 Remove gfx_traits from the dependencies of [script]. 2015-06-12 12:59:46 +02:00
Hyowon Kim
473afdb196 Add attributes for canvas shadows. 2015-06-12 09:40:00 +09:00
Corey Farwell
4f47b41fa7 Remove fnv & smallvec crate reexports from util
The util component specified fnv and smallvec as dependencies and publicly
reexported both of them. Several other components utilized these reexports,
presumably because fnv and smallvec used to live in the tree so reexporting
made the transition easier.

These indirect dependencies through the util component are unnecessary.

This commit removes the fnv & smallvec crate reexports in the util component.
It exchange, it adds fnv & smallvec as dependencies to non-util components
wherever needed. Finally, it removes the fnv dependency from util as it is not
utilized anywhere in the util component.
2015-06-10 07:14:55 -07:00
Manish Goregaokar
968b335f9b Audit and reduce unstable usage in script
Reasons behind existing unstable features:

alloc:

 - `Rc.make_unique()`
 - `into_raw` / `from_raw` (naming). All over the bindings code.

collections:

 - `Vec.push_all()`
 - `from_str`
   - can be replaced by `.to_owned()`
 - `from_raw_buf`
   - could be done directly

core:

  - `nonzero`
  - `UnsafeCell` (`as_unsafe_cell`)
  - `Zeroable`
  - `Peekable.is_empty`

std_misc:

  - Handle stuff
2015-06-10 01:20:06 +05:30
Eduard Burtescu
00e8e5f77d Use the correct log crate and setup env_logger in main. 2015-06-06 23:20:40 +03: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
ecoal95
b3ac346749 Add WebGLContextAttributes support
This commit also:
* Allows to return non-rootable dictionaries from
Codegen.
* Merges the two context types in an enum type.
2015-06-01 15:29:38 +02:00
ecoal95
3350522306 Layerize canvas
Note that this keeps using readback right now, `NativeSurface` painting
will be implemented soon.

Also see https://github.com/servo/servo/issues/6142
2015-05-20 19:10:50 +02:00
Josh Matthews
7f0706ed42 Implement a DocumentLoader type that tracks pending loads and notifies the script task when the queue is empty. Dispatch the document load event based on the DocumentLoader's notification. 2015-05-11 13:41:51 -04:00
Avi Weinstock
b742eeca05 Made the clipboard-related functionality in TextInput more testable. Added test_clipboard_paste to the "test-unit" suite. 2015-05-06 11:46:18 -04:00
William Galliher
5afec62f07 Implement incomplete opening, sending, and closing behaviour for WebSockets using rust-websocket.
Authors:
Shivaji Vidhale <savidhal@ncsu.edu>
William Galliher <wpgallih@ncsu.edu>
Allen Chen <achen4@ncsu.edu>
Rucha Jogaikar <rsjogaik@ncsu.edu>
2015-05-05 12:17:35 -04:00
Simon Sapin
ef8edd4e87 Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8. 2015-05-05 10:07:34 -04:00
Nicholas Nethercote
092507d23c Add a profile_traits crate to reduce compile times.
A rebuild after touching components/profile/mem.rs now takes 48 seconds (and
only rebuilds `profile` and `servo`) which is much lower than it used to be.
In comparison, a rebuild after touching components/profile_traits/mem.rs takes
294 seconds and rebuilds many more crates.

This change also removes some unnecessary crate dependencies in `net` and
`net_traits`.
2015-04-30 17:58:47 -07:00
James Graham
c2fc6e311a Add script execution support via WebDriver 2015-04-23 16:14:27 +01:00
Josh Matthews
1ca9ff56c8 Create easy common interface for off-thread network listeners, and remove the CORS-specific reimplementation of async networking. 2015-04-16 11:46:41 -04:00
bors-servo
017d105361 Auto merge of #5574 - servo:unit-tests, r=jack
On my laptop, running `./mach test-unit` goes from about 11 minutes to 22 seconds, when run after `./mach build`.

Fix #5291.
2015-04-07 21:16:49 -05:00
Simon Sapin
dc431c9bdb Move script crate unit tests into the unit_tests crate. 2015-04-08 01:07:53 +02:00
Diego Marcos
88954e3e18 Implements drawImage for html image as ImageSource 2015-04-07 11:02:50 -07:00
bors-servo
036b3eaa04 auto merge of #5511 : Ms2ger/servo/int, r=jdm 2015-04-03 13:54:46 -06:00
Ms2ger
c2e81be8a5 Stop using int/uint in script. 2015-04-03 20:47:53 +02:00
Gilles Leblanc
ba36a108c1 Split out shared networking code into net_traits crate
Fixes #4476
2015-04-03 13:38:10 -04:00