mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +01:00
Auto merge of #17074 - paulrouget:remove_viewport, r=emilio
remove no-op viewport code <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17074) <!-- Reviewable:end -->
This commit is contained in:
commit
86dcd5366f
2 changed files with 0 additions and 11 deletions
|
@ -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,
|
||||
|
||||
|
@ -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),
|
||||
|
@ -798,10 +794,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);
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
@ -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"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue