Commit graph

1615 commits

Author SHA1 Message Date
ecoal95
42bd43a696 webgl: Make bind* calls more spec-compliant 2015-07-06 19:54:06 +02:00
ecoal95
b1765c6882 webgl: Refactor implementation to move logic inside the DOM interfaces
This improves the encapsulation and consistency in our WebGL
implementation.

Also allows to implement new methods such as `getShaderSource()`.

It will also allow us to use `delete()` in the destructors of them (note
that we will want to keep track of them from the context).
2015-07-06 19:54:05 +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
bors-servo
cc73aad447 Auto merge of #6546 - michaelwu:slim-layoutdatawrapper, r=Ms2ger
Remove LayoutChan from LayoutDataWrapper

Saves 32 bytes in Node.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6546)
<!-- Reviewable:end -->
2015-07-05 21:39:12 -06:00
Corey Farwell
a985ee4f19 Utilize iterators for AttrValue::from_serialized_tokenlist 2015-07-04 21:54:45 -07:00
David Zbarsky
861ddedaef Remove some redundant let bindings 2015-07-04 13:12:49 -04:00
Michael Wu
1a014beb08 Remove LayoutChan from LayoutDataWrapper 2015-07-04 03:54:40 -04:00
bors-servo
0298c92670 Auto merge of #6549 - Ms2ger:from_actual, r=nox
Remove *Cast::from_actual.

Since JSRef was removed, from_actual duplicates from_ref.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6549)
<!-- Reviewable:end -->
2015-07-03 22:56:17 -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
Simon Sapin
75e3e787f6 Upgrade to rustc 1.3.0-dev (f3b97a74a 2015-07-03) 2015-07-04 11:32:41 +02:00
David Zbarsky
c55a06cb64 Factor out common forward/back navigation code in HTMLIFrameElementMethods 2015-07-03 23:05:58 -04:00
Tim Taubert
92874a89d2 Implement window.crypto.getRandomValues() 2015-07-03 18:34:00 +02:00
Ms2ger
9f52ab11aa Simplify the string handling in HTMLAnchorElement::activation_behavior. 2015-07-03 13:31:00 +02:00
Ms2ger
59ea4dbd21 Remove an avoidable null-check from HTMLAnchorElement::activation_behavior. 2015-07-03 13:30:31 +02:00
Ms2ger
2e89228cd5 Remove HTMLAnchorElement::handle_event.
It is equivalent to the default implementation.
2015-07-03 13:27:23 +02:00
bors-servo
be9d60664d Auto merge of #6510 - mintern:fix-worker-redirect-location, r=Ms2ger
Update Worker location for redirects

Fixes #4146

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6510)
<!-- Reviewable:end -->
2015-07-02 03:28:29 -06:00
Brandon Mintern
0a3981cdc9 Update Worker location for redirects
Fixes #4146
2015-07-02 11:25:33 -04: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
Matt Brubeck
13072c7b0c Remove string_cache dependency from util.
Move `namespace::from_domstring` from util to script::dom, because it is used
only in that crate.
2015-07-01 10:04:53 -07:00
bors-servo
9897125b34 Auto merge of #6434 - yoava333:mouseover, r=nox
Added support for mouseover and mouseout events

fixes issue https://github.com/servo/servo/issues/6404

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6434)
<!-- Reviewable:end -->
2015-06-30 20:05:06 -06:00
Michael Wu
de788e0529 Auto-derive JSTraceable and Reflectable for ServoHTMLParser 2015-06-30 15:53:04 -04:00
Yoav Alon
3a44e143bc add support for mouseover and mouseout events 2015-06-30 14:42:38 +03:00
Michael Wu
728ecc72b6 Add JSAutoRequest/JSAutoCompartment to HTMLIFrameElement 2015-06-29 18:59:50 -04:00
Corey Farwell
109e3219a4 Prefer HTTPS when linking to GitHub Pages
This commit was generated using the following commands:

```
find . -iname "*.webidl" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)github.io/https:\1github.io/g'
```

```
find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)github.io/https:\1github.io/g'
```
2015-06-28 23:16:47 -07:00
bors-servo
6f25ecea3f Auto merge of #6507 - Ms2ger:node-insert, r=Manishearth
Fix a bug in Node::pre_insert.

