mirror of
https://github.com/servo/servo.git
synced 2025-08-09 23:45:35 +01:00
Let the clipboard crate handle the lack of clipboard support
This commit is contained in:
parent
795e7f6002
commit
ec6cc56299
5 changed files with 6 additions and 29 deletions
|
@ -374,10 +374,6 @@ pub struct InitialConstellationState {
|
|||
|
||||
/// A channel to the webgl thread.
|
||||
pub webvr_chan: Option<IpcSender<WebVRMsg>>,
|
||||
|
||||
/// Whether the constellation supports the clipboard.
|
||||
/// TODO: this field is not used, remove it?
|
||||
pub supports_clipboard: bool,
|
||||
}
|
||||
|
||||
/// Data needed for webdriver
|
||||
|
@ -621,16 +617,12 @@ where
|
|||
),
|
||||
},
|
||||
phantom: PhantomData,
|
||||
clipboard_ctx: if state.supports_clipboard {
|
||||
match ClipboardContext::new() {
|
||||
Ok(c) => Some(c),
|
||||
Err(e) => {
|
||||
warn!("Error creating clipboard context ({})", e);
|
||||
None
|
||||
},
|
||||
}
|
||||
} else {
|
||||
None
|
||||
clipboard_ctx: match ClipboardContext::new() {
|
||||
Ok(c) => Some(c),
|
||||
Err(e) => {
|
||||
warn!("Error creating clipboard context ({})", e);
|
||||
None
|
||||
},
|
||||
},
|
||||
webdriver: WebDriverData::new(),
|
||||
scheduler_chan: TimerScheduler::start(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue