Commit graph

1937 commits

Author SHA1 Message Date
bors-servo
acf47a02cf Auto merge of #6568 - dzbarsky:delete_range, r=jdm
Implement Range#insertNode

Gecko doesn't really follow the spec but it seems to throw a HierarchyRequest error when parent is null.
Any ideas who I should talk to about fixing the spec to account for the null checks?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6568)
<!-- Reviewable:end -->
2015-07-16 10:56:17 -06:00
David Zbarsky
c2664e52dd Implement Range#insertNode 2015-07-16 17:43:46 -04:00
bors-servo
9534e8143f Auto merge of #6641 - michaelwu:direct-output, r=Ms2ger
Directly append children to output node in parse_html_fragment



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6641)
<!-- Reviewable:end -->
2015-07-16 07:21:06 -06:00
Ms2ger
b467f3e9d6 Don't try to send a message in WebSocket#close if the sender isn't present. 2015-07-16 14:29:04 +02:00
Ms2ger
072fdf695b Handle Send correctly if readyState is not Open. 2015-07-16 12:43:10 +02:00
Ms2ger
cd741e681d Remove WebSocket::sendCloseFrame.
It is a field that is used a function argument. Given that the control flow
is not quite the same, and we can't add an argument to Send, I opted for a
separate function.
2015-07-16 12:43:08 +02: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
Michael Wu
2752d3398e Directly append children to output node in parse_html_fragment 2015-07-15 17:09:26 -04:00
bors-servo
b6b95085fb Auto merge of #6628 - michaelwu:slim-domrectlist, r=jdm
Remove window field from domrectlist

Nothing uses this field AFAICT.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6628)
<!-- Reviewable:end -->
2015-07-15 04:56:24 -06:00
Ms2ger
6a61a5dcf5 Remove parse_web_socket_url in favour of functions in rust-websocket. 2015-07-15 11:26:49 +02:00
Michael Wu
c90be8e1dc Remove window field from domrectlist 2015-07-14 21:27:04 -04:00
bors-servo
9af229b830 Auto merge of #6591 - servo:rustup_2015-07-10, r=larsbergstrom
Upgrade to rustc 1.3.0-dev (fddfd089b 2015-07-10)

Depends on https://github.com/jgraham/webdriver-rust/pull/12.

Fixes #6020.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6591)
<!-- Reviewable:end -->
2015-07-14 13:40:22 -06: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
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
bors-servo
64751b8eef Auto merge of #6596 - pcwalton:layout-control-ipc, r=jdm
compositing: Make `ScriptListener` and `LayoutControlChan` messages go over IPC.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6596)
<!-- Reviewable:end -->
2015-07-14 08:46:07 -06:00
Patrick Walton
9ce65c08a5 layout: Make the LayoutControlChan use IPC. 2015-07-14 13:45:52 -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
David Zbarsky
bc1eb97671 Remove some more unnecessary let bindings 2015-07-14 14:48:16 -04:00
bors-servo
a2903091e4 Auto merge of #6622 - Ms2ger:send-invalid-state, r=metajack
Throw an InvalidStateError from WebSocket#send when it is called too early.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6622)
<!-- Reviewable:end -->
2015-07-14 03:34:47 -06:00
Ms2ger
48b94ec02b Throw an InvalidStateError from WebSocket#send when it is called too early. 2015-07-14 17:27:10 +02:00
bors-servo
556c0e1509 Auto merge of #6621 - Ms2ger:repeat, r=SimonSapin
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.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6621)
<!-- Reviewable:end -->
2015-07-14 02:42:26 -06: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
bors-servo
d91a6f3834 Auto merge of #6620 - Ms2ger:ws-crash, r=jdm
Stop panicking while establishing a WebSocket connection.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6620)
<!-- Reviewable:end -->
2015-07-14 02:06:17 -06:00
Ms2ger
86e94786ae Stop panicking while establishing a WebSocket connection. 2015-07-14 16:01:59 +02:00
bors-servo
6a728712f9 Auto merge of #6617 - frewsxcv:fixme-ufcs, r=metajack
Complete FIXMEs related to UFCS



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6617)
<!-- Reviewable:end -->
2015-07-14 01:30:12 -06:00
bors-servo
0fb9f22ff7 Auto merge of #6611 - jdm:websocketorigin, r=jdm
Add Origin header to WebSocket connections.

Closes #6532.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6611)
<!-- Reviewable:end -->
2015-07-13 23:39:16 -06:00
bors-servo
91ce002241 Auto merge of #6554 - dzbarsky:master, r=Ms2ger
Test namespace prefix for element equality



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6554)
<!-- Reviewable:end -->
2015-07-13 22:24:22 -06:00
Corey Farwell
78d2fe6e9b Complete FIXMEs related to UFCS 2015-07-14 09:24:53 +09: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
Bogdan Cuza
35d5328271 Fix #6379 2015-07-13 12:03:19 -04:00
Ms2ger
f93f49490f Replace WebSocketTask::Open by ConnectionEstablished. 2015-07-13 16:03:02 +02:00
Ms2ger
17bd7e5ec3 Remove some dead code from WebSockets. 2015-07-13 16:02:55 +02:00
Ms2ger
4c0c60a4d6 Return the parsed URL from WebSocket#url. 2015-07-13 14:21:18 +02:00
Ms2ger
da3c654f69 Add debug logging to register_named_element and unregister_named_element.
I found them helpful; I imagine others might as well.
2015-07-11 22:02:44 +02:00
bors-servo
3d4122e7c1 Auto merge of #6603 - wjh:remove-url-from-page-6589, r=jdm
Remove url field from Page

Resolves issue [#6589](https://github.com/servo/servo/issues/6589).

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6603)
<!-- Reviewable:end -->
2015-07-11 04:47:06 -06:00
Will Huxtable
58a31b07b4 Remove url field from Page 2015-07-11 17:06:12 +01:00
Ms2ger
8b45f9f51c Implement Window#top. 2015-07-11 18:00:59 +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
David Zbarsky
0fa8e51432 Test element prefix for element equality 2015-07-11 02:50:39 -04: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
bors-servo
52e857dd7b Auto merge of #6561 - dzbarsky:namespace, r=Ms2ger
Implement Node#isDefaultNamespace and Node#lookupNamespaceURI (fixes #1826)



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6561)
<!-- Reviewable:end -->
2015-07-10 06:44:25 -06:00
David Zbarsky
326b2a7161 Test element prefix for element equality 2015-07-10 14:41:37 -04: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
bors-servo
c04b7bbf6e Auto merge of #6540 - jdm:devtoolsfix, r=glennw
Make devtools usable once more.

This fixes the panic by rebasing #6189, and also makes cached messages appear once more.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6540)
<!-- Reviewable:end -->
2015-07-07 09:43:36 -06:00
Corey Farwell
7159fe749f Create and utilize utility for joining strs 2015-07-08 05:18:07 +09:00
Corey Farwell
91b0671e1d Join tokens when stringifying DOMTokenList
Previous, it would return the original String straight from the
AttrValue, which might contain extraaneous whitespace. The spec
specifies to just join the tokens together with \x20

https://dom.spec.whatwg.org/#stringification-behavior
2015-07-08 04:42:50 +09:00