mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
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:
parent
7412e28349
commit
349edff768
34 changed files with 35 additions and 1139 deletions
|
@ -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);
|
||||
|
|
|
@ -19,7 +19,6 @@ use profile_traits::time;
|
|||
use script_traits::{AnimationState, EventResult, MouseButton, MouseEventType};
|
||||
use std::fmt::{Debug, Error, Formatter};
|
||||
use std::rc::Rc;
|
||||
use style_traits::viewport::ViewportConstraints;
|
||||
use style_traits::CSSPixel;
|
||||
use webrender_api;
|
||||
use webrender_api::units::{DeviceIntPoint, DeviceIntSize};
|
||||
|
@ -85,8 +84,6 @@ pub enum Msg {
|
|||
TouchEventProcessed(EventResult),
|
||||
/// Composite to a PNG file and return the Image over a passed channel.
|
||||
CreatePng(Option<Rect<f32, CSSPixel>>, IpcSender<Option<Image>>),
|
||||
/// Alerts the compositor that the viewport has been constrained in some manner
|
||||
ViewportConstrained(PipelineId, ViewportConstraints),
|
||||
/// A reply to the compositor asking if the output image is stable.
|
||||
IsReadyToSaveImageReply(bool),
|
||||
/// Pipeline visibility changed
|
||||
|
@ -158,7 +155,6 @@ impl Debug for Msg {
|
|||
Msg::Recomposite(..) => write!(f, "Recomposite"),
|
||||
Msg::TouchEventProcessed(..) => write!(f, "TouchEventProcessed"),
|
||||
Msg::CreatePng(..) => write!(f, "CreatePng"),
|
||||
Msg::ViewportConstrained(..) => write!(f, "ViewportConstrained"),
|
||||
Msg::IsReadyToSaveImageReply(..) => write!(f, "IsReadyToSaveImageReply"),
|
||||
Msg::PipelineVisibilityChanged(..) => write!(f, "PipelineVisibilityChanged"),
|
||||
Msg::PipelineExited(..) => write!(f, "PipelineExited"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue