Removed util.

This commit is contained in:
Alan Jeffrey 2016-12-14 10:37:58 -06:00
parent 01b6ad55bd
commit 9be4fd56ce
133 changed files with 396 additions and 352 deletions

View file

@ -31,9 +31,10 @@ msg = {path = "../../components/msg"}
net_traits = {path = "../../components/net_traits"}
plugins = {path = "../../components/plugins"}
script_traits = {path = "../../components/script_traits"}
servo_config = {path = "../../components/config"}
servo_geometry = {path = "../../components/geometry"}
servo_url = {path = "../../components/url"}
style_traits = {path = "../../components/style_traits"}
util = {path = "../../components/util"}
[target.'cfg(target_os="macos")'.dependencies]
objc = "0.2"

View file

@ -10,7 +10,6 @@ use interfaces::{cef_browser_t, cef_browser_host_t, cef_client_t, cef_frame_t};
use interfaces::{cef_request_context_t};
use servo::Browser;
use types::{cef_browser_settings_t, cef_string_t, cef_window_info_t, cef_window_handle_t};
use util::thread::spawn_named;
use window;
use wrappers::CefWrap;
@ -21,6 +20,7 @@ use std::cell::{Cell, RefCell};
use std::ptr;
use std::rc::Rc;
use std::sync::atomic::{AtomicIsize, Ordering};
use std::thread;
thread_local!(pub static ID_COUNTER: AtomicIsize = AtomicIsize::new(0));
thread_local!(pub static BROWSERS: RefCell<Vec<CefBrowser>> = RefCell::new(vec!()));
@ -293,9 +293,9 @@ cef_static_method_impls! {
let _browser_settings: &cef_browser_settings_t = _browser_settings;
let _request_context: CefRequestContext = _request_context;
browser_host_create(window_info, client, url, false);
spawn_named("async_browser_creation".to_owned(), move || {
thread::Builder::new().name("async_browser_creation".to_owned()).spawn(move || {
window::app_wakeup();
});
}).expect("Thread spawning failed");
1i32
}}
fn cef_browser_host_create_browser_sync(window_info: *const cef_window_info_t,
@ -309,4 +309,4 @@ cef_static_method_impls! {
let _request_context: CefRequestContext = _request_context;
browser_host_create(window_info, client, url, true)
}}
}
}

View file

@ -9,9 +9,9 @@ use window::init_window;
use browser;
use libc::{c_char, c_int, c_void};
use servo_config::opts;
use std::ffi;
use std::str;
use util::opts;
const MAX_RENDERING_THREADS: usize = 128;

View file

@ -24,12 +24,13 @@ extern crate gleam;
extern crate glutin_app;
extern crate rustc_unicode;
extern crate script_traits;
extern crate servo_config;
extern crate servo_geometry;
extern crate servo_url;
extern crate style_traits;
extern crate net_traits;
extern crate msg;
extern crate util;
extern crate libc;

View file

@ -27,6 +27,7 @@ use gfx_traits::DevicePixel;
use gleam::gl;
use msg::constellation_msg::{Key, KeyModifiers};
use net_traits::net_error_list::NetError;
use servo_geometry::ScreenPx;
use std::cell::RefCell;
use std::ffi::CString;
use std::os::raw::{c_char, c_void};
@ -35,7 +36,6 @@ use std::rc::Rc;
use std::sync::mpsc::{Sender, channel};
use servo_url::ServoUrl;
use style_traits::cursor::Cursor;
use util::geometry::ScreenPx;
#[cfg(target_os="linux")]
extern crate x11;
#[cfg(target_os="linux")]

View file

@ -19,9 +19,10 @@ msg = {path = "../../components/msg"}
net_traits = {path = "../../components/net_traits"}
script_traits = {path = "../../components/script_traits"}
servo-glutin = "0.6"
servo_geometry = {path = "../../components/geometry"}
servo_config = {path = "../../components/config"}
servo_url = {path = "../../components/url"}
style_traits = {path = "../../components/style_traits"}
util = {path = "../../components/util"}
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
osmesa-sys = "0.1.2"

View file

@ -19,16 +19,17 @@ extern crate msg;
extern crate net_traits;
#[cfg(any(target_os = "linux", target_os = "macos"))] extern crate osmesa_sys;
extern crate script_traits;
extern crate servo_config;
extern crate servo_geometry;
extern crate servo_url;
extern crate style_traits;
extern crate util;
#[cfg(target_os = "windows")] extern crate winapi;
#[cfg(target_os = "windows")] extern crate user32;
#[cfg(target_os = "windows")] extern crate gdi32;
use compositing::windowing::WindowEvent;
use servo_config::opts;
use std::rc::Rc;
use util::opts;
use window::Window;
pub mod window;

View file

@ -26,6 +26,10 @@ use net_traits::net_error_list::NetError;
#[cfg(any(target_os = "linux", target_os = "macos"))]
use osmesa_sys;
use script_traits::{TouchEventType, TouchpadPressurePhase};
use servo_config::opts;
use servo_config::prefs::PREFS;
use servo_config::resource_files;
use servo_geometry::ScreenPx;
use servo_url::ServoUrl;
use std::cell::{Cell, RefCell};
#[cfg(any(target_os = "linux", target_os = "macos"))]
@ -39,10 +43,6 @@ use std::sync::mpsc::{Sender, channel};
use style_traits::cursor::Cursor;
#[cfg(target_os = "windows")]
use user32;
use util::geometry::ScreenPx;
use util::opts;
use util::prefs::PREFS;
use util::resource_files;
#[cfg(target_os = "windows")]
use winapi;

View file

@ -22,8 +22,9 @@ net_traits_tests = {path = "../../tests/unit/net_traits"}
plugin_compiletest = {path = "../../tests/compiletest/plugin"}
profile_tests = {path = "../../tests/unit/profile"}
script_tests = {path = "../../tests/unit/script"}
servo_config_tests = {path = "../../tests/unit/servo_config"}
servo_remutex_tests = {path = "../../tests/unit/servo_remutex"}
style_tests = {path = "../../tests/unit/style"}
util_tests = {path = "../../tests/unit/util"}
[features]
default = ["webdriver", "max_log_level"]

View file

@ -38,8 +38,8 @@ extern crate sig;
use backtrace::Backtrace;
use servo::Browser;
use servo::compositing::windowing::WindowEvent;
use servo::util::opts::{self, ArgumentParsingResult};
use servo::util::servo_version;
use servo::config::opts::{self, ArgumentParsingResult};
use servo::config::servo_version;
use std::env;
use std::panic;
use std::process;
@ -286,10 +286,10 @@ mod android {
use self::libc::{pipe, dup2};
use self::libc::fdopen;
use self::libc::fgets;
use servo::util::thread::spawn_named;
use std::ffi::CStr;
use std::ffi::CString;
use std::str::from_utf8;
use std::thread;
unsafe {
let mut pipes: [c_int; 2] = [ 0, 0 ];
@ -297,7 +297,7 @@ mod android {
dup2(pipes[1], file_no);
let mode = CString::new("r").unwrap();
let input_file = FilePtr(fdopen(pipes[0], mode.as_ptr()));
spawn_named("android-logger".to_owned(), move || {
thread::Builder::new().name("android-logger".to_owned()).spawn(move || {
static READ_SIZE: usize = 1024;
let mut read_buffer = vec![0; READ_SIZE];
let FilePtr(input_file) = input_file;