aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits
diff options
context:
space:
mode:
Diffstat (limited to 'components/script_traits')
-rw-r--r--components/script_traits/lib.rs13
-rw-r--r--components/script_traits/webdriver_msg.rs1
2 files changed, 8 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.
diff --git a/components/script_traits/webdriver_msg.rs b/components/script_traits/webdriver_msg.rs
index e7087d8825d..9716bd220d6 100644
--- a/components/script_traits/webdriver_msg.rs
+++ b/components/script_traits/webdriver_msg.rs
@@ -74,6 +74,7 @@ pub enum WebDriverScriptCommand {
GetElementRect(String, IpcSender<Result<Rect<f64>, ErrorStatus>>),
GetElementTagName(String, IpcSender<Result<String, ErrorStatus>>),
GetElementText(String, IpcSender<Result<String, ErrorStatus>>),
+ GetBoundingClientRect(String, IpcSender<Result<Rect<f32>, ErrorStatus>>),
GetBrowsingContextId(
WebDriverFrameId,
IpcSender<Result<BrowsingContextId, ErrorStatus>>,