diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-05-07 04:59:04 -0500 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-05-07 04:59:04 -0500 |
commit | 63ba1cb69b80d70c1d893ba80edd802cd326316d (patch) | |
tree | 7b2cfe37d0483c46350773bfc98fa248d0e20ac7 /components/msg | |
parent | 0ec6d80b6ed61c6950b8e5f50d04f994f0021101 (diff) | |
parent | 5311d9ab592fe1efcf427ad62437a6e224ba2116 (diff) | |
download | servo-63ba1cb69b80d70c1d893ba80edd802cd326316d.tar.gz servo-63ba1cb69b80d70c1d893ba80edd802cd326316d.zip |
Auto merge of #5884 - jgraham:webdriver_screenshot, r=jdm
This adds support for compositing to a PNG without actually quiting
the browser.
Cargo bits need to be updated after the upstream changes to rust-png land.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5884)
<!-- Reviewable:end -->
Diffstat (limited to 'components/msg')
-rw-r--r-- | components/msg/Cargo.toml | 3 | ||||
-rw-r--r-- | components/msg/constellation_msg.rs | 5 | ||||
-rw-r--r-- | components/msg/lib.rs | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/components/msg/Cargo.toml b/components/msg/Cargo.toml index b3a0ebfe5d1..035ce9aaa19 100644 --- a/components/msg/Cargo.toml +++ b/components/msg/Cargo.toml @@ -32,6 +32,9 @@ git = "https://github.com/servo/rust-core-foundation" [dependencies.io_surface] git = "https://github.com/servo/rust-io-surface" +[dependencies.png] +git = "https://github.com/servo/rust-png" + [dependencies] url = "0.2.16" bitflags = "*" diff --git a/components/msg/constellation_msg.rs b/components/msg/constellation_msg.rs index e5363037628..c819ee14944 100644 --- a/components/msg/constellation_msg.rs +++ b/components/msg/constellation_msg.rs @@ -11,6 +11,7 @@ use geom::scale_factor::ScaleFactor; use hyper::header::Headers; use hyper::method::Method; use layers::geometry::DevicePixel; +use png; use util::cursor::Cursor; use util::geometry::{PagePx, ViewportPx}; use std::sync::mpsc::{channel, Sender, Receiver}; @@ -233,10 +234,12 @@ pub enum Msg { Focus(PipelineId), /// Requests that the constellation retrieve the current contents of the clipboard GetClipboardContents(Sender<String>), - // Dispatch a webdriver command + /// Dispatch a webdriver command WebDriverCommand(PipelineId, WebDriverScriptCommand), /// Notifies the constellation that the viewport has been constrained in some manner ViewportConstrained(PipelineId, ViewportConstraints), + /// Create a PNG of the window contents + CompositePng(Sender<Option<png::Image>>) } #[derive(Clone, Eq, PartialEq)] diff --git a/components/msg/lib.rs b/components/msg/lib.rs index 558ccf55a96..73c5255ddca 100644 --- a/components/msg/lib.rs +++ b/components/msg/lib.rs @@ -7,6 +7,7 @@ extern crate azure; extern crate geom; extern crate hyper; extern crate layers; +extern crate png; extern crate util; extern crate url; extern crate style; |