Commit graph

509 commits

Author SHA1 Message Date
Corey Farwell
a276bfa57c Remove dead Python code in binding generating code
Fixes #6956
2015-08-05 09:17:30 -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
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
Harrison G
49c5408e65 Fixes issue #6866 2015-08-02 16:55:42 -04:00
Ravi Shankar
79b65402d7 Persuading devtools to communicate with the workers; r=jdm 2015-08-01 21:25:49 +05:30
Patrick Walton
61e3a9545e script: Fix test failures. 2015-07-31 15:03:39 -07: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
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
2b62041997 Remove usage of the deprecated box () (expr) syntax. 2015-07-30 18:01:44 +02:00
Ms2ger
e8cff1d2a2 Remove an obsolete comment I missed in #6804. 2015-07-30 09:36:47 +02:00
bors-servo
3a112bc07f Auto merge of #6834 - jdm:named-constructor-prototype, r=Ms2ger
Use an actual byte string when defining the prototype of named constr…

…uctors. Fixes #6730.

r? @Ms2ger

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6834)
<!-- Reviewable:end -->
2015-07-29 22:07:35 -06:00
bors-servo
acbca7b3aa Auto merge of #6798 - dzbarsky:gCS, r=pcwalton
Implement getComputedStyle

It's not quite done but can probably be reviewed anyway.
I still need to finish up a few of the ToCss impls, I just got lazy and wanted to make sure things worked.

The computation of the used values is definitely not right, I'm going to investigate that.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6798)
<!-- Reviewable:end -->
2015-07-29 18:48:45 -06:00
David Zbarsky
e484d6b5e3 Implement getComputedStyle 2015-07-29 20:17:50 -04:00
Josh Matthews
b2cf27ba5d Use an actual byte string when defining the prototype of named constructors. Fixes #6730. 2015-07-29 12:39:26 -04:00
Ms2ger
efa12e6963 Remove unrooted_must_root annotation from unions (fixes #2661).
The unsafety was fixed as part of the SpiderMonkey upgrade; this removes the
now unused annotation.
2015-07-28 16:22:41 +02:00
Patrick Walton
164e10202c devtools: Convert the developer tools to run over IPC. 2015-07-27 09:10:01 -07:00
bors-servo
705c95dedb Auto merge of #6660 - nox:children-changed, r=jdm
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.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6660)
<!-- Reviewable:end -->
2015-07-25 11:39:20 -06:00
Patrick Walton
bb99b2f3c8 script: Make most of 2D canvas and WebGL run over IPC.
To actually make the multiprocess communication work, we'll need to
reroute the task creation to the pipeline or the compositor. But this
works as a first step.
2015-07-25 00:50:12 -07:00
Akos Kiss
fa86ea4f6f Add aarch64-unknown-linux-gnu support
* Adding dependencies
* Replacing `i8` with `libc::c_char` to build properly on platforms
  where char is unsigned.
2015-07-23 22:52:17 +00:00
Anthony Ramine
389a9ff643 Introduce RootedVec<JS<T>>::r() 2015-07-23 20:56:27 +02:00
bors-servo
aafc3dfa96 Auto merge of #6682 - boghison:scripttask, r=jdm
Fix a few issues

 - Use SmallVec<[T; N]>
 - Make find_iframe a free function
 - Make ProgressEvent use enums for bubbles and cancelable
 - Change README, as `rust-snapshot-hash` is just a text file

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6682)
<!-- Reviewable:end -->
2015-07-22 12:25:57 -06:00
snf
7f152b665d Add Clamp and EnforceRange support for webidl arguments. 2015-07-22 17:04:06 +02:00
Bogdan Cuza
681b11c08b Fix #6680 2015-07-22 16:45:43 +03:00
bors-servo
8a6681ba70 Auto merge of #6688 - Manishearth:smarter-root-lint, r=jdm
Handle type parameters in unused_must_root

