Bump euclid to 0.14.

This commit is contained in:
Nicolas Silva 2017-06-02 14:50:26 +02:00
parent 5dce166266
commit 8617320500
88 changed files with 349 additions and 381 deletions

View file

@ -20,7 +20,7 @@ debugmozjs = ["libservo/debugmozjs"]
[dependencies]
compositing = {path = "../../components/compositing"}
devtools = {path = "../../components/devtools"}
euclid = "0.13"
euclid = "0.14.4"
gleam = "0.4"
glutin_app = {path = "../glutin"}
libc = "0.2"

View file

@ -12,8 +12,7 @@ use webrender_traits::ScrollLocation;
use wrappers::CefWrap;
use compositing::windowing::{WindowEvent, MouseWindowEvent};
use euclid::point::TypedPoint2D;
use euclid::size::TypedSize2D;
use euclid::{TypedPoint2D, TypedVector2D, TypedSize2D};
use libc::{c_double, c_int};
use msg::constellation_msg::{self, KeyModifiers, KeyState};
use script_traits::{MouseButton, TouchEventType};
@ -470,7 +469,7 @@ full_cef_class_impl! {
let event: &cef_mouse_event = event;
let delta_x: c_int = delta_x;
let delta_y: c_int = delta_y;
let delta = TypedPoint2D::new(delta_x as f32, delta_y as f32);
let delta = TypedVector2D::new(delta_x as f32, delta_y as f32);
let origin = TypedPoint2D::new((*event).x as i32, (*event).y as i32);
this.downcast().send_window_event(WindowEvent::Scroll(ScrollLocation::Delta(delta),
origin,

View file

@ -19,10 +19,7 @@ use wrappers::CefWrap;
use compositing::compositor_thread::EventLoopWaker;
use compositing::windowing::{WindowEvent, WindowMethods};
use euclid::point::{Point2D, TypedPoint2D};
use euclid::rect::TypedRect;
use euclid::scale_factor::ScaleFactor;
use euclid::size::{Size2D, TypedSize2D};
use euclid::{Point2D, TypedPoint2D, TypedRect, Size2D, TypedSize2D, ScaleFactor};
use gleam::gl;
use msg::constellation_msg::{Key, KeyModifiers};
use net_traits::net_error_list::NetError;

View file

@ -11,7 +11,7 @@ path = "lib.rs"
[dependencies]
bitflags = "0.7"
compositing = {path = "../../components/compositing"}
euclid = "0.13"
euclid = "0.14.4"
gleam = "0.4"
log = "0.3.5"
msg = {path = "../../components/msg"}

View file

@ -8,10 +8,7 @@ use NestedEventLoopListener;
use compositing::compositor_thread::EventLoopWaker;
use compositing::windowing::{MouseWindowEvent, WindowNavigateMsg};
use compositing::windowing::{WindowEvent, WindowMethods};
use euclid::{Point2D, Size2D, TypedPoint2D};
use euclid::rect::TypedRect;
use euclid::scale_factor::ScaleFactor;
use euclid::size::TypedSize2D;
use euclid::{Point2D, Size2D, TypedPoint2D, TypedVector2D, TypedRect, ScaleFactor, TypedSize2D};
#[cfg(target_os = "windows")]
use gdi32;
use gleam::gl;
@ -501,7 +498,7 @@ impl Window {
MouseScrollDelta::LineDelta(dx, dy) => (dx, dy * LINE_HEIGHT),
MouseScrollDelta::PixelDelta(dx, dy) => (dx, dy),
};
let scroll_location = ScrollLocation::Delta(TypedPoint2D::new(dx, dy));
let scroll_location = ScrollLocation::Delta(TypedVector2D::new(dx, dy));
if let Some((x, y)) = pos {
self.mouse_pos.set(Point2D::new(x, y));
self.event_queue.borrow_mut().push(
@ -1232,7 +1229,7 @@ impl WindowMethods for Window {
}
(NONE, None, Key::PageDown) => {
let scroll_location = ScrollLocation::Delta(TypedPoint2D::new(0.0,
let scroll_location = ScrollLocation::Delta(TypedVector2D::new(0.0,
-self.framebuffer_size()
.to_f32()
.to_untyped()
@ -1241,7 +1238,7 @@ impl WindowMethods for Window {
TouchEventType::Move);
}
(NONE, None, Key::PageUp) => {
let scroll_location = ScrollLocation::Delta(TypedPoint2D::new(0.0,
let scroll_location = ScrollLocation::Delta(TypedVector2D::new(0.0,
self.framebuffer_size()
.to_f32()
.to_untyped()
@ -1259,18 +1256,18 @@ impl WindowMethods for Window {
}
(NONE, None, Key::Up) => {
self.scroll_window(ScrollLocation::Delta(TypedPoint2D::new(0.0, 3.0 * LINE_HEIGHT)),
self.scroll_window(ScrollLocation::Delta(TypedVector2D::new(0.0, 3.0 * LINE_HEIGHT)),
TouchEventType::Move);
}
(NONE, None, Key::Down) => {
self.scroll_window(ScrollLocation::Delta(TypedPoint2D::new(0.0, -3.0 * LINE_HEIGHT)),
self.scroll_window(ScrollLocation::Delta(TypedVector2D::new(0.0, -3.0 * LINE_HEIGHT)),
TouchEventType::Move);
}
(NONE, None, Key::Left) => {
self.scroll_window(ScrollLocation::Delta(TypedPoint2D::new(LINE_HEIGHT, 0.0)), TouchEventType::Move);
self.scroll_window(ScrollLocation::Delta(TypedVector2D::new(LINE_HEIGHT, 0.0)), TouchEventType::Move);
}
(NONE, None, Key::Right) => {
self.scroll_window(ScrollLocation::Delta(TypedPoint2D::new(-LINE_HEIGHT, 0.0)), TouchEventType::Move);
self.scroll_window(ScrollLocation::Delta(TypedVector2D::new(-LINE_HEIGHT, 0.0)), TouchEventType::Move);
}
(CMD_OR_CONTROL, Some('r'), _) => {
if let Some(true) = PREFS.get("shell.builtin-key-shortcuts.enabled").as_boolean() {