aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits/lib.rs
diff options
context:
space:
mode:
authorGeorge Roman <george.roman.99@gmail.com>2019-08-09 20:30:56 +0300
committerGeorge Roman <george.roman.99@gmail.com>2019-08-20 00:52:46 +0300
commitd3696baf27fb77d67b012a90403b6c699ca40484 (patch)
treec88883dd1e912a51c1b9a0752c1d5b8b78a96007 /components/script_traits/lib.rs
parenta084997afee23bb541e89a807905ff1c815a649e (diff)
downloadservo-d3696baf27fb77d67b012a90403b6c699ca40484.tar.gz
servo-d3696baf27fb77d67b012a90403b6c699ca40484.zip
Implement TakeElementScreenshot WebDriver command
Diffstat (limited to 'components/script_traits/lib.rs')
-rw-r--r--components/script_traits/lib.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs
index 790c49eff94..f0aa1516ca2 100644
--- a/components/script_traits/lib.rs
+++ b/components/script_traits/lib.rs
@@ -25,10 +25,7 @@ use canvas_traits::webgl::WebGLPipeline;
use crossbeam_channel::{Receiver, RecvTimeoutError, Sender};
use devtools_traits::{DevtoolScriptControlMsg, ScriptToDevtoolsControlMsg, WorkerId};
use embedder_traits::{Cursor, EventLoopWaker};
-use euclid::{
- default::{Point2D, Rect},
- Length, Scale, Size2D, Vector2D,
-};
+use euclid::{default::Point2D, Length, Rect, Scale, Size2D, UnknownUnit, Vector2D};
use gfx_traits::Epoch;
use http::HeaderMap;
use hyper::Method;
@@ -294,7 +291,7 @@ pub enum ConstellationControlMsg {
/// Sends a DOM event.
SendEvent(PipelineId, CompositorEvent),
/// Notifies script of the viewport.
- Viewport(PipelineId, Rect<f32>),
+ Viewport(PipelineId, Rect<f32, UnknownUnit>),
/// Notifies script of a new set of scroll offsets.
SetScrollState(
PipelineId,
@@ -807,7 +804,11 @@ pub enum WebDriverCommandMsg {
IpcSender<WindowSizeData>,
),
/// Take a screenshot of the window.
- TakeScreenshot(TopLevelBrowsingContextId, IpcSender<Option<Image>>),
+ TakeScreenshot(
+ TopLevelBrowsingContextId,
+ Option<Rect<f32, CSSPixel>>,
+ IpcSender<Option<Image>>,
+ ),
}
/// Messages to the constellation.