Auto merge of #5361 - luniv:css-device-adapt, r=mbrubeck

Spec: http://dev.w3.org/csswg/css-device-adapt/

Currently, the actual viewport is used by the layout task as part of the reflow, and the compositor uses the zoom constraints. I'm not sure if anywhere else currently needs access to the constraints (i.e. there's no CSSOM as far as I can tell).

I did not implement sections 9 (viewport <META>) or 10 (handling 'auto' for 'zoom').

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5361)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-05-06 12:41:09 -05:00
commit ccf1e6b9a7
24 changed files with 1030 additions and 71 deletions

View file

@ -14,6 +14,7 @@ use layers::geometry::DevicePixel;
use util::cursor::Cursor;
use util::geometry::{PagePx, ViewportPx};
use std::sync::mpsc::{channel, Sender, Receiver};
use style::viewport::ViewportConstraints;
use webdriver_traits::WebDriverScriptCommand;
use url::Url;
@ -233,7 +234,9 @@ pub enum Msg {
/// Requests that the constellation retrieve the current contents of the clipboard
GetClipboardContents(Sender<String>),
// Dispatch a webdriver command
WebDriverCommand(PipelineId, WebDriverScriptCommand)
WebDriverCommand(PipelineId, WebDriverScriptCommand),
/// Notifies the constellation that the viewport has been constrained in some manner
ViewportConstrained(PipelineId, ViewportConstraints),
}
#[derive(Clone, Eq, PartialEq)]