It was removed from the spec and it's disabled everywhere.

This also removes the meta viewport support (which was implemented on top), but that also had a single test and is disabled everywhere, so I'm not too concerned, it can be implemented again if / when needed.
This commit is contained in:
Emilio Cobos Álvarez 2023-06-30 16:20:59 +02:00 committed by Martin Robinson
parent 7412e28349
commit 349edff768
No known key found for this signature in database
GPG key ID: D56AA4FA55EFE6F8
34 changed files with 35 additions and 1139 deletions

View file

@ -46,7 +46,6 @@ use std::fs::{create_dir_all, File};
use std::io::Write;
use std::num::NonZeroU32;
use std::rc::Rc;
use style_traits::viewport::ViewportConstraints;
use style_traits::{CSSPixel, DevicePixel, PinchZoomFactor};
use time::{now, precise_time_ns, precise_time_s};
use webrender_api::units::{
@ -507,13 +506,6 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
}
},
(
Msg::ViewportConstrained(pipeline_id, constraints),
ShutdownState::NotShuttingDown,
) => {
self.constrain_viewport(pipeline_id, constraints);
},
(Msg::IsReadyToSaveImageReply(is_ready), ShutdownState::NotShuttingDown) => {
assert_eq!(
self.ready_to_save_state,
@ -1363,17 +1355,6 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
}
}
fn constrain_viewport(&mut self, pipeline_id: PipelineId, constraints: ViewportConstraints) {
let is_root = self.root_pipeline.id == Some(pipeline_id);
if is_root {
self.viewport_zoom = constraints.initial_zoom;
self.min_viewport_zoom = constraints.min_zoom;
self.max_viewport_zoom = constraints.max_zoom;
self.update_zoom_transform();
}
}
fn hidpi_factor(&self) -> Scale<f32, DeviceIndependentPixel, DevicePixel> {
if self.output_file.is_some() {
return Scale::new(1.0);