mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
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:
commit
ccf1e6b9a7
24 changed files with 1030 additions and 71 deletions
|
@ -26,6 +26,7 @@ use profile_traits::time;
|
|||
use std::sync::mpsc::{channel, Sender, Receiver};
|
||||
use std::fmt::{Error, Formatter, Debug};
|
||||
use std::rc::Rc;
|
||||
use style::viewport::ViewportConstraints;
|
||||
use url::Url;
|
||||
use util::cursor::Cursor;
|
||||
|
||||
|
@ -219,6 +220,8 @@ pub enum Msg {
|
|||
SetCursor(Cursor),
|
||||
/// Informs the compositor that the paint task for the given pipeline has exited.
|
||||
PaintTaskExited(PipelineId),
|
||||
/// Alerts the compositor that the viewport has been constrained in some manner
|
||||
ViewportConstrained(PipelineId, ViewportConstraints),
|
||||
}
|
||||
|
||||
impl Debug for Msg {
|
||||
|
@ -245,6 +248,7 @@ impl Debug for Msg {
|
|||
Msg::KeyEvent(..) => write!(f, "KeyEvent"),
|
||||
Msg::SetCursor(..) => write!(f, "SetCursor"),
|
||||
Msg::PaintTaskExited(..) => write!(f, "PaintTaskExited"),
|
||||
Msg::ViewportConstrained(..) => write!(f, "ViewportConstrained"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -303,4 +307,3 @@ pub trait CompositorEventListener {
|
|||
/// Requests that the compositor send the title for the main frame as soon as possible.
|
||||
fn get_title_for_main_frame(&self);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue