Commit graph

1492 commits

Author SHA1 Message Date
ecoal95
eff2bb4310 WebGLRenderingContext getters and getParameter
This implements the `canvas`, `drawingBufferHeight` and
`drawingBufferWidth` getters to `WebGLRenderingContext`, and an initial
version of `getParameter`.
2015-06-01 16:34:51 +02:00
bors-servo
0de09b936e Auto merge of #6183 - ecoal95:webglcontextattributes, r=nox
r? @jdm

I couldn't add the `getContextAttributes` method since `CodegenRust`
doesn't know how to return a dictionary value, I'll take a look at it ASAP.

I think the helper functions can return directly the renderer, since they're used just for that, but I wanted to hear your opinions about this.

By the way I'm interested in adding more serious tests for WebGL, and I think the [khronos conformance suit](https://github.com/KhronosGroup/WebGL/tree/master/conformance-suites/1.0.3) should be the best option.

Should I try to integrate it in wpt, or making a `tests/webgl` directory (or similar) inside the servo tree? (Maybe this question should be for @Ms2ger)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6183)
<!-- Reviewable:end -->
2015-06-01 08:37:48 -05:00
ecoal95
b3ac346749 Add WebGLContextAttributes support
This commit also:
* Allows to return non-rootable dictionaries from
Codegen.
* Merges the two context types in an enum type.
2015-06-01 15:29:38 +02:00
Hyowon Kim
a512e9e507 Correct the calculation of rects for drawimage. 2015-06-01 15:58:38 +09:00
bors-servo
bf4fc6f388 Auto merge of #5972 - pgonda:remove-children-from-doc, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5972)
<!-- Reviewable:end -->
2015-05-29 12:03:28 -05:00
bors-servo
df74ed136c Auto merge of #6206 - nox:typeerror-for-unions, r=Manishearth
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6206)
<!-- Reviewable:end -->
2015-05-28 06:24:00 -05:00
Anthony Ramine
2c6d2d3abe Make throw_not_in_union() throw a TypeError (fixes #6194) 2015-05-28 13:03:28 +02:00
bors-servo
2b52006b1c Auto merge of #5981 - Jinwoo-Song:nodeiterator, r=Manishearth
Implement NodeIterator's basic functionality. (Fixes #1235)  But the cases for node removals are not implemented yet. 

r? @jdm 
cc @yichoi

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5981)
<!-- Reviewable:end -->
2015-05-28 05:14:08 -05:00
Jinwoo Song
db25be7bf6 Update NodeIterator code to apply review comments. 2015-05-28 18:37:27 +09:00
bors-servo
d87af8ac52 Auto merge of #6192 - nox:cleanup-urlsearchparams, r=Manishearth
It now uses rust-url for its serializer.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6192)
<!-- Reviewable:end -->
2015-05-27 05:21:05 -05:00
Anthony Ramine
6802bafc39 Cleanup URLSearchParams
It now uses rust-url for its serializer.
2015-05-27 12:19:16 +02:00
Jinwoo Song
cb2bdf1977 Implement nextNode(), previousNode() and detach() in NodeIterator
First patch to resolve #1235. We need more implementation for handling node removals,
and I'll implement in next patch.
2015-05-27 16:37:30 +09:00
Jinwoo Song
4e8005cd5b Implement Document.createNodeIterator and rebase patch 2015-05-27 16:37:30 +09:00
Jinwoo Song
0e4c792dc5 Implement more NodeIterator attribute and methods
Just implement the skelectons
 - referenceNode attribute
 - nextNode() and previousNode()
2015-05-27 16:37:30 +09:00
Jinwoo Song
2701c264ab Implement NodeIterator's attributes
- root, whatToShow, and filter
2015-05-27 16:37:29 +09:00
bors-servo
df2f8d0636 Auto merge of #6187 - tamird:cleanup-validate-and-extract, r=mbrubeck
Also `debug_assert!`s that `splitn` was called with the
correct `count` argument.

Adaptation of #5778.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6187)
<!-- Reviewable:end -->
2015-05-26 16:29:42 -05:00
Patrick Walton
05bf2ffd02 script: Address review comments 2015-05-26 11:03:47 -07:00
Patrick Walton
9e34e82aec script: Reflow 200 milliseconds after the <body> is parsed, like Gecko
does.
2015-05-26 10:38:47 -07:00
Tamir Duberstein
a3d463093e Avoid extra O(n) scan in validate_and_extract
Also `debug_assert!`s that `splitn` was called with the
correct `count` argument.
2015-05-26 13:26:26 -04:00
Peter
7239d67353 fixes #5963 2015-05-26 10:01:03 -04:00
bors-servo
7d0409b842 Auto merge of #6140 - nox:cleanup-rootedvec, r=Manishearth
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6140)
<!-- Reviewable:end -->
2015-05-26 08:36:29 -05:00
Anthony Ramine
22931145ab Remove use of RootedVec in DOMRectList 2015-05-26 15:35:17 +02:00
Anthony Ramine
81cacdf820 Remove use of RootedVec in NodeList 2015-05-26 15:35:16 +02:00
bors-servo
999325460e Auto merge of #6179 - AopicieR:byte_strings, r=jdm
Fixes #3257 
In eventtarget.rs I'm not sure whether ARG_NAMES actually needs to be static!?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6179)
<!-- Reviewable:end -->
2015-05-25 17:13:27 -05:00
bors-servo
34a617aaa1 Auto merge of #6169 - tamird:struct-variant, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6169)
<!-- Reviewable:end -->
2015-05-25 15:53:56 -05:00
Philipp Hartwig
ab4059ca21 Use byte string instead of handcrafted byte array 2015-05-25 20:57:16 +02:00
bors-servo
542519ebfd Auto merge of #6174 - frewsxcv:cleanup-long-lines, r=SimonSapin
Part of https://github.com/servo/servo/issues/6041

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6174)
<!-- Reviewable:end -->
2015-05-24 18:27:26 -05:00
Corey Farwell
8e3f4bba85 Reduce max line length from 150 to 120 characters
Part of https://github.com/servo/servo/issues/6041
2015-05-24 00:01:49 -04:00
Alexander Putilin
4e440a0ebb fixes 6111: WebSocket close event shouldn't be Cancelable 2015-05-24 01:38:39 +03:00
Tamir Duberstein
dce048dd54 Use a struct variant for clarity 2015-05-23 16:55:00 -04:00
bors-servo
dd319c1a99 Auto merge of #5727 - jdm:parserinterrupt2, r=mbrubeck
...r parsing. Hook up document loading to async networking events.