It was accidentally broken in 3ce368fa28.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6507)
<!-- Reviewable:end -->
2015-06-28 14:01:47 -06:00
Ms2ger
0b680dc9bd Fix a bug in Node::pre_insert.
It was accidentally broken in 3ce368fa28.
2015-06-28 15:59:01 +02:00
bors-servo
46709edaf8 Auto merge of #6499 - Ms2ger:slice_position_elem, r=nox
Stop using position_elem.

It is unstable and not really better than the stable alternative.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6499)
<!-- Reviewable:end -->
2015-06-27 15:51:35 -06: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
108c9b161c Remove unused imports. 2015-06-27 19:37:12 +02:00
Mukilan Thiyagarajan
8f5265c131 CGImports must consider special operations to generate required 'use' items 2015-06-27 19:01:17 +05:30
Michael Wu
0cd855379d Don't use MutNullableHeap in InputActivationState
No internal mutability required here.
2015-06-26 19:32:12 -04:00
Michael Wu
58d28ca0c8 Don't use MutHeap in BoundaryPoint
BoundaryPoint only requires external mutability, so MutHeap isn't necessary.
2015-06-26 19:32:12 -04:00
bors-servo
aed11dc22c Auto merge of #6477 - Ms2ger:vec_from_raw_buf, r=metajack
Stop using Vec::from_raw_buf.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6477)
<!-- Reviewable:end -->
2015-06-26 16:01:23 -06:00
bors-servo
c331db1623 Auto merge of #6468 - servo:update-selectors, r=Ms2ger
Update rust-selectors

r? @Ms2ger

https://github.com/servo/rust-selectors/pull/33

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6468)
<!-- Reviewable:end -->
2015-06-26 14:50:01 -06:00
Simon Sapin
9e1a674b16 Update rust-selectors 2015-06-26 12:35:08 -07:00
Ms2ger
a72c6ec8b6 Stop using Vec::from_raw_buf. 2015-06-26 21:20:13 +02:00
Ms2ger
932aa06694 Use Rc::get_mut rather than deprecated rc::get_mut. 2015-06-26 17:17:18 +02:00
bors-servo
9eb3cc2a24 Auto merge of #6464 - Ms2ger:into_raw, r=saneyuki
Use Box::into_raw rather than boxed::into_raw.

The latter is deprecated.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6464)
<!-- Reviewable:end -->
2015-06-26 04:50:54 -06: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
28086f3c75 Use Box::into_raw rather than boxed::into_raw.
The latter is deprecated.
2015-06-25 23:03:54 +02:00
Michael Wu
2b82b92b19 Fix indentation in testbindingproxy.rs 2015-06-25 15:19:22 -04:00
bors-servo
57cc84b293 Auto merge of #6110 - klusark:NamedConstructor, r=Ms2ger
Implement Named constructors and the Image constructor for HTMLImageElement

I'm not sure if I like how I mostly just duplicated the code in CodegenRust.py, so that might need to be refactored.

Instead of just calling it Image, we might want to call it ConstructorImage, to make it clear that it's a constructor. Anyone have an opinion on that?

There seems to be a bug in the HTMLImageElement getter/setter as the value is 0 regardless of what I do. This seems to be unrelated to my commits, so I'll investigate that separately.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6110)
<!-- Reviewable:end -->
2015-06-25 02:18:06 -06:00
Corey Farwell
1bd171e782 Remove unused js::JS_ARGV import in script component 2015-06-24 21:48:51 -07:00
Glenn Watson
4b3962e6c7 Trigger reflow after rAF callbacks. 2015-06-25 05:40:23 +10:00
Joel Teichroeb
d33579183a Implement the Image NamedConstructor for HTMLImageElement 2015-06-24 10:42:54 -07:00
Joel Teichroeb
012be81eab Add support for NamedConstructor in webidls 2015-06-24 10:42:53 -07:00
bors-servo
6247a96761 Auto merge of #6223 - nox:merge-generic-functions, r=Ms2ger
Merge generic funs to share them across all bindings (fixes #2684)



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6223)
<!-- Reviewable:end -->
2015-06-24 03:54:56 -06:00
Anthony Ramine
a90983553b Merge generic funs to share them across all bindings (fixes #2684) 2015-06-24 11:34:30 +02:00
bors-servo
469b9550f6 Auto merge of #6443 - Ms2ger:cleanup-layout, r=pcwalton
Various layout cleanup.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6443)
<!-- Reviewable:end -->
2015-06-24 03:00:32 -06:00