From dc5a50fcd3aa517dcd964517156c31c47ac7b527 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 26 Jul 2017 08:42:16 -0400 Subject: [PATCH 1/4] Clean up warnings in script unit tests. --- tests/unit/script/textinput.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/unit/script/textinput.rs b/tests/unit/script/textinput.rs index 620368b4d8f..4f64596e5f5 100644 --- a/tests/unit/script/textinput.rs +++ b/tests/unit/script/textinput.rs @@ -7,8 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use msg::constellation_msg::{ALT, CONTROL, SUPER}; -use msg::constellation_msg::{Key, KeyModifiers}; +use msg::constellation_msg::{Key, KeyModifiers, CONTROL}; use script::clipboard_provider::DummyClipboardContext; use script::test::DOMString; use script::textinput::{TextInput, TextPoint, Selection, Lines, Direction, SelectionDirection}; From f86399d1e51ba23c95e066c18197f8765bfccae3 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 26 Jul 2017 08:43:38 -0400 Subject: [PATCH 2/4] Remove unused CEF variable. --- ports/cef/core.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/ports/cef/core.rs b/ports/cef/core.rs index 7fcac74d848..c3bef096f85 100644 --- a/ports/cef/core.rs +++ b/ports/cef/core.rs @@ -13,8 +13,6 @@ use servo_config::opts; use std::ffi; use std::str; -const MAX_RENDERING_THREADS: usize = 128; - //static HOME_URL: &'static str = "http://s27.postimg.org/vqbtrolyr/servo.jpg"; static CEF_API_HASH_UNIVERSAL: &'static [u8] = b"8efd129f4afc344bd04b2feb7f73a149b6c4e27f\0"; @@ -57,16 +55,6 @@ pub extern "C" fn cef_initialize(args: *const cef_main_args_t, } } - let rendering_threads = unsafe { - if ((*settings).rendering_threads as usize) < 1 { - 1 - } else if (*settings).rendering_threads as usize > MAX_RENDERING_THREADS { - MAX_RENDERING_THREADS - } else { - (*settings).rendering_threads as usize - } - }; - let mut temp_opts = opts::default_opts(); temp_opts.headless = false; temp_opts.hard_fail = false; From b8d8e1528625bbb211e02cc6a23fa605d3fe9b03 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 26 Jul 2017 08:44:08 -0400 Subject: [PATCH 3/4] Remove unused CEF import. --- ports/cef/window.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/cef/window.rs b/ports/cef/window.rs index b598e35abdd..7d6f08bfeef 100644 --- a/ports/cef/window.rs +++ b/ports/cef/window.rs @@ -31,7 +31,6 @@ use std::ffi::CString; use std::os::raw::{c_char, c_void}; use std::ptr; use std::rc::Rc; -use std::sync::mpsc::{Sender, channel}; use servo_url::ServoUrl; use style_traits::cursor::Cursor; use style_traits::DevicePixel; From 7359b761f00a53671b28673a25855562b2d12d9b Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 27 Jul 2017 00:05:27 -0400 Subject: [PATCH 4/4] Conditionally import values for mac tests. --- tests/unit/script/textinput.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/unit/script/textinput.rs b/tests/unit/script/textinput.rs index 4f64596e5f5..708a24f9649 100644 --- a/tests/unit/script/textinput.rs +++ b/tests/unit/script/textinput.rs @@ -7,6 +7,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[cfg(target_os = "macos")] +use msg::constellation_msg::{ALT, SUPER}; use msg::constellation_msg::{Key, KeyModifiers, CONTROL}; use script::clipboard_provider::DummyClipboardContext; use script::test::DOMString;