Skip to content

Commit

Permalink
remove no-op viewport code
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrouget committed May 29, 2017
1 parent 764da7b commit b0afc26
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
8 changes: 0 additions & 8 deletions components/compositing/compositor.rs
Expand Up @@ -120,9 +120,6 @@ pub struct IOCompositor<Window: WindowMethods> {
/// The position and size of the window within the rendering area.
window_rect: TypedRect<u32, DevicePixel>,

/// The overridden viewport.
viewport: Option<(TypedPoint2D<u32, DevicePixel>, TypedSize2D<u32, DevicePixel>)>,

/// "Mobile-style" zoom that does not reflow the page.
viewport_zoom: PinchZoomFactor,

Expand Down Expand Up @@ -373,7 +370,6 @@ impl<Window: WindowMethods> IOCompositor<Window> {
frame_size: frame_size,
window_rect: window_rect,
scale: ScaleFactor::new(1.0),
viewport: None,
scale_factor: scale_factor,
channel_to_self: state.sender.clone_compositor_proxy(),
delayed_composition_timer: DelayedCompositionTimerProxy::new(state.sender),
Expand Down Expand Up @@ -793,10 +789,6 @@ impl<Window: WindowMethods> IOCompositor<Window> {
self.initialize_compositing();
}

WindowEvent::Viewport(point, size) => {
self.viewport = Some((point, size));
}

WindowEvent::Resize(size) => {
self.on_resize_window_event(size);
}
Expand Down
3 changes: 0 additions & 3 deletions components/compositing/windowing.rs
Expand Up @@ -54,8 +54,6 @@ pub enum WindowEvent {
Resize(TypedSize2D<u32, DevicePixel>),
/// Touchpad Pressure
TouchpadPressure(TypedPoint2D<f32, DevicePixel>, f32, TouchpadPressurePhase),
/// Sent when you want to override the viewport.
Viewport(TypedPoint2D<u32, DevicePixel>, TypedSize2D<u32, DevicePixel>),
/// Sent when a new URL is to be loaded.
LoadUrl(String),
/// Sent when a mouse hit test is to be performed.
Expand Down Expand Up @@ -91,7 +89,6 @@ impl Debug for WindowEvent {
WindowEvent::InitializeCompositing => write!(f, "InitializeCompositing"),
WindowEvent::Resize(..) => write!(f, "Resize"),
WindowEvent::TouchpadPressure(..) => write!(f, "TouchpadPressure"),
WindowEvent::Viewport(..) => write!(f, "Viewport"),
WindowEvent::KeyEvent(..) => write!(f, "Key"),
WindowEvent::LoadUrl(..) => write!(f, "LoadUrl"),
WindowEvent::MouseWindowEventClass(..) => write!(f, "Mouse"),
Expand Down

0 comments on commit b0afc26

Please sign in to comment.