servo: Merge #17074 - remove no-op viewport code (from paulrouget:remove_viewport); r=emilio
authorPaul Rouget <me@paulrouget.com>
Mon, 29 May 2017 07:13:58 -0500
changeset 409214 c88e2ecc9472a1c9983c924362e71f598635e36b
parent 409213 d2ee41a263fc99c39957abdc1c74ff3403eec230
child 409215 dec37391ecf8c26962fede1c15db9b5f8c769b28
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs17074, 16809
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
servo: Merge #17074 - remove no-op viewport code (from paulrouget:remove_viewport); r=emilio <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #16809 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because no-op code <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 86dcd5366f18ab01fa309c976a895effdd959fa8
servo/components/compositing/compositor.rs
servo/components/compositing/windowing.rs
--- a/servo/components/compositing/compositor.rs
+++ b/servo/components/compositing/compositor.rs
@@ -115,19 +115,16 @@ pub struct IOCompositor<Window: WindowMe
     scale: ScaleFactor<f32, LayerPixel, DevicePixel>,
 
     /// The size of the rendering area.
     frame_size: TypedSize2D<u32, DevicePixel>,
 
     /// 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,
 
     /// Viewport zoom constraints provided by @viewport.
     min_viewport_zoom: Option<PinchZoomFactor>,
     max_viewport_zoom: Option<PinchZoomFactor>,
 
     /// "Desktop-style" zoom that resizes the viewport to fit the window.
@@ -368,17 +365,16 @@ impl<Window: WindowMethods> IOCompositor
             gl: window.gl(),
             window: window,
             port: state.receiver,
             root_pipeline: None,
             pipeline_details: HashMap::new(),
             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),
             composition_request: CompositionRequest::NoCompositingNecessary,
             touch_handler: TouchHandler::new(),
             pending_scroll_zoom_events: Vec::new(),
             waiting_for_results_of_scroll: false,
             composite_target: composite_target,
@@ -793,20 +789,16 @@ impl<Window: WindowMethods> IOCompositor
             WindowEvent::Refresh => {
                 self.composite();
             }
 
             WindowEvent::InitializeCompositing => {
                 self.initialize_compositing();
             }
 
-            WindowEvent::Viewport(point, size) => {
-              self.viewport = Some((point, size));
-            }
-
             WindowEvent::Resize(size) => {
                 self.on_resize_window_event(size);
             }
 
             WindowEvent::LoadUrl(url_string) => {
                 self.on_load_url_window_event(url_string);
             }
 
--- a/servo/components/compositing/windowing.rs
+++ b/servo/components/compositing/windowing.rs
@@ -49,18 +49,16 @@ pub enum WindowEvent {
     Refresh,
     /// Sent to initialize the GL context. The windowing system must have a valid, current GL
     /// context when this message is sent.
     InitializeCompositing,
     /// Sent when the window is resized.
     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.
     MouseWindowEventClass(MouseWindowEvent),
     /// Sent when a mouse move.
     MouseWindowMoveEventClass(TypedPoint2D<f32, DevicePixel>),
     /// Touch event: type, identifier, point
     Touch(TouchEventType, TouchId, TypedPoint2D<f32, DevicePixel>),
@@ -86,17 +84,16 @@ pub enum WindowEvent {
 impl Debug for WindowEvent {
     fn fmt(&self, f: &mut Formatter) -> Result<(), Error> {
         match *self {
             WindowEvent::Idle => write!(f, "Idle"),
             WindowEvent::Refresh => write!(f, "Refresh"),
             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"),
             WindowEvent::MouseWindowMoveEventClass(..) => write!(f, "MouseMove"),
             WindowEvent::Touch(..) => write!(f, "Touch"),
             WindowEvent::Scroll(..) => write!(f, "Scroll"),
             WindowEvent::Zoom(..) => write!(f, "Zoom"),
             WindowEvent::PinchZoom(..) => write!(f, "PinchZoom"),