fixes #6651

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6688)
<!-- Reviewable:end -->
2015-07-22 07:05:31 -06:00
Manish Goregaokar
521d8bc32e Make enum/fn part of unrooted_must_root handle type parameters 2015-07-22 10:44:26 +05:30
Manish Goregaokar
511e3337fb Fix rooting in script 2015-07-22 00:00:15 +05:30
Manish Goregaokar
f6f0a7e4aa Make stmt part of unrooted_must_root handle type parameters (fixes #6651) 2015-07-22 00:00:14 +05:30
bors-servo
a9f12da4f8 Auto merge of #6592 - frewsxcv:notimplementederror, r=Ms2ger
Use NotImplementedError for Python base class methods

From the Python docs:

https://docs.python.org/2/library/exceptions.html#exceptions.NotImplementedError

"In user defined base classes, abstract methods should raise this
exception when they require derived classes to override the method."

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6592)
<!-- Reviewable:end -->
2015-07-21 11:28:21 -06:00
Ms2ger
6d7bc2cffe Rename browser_context identifiers to browsing_context. 2015-07-20 15:56:32 +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
Simon Sapin
83d2a11d86 Upgrade to rustc 1.3.0-dev (fddfd089b 2015-07-10) 2015-07-15 00:46:43 +02: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
ce4d442941 Move away from the repeat().take().collect() pattern.
This was the preferred pattern between the deprecation of Vec::from_elem and
the addition of the count argument to the vec![] macro.
2015-07-14 16:19:30 +02:00
Simon Sapin
a5b6cb6b43 Unpaired surrogates: Document the -Z flag in the panic message. 2015-07-13 20:58:21 +02:00
Simon Sapin
e4dc608c0a Use error! instead of warn! to get console output by default. 2015-07-13 20:52:21 +02:00
Simon Sapin
90dbd86ed7 Add a -Z replace-surrogates command-line option.
See #6564.
2015-07-13 20:41:57 +02:00
Ms2ger
243446eff3 Revert "Replace surrogates in JS strings with U+FFFD instead of panicking."
This reverts commit 3f07f8e866.
2015-07-11 09:32:32 +02:00
Corey Farwell
10296e77dc Use NotImplementedError for Python base class methods
From the Python docs:

https://docs.python.org/2/library/exceptions.html#exceptions.NotImplementedError

"In user defined base classes, abstract methods should raise this
exception when they require derived classes to override the method."
2015-07-11 07:41:44 +09:00
Simon Sapin
3f07f8e866 Replace surrogates in JS strings with U+FFFD instead of panicking.
Fix #6519.
See #6564.
2015-07-11 03:12:46 +02:00
Corey Farwell
a2c34b318e Remove unused files in 'script/dom/bindings/'
Similar to https://github.com/servo/servo/pull/6581, but I didn't get
everything in that pull request
2015-07-10 08:53:24 +09:00
Corey Farwell
0ec2375cab Remove tidy blacklist for 'script/dom/bindings/*'
Recently, I found myself reading through the Python codegen scripts that
live in 'components/script/dom/bindings/*' and noticed that there were
many tidy violations: unnecessary semicolons, weird spacing, unused
variables, lack of license headers, etc. Considering these files are now
living in our tree and mostly maintained directly by contributors of
Servo (as opposed to being from upstream), I feel these files should not
be excluded from our normal tidy process. This commit removes the
blacklist on these files and fixes all tidy violations.

I added these subdirectories to the blacklist because they appear to be
maintained upstream somewhere else:

* "components/script/dom/bindings/codegen/parser/*",
* "components/script/dom/bindings/codegen/ply/*",

Also, I added a '# noqa' comment which tells us to ignore the
flake8 errors for that line. I chose to ignore this (instead of fixing
it) to make the work for this commit simpler for me.
2015-07-09 19:42:31 +09:00
Corey Farwell
1ce089abf4 Remove unused files in 'script/dom/bindings/'
As per this conversation:

https://github.com/servo/servo/pull/6580
2015-07-09 07:25:14 +09:00
ecoal95
9b306aced6 webgl: implement getError 2015-07-06 19:55:48 +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
Ms2ger
2f88b84e07 Remove *Cast::from_actual.
Since JSRef was removed, from_actual duplicates from_ref.
2015-07-04 12:55:01 +02:00
Tim Taubert
92874a89d2 Implement window.crypto.getRandomValues() 2015-07-03 18:34:00 +02:00
bors-servo
bbb39082e0 Auto merge of #6529 - dwins:master, r=Manishearth
Refactor #[jstraceable] to #[derive(JSTraceable)]

fixes #6524.  I had to make an additional change not mentioned in the ticket - adding the `#[feature]` to enable deriving custom traits but I assume that's expected at this time.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6529)
<!-- Reviewable:end -->
2015-07-01 18:27:40 -06:00
David Winslow
4cf46bff2d Refactor #[jstraceable] to #[derive(JSTraceable)]
fixes #6524
2015-07-01 18:27:06 -04:00