servo: Merge #4035 - Remove rust-alert as it's broken on mac, and unimplemented on other platforms (from glennw:remove-rust-alert); r=pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 554f696db81665f92e9976a15d986b0fd0f99edf
This commit is contained in:
Glenn Watson 2014-11-18 21:30:27 -07:00
Родитель c45bdbbfb9
Коммит 8a83aa075e
14 изменённых файлов: 5 добавлений и 117 удалений

17
servo/Cargo.lock сгенерированный
Просмотреть файл

@ -16,15 +16,6 @@ dependencies = [
"util 0.0.1",
]
[[package]]
name = "alert"
version = "0.1.0"
source = "git+https://github.com/servo/rust-alert#9bd18fc406683bae448bc6f5d546872970af252e"
dependencies = [
"cocoa 0.1.1 (git+https://github.com/servo/rust-cocoa)",
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation)",
]
[[package]]
name = "android_glue"
version = "0.0.1"
@ -71,11 +62,6 @@ name = "cocoa"
version = "0.1.1"
source = "git+https://github.com/DavidPartouche/rust-cocoa#0a951a6cdd5f1a175b929754c134f9443b105642"
[[package]]
name = "cocoa"
version = "0.1.1"
source = "git+https://github.com/servo/rust-cocoa#f926323d306401df33f528c9aeca8e582cad063b"
[[package]]
name = "compile_msg"
version = "0.1.1"
@ -85,7 +71,6 @@ source = "git+https://github.com/huonw/compile_msg#f526abe54b49642bc1e969e6c2af1
name = "compositing"
version = "0.0.1"
dependencies = [
"alert 0.1.0 (git+https://github.com/servo/rust-alert)",
"azure 0.1.0 (git+https://github.com/servo/rust-azure)",
"core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics)",
"core_text 0.1.0 (git+https://github.com/servo/rust-core-text)",
@ -294,7 +279,6 @@ source = "git+https://github.com/servo/glfw?ref=cargo-3.0.4#765dace7e4125b87c764
name = "glfw_app"
version = "0.0.1"
dependencies = [
"alert 0.1.0 (git+https://github.com/servo/rust-alert)",
"cgl 0.0.1 (git+https://github.com/servo/rust-cgl)",
"compositing 0.0.1",
"geom 0.1.0 (git+https://github.com/servo/rust-geom)",
@ -322,7 +306,6 @@ dependencies = [
name = "glutin_app"
version = "0.0.1"
dependencies = [
"alert 0.1.0 (git+https://github.com/servo/rust-alert)",
"cgl 0.0.1 (git+https://github.com/servo/rust-cgl)",
"compositing 0.0.1",
"geom 0.1.0 (git+https://github.com/servo/rust-geom)",

Просмотреть файл

@ -31,9 +31,6 @@ path = "../devtools"
[dependencies.devtools_traits]
path = "../devtools_traits"
[dependencies.alert]
git = "https://github.com/servo/rust-alert"
[dependencies.azure]
git = "https://github.com/servo/rust-azure"

Просмотреть файл

@ -13,7 +13,6 @@
#[phase(plugin, link)]
extern crate log;
extern crate alert;
extern crate azure;
extern crate devtools_traits;
extern crate geom;

16
servo/ports/android/glut_app/Cargo.lock сгенерированный
Просмотреть файл

@ -2,7 +2,6 @@
name = "glut_app"
version = "0.0.1"
dependencies = [
"alert 0.1.0 (git+https://github.com/servo/rust-alert)",
"compositing 0.0.1",
"egl 0.1.0 (git+https://github.com/servo/rust-egl)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom)",
@ -13,15 +12,6 @@ dependencies = [
"util 0.0.1",
]
[[package]]
name = "alert"
version = "0.1.0"
source = "git+https://github.com/servo/rust-alert#9bd18fc406683bae448bc6f5d546872970af252e"
dependencies = [
"cocoa 0.1.1 (git+https://github.com/servo/rust-cocoa)",
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation)",
]
[[package]]
name = "azure"
version = "0.1.0"
@ -55,16 +45,10 @@ dependencies = [
"gleam 0.0.1 (git+https://github.com/servo/gleam)",
]
[[package]]
name = "cocoa"
version = "0.1.1"
source = "git+https://github.com/servo/rust-cocoa#f926323d306401df33f528c9aeca8e582cad063b"
[[package]]
name = "compositing"
version = "0.0.1"
dependencies = [
"alert 0.1.0 (git+https://github.com/servo/rust-alert)",
"azure 0.1.0 (git+https://github.com/servo/rust-azure)",
"core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics)",
"core_text 0.1.0 (git+https://github.com/servo/rust-core-text)",

Просмотреть файл

@ -8,9 +8,6 @@ name = "glut_app"
path = "lib.rs"
crate-type = ["dylib"]
[dependencies.alert]
git = "https://github.com/servo/rust-alert"
[dependencies.compositing]
path = "../../../components/compositing"

Просмотреть файл

@ -9,7 +9,6 @@
#![deny(unused_imports)]
#![deny(unused_variables)]
extern crate alert;
extern crate compositing;
extern crate egl;
extern crate geom;

Просмотреть файл

@ -6,12 +6,11 @@
use compositing::compositor_task::{mod, CompositorProxy, CompositorReceiver};
use compositing::windowing::{WindowEvent, WindowMethods};
use compositing::windowing::{IdleWindowEvent, ResizeWindowEvent, LoadUrlWindowEvent, MouseWindowEventClass};
use compositing::windowing::{IdleWindowEvent, ResizeWindowEvent, MouseWindowEventClass};
use compositing::windowing::{ScrollWindowEvent, ZoomWindowEvent, NavigationWindowEvent, FinishedWindowEvent};
use compositing::windowing::{MouseWindowClickEvent, MouseWindowMouseDownEvent, MouseWindowMouseUpEvent};
use compositing::windowing::{Forward, Back};
use alert::{Alert, AlertMethods};
use libc::{c_int, c_uchar};
use std::cell::{Cell, RefCell};
use std::rc::Rc;
@ -238,7 +237,6 @@ impl Window {
debug!("got key: {}", key);
let modifiers = glut::get_modifiers();
match key {
42 => self.load_url(),
43 => self.event_queue.borrow_mut().push(ZoomWindowEvent(1.1)),
45 => self.event_queue.borrow_mut().push(ZoomWindowEvent(0.909090909)),
56 => self.event_queue.borrow_mut().push(ScrollWindowEvent(TypedPoint2D(0.0f32, 5.0f32),
@ -284,19 +282,6 @@ impl Window {
};
self.event_queue.borrow_mut().push(MouseWindowEventClass(event));
}
/// Helper function to pop up an alert box prompting the user to load a URL.
fn load_url(&self) {
let mut alert: Alert = AlertMethods::new("Navigate to:");
alert.add_prompt();
alert.run();
let value = alert.prompt_value();
if "" == value.as_slice() { // To avoid crashing on Linux.
self.event_queue.borrow_mut().push(LoadUrlWindowEvent("http://purple.com/".to_string()))
} else {
self.event_queue.borrow_mut().push(LoadUrlWindowEvent(value.clone()))
}
}
}
struct GlutCompositorProxy {

16
servo/ports/cef/Cargo.lock сгенерированный
Просмотреть файл

@ -23,15 +23,6 @@ dependencies = [
"util 0.0.1",
]
[[package]]
name = "alert"
version = "0.1.0"
source = "git+https://github.com/servo/rust-alert#9bd18fc406683bae448bc6f5d546872970af252e"
dependencies = [
"cocoa 0.1.1 (git+https://github.com/servo/rust-cocoa)",
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation)",
]
[[package]]
name = "azure"
version = "0.1.0"
@ -65,16 +56,10 @@ dependencies = [
"gleam 0.0.1 (git+https://github.com/servo/gleam)",
]
[[package]]
name = "cocoa"
version = "0.1.1"
source = "git+https://github.com/servo/rust-cocoa#f926323d306401df33f528c9aeca8e582cad063b"
[[package]]
name = "compositing"
version = "0.0.1"
dependencies = [
"alert 0.1.0 (git+https://github.com/servo/rust-alert)",
"azure 0.1.0 (git+https://github.com/servo/rust-azure)",
"core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics)",
"core_text 0.1.0 (git+https://github.com/servo/rust-core-text)",
@ -283,7 +268,6 @@ source = "git+https://github.com/servo/glfw?ref=cargo-3.0.4#765dace7e4125b87c764
name = "glfw_app"
version = "0.0.1"
dependencies = [
"alert 0.1.0 (git+https://github.com/servo/rust-alert)",
"cgl 0.0.1 (git+https://github.com/servo/rust-cgl)",
"compositing 0.0.1",
"geom 0.1.0 (git+https://github.com/servo/rust-geom)",

Просмотреть файл

@ -7,9 +7,6 @@ authors = ["The Servo Project Developers"]
name = "glfw_app"
path = "lib.rs"
[dependencies.alert]
git = "https://github.com/servo/rust-alert"
[dependencies.compositing]
path = "../../components/compositing"

Просмотреть файл

@ -8,7 +8,6 @@
#![feature(macro_rules)]
#![deny(unused_imports, unused_variables)]
extern crate alert;
#[cfg(target_os="macos")]
extern crate cgl;
extern crate compositing;

Просмотреть файл

@ -6,10 +6,9 @@
use NestedEventLoopListener;
use alert::{Alert, AlertMethods};
use compositing::compositor_task::{mod, CompositorProxy, CompositorReceiver};
use compositing::windowing::{Forward, Back};
use compositing::windowing::{IdleWindowEvent, ResizeWindowEvent, LoadUrlWindowEvent};
use compositing::windowing::{IdleWindowEvent, ResizeWindowEvent};
use compositing::windowing::{KeyEvent, MouseWindowClickEvent, MouseWindowMouseDownEvent};
use compositing::windowing::{MouseWindowEventClass, MouseWindowMoveEventClass};
use compositing::windowing::{MouseWindowMouseUpEvent, RefreshWindowEvent};
@ -326,7 +325,6 @@ impl Window {
fn handle_key(&self, key: glfw::Key, mods: glfw::Modifiers) {
match key {
glfw::KeyEscape => self.glfw_window.set_should_close(true),
glfw::KeyL if mods.contains(glfw::Control) => self.load_url(), // Ctrl+L
glfw::KeyEqual if mods.contains(glfw::Control) => { // Ctrl-+
self.event_queue.borrow_mut().push(ZoomWindowEvent(1.1));
}
@ -383,19 +381,6 @@ impl Window {
};
self.event_queue.borrow_mut().push(MouseWindowEventClass(event));
}
/// Helper function to pop up an alert box prompting the user to load a URL.
fn load_url(&self) {
let mut alert: Alert = AlertMethods::new("Navigate to:");
alert.add_prompt();
alert.run();
let value = alert.prompt_value();
if "" == value.as_slice() { // To avoid crashing on Linux.
self.event_queue.borrow_mut().push(LoadUrlWindowEvent("http://purple.com/".to_string()))
} else {
self.event_queue.borrow_mut().push(LoadUrlWindowEvent(value.clone()))
}
}
}
struct GlfwCompositorProxy {

Просмотреть файл

@ -7,9 +7,6 @@ authors = ["The Servo Project Developers"]
name = "glutin_app"
path = "lib.rs"
[dependencies.alert]
git = "https://github.com/servo/rust-alert"
[dependencies.compositing]
path = "../../components/compositing"

Просмотреть файл

@ -6,9 +6,8 @@
#![license = "MPL"]
#![feature(macro_rules)]
#![deny(unused_imports, unused_variable)]
#![deny(unused_imports, unused_variables)]
extern crate alert;
#[cfg(target_os="macos")]
extern crate cgl;
extern crate compositing;

Просмотреть файл

@ -2,12 +2,11 @@
* 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/. */
//! A windowing implementation using GLFW.
//! A windowing implementation using glutin.
use alert::{Alert, AlertMethods};
use compositing::compositor_task::{mod, CompositorProxy, CompositorReceiver};
use compositing::windowing::{WindowEvent, WindowMethods};
use compositing::windowing::{IdleWindowEvent, ResizeWindowEvent, LoadUrlWindowEvent};
use compositing::windowing::{IdleWindowEvent, ResizeWindowEvent};
use compositing::windowing::{MouseWindowEventClass, MouseWindowMoveEventClass, ScrollWindowEvent};
use compositing::windowing::{ZoomWindowEvent, PinchZoomWindowEvent, NavigationWindowEvent};
use compositing::windowing::{FinishedWindowEvent, QuitWindowEvent, MouseWindowClickEvent};
@ -339,9 +338,6 @@ impl Window {
fn handle_key(&self, key: glutin::VirtualKeyCode) -> bool {
match key {
glutin::Escape => return true,
glutin::L if self.ctrl_pressed() => {
self.load_url(); // Ctrl+L
}
glutin::Equals if self.ctrl_pressed() => { // Ctrl-+
self.event_queue.borrow_mut().push(ZoomWindowEvent(1.1));
}
@ -398,19 +394,6 @@ impl Window {
self.event_queue.borrow_mut().push(MouseWindowEventClass(event));
}
/// Helper function to pop up an alert box prompting the user to load a URL.
fn load_url(&self) {
let mut alert: Alert = AlertMethods::new("Navigate to:");
alert.add_prompt();
alert.run();
let value = alert.prompt_value();
if "" == value.as_slice() { // To avoid crashing on Linux.
self.event_queue.borrow_mut().push(LoadUrlWindowEvent("http://purple.com/".to_string()))
} else {
self.event_queue.borrow_mut().push(LoadUrlWindowEvent(value.clone()))
}
}
pub unsafe fn set_nested_event_loop_listener(
&self,
_listener: *mut NestedEventLoopListener + 'static) {