From ce61dc26230c3ce7b8ce3cea5dd0f4a091d328d6 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Thu, 5 Nov 2015 08:37:39 -0800 Subject: [PATCH] Upgrade to latest glutin --- components/servo/Cargo.lock | 8 ++++---- components/servo/main.rs | 2 +- ports/cef/Cargo.lock | 26 ++++++++++++++++++++++---- ports/cef/browser.rs | 5 +++-- ports/glutin/lib.rs | 2 +- ports/glutin/window.rs | 6 +++--- ports/gonk/Cargo.lock | 24 +++++++++++++++++++++--- 7 files changed, 55 insertions(+), 18 deletions(-) diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index 9d612376904..cf83158b793 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -722,8 +722,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "glutin" -version = "0.4.0" -source = "git+https://github.com/servo/glutin?branch=servo#6525e224e3b5b3ad4f0af8d87460512eb64e8c59" +version = "0.4.1" +source = "git+https://github.com/servo/glutin?branch=servo#d4ab289f0eee3a168746ab10521edbff244e4b99" dependencies = [ "android_glue 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -761,7 +761,7 @@ dependencies = [ "egl 0.1.0 (git+https://github.com/servo/rust-egl)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "glutin 0.4.0 (git+https://github.com/servo/glutin?branch=servo)", + "glutin 0.4.1 (git+https://github.com/servo/glutin?branch=servo)", "layers 0.1.0 (git+https://github.com/servo/rust-layers)", "libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", @@ -1283,7 +1283,7 @@ dependencies = [ "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "gl_generator 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "glutin 0.4.0 (git+https://github.com/servo/glutin?branch=servo)", + "glutin 0.4.1 (git+https://github.com/servo/glutin?branch=servo)", "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "layers 0.1.0 (git+https://github.com/servo/rust-layers)", "libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/components/servo/main.rs b/components/servo/main.rs index c96fda023dd..e78bd2b3170 100644 --- a/components/servo/main.rs +++ b/components/servo/main.rs @@ -67,7 +67,7 @@ fn main() { load_gl_when_headless(); None } else { - Some(app::create_window(std::ptr::null_mut())) + Some(app::create_window(None)) }; // Our wrapper around `Browser` that also implements some diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index 206b1d56e57..3e4e193401b 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -675,8 +675,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "glutin" -version = "0.4.0" -source = "git+https://github.com/servo/glutin?branch=servo#6525e224e3b5b3ad4f0af8d87460512eb64e8c59" +version = "0.4.1" +source = "git+https://github.com/servo/glutin?branch=servo#d4ab289f0eee3a168746ab10521edbff244e4b99" dependencies = [ "android_glue 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -714,7 +714,7 @@ dependencies = [ "egl 0.1.0 (git+https://github.com/servo/rust-egl)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "glutin 0.4.0 (git+https://github.com/servo/glutin?branch=servo)", + "glutin 0.4.1 (git+https://github.com/servo/glutin?branch=servo)", "layers 0.1.0 (git+https://github.com/servo/rust-layers)", "libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", @@ -1220,7 +1220,7 @@ dependencies = [ "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "gl_generator 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "glutin 0.4.0 (git+https://github.com/servo/glutin?branch=servo)", + "glutin 0.4.1 (git+https://github.com/servo/glutin?branch=servo)", "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "layers 0.1.0 (git+https://github.com/servo/rust-layers)", "libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1469,6 +1469,7 @@ dependencies = [ "util 0.0.1", "uuid 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "websocket 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", + "xml5ever 0.1.0 (git+https://github.com/Ygg01/xml5ever)", ] [[package]] @@ -1988,3 +1989,20 @@ dependencies = [ "bitflags 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "xml5ever" +version = "0.1.0" +source = "git+https://github.com/Ygg01/xml5ever#0c36f2d93532b2d7b1ccfbd6019a6d53a1fcac69" +dependencies = [ + "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tendril 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", +] + diff --git a/ports/cef/browser.rs b/ports/cef/browser.rs index b728d084779..8c722c60f89 100644 --- a/ports/cef/browser.rs +++ b/ports/cef/browser.rs @@ -129,10 +129,11 @@ impl ServoCefBrowser { let mut glutin_window: Option> = None; let servo_browser = if window_info.windowless_rendering_enabled == 0 { - glutin_window = Some(glutin_app::create_window(window_info.parent_window as glutin_app::WindowID)); + let parent_window = glutin_app::WindowID::new(window_info.parent_window as *mut _); + glutin_window = Some(glutin_app::create_window(Some(parent_window))); let servo_browser = Browser::new(glutin_window.clone()); window_handle = match glutin_window { - Some(ref win) => win.platform_window() as cef_window_handle_t, + Some(ref win) => win.platform_window().window as cef_window_handle_t, None => get_null_window_handle() }; ServoBrowser::OnScreen(servo_browser) diff --git a/ports/glutin/lib.rs b/ports/glutin/lib.rs index bd77c5a808a..b7fb8fcce25 100644 --- a/ports/glutin/lib.rs +++ b/ports/glutin/lib.rs @@ -37,7 +37,7 @@ pub trait NestedEventLoopListener { fn handle_event_from_nested_event_loop(&mut self, event: WindowEvent) -> bool; } -pub fn create_window(parent: WindowID) -> Rc { +pub fn create_window(parent: Option) -> Rc { // Read command-line options. let opts = opts::get(); let foreground = opts.output_file.is_none(); diff --git a/ports/glutin/window.rs b/ports/glutin/window.rs index f1c4cc50964..a0bacdb9f45 100644 --- a/ports/glutin/window.rs +++ b/ports/glutin/window.rs @@ -84,7 +84,7 @@ pub struct Window { impl Window { pub fn new(is_foreground: bool, window_size: TypedSize2D, - parent: glutin::WindowID) -> Rc { + parent: Option) -> Rc { let mut glutin_window = glutin::WindowBuilder::new() .with_title("Servo".to_string()) .with_decorations(!opts::get().no_native_titlebar) @@ -122,7 +122,7 @@ impl Window { } pub fn platform_window(&self) -> glutin::WindowID { - unsafe { self.window.platform_window() } + unsafe { glutin::WindowID::new(self.window.platform_window()) } } fn nested_window_resize(width: u32, height: u32) { @@ -721,7 +721,7 @@ pub struct Window { impl Window { pub fn new(_is_foreground: bool, window_size: TypedSize2D, - _parent: glutin::WindowID) -> Rc { + _parent: Option) -> Rc { let window_size = window_size.to_untyped(); let headless_builder = glutin::HeadlessRendererBuilder::new(window_size.width, window_size.height); diff --git a/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock index 39166896bb1..b0093519403 100644 --- a/ports/gonk/Cargo.lock +++ b/ports/gonk/Cargo.lock @@ -677,8 +677,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "glutin" -version = "0.4.0" -source = "git+https://github.com/servo/glutin?branch=servo#6525e224e3b5b3ad4f0af8d87460512eb64e8c59" +version = "0.4.1" +source = "git+https://github.com/servo/glutin?branch=servo#d4ab289f0eee3a168746ab10521edbff244e4b99" dependencies = [ "android_glue 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1200,7 +1200,7 @@ dependencies = [ "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "gl_generator 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "glutin 0.4.0 (git+https://github.com/servo/glutin?branch=servo)", + "glutin 0.4.1 (git+https://github.com/servo/glutin?branch=servo)", "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "layers 0.1.0 (git+https://github.com/servo/rust-layers)", "libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1449,6 +1449,7 @@ dependencies = [ "util 0.0.1", "uuid 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "websocket 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", + "xml5ever 0.1.0 (git+https://github.com/Ygg01/xml5ever)", ] [[package]] @@ -1936,3 +1937,20 @@ dependencies = [ "bitflags 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "xml5ever" +version = "0.1.0" +source = "git+https://github.com/Ygg01/xml5ever#0c36f2d93532b2d7b1ccfbd6019a6d53a1fcac69" +dependencies = [ + "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tendril 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", +] +