Constrain the viewport & zoom when reflowing

This commit is contained in:
James Gilbertson 2015-03-24 23:46:47 -06:00
parent 8977316d3e
commit 138596e861
13 changed files with 100 additions and 13 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),
}
// https://developer.mozilla.org/en-US/docs/Web/API/Using_the_Browser_API#Events