aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabrice Desré <fabrice@desre.org>2018-03-30 17:44:47 -0700
committerFabrice Desré <fabrice@desre.org>2018-03-30 22:55:23 -0700
commitbab13941468ef443a43a1363d2a93ca47e047df9 (patch)
tree209c440aeea864c99d79821193dee55d2bbe1853
parentd232705106478e0a2e5de78f8b40144408879c36 (diff)
downloadservo-bab13941468ef443a43a1363d2a93ca47e047df9.tar.gz
servo-bab13941468ef443a43a1363d2a93ca47e047df9.zip
Cleanup ports/servo to only rely on libservo
-rw-r--r--Cargo.lock7
-rw-r--r--ports/servo/Cargo.toml7
-rw-r--r--ports/servo/browser.rs14
-rw-r--r--ports/servo/glutin_app/keyutils.rs2
-rw-r--r--ports/servo/glutin_app/mod.rs2
-rw-r--r--ports/servo/glutin_app/window.rs24
-rw-r--r--ports/servo/main.rs7
7 files changed, 21 insertions, 42 deletions
diff --git a/Cargo.lock b/Cargo.lock
index e8726c0e8d8..25eb879029a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2717,25 +2717,18 @@ dependencies = [
"android_injected_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "compositing 0.0.1",
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)",
"glutin 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libservo 0.0.1",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "msg 0.0.1",
"osmesa-src 17.3.1-devel (git+https://github.com/servo/osmesa-src)",
"osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "script_traits 0.0.1",
"servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo_config 0.0.1",
- "servo_geometry 0.0.1",
"sig 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "style_traits 0.0.1",
"tinyfiledialogs 3.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "webrender_api 0.57.0 (git+https://github.com/servo/webrender)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"winit 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
"winres 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/ports/servo/Cargo.toml b/ports/servo/Cargo.toml
index 0d2d01aebf0..d81a005358c 100644
--- a/ports/servo/Cargo.toml
+++ b/ports/servo/Cargo.toml
@@ -36,19 +36,12 @@ unstable = ["libservo/unstable"]
[dependencies]
backtrace = "0.3"
bitflags = "1.0"
-compositing = {path = "../../components/compositing"}
euclid = "0.17"
gleam = "0.4.29"
glutin = "0.13"
libservo = {path = "../../components/servo"}
log = "0.4"
-msg = {path = "../../components/msg"}
-script_traits = {path = "../../components/script_traits"}
-servo_geometry = {path = "../../components/geometry"}
-servo_config = {path = "../../components/config"}
-style_traits = {path = "../../components/style_traits"}
tinyfiledialogs = "3.0"
-webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}
winit = "0.11.2"
[target.'cfg(not(target_os = "android"))'.dependencies]
diff --git a/ports/servo/browser.rs b/ports/servo/browser.rs
index 0231cb131b7..ff0a8d20cee 100644
--- a/ports/servo/browser.rs
+++ b/ports/servo/browser.rs
@@ -2,21 +2,21 @@
* 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 compositing::compositor_thread::EmbedderMsg;
-use compositing::windowing::{WebRenderDebugOption, WindowEvent};
use euclid::{TypedPoint2D, TypedVector2D};
use glutin_app::keyutils::{CMD_OR_CONTROL, CMD_OR_ALT};
use glutin_app::window::{Window, LINE_HEIGHT};
-use msg::constellation_msg::{Key, TopLevelBrowsingContextId as BrowserId};
-use msg::constellation_msg::{KeyModifiers, KeyState, TraversalDirection};
-use script_traits::TouchEventType;
+use servo::compositing::compositor_thread::EmbedderMsg;
+use servo::compositing::windowing::{WebRenderDebugOption, WindowEvent};
+use servo::msg::constellation_msg::{Key, TopLevelBrowsingContextId as BrowserId};
+use servo::msg::constellation_msg::{KeyModifiers, KeyState, TraversalDirection};
use servo::net_traits::pub_domains::is_reg_domain;
+use servo::script_traits::TouchEventType;
+use servo::servo_config::prefs::PREFS;
use servo::servo_url::ServoUrl;
-use servo_config::prefs::PREFS;
+use servo::webrender_api::ScrollLocation;
use std::mem;
use std::rc::Rc;
use tinyfiledialogs;
-use webrender_api::ScrollLocation;
pub struct Browser {
current_url: Option<ServoUrl>,
diff --git a/ports/servo/glutin_app/keyutils.rs b/ports/servo/glutin_app/keyutils.rs
index bce62893cde..cecce496a1d 100644
--- a/ports/servo/glutin_app/keyutils.rs
+++ b/ports/servo/glutin_app/keyutils.rs
@@ -2,7 +2,7 @@
* 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 msg::constellation_msg::{self, Key, KeyModifiers};
+use servo::msg::constellation_msg::{self, Key, KeyModifiers};
use winit::{self, VirtualKeyCode};
bitflags! {
diff --git a/ports/servo/glutin_app/mod.rs b/ports/servo/glutin_app/mod.rs
index a7e8ac8f5e8..c844cdb6469 100644
--- a/ports/servo/glutin_app/mod.rs
+++ b/ports/servo/glutin_app/mod.rs
@@ -7,7 +7,7 @@
pub mod keyutils;
pub mod window;
-use servo_config::opts;
+use servo::servo_config::opts;
use std::rc::Rc;
pub fn create_window() -> Rc<window::Window> {
diff --git a/ports/servo/glutin_app/window.rs b/ports/servo/glutin_app/window.rs
index 624ed0d5f1f..6ee0f9dee66 100644
--- a/ports/servo/glutin_app/window.rs
+++ b/ports/servo/glutin_app/window.rs
@@ -4,20 +4,23 @@
//! A windowing implementation using glutin.
-use compositing::compositor_thread::EventLoopWaker;
-use compositing::windowing::{AnimationState, MouseWindowEvent, WindowEvent};
-use compositing::windowing::{EmbedderCoordinates, WindowMethods};
use euclid::{Length, TypedPoint2D, TypedVector2D, TypedScale, TypedSize2D};
#[cfg(target_os = "windows")]
use gdi32;
use gleam::gl;
use glutin::{self, Api, GlContext, GlRequest};
-use msg::constellation_msg::{Key, KeyState};
#[cfg(any(target_os = "linux", target_os = "macos"))]
use osmesa_sys;
-use script_traits::TouchEventType;
-use servo_config::opts;
-use servo_geometry::DeviceIndependentPixel;
+use servo::compositing::compositor_thread::EventLoopWaker;
+use servo::compositing::windowing::{AnimationState, MouseWindowEvent, WindowEvent};
+use servo::compositing::windowing::{EmbedderCoordinates, WindowMethods};
+use servo::msg::constellation_msg::{Key, KeyState};
+use servo::script_traits::TouchEventType;
+use servo::servo_config::opts;
+use servo::servo_geometry::DeviceIndependentPixel;
+use servo::style_traits::DevicePixel;
+use servo::style_traits::cursor::CursorKind;
+use servo::webrender_api::{DeviceIntPoint, DeviceUintRect, DeviceUintSize, ScrollLocation};
use std::cell::{Cell, RefCell};
#[cfg(any(target_os = "linux", target_os = "macos"))]
use std::ffi::CString;
@@ -28,12 +31,9 @@ use std::rc::Rc;
use std::sync::Arc;
use std::thread;
use std::time;
-use style_traits::DevicePixel;
-use style_traits::cursor::CursorKind;
use super::keyutils::{self, GlutinKeyModifiers};
#[cfg(target_os = "windows")]
use user32;
-use webrender_api::{DeviceIntPoint, DeviceUintRect, DeviceUintSize, ScrollLocation};
#[cfg(target_os = "windows")]
use winapi;
use winit;
@@ -513,7 +513,7 @@ impl Window {
event: winit::WindowEvent::Touch(touch),
..
} => {
- use script_traits::TouchId;
+ use servo::script_traits::TouchId;
let phase = glutin_phase_to_touch_event_type(touch.phase);
let id = TouchId(touch.id as i32);
@@ -570,7 +570,7 @@ impl Window {
fn handle_mouse(&self, button: winit::MouseButton,
action: winit::ElementState,
coords: TypedPoint2D<i32, DevicePixel>) {
- use script_traits::MouseButton;
+ use servo::script_traits::MouseButton;
let max_pixel_dist = 10.0 * self.hidpi_factor().get();
let event = match action {
diff --git a/ports/servo/main.rs b/ports/servo/main.rs
index 5401ef9130d..fdf1cdd6439 100644
--- a/ports/servo/main.rs
+++ b/ports/servo/main.rs
@@ -21,25 +21,18 @@
extern crate android_injected_glue;
extern crate backtrace;
#[macro_use] extern crate bitflags;
-extern crate compositing;
extern crate euclid;
#[cfg(target_os = "windows")] extern crate gdi32;
extern crate gleam;
extern crate glutin;
// The window backed by glutin
#[macro_use] extern crate log;
-extern crate msg;
#[cfg(any(target_os = "linux", target_os = "macos"))] extern crate osmesa_sys;
-extern crate script_traits;
extern crate servo;
-extern crate servo_config;
-extern crate servo_geometry;
#[cfg(all(feature = "unstable", not(target_os = "android")))]
#[macro_use]
extern crate sig;
-extern crate style_traits;
extern crate tinyfiledialogs;
-extern crate webrender_api;
extern crate winit;
#[cfg(target_os = "windows")] extern crate winapi;
#[cfg(target_os = "windows")] extern crate user32;