Commit graph

1855 commits

Author SHA1 Message Date
Ms2ger
c019897a50 Implement AttrHelpersForLayout for LayoutJS<Attr> rather than Attr itself. 2015-06-20 18:51:25 +02:00
Anthony Ramine
a8e4558e82 Implement URL and trivially missing URLUtils members
Fixes #6322.
2015-06-20 15:17:55 +02:00
Tom Schuster
d3f92eb339 small cleanup 2015-06-20 15:06:05 +02:00
Tom Schuster
e44f8f5609 Implement the HTML background attribute 2015-06-20 15:06:03 +02:00
bors-servo
02303941be Auto merge of #6413 - hyowon:invalid_shadow_attrs, r=Ms2ger
Check invalid values for the shadow attributes.

I left out checking invalid values when setting the shadows attributes.
r? @nox @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/6413)
<!-- Reviewable:end -->
2015-06-20 06:44:08 -06:00
Simon Sapin
fc25397c91 Update rust-selectors
https://github.com/servo/rust-selectors/pull/30
2015-06-20 07:05:43 +02:00
Michael Wu
b7301ca06c Fix some warnings caused by the SM upgrade 2015-06-19 22:07:08 -04:00
Michael Wu
675267b782 Upgrade to SM 39 2015-06-19 18:42:48 -04:00
ecoal95
8cbfb3482c Use euclid from crates.io 2015-06-19 00:04:24 +02:00
Hyowon Kim
cc55e2e426 Check invalid values for the shadow attributes. 2015-06-18 16:54:12 +09:00
Jack Moffitt
07d95627ca Generate code into OUT_DIR.
This is necessary to ensure Cargo knows when to rebuild. Normally
.gitignore would be enough to exclude these from Cargo's freshness
calculation, but https://github.com/rust-lang/cargo/issues/1729 prevents
this currently. This is the new, correct way to do these thigns, just
like the style crate does.
2015-06-17 16:18:22 -06:00
Jinwoo Song
7781f331d3 WebSocket constructor should not panic
Make an early return when the WebSocket connection fails in the constructor.
Also let the WebSocket connection to be closed when the connection could
not be established.

Fixes #6082.
2015-06-16 09:45:42 +02:00
bors-servo
67b121c0b8 Auto merge of #6377 - servo:rustup_20140614, r=SimonSapin
See #6376

r? @Ms2ger

Snaps don't exist yet, putting up the @larsbergstrom signal. The snap need not exactly match this commit, anything in the vicinity, or just master, should work really. (yay stability)


There's no particular reason behind this rustup except that I want to keep Servo running on almost-master as much as possible.


<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6377)
<!-- Reviewable:end -->
2015-06-15 10:33:14 -06:00
Simon Sapin
5428226e04 Remove usage of String::from_str, deprecated in #6377 2015-06-15 15:37:14 +02:00
Ms2ger
90a7ef1571 Throw a TypeError when get_callable_property encounters a value that isn't callable. 2015-06-14 20:08:26 +02:00
Ms2ger
0607cd3fb5 Return Fallible from get_callable_property. 2015-06-14 20:08:06 +02:00
Manish Goregaokar
94fa868d2b Add unsafe blocks to make_unique
See #6376
2015-06-14 20:52:27 +05:30
bors-servo
db2eb36e19 Auto merge of #6325 - Ms2ger:from_str, r=nox
The former appears to be preferred.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6325)
<!-- Reviewable:end -->
2015-06-14 03:55:56 -06:00
bors-servo
ceaca2e288 Auto merge of #6357 - ecoal95:more-webgl, r=pcwalton
See the commit descriptions for more details. 

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

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6357)
<!-- Reviewable:end -->
2015-06-13 15:05:08 -06:00
ecoal95
ff568ecc90 webgl: Add multiple WebGL calls (activeTexture + blend*)
* activeTexture
* blendColor
* blendFunc
* blendFuncSeparate
* blendEquation
* blendEquationSeparate

Blocked on gleam.
2015-06-13 23:03:38 +02:00
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