mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +01:00
Constrain the viewport & zoom when reflowing
This commit is contained in:
parent
8977316d3e
commit
138596e861
13 changed files with 100 additions and 13 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