Commit graph

1585 commits

Author SHA1 Message Date
ecoal95
c33776a600 webgl: Uncomment WebGLRenderingContext constants 2015-06-13 23:03:38 +02:00
ecoal95
b0d04765ae webgl: Add WebGLActiveInfo and WebGLShaderPrecisionFormat interfaces 2015-06-13 23:03:37 +02:00
Corey Farwell
5c408d2be9 rust-geom API changes
https://github.com/servo/rust-geom/pull/81
2015-06-13 12:28:21 -07:00
Ms2ger
b49bd79625 Use str::parse() rather than FromStr::from_str.
The former appears to be preferred.
2015-06-13 17:58:16 +02:00
bors-servo
9474e62d38 Auto merge of #6157 - hyowon:canvas_pattern_fill, r=nox
Issue #6056
Depends on servo/rust-azure#160

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6157)
<!-- Reviewable:end -->
2015-06-13 01:49:50 -06:00
Hyowon Kim
00240e5550 Implementation of pattern fill style for canvas. 2015-06-13 14:35:13 +09:00
bors-servo
c3d242544e Auto merge of #6308 - pcwalton:debloat-partialeq, r=nox
This makes the difference between selector matching scaling on the ARM
Cortex-A9 and not, because the auto-derived `PartialEq` implementation
blows out the 32KB I-cache. With this change, there is a 2x improvement
in selector matching over sequential when using all 8 cores. (More work
needs to be done; this is a start.)

r? any DOM expert

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6308)
<!-- Reviewable:end -->
2015-06-12 21:04:05 -06:00
Patrick Walton
8c210e1a27 script: Make PartialEq on element type IDs generate a lot less code.
This makes the difference between selector matching scaling on the ARM
Cortex-A9 and not, because the auto-derived `PartialEq` implementation
blows out the 32KB I-cache. With this change, there is a 2x improvement
in selector matching over sequential when using all 8 cores. (More work
needs to be done; this is a start.)
2015-06-12 15:00:02 -07:00
Mátyás Mustoha
3ae64fe739 Remove gfx_traits from the dependencies of [script]. 2015-06-12 12:59:46 +02:00
Hyowon Kim
473afdb196 Add attributes for canvas shadows. 2015-06-12 09:40:00 +09:00
bors-servo
35000a9b85 Auto merge of #6317 - frewsxcv:rm-util-crate-reexports, r=Ms2ger
The util component specified fnv and smallvec as dependencies and publicly
reexported both of them. Several other components utilized these reexports,
presumably because fnv and smallvec used to live in the tree so reexporting
made the transition easier.

These indirect dependencies through the util component are unnecessary.

This commit removes the fnv & smallvec crate reexports in the util component.
It exchange, it adds fnv & smallvec as dependencies to non-util components
wherever needed. Finally, it removes the fnv dependency from util as it is not
utilized anywhere in the util component.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6317)
<!-- Reviewable:end -->
2015-06-10 08:23:11 -06:00
Corey Farwell
4f47b41fa7 Remove fnv & smallvec crate reexports from util
The util component specified fnv and smallvec as dependencies and publicly
reexported both of them. Several other components utilized these reexports,
presumably because fnv and smallvec used to live in the tree so reexporting
made the transition easier.

These indirect dependencies through the util component are unnecessary.

