Allow Window implementations to indicate that they don't support a clipboard.

This is important for the SERVO_HEADLESS configuration, because
creating a clipboard on linux creates an X context which then causes
reftest instability.
This commit is contained in:
James Graham 2015-06-01 18:28:39 +01:00
parent ec79881471
commit 2b396b2485
6 changed files with 46 additions and 11 deletions

View file

@ -451,6 +451,10 @@ impl WindowMethods for Window {
}
}
}
fn supports_clipboard(&self) -> bool {
true
}
}
struct CefCompositorProxy {

View file

@ -614,6 +614,10 @@ impl WindowMethods for Window {
_ => {}
}
}
fn supports_clipboard(&self) -> bool {
true
}
}
/// The type of a window.
@ -718,6 +722,10 @@ impl WindowMethods for Window {
/// Helper function to handle keyboard events.
fn handle_key(&self, _: Key, _: constellation_msg::KeyModifiers) {
}
fn supports_clipboard(&self) -> bool {
false
}
}
struct GlutinCompositorProxy {

View file

@ -841,6 +841,10 @@ impl WindowMethods for Window {
fn prepare_for_composite(&self, _width: usize, _height: usize) -> bool {
true
}
fn supports_clipboard(&self) -> bool {
true
}
}
struct GonkCompositorProxy {