servo: Merge #8761 - Implement some more WebGL functions (from dzbarsky:gl_functions); r=dzbarsky
authorDavid Zbarsky <dzbarsky@gmail.com>
Mon, 14 Dec 2015 07:55:50 +0500
changeset 337832 846e889bdf69ac8415dc0254fe49945908c26140
parent 337831 029babc3234add30461e9098e5589939904c05b1
child 337833 7cc474579138bfcb9ccb59702ba48ef26e5cd838
push id86548
push userkwierso@gmail.com
push dateSat, 04 Feb 2017 01:35:21 +0000
treeherdermozilla-inbound@e7b96d015d03 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdzbarsky
servo: Merge #8761 - Implement some more WebGL functions (from dzbarsky:gl_functions); r=dzbarsky r? @ecoal95 Source-Repo: https://github.com/servo/servo Source-Revision: 89d9aad1e1e3cd93b12088f09aad1193e7298ba4
servo/components/canvas/Cargo.toml
servo/components/canvas/webgl_paint_task.rs
servo/components/canvas_traits/lib.rs
servo/components/compositing/Cargo.toml
servo/components/script/dom/webglprogram.rs
servo/components/script/dom/webglrenderingcontext.rs
servo/components/script/dom/webglshader.rs
servo/components/script/dom/webidls/WebGLRenderingContext.webidl
servo/components/servo/Cargo.lock
servo/components/servo/Cargo.toml
servo/ports/cef/Cargo.lock
servo/ports/cef/Cargo.toml
servo/ports/glutin/Cargo.toml
servo/ports/gonk/Cargo.lock
servo/ports/gonk/Cargo.toml
--- a/servo/components/canvas/Cargo.toml
+++ b/servo/components/canvas/Cargo.toml
@@ -33,10 +33,10 @@ features = ["texture_surface"]
 
 [dependencies.ipc-channel]
 git = "https://github.com/servo/ipc-channel"
 
 [dependencies]
 cssparser = { version = "0.4", features = [ "serde-serialization" ] }
 log = "0.3"
 num = "0.1.24"
-gleam = "0.1"
+gleam = "0.2"
 euclid = {version = "0.4", features = ["plugins"]}
--- a/servo/components/canvas/webgl_paint_task.rs
+++ b/servo/components/canvas/webgl_paint_task.rs
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use canvas_traits::{CanvasCommonMsg, CanvasMsg, CanvasWebGLMsg, FromLayoutMsg, FromPaintMsg};
-use canvas_traits::{WebGLFramebufferBindingRequest, WebGLShaderParameter};
+use canvas_traits::{WebGLError, WebGLFramebufferBindingRequest, WebGLParameter, WebGLResult};
 use core::nonzero::NonZero;
 use euclid::size::Size2D;
 use gleam::gl;
 use gleam::gl::types::{GLsizei};
 use ipc_channel::ipc::{self, IpcSender, IpcSharedMemory};
 use ipc_channel::router::ROUTER;
 use layers::platform::surface::NativeSurface;
 use offscreen_gl_context::{ColorAttachmentType, GLContext, GLContextAttributes};
