mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Code cleanup
This commit is contained in:
parent
05a6495d43
commit
9c74e4d9ce
3 changed files with 2 additions and 5 deletions
|
@ -107,7 +107,6 @@ use canvas::canvas_paint_thread::CanvasPaintThread;
|
||||||
use canvas::webgl_thread::WebGLThreads;
|
use canvas::webgl_thread::WebGLThreads;
|
||||||
use canvas_traits::canvas::CanvasId;
|
use canvas_traits::canvas::CanvasId;
|
||||||
use canvas_traits::canvas::CanvasMsg;
|
use canvas_traits::canvas::CanvasMsg;
|
||||||
use clipboard::{ClipboardContext, ClipboardProvider};
|
|
||||||
use compositing::compositor_thread::CompositorProxy;
|
use compositing::compositor_thread::CompositorProxy;
|
||||||
use compositing::compositor_thread::Msg as ToCompositorMsg;
|
use compositing::compositor_thread::Msg as ToCompositorMsg;
|
||||||
use compositing::SendableFrameTree;
|
use compositing::SendableFrameTree;
|
||||||
|
|
|
@ -354,7 +354,6 @@ where
|
||||||
self.handle_key_from_servo(browser_id, key_event);
|
self.handle_key_from_servo(browser_id, key_event);
|
||||||
},
|
},
|
||||||
EmbedderMsg::GetClipboardContents(sender) => {
|
EmbedderMsg::GetClipboardContents(sender) => {
|
||||||
println!("glutin/browser.rs GetClipboardContents {:?} ", browser_id);
|
|
||||||
let contents = match self.clipboard_ctx {
|
let contents = match self.clipboard_ctx {
|
||||||
Some(ref mut ctx) => {
|
Some(ref mut ctx) => {
|
||||||
match ctx.get_contents() {
|
match ctx.get_contents() {
|
||||||
|
@ -372,8 +371,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EmbedderMsg::SetClipboardContents(text) => {
|
EmbedderMsg::SetClipboardContents(text) => {
|
||||||
println!("browser.rs SetClipBoardContents {} {:?}", text, browser_id);
|
if let Some(ref mut ctx) = self.clipboard_ctx {
|
||||||
if let Some( ref mut ctx ) = self.clipboard_ctx {
|
|
||||||
if let Err(e) = ctx.set_contents(text) {
|
if let Err(e) = ctx.set_contents(text) {
|
||||||
warn!("Error setting clipboard contents ({})", e);
|
warn!("Error setting clipboard contents ({})", e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
extern crate clipboard;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate lazy_static;
|
extern crate lazy_static;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
@ -9,7 +10,6 @@ extern crate log;
|
||||||
#[cfg(all(feature = "unstable", any(target_os = "macos", target_os = "linux")))]
|
#[cfg(all(feature = "unstable", any(target_os = "macos", target_os = "linux")))]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate sig;
|
extern crate sig;
|
||||||
extern crate clipboard;
|
|
||||||
|
|
||||||
mod app;
|
mod app;
|
||||||
mod browser;
|
mod browser;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue