Commit graph

1683 commits

Author SHA1 Message Date
bors-servo
6b4f1a42f0 Auto merge of #6694 - jdm:websocketprotocol, r=Ms2ger
Reject websocket protocol requests that don't match https://tools.iet…

…f.org/html/rfc6455#section-4.1 .

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6694)
<!-- Reviewable:end -->
2015-07-22 09:44:34 -06: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
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
a9f651cfa1 Address review comments; add docs 2015-07-22 18:34:54 +05:30
Corey Farwell
b1b03a32db Upgrade rust-selectors, pass ':empty' tests
https://github.com/servo/rust-selectors/pull/36
2015-07-22 18:27:33 +07: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
fda3eb6327 Make struct part of unrooted_must_root handle type parameters 2015-07-22 00:01: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
Tetsuharu OHZEKI
eb47185d58 Implement Window.trap() to trigger a breakpoint trap 2015-07-21 00:53:17 +09:00
Ms2ger
6d7bc2cffe Rename browser_context identifiers to browsing_context. 2015-07-20 15:56:32 +02:00
Ms2ger
7491728a9c Rename BrowserContext to BrowsingContext. 2015-07-20 15:41:16 +02:00
Ms2ger
9a143bb67e Remove leftover debug println. 2015-07-20 13:12:20 +02:00
Patrick Walton
b6485a9eaf compositing: Make the constellation messages serializable. 2015-07-18 12:43:08 -07:00
David Zbarsky
207648f14d Implement Range#cloneContents 2015-07-17 02:48:39 -04:00
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
Simon Sapin
83d2a11d86 Upgrade to rustc 1.3.0-dev (fddfd089b 2015-07-10) 2015-07-15 00:46:43 +02: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
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
Ms2ger
8b45f9f51c Implement Window#top. 2015-07-11 18:00:59 +02:00