mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Add set_clipboard_context function and relevant plumbing. Use Option more consistantly (less unwraps) in textinput's selection handling.
This commit is contained in:
parent
52c2049f2a
commit
f86252a60b
5 changed files with 83 additions and 48 deletions
|
@ -475,6 +475,13 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
|
|||
);
|
||||
sender.send(result).unwrap();
|
||||
}
|
||||
ConstellationMsg::SetClipboardContents(s) => {
|
||||
if let Some(ref ctx) = self.clipboard_ctx {
|
||||
if let Err(e) = ctx.set_contents(s) {
|
||||
debug!("Error setting clipboard contents ({})", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
ConstellationMsg::WebDriverCommand(command) => {
|
||||
debug!("constellation got webdriver command message");
|
||||
self.handle_webdriver_msg(command);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue