mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Separate "desktop" and "mobile" zoom calculations.
This ensures that the layout viewport responds to each type of zoom correctly, and lays the ground for CSS Media Queries and CSS Device Adaption. Until we have proper touch support, mobile-style "pinch" zoom can be simulated by holding Ctrl while scrolling with a mousewheel or trackpad gesture.
This commit is contained in:
parent
afb6bf48e7
commit
4fef0d1c1c
13 changed files with 149 additions and 66 deletions
|
@ -10,17 +10,16 @@ use dom::bindings::trace::Traceable;
|
|||
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
||||
use dom::eventtarget::EventTarget;
|
||||
use dom::window::Window;
|
||||
use servo_msg::constellation_msg::WindowSizeData;
|
||||
use servo_util::str::DOMString;
|
||||
use servo_util::geometry::PagePx;
|
||||
use std::cell::{Cell, RefCell};
|
||||
|
||||
use geom::point::Point2D;
|
||||
use geom::size::TypedSize2D;
|
||||
|
||||
use time;
|
||||
|
||||
pub enum Event_ {
|
||||
ResizeEvent(TypedSize2D<PagePx, f32>),
|
||||
ResizeEvent(WindowSizeData),
|
||||
ReflowEvent,
|
||||
ClickEvent(uint, Point2D<f32>),
|
||||
MouseDownEvent(uint, Point2D<f32>),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue