Commit graph

2226 commits

Author SHA1 Message Date
vectorijk
270df6bac8 without the explicit dereferencing 2015-08-16 01:34:58 -07:00
vectorijk
7758f81ffd dereference via * instead of RefMut 2015-08-16 01:34:57 -07:00
vectorijk
14ac1ef75a remove ScriptListener
ref #7175
2015-08-16 01:34:55 -07:00
bors-servo
7c63c7d7c1 Auto merge of #7214 - tomjakubowski:websocket-binaryType, r=Ms2ger
Implement WebSocket#binaryType

Closes #7098

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7214)
<!-- Reviewable:end -->
2015-08-15 19:57:58 -06:00
Tom Jakubowski
e92f4629db WebSocket: Implement WebSocket#binaryType 2015-08-15 12:44:22 -07:00
bors-servo
55e755e35a Auto merge of #7233 - nox:default-float-value, r=Ms2ger
Support default values for restricted float members (fixes #7217)



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7233)
<!-- Reviewable:end -->
2015-08-15 10:59:44 -06:00
bors-servo
31413f4313 Auto merge of #7188 - servo:set_inline_style_property_priority, r=nox
Fix Element::set_inline_style_property_priority’s handling of priority

Thanks to @michaelwu for pointing out a copy-paste error.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7188)
<!-- Reviewable:end -->
2015-08-15 09:17:31 -06:00
Anthony Ramine
ec2a6b24b1 Support default values for restricted float members (fixes #7217) 2015-08-15 14:45:26 +02:00
bors-servo
6a52ec9484 Auto merge of #7006 - Wafflespeanut:script_cleanup, r=jdm
Splitting ScriptMsg into various enums...

... for #3734, which is also one of the oldest issues. (/cc @jdm)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7006)
<!-- Reviewable:end -->
2015-08-15 03:48:47 -06:00
João Oliveira
0038580abf Replace uses of for foo in bar.iter() and for foo in bar.iter_mut()
closes #7197
2015-08-15 02:27:39 +01:00
Ravi Shankar
89153116fb Splitting ScriptMsg into various enums; r=jdm 2015-08-15 02:00:48 +05:30
João Oliveira
9c11781880 replace .len() == 0 with is_empty()
closes #7198
2015-08-14 04:00:33 +01:00
bors-servo
2e1ca10eea Auto merge of #7199 - frewsxcv:codegen-if-let, r=Manishearth
Prefer if..let over if..is_some..unwrap in codegen



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7199)
<!-- Reviewable:end -->
2015-08-13 15:35:21 -06:00
bors-servo
289decb064 Auto merge of #7196 - frewsxcv:double-unsafe, r=jdm
Avoid marking codegen method bodies as unsafe twice

`CGAbstractMethod` takes a couple boolean parameters, among others:

* `extern`: will mark the method as `unsafe` and `extern`
* `unsafe`: will wrap the method body in an `unsafe` block

Passing both as `True` should not mark it as `unsafe` twice.

Example from a generated `HTMLCollectionBinding.rs`:

Before:

```
unsafe extern fn get_length(..) -> u8 {
    unsafe {
        // code here
    }
}
```

After

```
unsafe extern fn get_length(..) -> u8 {
    // code here
}
```

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7196)
<!-- Reviewable:end -->
2015-08-13 15:00:37 -06:00
Corey Farwell
43429abce4 Avoid marking codegen method bodies as unsafe twice
`CGAbstractMethod` takes a couple boolean parameters, among others:

* `extern`: will mark the method as `unsafe` and `extern`
* `unsafe`: will wrap the method body in an `unsafe` block

Passing both as `True` should not mark it as `unsafe` twice.

Example from a generated `HTMLCollectionBinding.rs`:

Before:

```
unsafe extern fn get_length(..) -> u8 {
    unsafe {
        // code here
    }
}
```

After

```
unsafe extern fn get_length(..) -> u8 {
    // code here
}
```
2015-08-13 16:50:17 -04:00
Corey Farwell
7a774a198c Prefer if..let over if..is_some..unwrap in codegen 2015-08-13 16:35:21 -04:00
bors-servo
42d74324e2 Auto merge of #7190 - Ms2ger:node-clone, r=jdm
Correct the default value for Node#cloneNode's deep argument.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7190)
<!-- Reviewable:end -->
2015-08-13 13:51:06 -06:00
bors-servo
a03616f379 Auto merge of #7097 - boghison:memtypes, r=jdm
Measure heap memory usage for more types. Fixes #6951

Also adds HeapSizeOf implementations/derive for some types. I've used "Cannot calculate Heap size" as a reason everywhere, because my imagination is rather limited. If you'd like me to change this message for specific types, please write something like this: "Trusted - Cannot calculate Heap size for Trusted" so that it would be easier for me to replace them through a script :)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7097)
<!-- Reviewable:end -->
2015-08-13 13:16:14 -06:00
Bogdan Cuza
45145108da Measure heap memory usage for more types. Fixes #6951 2015-08-13 21:44:41 +03:00
bors-servo
f3b7c5cb4b Auto merge of #7132 - jdm:docenum, r=ms2ger
Document the use and meaning of the devtools control messages. Fixes …