This commit removes the fnv & smallvec crate reexports in the util component.
It exchange, it adds fnv & smallvec as dependencies to non-util components
wherever needed. Finally, it removes the fnv dependency from util as it is not
utilized anywhere in the util component.
2015-06-10 07:14:55 -07:00
bors-servo
c86e461555 Auto merge of #6323 - Ms2ger:typo, r=SimonSapin
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6323)
<!-- Reviewable:end -->
2015-06-10 07:30:09 -06:00
Ms2ger
9ef975d929 Fix a typo in the DOM documentation. 2015-06-10 13:45:05 +02:00
Ms2ger
5149f0e953 Remove null_str_as_empty and null_str_as_empty_ref functions.
With just one caller between the two functions, there doesn't seem to be
much point in having the abstraction.
2015-06-10 13:36:51 +02:00
bors-servo
3ece6bc166 Auto merge of #6318 - Ms2ger:optimize-lookup-prefix, r=nox
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6318)
<!-- Reviewable:end -->
2015-06-10 04:30:38 -06:00
bors-servo
b46ab0c60d Auto merge of #6319 - mukilan:overload-codegen, r=Ms2ger
The cause of the issue is that the index of the overload to be invoked was being derived from the wrong lists (that contain only a subset of the overloads)  - `possibleOverloads` and `interfaceSigs` rather than the `method.signatures()` (which contains all possible overloads).

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6319)
<!-- Reviewable:end -->
2015-06-10 03:50:42 -06:00
Mukilan Thiyagarajan
e5b8e81bf8 Fix codegen for overload resolution. Fixes #6300 2015-06-10 14:14:31 +05:30
Ms2ger
749598f5a0 Optimize lookupPrefix. 2015-06-10 10:33:40 +02:00
bors-servo
44a4b7886d Auto merge of #6284 - fbau123:6242-testbinding-add-specialoperations, r=nox
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6284)
<!-- Reviewable:end -->
2015-06-09 17:12:43 -06:00
Francesc Bautista
4ada1e9421 added TestBindingProxy.webidl and testbindingproxy.rs files
added testbindingproxy to dom/mod.rs and fixed unused variable warning of testingbindingproxy.rs

removed useless GlobalField, removed brackets use statements with only 1 element and changed the description of TestBindingProxy.webidl

renamed reflector to reflector_ and removed unused import in testbinding.rs
2015-06-09 23:14:05 +02:00
Manish Goregaokar
968b335f9b Audit and reduce unstable usage in script
Reasons behind existing unstable features:

alloc:

 - `Rc.make_unique()`
 - `into_raw` / `from_raw` (naming). All over the bindings code.

collections:

 - `Vec.push_all()`
 - `from_str`
   - can be replaced by `.to_owned()`
 - `from_raw_buf`
   - could be done directly

core:

  - `nonzero`
  - `UnsafeCell` (`as_unsafe_cell`)
  - `Zeroable`
  - `Peekable.is_empty`

std_misc:

  - Handle stuff
2015-06-10 01:20:06 +05:30
bors-servo
e09c555a41 Auto merge of #6293 - ecoal95:webgl-objects, r=nox
This commit implements:
* WebGLFramebuffer
* WebGLRenderbuffer
* WebGLTexture

And adds the following methods to `WebGLRenderingContext`:
* create{Texture,Framebuffer,Renderbuffer}
* bind{Texture,Framebuffer,Renderbuffer}
* destroy{Buffer,Texture,Framebuffer,Renderbuffer}

Fixes:
* WebGLUniform location shouldn't inherit from WebGLObject.

Known Issues:
* WebGL objects have to be destroyed on drop, we may want to keep a reference to the context, or maybe a clone of the renderer to achieve this

Also refactors a huge part of the current implementation, to allow
failing on creation of different WebGL objects.

Blocked on https://github.com/servo/gleam/pull/22

A reftest for most of the added functionality is not doable right now,
we need a few more functions in order to upload a texture, for example.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6293)
<!-- Reviewable:end -->
2015-06-09 10:06:37 -05:00
bors-servo
ce30807be5 Auto merge of #6290 - hyowon:fill_or_stroke_style, r=nox
The fillStyle and strokeStyle attributes can be either strings(color), CanvasGradients, or CanvasPatterns.
The current implementation only considers strings(color).
r? @nox @jdm @pcwalton 
cc @yichoi

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6290)
<!-- Reviewable:end -->
2015-06-08 09:49:13 -05:00
bors-servo
ca6a34a1cd Auto merge of #6299 - GreenRecycleBin:#6271, r=Ms2ger
get_proto_or_iface_array now returns *mut ProtoOrIfaceArray

Fix #6271

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6299)
<!-- Reviewable:end -->
2015-06-07 10:47:14 -05:00
bors-servo
78665336e6 Auto merge of #6297 - brson:inline, r=jdm
This results in a 14% compile time improvement.

See https://gist.github.com/brson/b48dd03b06c406be68e6

