diff --git a/ports/libsimpleservo/api/build.rs b/ports/libsimpleservo/api/build.rs index 428e300f504..1fcd49bf930 100644 --- a/ports/libsimpleservo/api/build.rs +++ b/ports/libsimpleservo/api/build.rs @@ -62,13 +62,9 @@ fn main() { .unwrap(); } - // Merge prefs.json and package-prefs.json let mut default_prefs = PathBuf::from(env!("CARGO_MANIFEST_DIR")); default_prefs.push("../../../resources/prefs.json"); - let mut prefs: Value = serde_json::from_reader(File::open(&default_prefs).unwrap()).unwrap(); - let mut pkg_prefs = PathBuf::from(env!("CARGO_MANIFEST_DIR")); - pkg_prefs.push("../../../resources/package-prefs.json"); - let pkg_prefs: Value = serde_json::from_reader(File::open(&pkg_prefs).unwrap()).unwrap(); + let prefs: Value = serde_json::from_reader(File::open(&default_prefs).unwrap()).unwrap(); let file = File::create(&dest.join("prefs.json")).unwrap(); serde_json::to_writer(file, &prefs).unwrap(); } diff --git a/ports/libsimpleservo/api/src/gl_glue.rs b/ports/libsimpleservo/api/src/gl_glue.rs index 38289843cdd..bd4dbc7c766 100644 --- a/ports/libsimpleservo/api/src/gl_glue.rs +++ b/ports/libsimpleservo/api/src/gl_glue.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #![allow(bare_trait_objects)] // Until https://github.com/brendanzab/gl-rs/pull/493 - + // pub type ServoGl = std::rc::Rc; #[cfg(any(target_os = "android", target_os = "windows"))] @@ -12,6 +12,7 @@ pub mod egl { use std::ffi::CString; use std::os::raw::c_void; + use log::info; use servo::gl::GlesFns; pub type EGLNativeWindowType = *const libc::c_void; @@ -73,6 +74,7 @@ pub mod gl { CFBundleGetBundleWithIdentifier, CFBundleGetFunctionPointerForName, }; use core_foundation::string::CFString; + use log::info; use servo::gl::GlFns; pub fn init() -> Result { @@ -104,6 +106,7 @@ pub mod gl { use std::os::raw::c_void; use libloading::{Library, Symbol}; + use log::info; use servo::gl::GlFns; pub fn init() -> Result { diff --git a/ports/libsimpleservo/api/src/lib.rs b/ports/libsimpleservo/api/src/lib.rs index fedde7402eb..bbb894faee1 100644 --- a/ports/libsimpleservo/api/src/lib.rs +++ b/ports/libsimpleservo/api/src/lib.rs @@ -13,6 +13,7 @@ use std::rc::Rc; use getopts::Options; use ipc_channel::ipc::IpcSender; +use log::{debug, info, warn}; use servo::compositing::windowing::{ AnimationState, EmbedderCoordinates, EmbedderEvent, EmbedderMethods, MouseWindowEvent, WindowMethods, @@ -40,7 +41,7 @@ use servo::webrender_api::ScrollLocation; use servo::webrender_surfman::WebrenderSurfman; use servo::{self, gl, BrowserId, Servo}; use servo_media::player::context as MediaPlayerContext; -use surfman::{Adapter, Connection, SurfaceType}; +use surfman::{Connection, SurfaceType}; thread_local! { pub static SERVO: RefCell> = RefCell::new(None); diff --git a/ports/libsimpleservo/capi/src/lib.rs b/ports/libsimpleservo/capi/src/lib.rs index 8213eade68c..7679516a526 100644 --- a/ports/libsimpleservo/capi/src/lib.rs +++ b/ports/libsimpleservo/capi/src/lib.rs @@ -18,7 +18,8 @@ use std::sync::{Mutex, RwLock}; #[cfg(not(target_os = "windows"))] use env_logger; use keyboard_types::Key; -use log::LevelFilter; +use lazy_static::lazy_static; +use log::{debug, error, info, warn, LevelFilter}; use simpleservo::{ self, gl_glue, ContextMenuResult, Coordinates, DeviceIntRect, EventLoopWaker, HostTrait, InitOptions, InputMethodType, MediaSessionActionType, MediaSessionPlaybackState, MouseButton, diff --git a/ports/libsimpleservo/capi/src/prefs.rs b/ports/libsimpleservo/capi/src/prefs.rs index d712ab1eba9..c832278e087 100644 --- a/ports/libsimpleservo/capi/src/prefs.rs +++ b/ports/libsimpleservo/capi/src/prefs.rs @@ -12,6 +12,8 @@ use std::collections::{BTreeMap, HashMap}; use std::ffi::{CStr, CString}; use std::os::raw::{c_char, c_void}; +use log::debug; + use crate::simpleservo::{self, PrefValue}; thread_local! {