…#6922.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7132)
<!-- Reviewable:end -->
2015-08-13 12:41:48 -06:00
Josh Matthews
820c74649b Improve documentation for devtools messages a bit more. 2015-08-13 13:44:54 -04:00
Simon Sapin
39ce15f20d Fix Element::set_inline_style_property_priority’s handling of priority
Thanks to mwu for pointing out a copy-paste error.
2015-08-13 17:07:17 +02:00
Ms2ger
c007b66d97 Correct the default value for Node#cloneNode's deep argument. 2015-08-13 12:12:45 +02:00
Ms2ger
f62e7be168 Merge the fragment handling into handle_navigate.
This is handled in the 'navigate' algorithm in the specification.
2015-08-12 20:03:18 +02:00
Ms2ger
2cdc043fcf Remove ScriptControlChan. 2015-08-12 16:24:09 +02:00
Ms2ger
4f9ec8915d Store a Sender<ConstellationControlMsg> in ScriptReflow. 2015-08-12 15:47:35 +02:00
Ms2ger
41ac66112a Store a Sender<ConstellationControlMsg> in Window. 2015-08-12 15:34:41 +02:00
Ms2ger
26d191f068 Remove the unused Window::control_chan() method. 2015-08-12 15:32:30 +02:00
Ms2ger
c05f0906d5 Store a Sender<ConstellationControlMsg> in ScriptTask. 2015-08-12 15:25:31 +02:00
Josh Matthews
aac53344b8 fixup! Simplify devtools frame marker notification. Record each frame tick based on a single message sent from the script task that ticked. 2015-08-12 09:05:05 -04:00
Josh Matthews
e59de75608 Simplify devtools frame marker notification. Record each frame tick based on a single message sent from the script task that ticked. 2015-08-12 00:59:58 -04:00
bors-servo
0c5158587d Auto merge of #6757 - mskrzypkows:document_hasFocus, r=jdm
Implementing document.hasFocus method, needs tests. #6475

I'm not sure if I have to implement some test for a new document method. As I remember there were tests for document methods, is it changed now? Where should I add tests?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6757)
<!-- Reviewable:end -->
2015-08-11 15:35:21 -06:00
bors-servo
d9925f5f92 Auto merge of #7104 - dzbarsky:add_color_stop, r=Ms2ger
CanvasGradient#addColorStop should throw for invalid colors and offsets

The new test failure is because the color stop has a value of 'currentColor' which we don't support yet.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7104)
<!-- Reviewable:end -->
2015-08-11 06:24:35 -06:00
David Zbarsky
a3ee46fc9c Make CSSStyleDeclaration setters rethrow errors instead of unwrapping and crashing. 2015-08-11 00:34:41 -04:00
Brandon Fairchild
a95015b68a Rename SendConsoleMessage to ConsoleAPI
Fixes #7131.
2015-08-10 16:46:18 -04:00
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
Maciej Skrzypkowski
07c0cd8a18 Implementing document.hasFocus method. #6475 2015-08-10 21:23:09 +02:00
David Zbarsky
7315b50973 CanvasGradient#addColorStop should throw for invalid colors and offsets 2015-08-09 23:19:56 -04:00
bors-servo
f77973c903 Auto merge of #7101 - HarryLovesCode:master, r=jdm
Allows object evaluation in devtools -- Closes #6724

The purpose of this is to fix how objects were previously evaluated in
the developer tools.

- Before this, evaluating an object such as the `window` would `panic!`
- After this, evaluating an object such as the `window` outputs `[object
  Window]`

A few things to note:

- This commit contains `unsafe` code.
- This does not contain a test because the developer tools cannot be properly tested until #5971 lands.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7101)
<!-- Reviewable:end -->
2015-08-09 18:27:53 -06:00
bors-servo
44d93bc37a Auto merge of #7089 - dzbarsky:createtbody, r=Ms2ger
Implement HTMLTableElement#createTBody



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7089)
<!-- Reviewable:end -->
2015-08-09 13:56:47 -06:00
Ms2ger
97c79bbb99 Avoid a panic when clicking a link whose href is unparsable. 2015-08-09 20:05:35 +02:00
David Zbarsky
54adae26c6 Implement HTMLTableElement#createTBody 2015-08-09 12:24:15 -04:00
Ms2ger
ecd3f4f80e Introduce a follow_hyperlink function to implement the "follow a hyperlink" algorithm. 2015-08-09 17:54:56 +02:00
Harrison G
e0f007a940 Closes #6724 (Allows object evaluation in devtools)
The purpose of this is to fix how objects were previously evaluated in
the developer tools.

- Before this, evaluating an object such as the `window` would `panic!`
- After this, evaluating an object such as the `window` outputs `[object
  Window]`

A few things to note:

- This commit contains `unsafe` code.
- This does not contain a test because the developer tools cannot be properly tested until #5971 lands.
2015-08-09 11:45:16 -04:00
bors-servo
6a8bc85284 Auto merge of #7092 - dzbarsky:putimagedata, r=jdm
Clean up and fix PutImageData



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7092)
<!-- Reviewable:end -->
2015-08-09 07:00:56 -06:00
bors-servo
dbce4c5bd8 Auto merge of #6975 - dzbarsky:get-tiny, r=jdm
Fix getImageData with sizes < 1 pixel



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6975)
<!-- Reviewable:end -->
2015-08-09 06:32:30 -06:00
bors-servo
f41834e321 Auto merge of #7063 - dzbarsky:caption, r=Ms2ger
Implement createCaption and deleteCaption on HTMLTableElement



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7063)
<!-- Reviewable:end -->
2015-08-09 04:45:28 -06:00
bors-servo
28abc55d9b Auto merge of #7107 - AdrianArroyoCalle:master, r=Ms2ger
Removed unused object_to_string method

Closes #7100

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7107)
<!-- Reviewable:end -->
2015-08-09 04:16:55 -06:00
Adrián Arroyo Calle
68f6fdd8bc Removed unused object_to_string method 2015-08-09 11:26:15 +02: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