Auto merge of #9263 - DarinM223:move_mousebutton, r=KiChjang

Moved MouseButton from msg to script_traits

Fixes #9250

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9263)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-01-16 19:34:51 +05:30
commit 9118b64b4b
13 changed files with 31 additions and 25 deletions

View file

@ -14,7 +14,8 @@ use compositing::windowing::{WindowEvent, MouseWindowEvent};
use euclid::point::Point2D;
use euclid::size::Size2D;
use libc::{c_double, c_int};
use msg::constellation_msg::{self, KeyModifiers, KeyState, MouseButton};
use msg::constellation_msg::{self, KeyModifiers, KeyState};
use script_traits::MouseButton;
use std::cell::{Cell, RefCell};
pub struct ServoCefBrowserHost {

View file

@ -253,7 +253,7 @@ impl Window {
/// Helper function to handle a click
fn handle_mouse(&self, button: glutin::MouseButton, action: glutin::ElementState, x: i32, y: i32) {
use msg::constellation_msg::MouseButton;
use script_traits::MouseButton;
// FIXME(tkuehn): max pixel dist should be based on pixel density
let max_pixel_dist = 10f64;

1
ports/gonk/Cargo.lock generated
View file

@ -16,6 +16,7 @@ dependencies = [
"net_traits 0.0.1",
"profile 0.0.1",
"script 0.0.1",
"script_traits 0.0.1",
"servo 0.0.1",
"servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",

View file

@ -18,6 +18,9 @@ path = "../../components/msg"
[dependencies.script]
path = "../../components/script"
[dependencies.script_traits]
path = "../../components/script_traits"
[dependencies.net_traits]
path = "../../components/net_traits"

View file

@ -6,7 +6,7 @@ use compositing::windowing::{WindowEvent, MouseWindowEvent};
use errno::errno;
use euclid::point::Point2D;
use libc::{c_int, c_long, time_t};
use msg::constellation_msg::MouseButton;
use script_traits::MouseButton;
use std::fs::File;
use std::io::Read;
use std::mem::{size_of, transmute, zeroed};

View file

@ -33,6 +33,7 @@ extern crate layers;
extern crate libc;
extern crate msg;
extern crate net_traits;
extern crate script_traits;
extern crate servo;
extern crate time;
extern crate url;