I'm not suggesting you merge this as-is, but you might consider whether removing some of these is worth pursuing.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6297)
<!-- Reviewable:end -->
2015-06-06 08:25:29 -05:00
bors-servo
493f96b9ab Auto merge of #6291 - Ms2ger:caption, r=nox
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6291)
<!-- Reviewable:end -->
2015-06-06 07:45:43 -05:00
Ms2ger
57f575b5ca Use if let in HTMLTableElement::SetCaption. 2015-06-06 13:19:00 +02:00
ecoal95
9f94d39c9e Implement new WebGL interfaces and methods
This commit implements:
* WebGLFramebuffer
* WebGLRenderbuffer
* WebGLTexture

And adds the following methods to `WebGLRenderingContext`:
* create{Texture,Framebuffer,Renderbuffer}
* bind{Texture,Framebuffer,Renderbuffer}
* destroy{Buffer,Texture,Framebuffer,Renderbuffer}

Fixes:
* WebGLUniform location shouldn't inherit from WebGLObject.

Known Issues:
* WebGL objects have to be destroyed on drop, we may want to keep a reference to the context, or maybe a clone of the renderer to achieve this

Also refactors a huge part of the current implementation, to allow
failing on creation of different WebGL objects.

Blocked on https://github.com/servo/gleam/pull/22

A reftest for most of the added functionality is not doable right now,
we need a few more functions in order to upload a texture, for example.
2015-06-06 12:14:01 +02:00
Hyowon Kim
5bbfb42e90 Replace fill_color and stroke_color with fill_style and stroke_style in CanvasContextState.
The fillStyle and strokeStyle attributes can be either
strings(color), CanvasGradients, or CanvasPatterns.
2015-06-06 16:15:11 +09:00
Daniel Le
15c4f7fe2d Avoid casting in the callers
get_proto_or_iface_array now returns *mut ProtoOrIfaceArray

Fix #6271
2015-06-06 12:22:18 +08:00
Brian Anderson
172fbcad27 Convert inline(always) to inline in CodegenRust and jstraceable.
This results in a 14% compile time improvement.

See https://gist.github.com/brson/b48dd03b06c406be68e6
2015-06-05 14:56:11 -07:00
Wafflespeanut
1612f723a8 Timestamp fix for issue #5690 2015-06-05 21:57:19 +05:30
bors-servo
9edc296c46 Auto merge of #6247 - jdm:tracefix, r=Ms2ger
This should allow the jQuery testsuite to complete.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6247)
<!-- Reviewable:end -->
2015-06-03 05:26:26 -05:00
bors-servo
bb95e07f8e Auto merge of #6231 - AopicieR:get_elements_by_name, r=Ms2ger
Fixes #1745 
Should I adjust the expected result of the corresponding wpt test cases?

html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace.html
html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace.xhtml

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6231)
<!-- Reviewable:end -->
2015-06-03 04:14:18 -05:00
Mike Blumenkrantz
ffa2093012 add window method for notifying when the <head> tag has been parsed 2015-06-02 22:16:28 -04:00
Mike Blumenkrantz
12f20f1ecc add handling for favicon link elements
fixes #6166
2015-06-02 22:16:25 -04:00
Hyowon Kim
5d05ffc417 Serialize colors for fill and stroke styles in canvas. 2015-06-03 09:11:24 +09:00
bors-servo
ec79881471 Auto merge of #6193 - j3parker:fix-5232, r=nox
fixes #5232

The correct styling shows up in the Firefox devtools (e.g. a caution symbol beside warning messages.)

I couldn't quickly find the corresponding Firefox code that handles log-levels so the values I'm sending are "guesses" (but they work seem to work.) I'll look today because I'm sending "log" for Debug-level, Error for failed asserts etc.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6193)
<!-- Reviewable:end -->
2015-06-01 20:13:30 -05:00
Jacob Parker
a00d264c8c fixes #5232, more console log levels sent to devtools 2015-06-01 18:39:43 -04:00
Josh Matthews
453679fd1f Trace the prototype array on the global object. 2015-06-01 18:36:57 -04:00
James Graham
49f1b13ad9 Add support for switching frames with the webdriver API.
This moves webdriver_traits into msg to avoid a circular dependency.
2015-06-01 23:18:55 +01:00
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
Philipp Hartwig
2779e0a7ed Restrict output of getElementsByName to HTML elements
https://html.spec.whatwg.org/#dom-document-getelementsbyname
2015-05-31 20:26:47 +02: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