@@ -52,28 +52,30 @@ impl WebGLPaintTask {
     /// NB: Not gl-related validations (names, lengths, accepted parameters...) are
     /// done in the corresponding DOM interfaces
     pub fn handle_webgl_message(&self, message: CanvasWebGLMsg) {
         match message {
             CanvasWebGLMsg::GetContextAttributes(sender) =>
                 self.context_attributes(sender),
             CanvasWebGLMsg::ActiveTexture(target) =>
                 gl::active_texture(target),
+            CanvasWebGLMsg::AttachShader(program_id, shader_id) =>
+                gl::attach_shader(program_id, shader_id),
+            CanvasWebGLMsg::BindAttribLocation(program_id, index, name) =>
+                gl::bind_attrib_location(program_id, index, &name),
             CanvasWebGLMsg::BlendColor(r, g, b, a) =>
                 gl::blend_color(r, g, b, a),
             CanvasWebGLMsg::BlendEquation(mode) =>
                 gl::blend_equation(mode),
             CanvasWebGLMsg::BlendEquationSeparate(mode_rgb, mode_alpha) =>
                 gl::blend_equation_separate(mode_rgb, mode_alpha),
             CanvasWebGLMsg::BlendFunc(src, dest) =>
                 gl::blend_func(src, dest),
             CanvasWebGLMsg::BlendFuncSeparate(src_rgb, dest_rgb, src_alpha, dest_alpha) =>
                 gl::blend_func_separate(src_rgb, dest_rgb, src_alpha, dest_alpha),
-            CanvasWebGLMsg::AttachShader(program_id, shader_id) =>
-                gl::attach_shader(program_id, shader_id),
             CanvasWebGLMsg::BufferData(buffer_type, data, usage) =>
                 gl::buffer_data(buffer_type, &data, usage),
             CanvasWebGLMsg::BufferSubData(buffer_type, offset, data) =>
                 gl::buffer_sub_data(buffer_type, offset, &data),
             CanvasWebGLMsg::Clear(mask) =>
                 gl::clear(mask),
             CanvasWebGLMsg::ClearColor(r, g, b, a) =>
                 gl::clear_color(r, g, b, a),
@@ -94,28 +96,36 @@ impl WebGLPaintTask {
             CanvasWebGLMsg::Disable(cap) =>
                 gl::disable(cap),
             CanvasWebGLMsg::Enable(cap) =>
                 gl::enable(cap),
             CanvasWebGLMsg::FrontFace(mode) =>
                 gl::front_face(mode),
             CanvasWebGLMsg::DrawArrays(mode, first, count) =>
                 gl::draw_arrays(mode, first, count),
+            CanvasWebGLMsg::DrawElements(mode, count, type_, offset) =>
+                gl::draw_elements(mode, count, type_, offset as u32),
             CanvasWebGLMsg::Hint(name, val) =>
                 gl::hint(name, val),
             CanvasWebGLMsg::LineWidth(width) =>
                 gl::line_width(width),
             CanvasWebGLMsg::PixelStorei(name, val) =>
                 gl::pixel_store_i(name, val),
             CanvasWebGLMsg::PolygonOffset(factor, units) =>
                 gl::polygon_offset(factor, units),
             CanvasWebGLMsg::EnableVertexAttribArray(attrib_id) =>
                 gl::enable_vertex_attrib_array(attrib_id),
             CanvasWebGLMsg::GetAttribLocation(program_id, name, chan) =>
                 self.attrib_location(program_id, name, chan),
+            CanvasWebGLMsg::GetBufferParameter(target, param_id, chan) =>
+                self.buffer_parameter(target, param_id, chan),
+            CanvasWebGLMsg::GetParameter(param_id, chan) =>
+                self.parameter(param_id, chan),
+            CanvasWebGLMsg::GetProgramParameter(program_id, param_id, chan) =>
+                self.program_parameter(program_id, param_id, chan),
             CanvasWebGLMsg::GetShaderParameter(shader_id, param_id, chan) =>
                 self.shader_parameter(shader_id, param_id, chan),
             CanvasWebGLMsg::GetUniformLocation(program_id, name, chan) =>
                 self.uniform_location(program_id, name, chan),
             CanvasWebGLMsg::CompileShader(shader_id, source) =>
                 self.compile_shader(shader_id, source),
             CanvasWebGLMsg::CreateBuffer(chan) =>
                 self.create_buffer(chan),
@@ -150,16 +160,18 @@ impl WebGLPaintTask {
             CanvasWebGLMsg::BindTexture(target, id) =>
                 gl::bind_texture(target, id),
             CanvasWebGLMsg::LinkProgram(program_id) =>
                 gl::link_program(program_id),
             CanvasWebGLMsg::Uniform4fv(uniform_id, data) =>
                 gl::uniform_4f(uniform_id, data[0], data[1], data[2], data[3]),
             CanvasWebGLMsg::UseProgram(program_id) =>
                 gl::use_program(program_id),
+            CanvasWebGLMsg::VertexAttrib(attrib_id, x, y, z, w) =>
+                gl::vertex_attrib_4f(attrib_id, x, y, z, w),
             CanvasWebGLMsg::VertexAttribPointer2f(attrib_id, size, normalized, stride, offset) =>
                 gl::vertex_attrib_pointer_f32(attrib_id, size, normalized, stride, offset as u32),
             CanvasWebGLMsg::Viewport(x, y, width, height) =>
                 gl::viewport(x, y, width, height),
             CanvasWebGLMsg::TexImage2D(target, level, internal, width, height, format, data_type, data) =>
                 gl::tex_image_2d(target, level, internal, width, height, /*border*/0, format, data_type, Some(&data)),
             CanvasWebGLMsg::TexParameteri(target, name, value) =>
                 gl::tex_parameter_i(target, name, value),
@@ -314,26 +326,183 @@ impl WebGLPaintTask {
             None
         } else {
             Some(attrib_location)
         };
 
         chan.send(attrib_location).unwrap();
     }
 
+    fn parameter(&self,
+                 param_id: u32,
+                 chan: IpcSender<WebGLResult<WebGLParameter>>) {
+        let result = match param_id {
+            gl::ACTIVE_TEXTURE |
+            gl::ALPHA_BITS |
+            gl::BLEND_DST_ALPHA |
+            gl::BLEND_DST_RGB |
+            gl::BLEND_EQUATION_ALPHA |
+            gl::BLEND_EQUATION_RGB |
+            gl::BLEND_SRC_ALPHA |
+            gl::BLEND_SRC_RGB |
+            gl::BLUE_BITS |
+            gl::CULL_FACE_MODE |
+            gl::DEPTH_BITS |
+            gl::DEPTH_FUNC |
+            gl::FRONT_FACE |
+            gl::GENERATE_MIPMAP_HINT |
+            gl::GREEN_BITS |
+            //gl::IMPLEMENTATION_COLOR_READ_FORMAT |
+            //gl::IMPLEMENTATION_COLOR_READ_TYPE |
+            gl::MAX_COMBINED_TEXTURE_IMAGE_UNITS |
+            gl::MAX_CUBE_MAP_TEXTURE_SIZE |
+            //gl::MAX_FRAGMENT_UNIFORM_VECTORS |
+            gl::MAX_RENDERBUFFER_SIZE |
+            gl::MAX_TEXTURE_IMAGE_UNITS |
+            gl::MAX_TEXTURE_SIZE |
+            //gl::MAX_VARYING_VECTORS |
+            gl::MAX_VERTEX_ATTRIBS |
+            gl::MAX_VERTEX_TEXTURE_IMAGE_UNITS |
+            //gl::MAX_VERTEX_UNIFORM_VECTORS |
+            gl::PACK_ALIGNMENT |
+            gl::RED_BITS |
+            gl::SAMPLE_BUFFERS |
+            gl::SAMPLES |
+            gl::STENCIL_BACK_FAIL |
+            gl::STENCIL_BACK_FUNC |
+            gl::STENCIL_BACK_PASS_DEPTH_FAIL |
+            gl::STENCIL_BACK_PASS_DEPTH_PASS |
+            gl::STENCIL_BACK_REF |
+            gl::STENCIL_BACK_VALUE_MASK |
+            gl::STENCIL_BACK_WRITEMASK |
+            gl::STENCIL_BITS |
+            gl::STENCIL_CLEAR_VALUE |
+            gl::STENCIL_FAIL |
+            gl::STENCIL_FUNC |
+            gl::STENCIL_PASS_DEPTH_FAIL |
+            gl::STENCIL_PASS_DEPTH_PASS |
+            gl::STENCIL_REF |
+            gl::STENCIL_VALUE_MASK |
+            gl::STENCIL_WRITEMASK |
+            gl::SUBPIXEL_BITS |
+            gl::UNPACK_ALIGNMENT =>
+            //gl::UNPACK_COLORSPACE_CONVERSION_WEBGL =>
+                Ok(WebGLParameter::Int(gl::get_integer_v(param_id))),
+
+            gl::BLEND |
+            gl::CULL_FACE |
+            gl::DEPTH_TEST |
+            gl::DEPTH_WRITEMASK |
+            gl::DITHER |
+            gl::POLYGON_OFFSET_FILL |
+            gl::SAMPLE_COVERAGE_INVERT |
+            gl::STENCIL_TEST =>
+            //gl::UNPACK_FLIP_Y_WEBGL |
+            //gl::UNPACK_PREMULTIPLY_ALPHA_WEBGL =>
+                Ok(WebGLParameter::Bool(gl::get_boolean_v(param_id) != 0)),
+
+            gl::DEPTH_CLEAR_VALUE |
+            gl::LINE_WIDTH |
+            gl::POLYGON_OFFSET_FACTOR |
+            gl::POLYGON_OFFSET_UNITS |
+            gl::SAMPLE_COVERAGE_VALUE =>
+                Ok(WebGLParameter::Float(gl::get_float_v(param_id))),
+
+            gl::VERSION => Ok(WebGLParameter::String("WebGL 1.0".to_owned())),
+            gl::RENDERER |
+            gl::VENDOR => Ok(WebGLParameter::String("Mozilla/Servo".to_owned())),
+            gl::SHADING_LANGUAGE_VERSION => Ok(WebGLParameter::String("WebGL GLSL ES 1.0".to_owned())),
+
+            // TODO(zbarsky, ecoal95): Implement support for the following valid parameters
+            // Float32Array
+            gl::ALIASED_LINE_WIDTH_RANGE |
+            gl::ALIASED_POINT_SIZE_RANGE |
+            //gl::BLEND_COLOR |
+            gl::COLOR_CLEAR_VALUE |
+            gl::DEPTH_RANGE |
+
+            // WebGLBuffer
+            gl::ARRAY_BUFFER_BINDING |
+            gl::ELEMENT_ARRAY_BUFFER_BINDING |
+
+            // WebGLFrameBuffer
+            gl::FRAMEBUFFER_BINDING |
+
+            // WebGLRenderBuffer
+            gl::RENDERBUFFER_BINDING |
+
+            // WebGLProgram
+            gl::CURRENT_PROGRAM |
+
+            // WebGLTexture
+            gl::TEXTURE_BINDING_2D |
+            gl::TEXTURE_BINDING_CUBE_MAP |
+
+            // sequence<GlBoolean>
+            gl::COLOR_WRITEMASK |
+
+            // Uint32Array
+            gl::COMPRESSED_TEXTURE_FORMATS |
+
+            // Int32Array
+            gl::MAX_VIEWPORT_DIMS |
+            gl::SCISSOR_BOX |
+            gl::VIEWPORT => Err(WebGLError::InvalidEnum),
+
+            // Invalid parameters
+            _ => Err(WebGLError::InvalidEnum)
+        };
+
+        chan.send(result).unwrap();
+    }
+
+    fn buffer_parameter(&self,
+                        target: u32,
+                        param_id: u32,
+                        chan: IpcSender<WebGLResult<WebGLParameter>>) {
+        let result = match param_id {
+            gl::BUFFER_SIZE |
+            gl::BUFFER_USAGE =>
+                Ok(WebGLParameter::Int(gl::get_buffer_parameter_iv(target, param_id))),
+            _ => Err(WebGLError::InvalidEnum),
+        };
+
+        chan.send(result).unwrap();
+    }
+
+    fn program_parameter(&self,
+                         program_id: u32,
+                         param_id: u32,
+                         chan: IpcSender<WebGLResult<WebGLParameter>>) {
+        let result = match param_id {
+            gl::DELETE_STATUS |
+            gl::LINK_STATUS |
+            gl::VALIDATE_STATUS =>
+                Ok(WebGLParameter::Bool(gl::get_program_iv(program_id, param_id) != 0)),
+            gl::ATTACHED_SHADERS |
+            gl::ACTIVE_ATTRIBUTES |
+            gl::ACTIVE_UNIFORMS =>
+                Ok(WebGLParameter::Int(gl::get_program_iv(program_id, param_id))),
+            _ => Err(WebGLError::InvalidEnum),
+        };
+
+        chan.send(result).unwrap();
+    }
+
     fn shader_parameter(&self,
-                            shader_id: u32,
-                            param_id: u32,
-                            chan: IpcSender<WebGLShaderParameter>) {
+                        shader_id: u32,
+                        param_id: u32,
+                        chan: IpcSender<WebGLResult<WebGLParameter>>) {
         let result = match param_id {
             gl::SHADER_TYPE =>
-                WebGLShaderParameter::Int(gl::get_shader_iv(shader_id, param_id)),
-            gl::DELETE_STATUS | gl::COMPILE_STATUS =>
-                WebGLShaderParameter::Bool(gl::get_shader_iv(shader_id, param_id) != 0),
-            _ => panic!("Unexpected shader parameter type"),
+                Ok(WebGLParameter::Int(gl::get_shader_iv(shader_id, param_id))),
+            gl::DELETE_STATUS |
+            gl::COMPILE_STATUS =>
+                Ok(WebGLParameter::Bool(gl::get_shader_iv(shader_id, param_id) != 0)),
+            _ => Err(WebGLError::InvalidEnum),
         };
 
         chan.send(result).unwrap();
     }
 
     fn uniform_location(&self, program_id: u32, name: String, chan: IpcSender<Option<i32>>) {
         let location = gl::get_uniform_location(program_id, &name);
         let location = if location == -1 {
--- a/servo/components/canvas_traits/lib.rs
+++ b/servo/components/canvas_traits/lib.rs
@@ -128,17 +128,18 @@ pub enum CanvasWebGLMsg {
     GetContextAttributes(IpcSender<GLContextAttributes>),
     ActiveTexture(u32),
     BlendColor(f32, f32, f32, f32),
     BlendEquation(u32),
     BlendEquationSeparate(u32, u32),
     BlendFunc(u32, u32),
     BlendFuncSeparate(u32, u32, u32, u32),
     AttachShader(u32, u32),
-    BufferData(u32, Vec<u8>, u32),
+    BindAttribLocation(u32, u32, String),
+    BufferData(u32, Vec<f32>, u32),
     BufferSubData(u32, isize, Vec<u8>),
     Clear(u32),
     ClearColor(f32, f32, f32, f32),
     ClearDepth(f64),
     ClearStencil(i32),
     ColorMask(bool, bool, bool, bool),
     CullFace(u32),
     FrontFace(u32),
@@ -160,27 +161,32 @@ pub enum CanvasWebGLMsg {
     DeleteTexture(u32),
     DeleteProgram(u32),
     DeleteShader(u32),
     BindBuffer(u32, u32),
     BindFramebuffer(u32, WebGLFramebufferBindingRequest),
     BindRenderbuffer(u32, u32),
     BindTexture(u32, u32),
     DrawArrays(u32, i32, i32),
+    DrawElements(u32, i32, u32, i64),
     EnableVertexAttribArray(u32),
-    GetShaderParameter(u32, u32, IpcSender<WebGLShaderParameter>),
+    GetBufferParameter(u32, u32, IpcSender<WebGLResult<WebGLParameter>>),
+    GetParameter(u32, IpcSender<WebGLResult<WebGLParameter>>),
+    GetProgramParameter(u32, u32, IpcSender<WebGLResult<WebGLParameter>>),
+    GetShaderParameter(u32, u32, IpcSender<WebGLResult<WebGLParameter>>),
     GetAttribLocation(u32, String, IpcSender<Option<i32>>),
     GetUniformLocation(u32, String, IpcSender<Option<i32>>),
     PolygonOffset(f32, f32),
     Hint(u32, u32),
     LineWidth(f32),
     PixelStorei(u32, i32),
     LinkProgram(u32),
     Uniform4fv(i32, Vec<f32>),
     UseProgram(u32),
+    VertexAttrib(u32, f32, f32, f32, f32),
     VertexAttribPointer2f(u32, i32, bool, i32, u32),
     Viewport(i32, i32, i32, i32),
     TexImage2D(u32, i32, i32, i32, i32, u32, u32, Vec<u8>),
     TexParameteri(u32, u32, i32),
     TexParameterf(u32, u32, f32),
     DrawingBufferWidth(IpcSender<i32>),
     DrawingBufferHeight(IpcSender<i32>),
 }
@@ -198,19 +204,21 @@ pub type WebGLResult<T> = Result<T, WebG
 
 #[derive(Clone, Deserialize, Serialize)]
 pub enum WebGLFramebufferBindingRequest {
     Explicit(u32),
     Default,
 }
 
 #[derive(Clone, Deserialize, Serialize)]
-pub enum WebGLShaderParameter {
+pub enum WebGLParameter {
     Int(i32),
     Bool(bool),
+    String(String),
+    Float(f32),
     Invalid,
 }
 
 #[derive(Clone, Deserialize, Serialize, HeapSizeOf)]
 pub struct CanvasGradientStop {
     pub offset: f64,
     pub color: RGBA,
 }
--- a/servo/components/compositing/Cargo.toml
+++ b/servo/components/compositing/Cargo.toml
@@ -69,17 +69,17 @@ git = "https://github.com/pcwalton/gaol"
 
 [dependencies]
 app_units = {version = "0.1", features = ["plugins"]}
 image = "0.5.0"
 libc = "0.2"
 log = "0.3"
 num = "0.1.24"
 time = "0.1.17"
-gleam = "0.1"
+gleam = "0.2"
 euclid = {version = "0.4", features = ["plugins"]}
 serde = "0.6"
 serde_macros = "0.6"
 url = "0.5"
 
 [target.x86_64-apple-darwin.dependencies]
 core-graphics = "0.2"
 core-text = "1.0"
--- a/servo/components/script/dom/webglprogram.rs
+++ b/servo/components/script/dom/webglprogram.rs
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
-use canvas_traits::{CanvasMsg, CanvasWebGLMsg, WebGLError, WebGLResult};
+use canvas_traits::{CanvasMsg, CanvasWebGLMsg, WebGLError, WebGLResult, WebGLParameter};
 use dom::bindings::codegen::Bindings::WebGLProgramBinding;
 use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
 use dom::bindings::global::GlobalRef;
 use dom::bindings::js::{JS, MutNullableHeap, Root};
 use dom::bindings::reflector::reflect_dom_object;
 use dom::webglobject::WebGLObject;
 use dom::webglrenderingcontext::MAX_UNIFORM_AND_ATTRIBUTE_LEN;
 use dom::webglshader::WebGLShader;
@@ -89,16 +89,33 @@ impl WebGLProgram {
 
         shader_slot.set(Some(shader));
 
         self.renderer.send(CanvasMsg::WebGL(CanvasWebGLMsg::AttachShader(self.id, shader.id()))).unwrap();
 
         Ok(())
     }
 
+    /// glBindAttribLocation
+    pub fn bind_attrib_location(&self, index: u32, name: DOMString) -> WebGLResult<()> {
+        if name.len() > MAX_UNIFORM_AND_ATTRIBUTE_LEN {
+            return Err(WebGLError::InvalidValue);
+        }
+
+        // Check if the name is reserved
+        if name.starts_with("webgl") || name.starts_with("_webgl_") {
+            return Err(WebGLError::InvalidOperation);
+        }
+
+        self.renderer
+            .send(CanvasMsg::WebGL(CanvasWebGLMsg::BindAttribLocation(self.id, index, String::from(name))))
+            .unwrap();
+        Ok(())
+    }
+
     /// glGetAttribLocation
     pub fn get_attrib_location(&self, name: DOMString) -> WebGLResult<Option<i32>> {
         if name.len() > MAX_UNIFORM_AND_ATTRIBUTE_LEN {
             return Err(WebGLError::InvalidValue);
         }
 
         // Check if the name is reserved
         if name.starts_with("webgl") || name.starts_with("_webgl_") {
@@ -124,15 +141,22 @@ impl WebGLProgram {
         }
 
         let (sender, receiver) = ipc::channel().unwrap();
         self.renderer
             .send(CanvasMsg::WebGL(CanvasWebGLMsg::GetUniformLocation(self.id, String::from(name), sender)))
             .unwrap();
         Ok(receiver.recv().unwrap())
     }
+
+    /// glGetProgramParameter
+    pub fn parameter(&self, param_id: u32) -> WebGLResult<WebGLParameter> {
+        let (sender, receiver) = ipc::channel().unwrap();
+        self.renderer.send(CanvasMsg::WebGL(CanvasWebGLMsg::GetProgramParameter(self.id, param_id, sender))).unwrap();
+        receiver.recv().unwrap()
+    }
 }
 
 impl Drop for WebGLProgram {
     fn drop(&mut self) {
         self.delete();
     }
 }
--- a/servo/components/script/dom/webglrenderingcontext.rs
+++ b/servo/components/script/dom/webglrenderingcontext.rs
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use canvas_traits::WebGLError::*;
 use canvas_traits::{CanvasCommonMsg, CanvasMsg, CanvasWebGLMsg, WebGLError};
-use canvas_traits::{WebGLFramebufferBindingRequest, WebGLShaderParameter};
+use canvas_traits::{WebGLFramebufferBindingRequest, WebGLParameter};
 use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
 use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::{WebGLRenderingContextMethods};
 use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::{self, WebGLContextAttributes};
 use dom::bindings::codegen::UnionTypes::ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement;
 use dom::bindings::conversions::ToJSValConvertible;
 use dom::bindings::global::{GlobalField, GlobalRef};
 use dom::bindings::inheritance::Castable;
 use dom::bindings::js::{JS, LayoutJS, MutNullableHeap, Root};
@@ -25,17 +25,17 @@ use dom::webglprogram::WebGLProgram;
 use dom::webglrenderbuffer::WebGLRenderbuffer;
 use dom::webglshader::WebGLShader;
 use dom::webgltexture::{TexParameterValue, WebGLTexture};
 use dom::webgluniformlocation::WebGLUniformLocation;
 use euclid::size::Size2D;
 use ipc_channel::ipc::{self, IpcSender};
 use js::jsapi::{JSContext, JSObject, RootedValue};
 use js::jsapi::{JS_GetFloat32ArrayData, JS_GetObjectAsArrayBufferView};
-use js::jsval::{BooleanValue, Int32Value, JSVal, NullValue, UndefinedValue};
+use js::jsval::{BooleanValue, DoubleValue, Int32Value, JSVal, NullValue, UndefinedValue};
 use net_traits::image::base::PixelFormat;
 use net_traits::image_cache_task::ImageResponse;
 use offscreen_gl_context::GLContextAttributes;
 use script_traits::ScriptMsg as ConstellationMsg;
 use std::cell::Cell;
 use std::sync::mpsc::channel;
 use std::{ptr, slice};
 use util::str::DOMString;
@@ -140,28 +140,53 @@ impl WebGLRenderingContext {
     pub fn webgl_error(&self, err: WebGLError) {
         // If an error has been detected no further errors must be
         // recorded until `getError` has been called
         if self.last_error.get().is_none() {
             self.last_error.set(Some(err));
         }
     }
 
-    pub fn bound_texture_for(&self, target: u32) -> Option<Root<WebGLTexture>> {
-        match target {
+    fn tex_parameter(&self, target: u32, name: u32, value: TexParameterValue) {
+        let texture = match target {
             constants::TEXTURE_2D => self.bound_texture_2d.get(),
             constants::TEXTURE_CUBE_MAP => self.bound_texture_cube_map.get(),
-
-            _ => unreachable!(),
+            _ => return self.webgl_error(InvalidEnum),
+        };
+        if let Some(texture) = texture {
+            handle_potential_webgl_error!(self, texture.tex_parameter(target, name, value));
+        } else {
+            return self.webgl_error(InvalidOperation);
         }
     }
 
     fn mark_as_dirty(&self) {
         self.canvas.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage);
     }
+
+    #[allow(unsafe_code)]
+    fn float32_array_to_slice(&self, data: *mut JSObject) -> Option<Vec<f32>> {
+        unsafe {
+            let mut length = 0;
+            let mut ptr = ptr::null_mut();
+            let buffer_data = JS_GetObjectAsArrayBufferView(data, &mut length, &mut ptr);
+            if buffer_data.is_null() {
+                self.webgl_error(InvalidValue); // https://github.com/servo/servo/issues/5014
+                return None;
+            }
+            let data_f32 = JS_GetFloat32ArrayData(data, ptr::null());
+            Some(slice::from_raw_parts(data_f32, length as usize).to_vec())
+        }
+    }
+
+    fn vertex_attrib(&self, indx: u32, x: f32, y: f32, z: f32, w: f32) {
+        self.ipc_renderer
+            .send(CanvasMsg::WebGL(CanvasWebGLMsg::VertexAttrib(indx, x, y, z, w)))
+            .unwrap();
+    }
 }
 
 impl Drop for WebGLRenderingContext {
     fn drop(&mut self) {
         self.ipc_renderer.send(CanvasMsg::Common(CanvasCommonMsg::Close)).unwrap();
     }
 }
 
@@ -185,30 +210,50 @@ impl WebGLRenderingContextMethods for We
         let (sender, receiver) = ipc::channel().unwrap();
         self.ipc_renderer
             .send(CanvasMsg::WebGL(CanvasWebGLMsg::DrawingBufferHeight(sender)))
             .unwrap();
         receiver.recv().unwrap()
     }
 
     #[allow(unsafe_code)]
+    // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.5
+    fn GetBufferParameter(&self, _cx: *mut JSContext, target: u32, parameter: u32) -> JSVal {
+        let (sender, receiver) = ipc::channel().unwrap();
+        self.ipc_renderer
+            .send(CanvasMsg::WebGL(CanvasWebGLMsg::GetBufferParameter(target, parameter, sender)))
+            .unwrap();
+        match handle_potential_webgl_error!(self, receiver.recv().unwrap(), WebGLParameter::Invalid) {
+            WebGLParameter::Int(val) => Int32Value(val),
+            WebGLParameter::Bool(_) => panic!("Buffer parameter should not be bool"),
+            WebGLParameter::Float(_) => panic!("Buffer parameter should not be float"),
+            WebGLParameter::String(_) => panic!("Buffer parameter should not be string"),
+            WebGLParameter::Invalid => NullValue(),
+        }
+    }
+
+    #[allow(unsafe_code)]
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3
     fn GetParameter(&self, cx: *mut JSContext, parameter: u32) -> JSVal {
-        // TODO(ecoal95): Implement the missing parameters from the spec
-        unsafe {
-            let mut rval = RootedValue::new(cx, UndefinedValue());
-            match parameter {
-                constants::VERSION =>
-                    "WebGL 1.0".to_jsval(cx, rval.handle_mut()),
-                constants::RENDERER |
-                constants::VENDOR =>
-                    "Mozilla/Servo".to_jsval(cx, rval.handle_mut()),
-                _ => rval.ptr = NullValue(),
+        let (sender, receiver) = ipc::channel().unwrap();
+        self.ipc_renderer
+            .send(CanvasMsg::WebGL(CanvasWebGLMsg::GetParameter(parameter, sender)))
+            .unwrap();
+        match handle_potential_webgl_error!(self, receiver.recv().unwrap(), WebGLParameter::Invalid) {
+            WebGLParameter::Int(val) => Int32Value(val),
+            WebGLParameter::Bool(val) => BooleanValue(val),
+            WebGLParameter::Float(val) => DoubleValue(val as f64),
+            WebGLParameter::String(val) => {
+                let mut rval = RootedValue::new(cx, UndefinedValue());
+                unsafe {
+                    val.to_jsval(cx, rval.handle_mut());
+                }
+                rval.ptr
             }
-            rval.ptr
+            WebGLParameter::Invalid => NullValue(),
         }
     }
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3
     fn GetError(&self) -> u32 {
         let error_code = if let Some(error) = self.last_error.get() {
             match error {
                 WebGLError::InvalidEnum => constants::INVALID_ENUM,
@@ -298,16 +343,24 @@ impl WebGLRenderingContextMethods for We
     fn AttachShader(&self, program: Option<&WebGLProgram>, shader: Option<&WebGLShader>) {
         if let Some(program) = program {
             if let Some(shader) = shader {
                 handle_potential_webgl_error!(self, program.attach_shader(shader));
             }
         }
     }
 
+    // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9
+    fn BindAttribLocation(&self, program: Option<&WebGLProgram>,
+                          index: u32, name: DOMString) {
+        if let Some(program) = program {
+            handle_potential_webgl_error!(self, program.bind_attrib_location(index, name));
+        }
+    }
+
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.5
     fn BindBuffer(&self, target: u32, buffer: Option<&WebGLBuffer>) {
         match target {
             constants::ARRAY_BUFFER |
             constants::ELEMENT_ARRAY_BUFFER => (),
 
             _ => return self.webgl_error(InvalidEnum),
         }
@@ -388,28 +441,21 @@ impl WebGLRenderingContextMethods for We
             constants::STATIC_DRAW |
             constants::DYNAMIC_DRAW => (),
             _ => return self.webgl_error(InvalidEnum),
         }
         let data = match data {
             Some(data) => data,
             None => return self.webgl_error(InvalidValue),
         };
-        let data_vec = unsafe {
-            let mut length = 0;
-            let mut ptr = ptr::null_mut();
-            let buffer_data = JS_GetObjectAsArrayBufferView(data, &mut length, &mut ptr);
-            if buffer_data.is_null() {
-                return self.webgl_error(InvalidValue) // https://github.com/servo/servo/issues/5014
-            }
-            slice::from_raw_parts(ptr, length as usize).to_vec()
-        };
-        self.ipc_renderer
-            .send(CanvasMsg::WebGL(CanvasWebGLMsg::BufferData(target, data_vec, usage)))
-            .unwrap()
+        if let Some(data_vec) = self.float32_array_to_slice(data) {
+            self.ipc_renderer
+                .send(CanvasMsg::WebGL(CanvasWebGLMsg::BufferData(target, data_vec, usage)))
+                .unwrap()
+        }
     }
 
     #[allow(unsafe_code)]
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.5
     fn BufferSubData(&self, _cx: *mut JSContext, target: u32, offset: i64, data: Option<*mut JSObject>) {
         match target {
             constants::ARRAY_BUFFER |
             constants::ELEMENT_ARRAY_BUFFER => (),
@@ -664,16 +710,54 @@ impl WebGLRenderingContextMethods for We
                         .unwrap();
                     self.mark_as_dirty();
                 }
             },
             _ => self.webgl_error(InvalidEnum),
         }
     }
 
+    // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.11
+    fn DrawElements(&self, mode: u32, count: i32, type_: u32, offset: i64) {
+        let type_size = match type_ {
+            constants::BYTE | constants::UNSIGNED_BYTE => 1,
+            constants::SHORT | constants::UNSIGNED_SHORT => 2,
+            constants::INT | constants::UNSIGNED_INT | constants::FLOAT => 4,
+            _ => return self.webgl_error(InvalidEnum),
+        };
+
+        if offset % type_size != 0 {
+            return self.webgl_error(InvalidOperation);
+        }
+
+        if count <= 0 {
+            return self.webgl_error(InvalidOperation);
+        }
+
+        if offset < 0 {
+            return self.webgl_error(InvalidValue);
+        }
+
+        // TODO ensure a non-null WebGLBuffer must be bound to the ELEMENT_ARRAY_BUFFER
+        // TODO(ecoal95): Check the CURRENT_PROGRAM when we keep track of it, and if it's
+        // null generate an InvalidOperation error
+        match mode {
+            constants::POINTS | constants::LINE_STRIP |
+            constants::LINE_LOOP | constants::LINES |
+            constants::TRIANGLE_STRIP | constants::TRIANGLE_FAN |
+            constants::TRIANGLES => {
+                self.ipc_renderer
+                    .send(CanvasMsg::WebGL(CanvasWebGLMsg::DrawElements(mode, count, type_, offset)))
+                    .unwrap();
+                self.mark_as_dirty();
+            },
+            _ => self.webgl_error(InvalidEnum),
+        }
+    }
+
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     fn EnableVertexAttribArray(&self, attrib_id: u32) {
         self.ipc_renderer
             .send(CanvasMsg::WebGL(CanvasWebGLMsg::EnableVertexAttribArray(attrib_id)))
             .unwrap()
     }
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
@@ -681,31 +765,44 @@ impl WebGLRenderingContextMethods for We
         if let Some(program) = program {
             handle_potential_webgl_error!(self, program.get_attrib_location(name), None).unwrap_or(-1)
         } else {
             -1
         }
     }
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9
+    fn GetProgramParameter(&self, _: *mut JSContext, program: Option<&WebGLProgram>, param_id: u32) -> JSVal {
+        if let Some(program) = program {
+            match handle_potential_webgl_error!(self, program.parameter(param_id), WebGLParameter::Invalid) {
+                WebGLParameter::Int(val) => Int32Value(val),
+                WebGLParameter::Bool(val) => BooleanValue(val),
+                WebGLParameter::String(_) => panic!("Program parameter should not be string"),
+                WebGLParameter::Float(_) => panic!("Program parameter should not be float"),
+                WebGLParameter::Invalid => NullValue(),
+            }
+        } else {
+            NullValue()
+        }
+    }
+
+    // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9
     fn GetShaderInfoLog(&self, shader: Option<&WebGLShader>) -> Option<DOMString> {
-        if let Some(shader) = shader {
-            shader.info_log().map(DOMString::from)
-        } else {
-            None
-        }
+        shader.and_then(|s| s.info_log()).map(DOMString::from)
     }
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9
     fn GetShaderParameter(&self, _: *mut JSContext, shader: Option<&WebGLShader>, param_id: u32) -> JSVal {
         if let Some(shader) = shader {
-            match handle_potential_webgl_error!(self, shader.parameter(param_id), WebGLShaderParameter::Invalid) {
-                WebGLShaderParameter::Int(val) => Int32Value(val),
-                WebGLShaderParameter::Bool(val) => BooleanValue(val),
-                WebGLShaderParameter::Invalid => NullValue(),
+            match handle_potential_webgl_error!(self, shader.parameter(param_id), WebGLParameter::Invalid) {
+                WebGLParameter::Int(val) => Int32Value(val),
+                WebGLParameter::Bool(val) => BooleanValue(val),
+                WebGLParameter::String(_) => panic!("Shader parameter should not be string"),
+                WebGLParameter::Float(_) => panic!("Shader parameter should not be float"),
+                WebGLParameter::Invalid => NullValue(),
             }
         } else {
             NullValue()
         }
     }
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     fn GetUniformLocation(&self,
@@ -843,33 +940,99 @@ impl WebGLRenderingContextMethods for We
             None => return,
         };
 
         let data = match data {
             Some(data) => data,
             None => return,
         };
 
-        let data_vec = unsafe {
-            let data_f32 = JS_GetFloat32ArrayData(data, ptr::null());
-            slice::from_raw_parts(data_f32, 4).to_vec()
-        };
-        self.ipc_renderer
-            .send(CanvasMsg::WebGL(CanvasWebGLMsg::Uniform4fv(uniform_id, data_vec)))
-            .unwrap()
+        if let Some(data_vec) = self.float32_array_to_slice(data) {
+            if data_vec.len() < 4 {
+                return self.webgl_error(InvalidOperation);
+            }
+
+            self.ipc_renderer
+                .send(CanvasMsg::WebGL(CanvasWebGLMsg::Uniform4fv(uniform_id, data_vec)))
+                .unwrap()
+        }
     }
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9
     fn UseProgram(&self, program: Option<&WebGLProgram>) {
         if let Some(program) = program {
             program.use_program()
         }
     }
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
+    fn VertexAttrib1f(&self, indx: u32, x: f32) {
+        self.vertex_attrib(indx, x, 0f32, 0f32, 1f32)
+    }
+
+    #[allow(unsafe_code)]
+    // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
+    fn VertexAttrib1fv(&self, _cx: *mut JSContext, indx: u32, data: *mut JSObject) {
+        if let Some(data_vec) = self.float32_array_to_slice(data) {
+            if data_vec.len() < 4 {
+                return self.webgl_error(InvalidOperation);
+            }
+            self.vertex_attrib(indx, data_vec[0], 0f32, 0f32, 1f32)
+        }
+    }
+
+    // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
+    fn VertexAttrib2f(&self, indx: u32, x: f32, y: f32) {
+        self.vertex_attrib(indx, x, y, 0f32, 1f32)
+    }
+
+    #[allow(unsafe_code)]
+    // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
+    fn VertexAttrib2fv(&self, _cx: *mut JSContext, indx: u32, data: *mut JSObject) {
+        if let Some(data_vec) = self.float32_array_to_slice(data) {
+            if data_vec.len() < 2 {
+                return self.webgl_error(InvalidOperation);
+            }
+            self.vertex_attrib(indx, data_vec[0], data_vec[1], 0f32, 1f32)
+        }
+    }
+
+    // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
+    fn VertexAttrib3f(&self, indx: u32, x: f32, y: f32, z: f32) {
+        self.vertex_attrib(indx, x, y, z, 1f32)
+    }
+
+    #[allow(unsafe_code)]
+    // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
+    fn VertexAttrib3fv(&self, _cx: *mut JSContext, indx: u32, data: *mut JSObject) {
+        if let Some(data_vec) = self.float32_array_to_slice(data) {
+            if data_vec.len() < 3 {
+                return self.webgl_error(InvalidOperation);
+            }
+            self.vertex_attrib(indx, data_vec[0], data_vec[1], data_vec[2], 1f32)
+        }
+    }
+
+    // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
+    fn VertexAttrib4f(&self, indx: u32, x: f32, y: f32, z: f32, w: f32) {
+        self.vertex_attrib(indx, x, y, z, w)
+    }
+
+    #[allow(unsafe_code)]
+    // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
+    fn VertexAttrib4fv(&self, _cx: *mut JSContext, indx: u32, data: *mut JSObject) {
+        if let Some(data_vec) = self.float32_array_to_slice(data) {
+            if data_vec.len() < 4 {
+                return self.webgl_error(InvalidOperation);
+            }
+            self.vertex_attrib(indx, data_vec[0], data_vec[1], data_vec[2], data_vec[3])
+        }
+    }
+
+    // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     fn VertexAttribPointer(&self, attrib_id: u32, size: i32, data_type: u32,
                            normalized: bool, stride: i32, offset: i64) {
         if let constants::FLOAT = data_type {
            let msg = CanvasMsg::WebGL(
                CanvasWebGLMsg::VertexAttribPointer2f(attrib_id, size, normalized, stride, offset as u32));
             self.ipc_renderer.send(msg).unwrap()
         } else {
             panic!("VertexAttribPointer: Data Type not supported")
@@ -957,46 +1120,22 @@ impl WebGLRenderingContextMethods for We
 
         self.ipc_renderer
             .send(CanvasMsg::WebGL(msg))
             .unwrap()
     }
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8
     fn TexParameterf(&self, target: u32, name: u32, value: f32) {
-        match target {
-            constants::TEXTURE_2D |
-            constants::TEXTURE_CUBE_MAP => {
-                if let Some(texture) = self.bound_texture_for(target) {
-                    let result = texture.tex_parameter(target, name, TexParameterValue::Float(value));
-                    handle_potential_webgl_error!(self, result);
-                } else {
-                    return self.webgl_error(InvalidOperation);
-                }
-            },
-
-            _ => self.webgl_error(InvalidEnum),
-        }
+        self.tex_parameter(target, name, TexParameterValue::Float(value))
     }
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8
     fn TexParameteri(&self, target: u32, name: u32, value: i32) {
-        match target {
-            constants::TEXTURE_2D |
-            constants::TEXTURE_CUBE_MAP => {
-                if let Some(texture) = self.bound_texture_for(target) {
-                    let result = texture.tex_parameter(target, name, TexParameterValue::Int(value));
-                    handle_potential_webgl_error!(self, result);
-                } else {
-                    return self.webgl_error(InvalidOperation);
-                }
-            },
-
-            _ => self.webgl_error(InvalidEnum),
-        }
+        self.tex_parameter(target, name, TexParameterValue::Int(value))
     }
 }
 
 pub trait LayoutCanvasWebGLRenderingContextHelpers {
     #[allow(unsafe_code)]
     unsafe fn get_renderer_id(&self) -> usize;
     #[allow(unsafe_code)]
     unsafe fn get_ipc_renderer(&self) -> IpcSender<CanvasMsg>;
--- a/servo/components/script/dom/webglshader.rs
+++ b/servo/components/script/dom/webglshader.rs
@@ -1,17 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
 use angle::hl::{BuiltInResources, Output, ShaderValidator};
-use canvas_traits::{CanvasMsg, CanvasWebGLMsg, WebGLError, WebGLResult, WebGLShaderParameter};
+use canvas_traits::{CanvasMsg, CanvasWebGLMsg, WebGLResult, WebGLParameter};
 use dom::bindings::cell::DOMRefCell;
-use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
 use dom::bindings::codegen::Bindings::WebGLShaderBinding;
 use dom::bindings::global::GlobalRef;
 use dom::bindings::js::Root;
 use dom::bindings::reflector::reflect_dom_object;
 use dom::webglobject::WebGLObject;
 use ipc_channel::ipc::{self, IpcSender};
 use std::cell::Cell;
 use std::sync::{ONCE_INIT, Once};
@@ -127,26 +126,21 @@ impl WebGLShader {
         }
     }
 
     /// glGetShaderInfoLog
     pub fn info_log(&self) -> Option<String> {
         self.info_log.borrow().clone()
     }
 
-    /// glGetShaderParameter
-    pub fn parameter(&self, param_id: u32) -> WebGLResult<WebGLShaderParameter> {
-        match param_id {
-            constants::SHADER_TYPE | constants::DELETE_STATUS | constants::COMPILE_STATUS => {},
-            _ => return Err(WebGLError::InvalidEnum),
-        }
-
+    /// glGetParameter
+    pub fn parameter(&self, param_id: u32) -> WebGLResult<WebGLParameter> {
         let (sender, receiver) = ipc::channel().unwrap();
         self.renderer.send(CanvasMsg::WebGL(CanvasWebGLMsg::GetShaderParameter(self.id, param_id, sender))).unwrap();
-        Ok(receiver.recv().unwrap())
+        receiver.recv().unwrap()
     }
 
     /// Get the shader source
     pub fn source(&self) -> Option<DOMString> {
         self.source.borrow().clone()
     }
 
     /// glShaderSource
--- a/servo/components/script/dom/webidls/WebGLRenderingContext.webidl
+++ b/servo/components/script/dom/webidls/WebGLRenderingContext.webidl
@@ -471,17 +471,17 @@ interface WebGLRenderingContextBase
     [WebGLHandlesContextLoss] WebGLContextAttributes? getContextAttributes();
     //[WebGLHandlesContextLoss] boolean isContextLost();
 
     sequence<DOMString>? getSupportedExtensions();
     object? getExtension(DOMString name);
 
     void activeTexture(GLenum texture);
     void attachShader(WebGLProgram? program, WebGLShader? shader);
-    //void bindAttribLocation(WebGLProgram? program, GLuint index, DOMString name);
+    void bindAttribLocation(WebGLProgram? program, GLuint index, DOMString name);
     void bindBuffer(GLenum target, WebGLBuffer? buffer);
     void bindFramebuffer(GLenum target, WebGLFramebuffer? framebuffer);
     void bindRenderbuffer(GLenum target, WebGLRenderbuffer? renderbuffer);
     void bindTexture(GLenum target, WebGLTexture? texture);
     void blendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
     void blendEquation(GLenum mode);
     void blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
     void blendFunc(GLenum sfactor, GLenum dfactor);
@@ -547,17 +547,17 @@ interface WebGLRenderingContextBase
 
     void depthFunc(GLenum func);
     void depthMask(GLboolean flag);
     void depthRange(GLclampf zNear, GLclampf zFar);
     //void detachShader(WebGLProgram? program, WebGLShader? shader);
     void disable(GLenum cap);
     //void disableVertexAttribArray(GLuint index);
     void drawArrays(GLenum mode, GLint first, GLsizei count);
-    //void drawElements(GLenum mode, GLsizei count, GLenum type, GLintptr offset);
+    void drawElements(GLenum mode, GLsizei count, GLenum type, GLintptr offset);
 
     void enable(GLenum cap);
     void enableVertexAttribArray(GLuint index);
     //void finish();
     //void flush();
     //void framebufferRenderbuffer(GLenum target, GLenum attachment,
     //                             GLenum renderbuffertarget,
     //                             WebGLRenderbuffer? renderbuffer);
@@ -568,24 +568,24 @@ interface WebGLRenderingContextBase
     //void generateMipmap(GLenum target);
 
     //WebGLActiveInfo? getActiveAttrib(WebGLProgram? program, GLuint index);
     //WebGLActiveInfo? getActiveUniform(WebGLProgram? program, GLuint index);
     //sequence<WebGLShader>? getAttachedShaders(WebGLProgram? program);
 
     [WebGLHandlesContextLoss] GLint getAttribLocation(WebGLProgram? program, DOMString name);
 
-    //any getBufferParameter(GLenum target, GLenum pname);
+    any getBufferParameter(GLenum target, GLenum pname);
     any getParameter(GLenum pname);
 
     [WebGLHandlesContextLoss] GLenum getError();
 
     //any getFramebufferAttachmentParameter(GLenum target, GLenum attachment,
     //                                      GLenum pname);
-    //any getProgramParameter(WebGLProgram? program, GLenum pname);
+    any getProgramParameter(WebGLProgram? program, GLenum pname);
     //DOMString? getProgramInfoLog(WebGLProgram? program);
     //any getRenderbufferParameter(GLenum target, GLenum pname);
     any getShaderParameter(WebGLShader? shader, GLenum pname);
     //WebGLShaderPrecisionFormat? getShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype);
     DOMString? getShaderInfoLog(WebGLShader? shader);
 
     DOMString? getShaderSource(WebGLShader? shader);
 
@@ -684,27 +684,33 @@ interface WebGLRenderingContextBase
     //void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose,
     //                      Float32Array value);
     //void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose,
     //                      sequence<GLfloat> value);
 
     void useProgram(WebGLProgram? program);
     //void validateProgram(WebGLProgram? program);
 
-    //void vertexAttrib1f(GLuint indx, GLfloat x);
+    // FIXME(dmarcos)
+    // The code generator doesn't handle Float32Array so we're using 'object'
+    void vertexAttrib1f(GLuint indx, GLfloat x);
     //void vertexAttrib1fv(GLuint indx, Float32Array values);
+    void vertexAttrib1fv(GLuint indx, object values);
     //void vertexAttrib1fv(GLuint indx, sequence<GLfloat> values);
-    //void vertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
+    void vertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
     //void vertexAttrib2fv(GLuint indx, Float32Array values);
+    void vertexAttrib2fv(GLuint indx, object values);
     //void vertexAttrib2fv(GLuint indx, sequence<GLfloat> values);
-    //void vertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
+    void vertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
     //void vertexAttrib3fv(GLuint indx, Float32Array values);
+    void vertexAttrib3fv(GLuint indx, object values);
     //void vertexAttrib3fv(GLuint indx, sequence<GLfloat> values);
-    //void vertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+    void vertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
     //void vertexAttrib4fv(GLuint indx, Float32Array values);
+    void vertexAttrib4fv(GLuint indx, object values);
     //void vertexAttrib4fv(GLuint indx, sequence<GLfloat> values);
     void vertexAttribPointer(GLuint indx, GLint size, GLenum type,
                              GLboolean normalized, GLsizei stride, GLintptr offset);
 
     void viewport(GLint x, GLint y, GLsizei width, GLsizei height);
 };
 
 interface WebGLRenderingContext
--- a/servo/components/servo/Cargo.lock
+++ b/servo/components/servo/Cargo.lock
@@ -9,17 +9,17 @@ dependencies = [
  "compositing 0.0.1",
  "devtools 0.0.1",
  "devtools_traits 0.0.1",
  "env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gaol 0.0.1 (git+https://github.com/pcwalton/gaol)",
  "gfx 0.0.1",
  "gfx_tests 0.0.1",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "glutin_app 0.0.1",
  "image 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)",
  "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
  "layout 0.0.1",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
@@ -101,17 +101,17 @@ dependencies = [
  "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
  "heapsize 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.20130412.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "bincode"
 version = "0.4.0"
 source = "git+https://github.com/TyOverby/bincode#590a862b4368910a5285ca8e970163f21a752b8d"
 dependencies = [
@@ -145,17 +145,17 @@ source = "registry+https://github.com/ru
 name = "canvas"
 version = "0.0.1"
 dependencies = [
  "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
  "canvas_traits 0.0.1",
  "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx_traits 0.0.1",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)",
  "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
  "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
  "offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)",
  "plugins 0.0.1",
  "util 0.0.1",
 ]
@@ -188,20 +188,20 @@ dependencies = [
 
 [[package]]
 name = "cfg-if"
 version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "cgl"
-version = "0.1.2"
+version = "0.1.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "clipboard"
 version = "0.1.0"
 source = "git+https://github.com/aweinstock314/rust-clipboard#4510d16e640fb52be1cd476557d52f69fa589196"
 dependencies = [
@@ -249,17 +249,17 @@ dependencies = [
  "clipboard 0.1.0 (git+https://github.com/aweinstock314/rust-clipboard)",
  "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-text 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "devtools_traits 0.0.1",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gaol 0.0.1 (git+https://github.com/pcwalton/gaol)",
  "gfx 0.0.1",
  "gfx_traits 0.0.1",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "image 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)",
  "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
  "layout_traits 0.0.1",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
@@ -627,17 +627,17 @@ dependencies = [
  "plugins 0.0.1",
  "profile_traits 0.0.1",
  "rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "script_traits 0.0.1",
  "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.20130412.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "simd 0.1.0 (git+https://github.com/huonw/simd)",
  "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "string_cache 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
  "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
@@ -683,37 +683,37 @@ source = "registry+https://github.com/ru
 dependencies = [
  "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "xml-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "gleam"
-version = "0.1.20"
+version = "0.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "glob"
 version = "0.2.10"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "glutin_app"
 version = "0.0.1"
 dependencies = [
  "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "cgl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "compositing 0.0.1",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "script_traits 0.0.1",
  "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-glutin 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -847,23 +847,23 @@ dependencies = [
 
 [[package]]
 name = "inflate"
 version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "io-surface"
-version = "0.1.1"
+version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "cgl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "ipc-channel"
 version = "0.1.0"
 source = "git+https://github.com/servo/ipc-channel#6900611d5f00c7405ae886d75841fe37df6bfc38"
 dependencies = [
@@ -907,30 +907,30 @@ source = "registry+https://github.com/ru
 [[package]]
 name = "language-tags"
 version = "0.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "layers"
 version = "0.2.0"
-source = "git+https://github.com/servo/rust-layers#c4efb24deb170908a534ae916d23890f85725b17"
+source = "git+https://github.com/servo/rust-layers#f75cff14252571fc02857ad28ca502774a012743"
 dependencies = [
  "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
- "cgl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "io-surface 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "io-surface 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.20130412.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "layout"
 version = "0.0.1"
 dependencies = [
  "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1112,17 +1112,17 @@ name = "msg"
 version = "0.0.1"
 dependencies = [
  "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
  "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "io-surface 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "io-surface 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)",
  "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
  "plugins 0.0.1",
  "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
@@ -1254,23 +1254,23 @@ version = "0.0.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "offscreen_gl_context"
 version = "0.1.0"
-source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#483abed6709570cb0930e6427455cd453363ffcd"
+source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#348364d8869d5e673b49c60f40803dfa903c70f2"
 dependencies = [
- "cgl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
  "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-glutin 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -1653,17 +1653,17 @@ dependencies = [
 ]
 
 [[package]]
 name = "servo-glutin"
 version = "0.4.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "android_glue 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "cgl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "cocoa 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "dwmapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gdi32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "gl_common 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1680,25 +1680,25 @@ dependencies = [
  "wayland-window 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11-dl 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "servo-skia"
-version = "0.20130412.2"
+version = "0.20130412.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "cgl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "expat-sys 2.1.1-really.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "io-surface 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "io-surface 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-glutin 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
--- a/servo/components/servo/Cargo.toml
+++ b/servo/components/servo/Cargo.toml
@@ -130,17 +130,17 @@ git = "https://github.com/pcwalton/gaol"
 [dependencies.ipc-channel]
 git = "https://github.com/servo/ipc-channel"
 
 [dependencies.layers]
 git = "https://github.com/servo/rust-layers"
 features = ["plugins"]
 
 [dependencies.gleam]
-version = "0.1"
+version = "0.2"
 
 [dependencies.offscreen_gl_context]
 git = "https://github.com/ecoal95/rust-offscreen-rendering-context"
 
 [dependencies]
 env_logger = "0.3"
 time = "0.1.12"
 bitflags = "0.3"
--- a/servo/ports/cef/Cargo.lock
+++ b/servo/ports/cef/Cargo.lock
@@ -1,23 +1,23 @@
 [root]
 name = "embedding"
 version = "0.0.1"
 dependencies = [
  "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
- "cgl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "cocoa 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "compositing 0.0.1",
  "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-text 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "devtools 0.0.1",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx 0.0.1",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "glutin_app 0.0.1",
  "js 0.1.1 (git+https://github.com/servo/rust-mozjs)",
  "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -90,17 +90,17 @@ dependencies = [
  "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
  "heapsize 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.20130412.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "bincode"
 version = "0.4.0"
 source = "git+https://github.com/TyOverby/bincode#590a862b4368910a5285ca8e970163f21a752b8d"
 dependencies = [
@@ -134,17 +134,17 @@ source = "registry+https://github.com/ru
 name = "canvas"
 version = "0.0.1"
 dependencies = [
  "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
  "canvas_traits 0.0.1",
  "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx_traits 0.0.1",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)",
  "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
  "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
  "offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)",
  "plugins 0.0.1",
  "util 0.0.1",
 ]
@@ -177,20 +177,20 @@ dependencies = [
 
 [[package]]
 name = "cfg-if"
 version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "cgl"
-version = "0.1.2"
+version = "0.1.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "clipboard"
 version = "0.1.0"
 source = "git+https://github.com/aweinstock314/rust-clipboard#4510d16e640fb52be1cd476557d52f69fa589196"
 dependencies = [
@@ -249,17 +249,17 @@ dependencies = [
  "clipboard 0.1.0 (git+https://github.com/aweinstock314/rust-clipboard)",
  "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-text 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "devtools_traits 0.0.1",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gaol 0.0.1 (git+https://github.com/pcwalton/gaol)",
  "gfx 0.0.1",
  "gfx_traits 0.0.1",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "image 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)",
  "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
  "layout_traits 0.0.1",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
@@ -594,17 +594,17 @@ dependencies = [
  "plugins 0.0.1",
  "profile_traits 0.0.1",
  "rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "script_traits 0.0.1",
  "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.20130412.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "simd 0.1.0 (git+https://github.com/huonw/simd)",
  "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "string_cache 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
  "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
@@ -643,37 +643,37 @@ source = "registry+https://github.com/ru
 dependencies = [
  "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "xml-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "gleam"
-version = "0.1.20"
+version = "0.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "glob"
 version = "0.2.10"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "glutin_app"
 version = "0.0.1"
 dependencies = [
  "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "cgl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "compositing 0.0.1",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "script_traits 0.0.1",
  "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-glutin 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -807,23 +807,23 @@ dependencies = [
 
 [[package]]
 name = "inflate"
 version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "io-surface"
-version = "0.1.1"
+version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "cgl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "ipc-channel"
 version = "0.1.0"
 source = "git+https://github.com/servo/ipc-channel#6900611d5f00c7405ae886d75841fe37df6bfc38"
 dependencies = [
@@ -867,30 +867,30 @@ source = "registry+https://github.com/ru
 [[package]]
 name = "language-tags"
 version = "0.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "layers"
 version = "0.2.0"
-source = "git+https://github.com/servo/rust-layers#c4efb24deb170908a534ae916d23890f85725b17"
+source = "git+https://github.com/servo/rust-layers#f75cff14252571fc02857ad28ca502774a012743"
 dependencies = [
  "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
- "cgl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "io-surface 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "io-surface 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.20130412.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "layout"
 version = "0.0.1"
 dependencies = [
  "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1072,17 +1072,17 @@ name = "msg"
 version = "0.0.1"
 dependencies = [
  "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
  "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "io-surface 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "io-surface 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)",
  "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
  "plugins 0.0.1",
  "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
@@ -1189,23 +1189,23 @@ version = "0.0.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "offscreen_gl_context"
 version = "0.1.0"
-source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#483abed6709570cb0930e6427455cd453363ffcd"
+source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#348364d8869d5e673b49c60f40803dfa903c70f2"
 dependencies = [
- "cgl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
  "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-glutin 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -1542,17 +1542,17 @@ dependencies = [
  "canvas_traits 0.0.1",
  "compositing 0.0.1",
  "devtools 0.0.1",
  "devtools_traits 0.0.1",
  "env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gaol 0.0.1 (git+https://github.com/pcwalton/gaol)",
  "gfx 0.0.1",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "glutin_app 0.0.1",
  "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)",
  "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
  "layout 0.0.1",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net 0.0.1",
@@ -1605,17 +1605,17 @@ dependencies = [
 ]
 
 [[package]]
 name = "servo-glutin"
 version = "0.4.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "android_glue 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "cgl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "cocoa 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "dwmapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gdi32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "gl_common 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1632,25 +1632,25 @@ dependencies = [
  "wayland-window 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11-dl 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "servo-skia"
-version = "0.20130412.2"
+version = "0.20130412.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "cgl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "expat-sys 2.1.1-really.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "io-surface 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "io-surface 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-glutin 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
--- a/servo/ports/cef/Cargo.toml
+++ b/servo/ports/cef/Cargo.toml
@@ -8,17 +8,17 @@ name = "embedding"
 path = "lib.rs"
 crate-type = ["dylib"]
 
 [dependencies]
 log = "0.3"
 url = "0.5"
 libc = "0.2"
 euclid = {version = "0.4", features = ["plugins"]}
-gleam = "0.1"
+gleam = "0.2"
 
 [dependencies.servo]
 path = "../../components/servo"
 
 [dependencies.glutin_app]
 path = "../glutin"
 
 [dependencies.plugins]
--- a/servo/ports/glutin/Cargo.toml
+++ b/servo/ports/glutin/Cargo.toml
@@ -11,17 +11,17 @@ path = "lib.rs"
 window = []
 headless = ["servo-glutin/headless"]
 
 [dependencies]
 time = "0.1.12"
 bitflags = "0.3"
 libc = "0.2"
 url = "0.5"
-gleam = "0.1"
+gleam = "0.2"
 euclid = {version = "0.4", features = ["plugins"]}
 servo-glutin = "0.4"
 
 [dependencies.compositing]
 path = "../../components/compositing"
 
 [dependencies.script_traits]
 path = "../../components/script_traits"
--- a/servo/ports/gonk/Cargo.lock
+++ b/servo/ports/gonk/Cargo.lock
@@ -4,17 +4,17 @@ version = "0.0.1"
 dependencies = [
  "compositing 0.0.1",
  "devtools 0.0.1",
  "egl 0.2.0 (git+https://github.com/servo/rust-egl)",
  "env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "errno 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx 0.0.1",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
  "layout 0.0.1",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "profile 0.0.1",
  "script 0.0.1",
  "servo 0.0.1",
@@ -81,17 +81,17 @@ dependencies = [
  "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
  "heapsize 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.20130412.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "bincode"
 version = "0.4.0"
 source = "git+https://github.com/TyOverby/bincode#590a862b4368910a5285ca8e970163f21a752b8d"
 dependencies = [
@@ -125,17 +125,17 @@ source = "registry+https://github.com/ru
 name = "canvas"
 version = "0.0.1"
 dependencies = [
  "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
  "canvas_traits 0.0.1",
  "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx_traits 0.0.1",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)",
  "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
  "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
  "offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)",
  "plugins 0.0.1",
  "util 0.0.1",
 ]
@@ -168,20 +168,20 @@ dependencies = [
 
 [[package]]
 name = "cfg-if"
 version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "cgl"
-version = "0.1.2"
+version = "0.1.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "clipboard"
 version = "0.1.0"
 source = "git+https://github.com/aweinstock314/rust-clipboard#4510d16e640fb52be1cd476557d52f69fa589196"
 dependencies = [
@@ -229,17 +229,17 @@ dependencies = [
  "clipboard 0.1.0 (git+https://github.com/aweinstock314/rust-clipboard)",
  "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-text 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "devtools_traits 0.0.1",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gaol 0.0.1 (git+https://github.com/pcwalton/gaol)",
  "gfx 0.0.1",
  "gfx_traits 0.0.1",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "image 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)",
  "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
  "layout_traits 0.0.1",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
@@ -592,17 +592,17 @@ dependencies = [
  "plugins 0.0.1",
  "profile_traits 0.0.1",
  "rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "script_traits 0.0.1",
  "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.20130412.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "simd 0.1.0 (git+https://github.com/huonw/simd)",
  "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "string_cache 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
  "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
@@ -641,17 +641,17 @@ source = "registry+https://github.com/ru
 dependencies = [
  "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "xml-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "gleam"
-version = "0.1.20"
+version = "0.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "glob"
@@ -783,23 +783,23 @@ dependencies = [
 
 [[package]]
 name = "inflate"
 version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "io-surface"
-version = "0.1.1"
+version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "cgl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "ipc-channel"
 version = "0.1.0"
 source = "git+https://github.com/servo/ipc-channel#6900611d5f00c7405ae886d75841fe37df6bfc38"
 dependencies = [
@@ -843,30 +843,30 @@ source = "registry+https://github.com/ru
 [[package]]
 name = "language-tags"
 version = "0.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "layers"
 version = "0.2.0"
-source = "git+https://github.com/servo/rust-layers#c4efb24deb170908a534ae916d23890f85725b17"
+source = "git+https://github.com/servo/rust-layers#f75cff14252571fc02857ad28ca502774a012743"
 dependencies = [
  "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
- "cgl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "io-surface 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "io-surface 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.20130412.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "layout"
 version = "0.0.1"
 dependencies = [
  "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1048,17 +1048,17 @@ name = "msg"
 version = "0.0.1"
 dependencies = [
  "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
  "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "io-surface 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "io-surface 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)",
  "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
  "plugins 0.0.1",
  "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
@@ -1165,23 +1165,23 @@ version = "0.0.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "offscreen_gl_context"
 version = "0.1.0"
-source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#483abed6709570cb0930e6427455cd453363ffcd"
+source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#348364d8869d5e673b49c60f40803dfa903c70f2"
 dependencies = [
- "cgl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
  "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-glutin 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -1518,17 +1518,17 @@ dependencies = [
  "canvas_traits 0.0.1",
  "compositing 0.0.1",
  "devtools 0.0.1",
  "devtools_traits 0.0.1",
  "env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gaol 0.0.1 (git+https://github.com/pcwalton/gaol)",
  "gfx 0.0.1",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)",
  "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
  "layout 0.0.1",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net 0.0.1",
  "net_traits 0.0.1",
@@ -1579,17 +1579,17 @@ dependencies = [
 ]
 
 [[package]]
 name = "servo-glutin"
 version = "0.4.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "android_glue 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "cgl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "cocoa 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "dwmapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gdi32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "gl_common 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1606,25 +1606,25 @@ dependencies = [
  "wayland-window 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11-dl 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "servo-skia"
-version = "0.20130412.2"
+version = "0.20130412.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "cgl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "expat-sys 2.1.1-really.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "io-surface 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "io-surface 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-glutin 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
--- a/servo/ports/gonk/Cargo.toml
+++ b/servo/ports/gonk/Cargo.toml
@@ -45,9 +45,9 @@ git = "https://github.com/servo/rust-egl
 
 [dependencies]
 env_logger = "0.3"
 url = "0.5"
 time = "0.1.17"
 errno = "0.1"
 libc = "0.2"
 euclid = {version = "0.4", features = ["plugins"]}
-gleam = "0.1"
+gleam = "0.2"