Relies on https://github.com/servo/html5ever/pull/107, so we'll likely need to backport it rather than wait for the next rustc upgrade.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5727)
<!-- Reviewable:end -->
2015-05-21 12:37:06 -05:00
Josh Matthews
ef8a127156 Update test expectations. Mark script loads as complete when the response is complete. 2015-05-21 09:53:19 -04:00
bors-servo
b84aa41c22 Auto merge of #6154 - Nashenas88:websocket-parse-url-typo, r=jdm
This is a really small typo fix for an issue I worked on recently.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6154)
<!-- Reviewable:end -->
2015-05-21 06:59:06 -05:00
Paul Faria
d4be93613b Adding in a missed algorithm step number in the comments. 2015-05-20 22:17:07 -04:00
bors-servo
1060cfde68 Auto merge of #6152 - glennw:runnable-panic, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6152)
<!-- Reviewable:end -->
2015-05-20 20:01:32 -05:00
Glenn Watson
b84c6fa5db Fix document load event firing after pipeline is closed. 2015-05-21 08:39:09 +10:00
bors-servo
77099b25d5 Auto merge of #5586 - pcwalton:no-broken-background-image-redux, r=glennw
r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5586)
<!-- Reviewable:end -->
2015-05-20 16:43:31 -05:00
bors-servo
ad53e95080 Auto merge of #6083 - ecoal95:layerize-canvas, r=pcwalton
I've done a bit of job to get this done. Right now readback is still used, but we have a `LayerId` -> `CanvasRenderer` map on the paint task, that we can use to get rid of that.

I'd want review, to see if this is a good approach (I know it's not the initial `CanvasId` -> renderer approach, but it's pretty similar, since a canvas involves a `PaintLayer`).

I had to do a bit of refactoring to avoid cyclic dependencies between canvas and gfx. I'd want you to review them too.

It's mergeable and doesn't break any tests :P

Some of my main concerns:
* Does the canvas render really need to be behind an `Arc<Mutex<T>>`?
* I can't clone a `NativeSurface` right now (that's why the `SendNativeSurface()` msg is unimplemented in the WebGL task). It should be easy to add that to rust-layers, supposing the caller is responsible to mark it as non-leaking, any reason to not do it?

cc @jdm @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6083)
<!-- Reviewable:end -->
2015-05-20 15:42:06 -05:00
bors-servo
fada39164c Auto merge of #5858 - pgonda:tabindex-focus-flag, r=jdm
Added support for the tabindex field, also added its correct defaults (-2 TODOs for things not supported in Servo yet).  Also added tabindex logic into Element::is_focusable_area.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5858)
<!-- Reviewable:end -->
2015-05-20 14:34:31 -05:00
Patrick Walton
7e7675c1dc net: Don't load the placeholder image for background images, only for
image fragments.

This also changes the way the placeholder is handled in the image cache
task to decode it up front instead of each time an image fails to load,
both because it was more convenient to implement that way and because
it saves CPU cycles to do so.

This matches the behavior of Gecko and WebKit. It improves the look of
our cached copy of Wikipedia.
2015-05-20 12:00:33 -07:00
Josh Matthews
8082df7d0d Make external script sources load asynchronously, yet still block further parsing. Hook up document loading to async networking events. 2015-05-20 14:22:09 -04:00
Patrick Walton
1a3395e077 script: Implement the width and height attributes for iframes per
HTML5 § 4.8.6.

Improves Amazon and Ars Technica.
2015-05-20 11:15:25 -07:00
ecoal95
3350522306 Layerize canvas
Note that this keeps using readback right now, `NativeSurface` painting
will be implemented soon.

Also see https://github.com/servo/servo/issues/6142
2015-05-20 19:10:50 +02:00
Peter
1c96eed544 fixes #5603, adds support for tabindex 2015-05-20 10:34:16 -04:00
bors-servo
6481058309 Auto merge of #6139 - michaelwu:rustup-fixes, r=SimonSapin
Mutable transmutes and wrong transmutes fixed.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6139)
<!-- Reviewable:end -->
2015-05-20 01:55:43 -05:00
bors-servo
d869a3c7a8 Auto merge of #6127 - Nashenas88:websockets-invalid-urls, r=Ms2ger
Fix #6061.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6127)
<!-- Reviewable:end -->
2015-05-20 01:13:57 -05:00
Paul Faria
66e9b33a52 Fixed definition of Close and Send in WebSocket.webidl and updated implementation in websocket.rs. 2015-05-19 23:59:22 -04:00
Paul Faria
51ae7334f5 Responded to more code review comments. Simplified code a lot. 2015-05-19 23:54:38 -04:00
Paul Faria
fe0b77d669 Responded to code review comments, general cleanup 2015-05-19 23:54:36 -04:00
Paul Faria
8e78564dc3 Fixing one missed trailing whitespace, and fixed url 2015-05-19 23:54:34 -04:00