diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs index 11967e10038..cf7f69479fe 100644 --- a/components/constellation/constellation.rs +++ b/components/constellation/constellation.rs @@ -341,9 +341,6 @@ pub struct Constellation { /// The size of the top-level window. window_size: WindowSizeData, - /// Means of accessing the clipboard - clipboard_ctx: Option, - /// Bits of state used to interact with the webdriver implementation webdriver: WebDriverData, @@ -692,13 +689,6 @@ where ), }, phantom: PhantomData, - 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(), document_states: HashMap::new(), @@ -1343,30 +1333,6 @@ where FromScriptMsg::Focus => { self.handle_focus_msg(source_pipeline_id); }, - FromScriptMsg::GetClipboardContents(sender) => { - let contents = match self.clipboard_ctx { - Some(ref mut ctx) => { - match ctx.get_contents() { - Ok(c) => c, - Err(e) => { - warn!("Error getting clipboard contents ({}), defaulting to empty string", e); - "".to_owned() - }, - } - }, - None => "".to_owned(), - }; - if let Err(e) = sender.send(contents) { - warn!("Failed to send clipboard ({})", e); - } - }, - FromScriptMsg::SetClipboardContents(s) => { - if let Some(ref mut ctx) = self.clipboard_ctx { - if let Err(e) = ctx.set_contents(s) { - warn!("Error setting clipboard contents ({})", e); - } - } - }, FromScriptMsg::VisibilityChangeComplete(is_visible) => { self.handle_visibility_change_complete(source_pipeline_id, is_visible); }, diff --git a/components/script_traits/script_msg.rs b/components/script_traits/script_msg.rs index 48862e8378f..6f11e2356df 100644 --- a/components/script_traits/script_msg.rs +++ b/components/script_traits/script_msg.rs @@ -121,8 +121,6 @@ pub enum ScriptMsg { CreateCanvasPaintThread(Size2D, IpcSender<(IpcSender, CanvasId)>), /// Notifies the constellation that this frame has received focus. Focus, - /// Requests that the constellation retrieve the current contents of the clipboard - GetClipboardContents(IpcSender), /// Get the top-level browsing context info for a given browsing context. GetTopForBrowsingContext( BrowsingContextId, @@ -183,8 +181,6 @@ pub enum ScriptMsg { AuxiliaryBrowsingContextLoadInfo, IpcSender, ), - /// Requests that the constellation set the contents of the clipboard - SetClipboardContents(String), /// Mark a new document as active ActivateDocument, /// Set the document state for a pipeline (used by screenshot / reftests) @@ -224,7 +220,6 @@ impl fmt::Debug for ScriptMsg { ChangeRunningAnimationsState(..) => "ChangeRunningAnimationsState", CreateCanvasPaintThread(..) => "CreateCanvasPaintThread", Focus => "Focus", - GetClipboardContents(..) => "GetClipboardContents", GetBrowsingContextInfo(..) => "GetBrowsingContextInfo", GetTopForBrowsingContext(..) => "GetParentBrowsingContext", GetChildBrowsingContextId(..) => "GetChildBrowsingContextId", @@ -242,7 +237,6 @@ impl fmt::Debug for ScriptMsg { ScriptLoadedURLInIFrame(..) => "ScriptLoadedURLInIFrame", ScriptNewIFrame(..) => "ScriptNewIFrame", ScriptNewAuxiliary(..) => "ScriptNewAuxiliary", - SetClipboardContents(..) => "SetClipboardContents", ActivateDocument => "ActivateDocument", SetDocumentState(..) => "SetDocumentState", SetFinalUrl(..) => "SetFinalUrl",