diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 5079fdd1bd7..6d59babe4da 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -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 IOCompositor { } }, - ( - 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 IOCompositor { } } - 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 { if self.output_file.is_some() { return Scale::new(1.0); diff --git a/components/compositing/compositor_thread.rs b/components/compositing/compositor_thread.rs index d74851d4413..fd0c7d14ded 100644 --- a/components/compositing/compositor_thread.rs +++ b/components/compositing/compositor_thread.rs @@ -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>, IpcSender>), - /// 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"), diff --git a/components/config/prefs.rs b/components/config/prefs.rs index a9e1cd85d1b..7d97cbd6c19 100644 --- a/components/config/prefs.rs +++ b/components/config/prefs.rs @@ -442,9 +442,6 @@ mod gen { }, #[serde(default = "default_layout_threads")] threads: i64, - viewport: { - enabled: bool, - }, writing_mode: { #[serde(rename = "layout.writing-mode.enabled")] enabled: bool, diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs index 8ada8aa654d..6742b6d4aed 100644 --- a/components/constellation/constellation.rs +++ b/components/constellation/constellation.rs @@ -176,7 +176,6 @@ use std::process; use std::rc::{Rc, Weak}; use std::sync::{Arc, Mutex}; use std::thread; -use style_traits::viewport::ViewportConstraints; use style_traits::CSSPixel; use webgpu::{self, WebGPU, WebGPURequest}; use webrender_traits::WebrenderExternalImageRegistry; @@ -2110,9 +2109,6 @@ where FromLayoutMsg::PendingPaintMetric(pipeline_id, epoch) => { self.handle_pending_paint_metric(pipeline_id, epoch); }, - FromLayoutMsg::ViewportConstrained(pipeline_id, constraints) => { - self.handle_viewport_constrained_msg(pipeline_id, constraints); - }, } } @@ -4934,19 +4930,6 @@ where self.switch_fullscreen_mode(browsing_context_id); } - /// Handle updating actual viewport / zoom due to @viewport rules - fn handle_viewport_constrained_msg( - &mut self, - pipeline_id: PipelineId, - constraints: ViewportConstraints, - ) { - self.compositor_proxy - .send(ToCompositorMsg::ViewportConstrained( - pipeline_id, - constraints, - )); - } - /// Checks the state of all script and layout pipelines to see if they are idle /// and compares the current layout state to what the compositor has. This is used /// to check if the output image is "stable" and can be written as a screenshot diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index 05666dac383..4ada89155ee 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -1015,11 +1015,7 @@ impl LayoutThread { let root_size = { let root_flow = layout_root.base(); - if self.stylist.viewport_constraints().is_some() { - root_flow.position.size.to_physical(root_flow.writing_mode) - } else { - root_flow.overflow.scroll.size - } + root_flow.overflow.scroll.size }; let origin = Rect::new(Point2D::new(Au(0), Au(0)), root_size).to_layout(); @@ -1207,64 +1203,39 @@ impl LayoutThread { self.stylist .force_stylesheet_origins_dirty(sheet_origins_affected_by_device_change); - self.viewport_size = - self.stylist - .viewport_constraints() - .map_or(current_screen_size, |constraints| { - debug!("Viewport constraints: {:?}", constraints); - - // other rules are evaluated against the actual viewport - Size2D::new( - Au::from_f32_px(constraints.size.width), - Au::from_f32_px(constraints.size.height), - ) - }); + self.viewport_size = current_screen_size; let viewport_size_changed = self.viewport_size != old_viewport_size; - if viewport_size_changed { - if let Some(constraints) = self.stylist.viewport_constraints() { - // let the constellation know about the viewport constraints - rw_data - .constellation_chan - .send(ConstellationMsg::ViewportConstrained( - self.id, - constraints.clone(), - )) - .unwrap(); - } - if had_used_viewport_units { - if let Some(mut data) = root_element.mutate_data() { - data.hint.insert(RestyleHint::recascade_subtree()); - } + if viewport_size_changed && had_used_viewport_units { + if let Some(mut data) = root_element.mutate_data() { + data.hint.insert(RestyleHint::recascade_subtree()); } } - { - if self.first_reflow.get() { - debug!("First reflow, rebuilding user and UA rules"); - for stylesheet in &ua_stylesheets.user_or_user_agent_stylesheets { - self.stylist - .append_stylesheet(stylesheet.clone(), &ua_or_user_guard); - self.handle_add_stylesheet(&stylesheet.0, &ua_or_user_guard); - } - - if self.stylist.quirks_mode() != QuirksMode::NoQuirks { - self.stylist.append_stylesheet( - ua_stylesheets.quirks_mode_stylesheet.clone(), - &ua_or_user_guard, - ); - self.handle_add_stylesheet( - &ua_stylesheets.quirks_mode_stylesheet.0, - &ua_or_user_guard, - ); - } - } - - if data.stylesheets_changed { - debug!("Doc sheets changed, flushing author sheets too"); + if self.first_reflow.get() { + debug!("First reflow, rebuilding user and UA rules"); + for stylesheet in &ua_stylesheets.user_or_user_agent_stylesheets { self.stylist - .force_stylesheet_origins_dirty(Origin::Author.into()); + .append_stylesheet(stylesheet.clone(), &ua_or_user_guard); + self.handle_add_stylesheet(&stylesheet.0, &ua_or_user_guard); } + + if self.stylist.quirks_mode() != QuirksMode::NoQuirks { + self.stylist.append_stylesheet( + ua_stylesheets.quirks_mode_stylesheet.clone(), + &ua_or_user_guard, + ); + self.handle_add_stylesheet( + &ua_stylesheets.quirks_mode_stylesheet.0, + &ua_or_user_guard, + ); + } + } + + if data.stylesheets_changed { + debug!("Doc sheets changed, flushing author sheets too"); + self.stylist + .force_stylesheet_origins_dirty(Origin::Author.into()); } if viewport_size_changed { diff --git a/components/layout_thread_2020/lib.rs b/components/layout_thread_2020/lib.rs index 006d18fc67e..e49faeff735 100644 --- a/components/layout_thread_2020/lib.rs +++ b/components/layout_thread_2020/lib.rs @@ -896,29 +896,7 @@ impl LayoutThread { self.stylist .force_stylesheet_origins_dirty(sheet_origins_affected_by_device_change); - self.viewport_size = - self.stylist - .viewport_constraints() - .map_or(current_screen_size, |constraints| { - Size2D::new( - Au::from_f32_px(constraints.size.width), - Au::from_f32_px(constraints.size.height), - ) - }); - - let viewport_size_changed = self.viewport_size != old_viewport_size; - if viewport_size_changed { - if let Some(constraints) = self.stylist.viewport_constraints() { - // let the constellation know about the viewport constraints - self.constellation_chan - .send(ConstellationMsg::ViewportConstrained( - self.id, - constraints.clone(), - )) - .unwrap(); - } - } - + self.viewport_size = current_screen_size; if self.first_reflow.get() { for stylesheet in &ua_stylesheets.user_or_user_agent_stylesheets { self.stylist diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs index a9b5733c9ff..8efa7b09ecf 100644 --- a/components/script/dom/bindings/trace.rs +++ b/components/script/dom/bindings/trace.rs @@ -160,7 +160,7 @@ use style::shared_lock::{Locked as StyleLocked, SharedRwLock as StyleSharedRwLoc use style::stylesheet_set::{AuthorStylesheetSet, DocumentStylesheetSet}; use style::stylesheets::keyframes_rule::Keyframe; use style::stylesheets::{CssRules, FontFaceRule, KeyframesRule, MediaRule, Stylesheet}; -use style::stylesheets::{ImportRule, NamespaceRule, StyleRule, SupportsRule, ViewportRule}; +use style::stylesheets::{ImportRule, NamespaceRule, StyleRule, SupportsRule}; use style::stylist::CascadeData; use style::values::specified::Length; use tendril::fmt::UTF8; @@ -914,12 +914,6 @@ unsafe impl JSTraceable for StyleLocked { } } -unsafe impl JSTraceable for StyleLocked { - unsafe fn trace(&self, _trc: *mut JSTracer) { - // Do nothing. - } -} - unsafe impl JSTraceable for StyleLocked { unsafe fn trace(&self, _trc: *mut JSTracer) { // Do nothing. diff --git a/components/script/dom/cssrule.rs b/components/script/dom/cssrule.rs index e23e6721301..560124ef030 100644 --- a/components/script/dom/cssrule.rs +++ b/components/script/dom/cssrule.rs @@ -16,7 +16,6 @@ use crate::dom::cssnamespacerule::CSSNamespaceRule; use crate::dom::cssstylerule::CSSStyleRule; use crate::dom::cssstylesheet::CSSStyleSheet; use crate::dom::csssupportsrule::CSSSupportsRule; -use crate::dom::cssviewportrule::CSSViewportRule; use crate::dom::window::Window; use dom_struct::dom_struct; use std::cell::Cell; @@ -55,8 +54,6 @@ impl CSSRule { rule as &dyn SpecificCSSRule } else if let Some(rule) = self.downcast::() { rule as &dyn SpecificCSSRule - } else if let Some(rule) = self.downcast::() { - rule as &dyn SpecificCSSRule } else if let Some(rule) = self.downcast::() { rule as &dyn SpecificCSSRule } else if let Some(rule) = self.downcast::() { @@ -97,14 +94,12 @@ impl CSSRule { StyleCssRule::Namespace(s) => { DomRoot::upcast(CSSNamespaceRule::new(window, parent_stylesheet, s)) }, - StyleCssRule::Viewport(s) => { - DomRoot::upcast(CSSViewportRule::new(window, parent_stylesheet, s)) - }, StyleCssRule::Supports(s) => { DomRoot::upcast(CSSSupportsRule::new(window, parent_stylesheet, s)) }, StyleCssRule::Page(_) => unreachable!(), StyleCssRule::Document(_) => unimplemented!(), // TODO + StyleCssRule::Viewport(_) => unimplemented!(), // TODO StyleCssRule::LayerBlock(_) => unimplemented!(), // TODO StyleCssRule::LayerStatement(_) => unimplemented!(), // TODO StyleCssRule::ScrollTimeline(_) => unimplemented!(), // TODO diff --git a/components/script/dom/cssviewportrule.rs b/components/script/dom/cssviewportrule.rs deleted file mode 100644 index 088d1b4a75e..00000000000 --- a/components/script/dom/cssviewportrule.rs +++ /dev/null @@ -1,63 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ - -use crate::dom::bindings::reflector::reflect_dom_object; -use crate::dom::bindings::root::DomRoot; -use crate::dom::bindings::str::DOMString; -use crate::dom::cssrule::{CSSRule, SpecificCSSRule}; -use crate::dom::cssstylesheet::CSSStyleSheet; -use crate::dom::window::Window; -use dom_struct::dom_struct; -use servo_arc::Arc; -use style::shared_lock::{Locked, ToCssWithGuard}; -use style::stylesheets::ViewportRule; - -#[dom_struct] -pub struct CSSViewportRule { - cssrule: CSSRule, - #[ignore_malloc_size_of = "Arc"] - viewportrule: Arc>, -} - -impl CSSViewportRule { - fn new_inherited( - parent_stylesheet: &CSSStyleSheet, - viewportrule: Arc>, - ) -> CSSViewportRule { - CSSViewportRule { - cssrule: CSSRule::new_inherited(parent_stylesheet), - viewportrule: viewportrule, - } - } - - #[allow(unrooted_must_root)] - pub fn new( - window: &Window, - parent_stylesheet: &CSSStyleSheet, - viewportrule: Arc>, - ) -> DomRoot { - reflect_dom_object( - Box::new(CSSViewportRule::new_inherited( - parent_stylesheet, - viewportrule, - )), - window, - ) - } -} - -impl SpecificCSSRule for CSSViewportRule { - fn ty(&self) -> u16 { - use crate::dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleConstants; - CSSRuleConstants::VIEWPORT_RULE - } - - fn get_css(&self) -> DOMString { - let guard = self.cssrule.shared_lock().read(); - self.viewportrule - .read_with(&guard) - .to_css_string(&guard) - .into() - } -} diff --git a/components/script/dom/documentorshadowroot.rs b/components/script/dom/documentorshadowroot.rs index 51bce1c7b2d..5ed1e19f0ab 100644 --- a/components/script/dom/documentorshadowroot.rs +++ b/components/script/dom/documentorshadowroot.rs @@ -9,7 +9,6 @@ use crate::dom::bindings::num::Finite; use crate::dom::bindings::root::{Dom, DomRoot}; use crate::dom::element::Element; use crate::dom::htmlelement::HTMLElement; -use crate::dom::htmlmetaelement::HTMLMetaElement; use crate::dom::node::{self, Node, VecPreOrderInsertionHelper}; use crate::dom::window::Window; use crate::stylesheet_set::StylesheetSetRef; @@ -226,13 +225,7 @@ impl DocumentOrShadowRoot { insertion_point: Option, style_shared_lock: &StyleSharedRwLock, ) { - // FIXME(emilio): It'd be nice to unify more code between the elements - // that own stylesheets, but StylesheetOwner is more about loading - // them... - debug_assert!( - owner.as_stylesheet_owner().is_some() || owner.is::(), - "Wat" - ); + debug_assert!(owner.as_stylesheet_owner().is_some(), "Wat"); let sheet = StyleSheetInDocument { sheet, diff --git a/components/script/dom/htmlmetaelement.rs b/components/script/dom/htmlmetaelement.rs index 74a6400fdca..204a67bf27c 100644 --- a/components/script/dom/htmlmetaelement.rs +++ b/components/script/dom/htmlmetaelement.rs @@ -3,38 +3,25 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::attr::Attr; -use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::HTMLMetaElementBinding::HTMLMetaElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use crate::dom::bindings::inheritance::Castable; -use crate::dom::bindings::root::{DomRoot, MutNullableDom}; +use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; -use crate::dom::cssstylesheet::CSSStyleSheet; use crate::dom::document::Document; use crate::dom::element::{AttributeMutation, Element}; use crate::dom::htmlelement::HTMLElement; use crate::dom::htmlheadelement::HTMLHeadElement; -use crate::dom::node::{ - document_from_node, stylesheets_owner_from_node, window_from_node, BindContext, Node, - UnbindContext, -}; +use crate::dom::node::{BindContext, Node, UnbindContext}; use crate::dom::virtualmethods::VirtualMethods; use dom_struct::dom_struct; use html5ever::{LocalName, Prefix}; use js::rust::HandleObject; -use servo_arc::Arc; -use servo_config::pref; -use std::sync::atomic::AtomicBool; -use style::media_queries::MediaList; use style::str::HTML_SPACE_CHARACTERS; -use style::stylesheets::{CssRule, CssRules, Origin, Stylesheet, StylesheetContents, ViewportRule}; #[dom_struct] pub struct HTMLMetaElement { htmlelement: HTMLElement, - #[ignore_malloc_size_of = "Arc"] - stylesheet: DomRefCell>>, - cssom_stylesheet: MutNullableDom, } impl HTMLMetaElement { @@ -45,8 +32,6 @@ impl HTMLMetaElement { ) -> HTMLMetaElement { HTMLMetaElement { htmlelement: HTMLElement::new_inherited(local_name, prefix, document), - stylesheet: DomRefCell::new(None), - cssom_stylesheet: MutNullableDom::new(None), } } @@ -64,73 +49,17 @@ impl HTMLMetaElement { ) } - pub fn get_stylesheet(&self) -> Option> { - self.stylesheet.borrow().clone() - } - - pub fn get_cssom_stylesheet(&self) -> Option> { - self.get_stylesheet().map(|sheet| { - self.cssom_stylesheet.or_init(|| { - CSSStyleSheet::new( - &window_from_node(self), - self.upcast::(), - "text/css".into(), - None, // todo handle location - None, // todo handle title - sheet, - ) - }) - }) - } - fn process_attributes(&self) { let element = self.upcast::(); if let Some(ref name) = element.get_name() { let name = name.to_ascii_lowercase(); let name = name.trim_matches(HTML_SPACE_CHARACTERS); - - if name == "viewport" { - self.apply_viewport(); - } - if name == "referrer" { self.apply_referrer(); } } } - #[allow(unrooted_must_root)] - fn apply_viewport(&self) { - if !pref!(layout.viewport.enabled) { - return; - } - let element = self.upcast::(); - if let Some(ref content) = element.get_attribute(&ns!(), &local_name!("content")) { - let content = content.value(); - if !content.is_empty() { - if let Some(translated_rule) = ViewportRule::from_meta(&**content) { - let stylesheets_owner = stylesheets_owner_from_node(self); - let document = document_from_node(self); - let shared_lock = document.style_shared_lock(); - let rule = CssRule::Viewport(Arc::new(shared_lock.wrap(translated_rule))); - let sheet = Arc::new(Stylesheet { - contents: StylesheetContents::from_data( - CssRules::new(vec![rule], shared_lock), - Origin::Author, - window_from_node(self).get_url(), - document.quirks_mode(), - ), - media: Arc::new(shared_lock.wrap(MediaList::empty())), - shared_lock: shared_lock.clone(), - disabled: AtomicBool::new(false), - }); - *self.stylesheet.borrow_mut() = Some(sheet.clone()); - stylesheets_owner.add_stylesheet(self.upcast(), sheet); - } - } - } - } - fn process_referrer_attribute(&self) { let element = self.upcast::(); if let Some(ref name) = element.get_name() { @@ -197,10 +126,6 @@ impl VirtualMethods for HTMLMetaElement { if context.tree_connected { self.process_referrer_attribute(); - - if let Some(s) = self.stylesheet.borrow_mut().take() { - stylesheets_owner_from_node(self).remove_stylesheet(self.upcast(), &s); - } } } } diff --git a/components/script/dom/mod.rs b/components/script/dom/mod.rs index 9120ce7c9f4..eacf23d5b4e 100644 --- a/components/script/dom/mod.rs +++ b/components/script/dom/mod.rs @@ -272,7 +272,6 @@ pub mod cssstylerule; pub mod cssstylesheet; pub mod cssstylevalue; pub mod csssupportsrule; -pub mod cssviewportrule; pub mod customelementregistry; pub mod customevent; pub mod dedicatedworkerglobalscope; diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index a4012fb7a92..943a0eaaa1a 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -48,7 +48,6 @@ use crate::dom::htmlimageelement::{HTMLImageElement, LayoutHTMLImageElementHelpe use crate::dom::htmlinputelement::{HTMLInputElement, LayoutHTMLInputElementHelpers}; use crate::dom::htmllinkelement::HTMLLinkElement; use crate::dom::htmlmediaelement::{HTMLMediaElement, LayoutHTMLMediaElementHelpers}; -use crate::dom::htmlmetaelement::HTMLMetaElement; use crate::dom::htmlstyleelement::HTMLStyleElement; use crate::dom::htmltextareaelement::{HTMLTextAreaElement, LayoutHTMLTextAreaElementHelpers}; use crate::dom::mouseevent::MouseEvent; @@ -1200,8 +1199,6 @@ impl Node { node.get_stylesheet() } else if let Some(node) = self.downcast::() { node.get_stylesheet() - } else if let Some(node) = self.downcast::() { - node.get_stylesheet() } else { None } @@ -1212,8 +1209,6 @@ impl Node { node.get_cssom_stylesheet() } else if let Some(node) = self.downcast::() { node.get_cssom_stylesheet() - } else if let Some(node) = self.downcast::() { - node.get_cssom_stylesheet() } else { None } diff --git a/components/script/dom/webidls/CSSRule.webidl b/components/script/dom/webidls/CSSRule.webidl index 215f3aaf445..72cbdd54f86 100644 --- a/components/script/dom/webidls/CSSRule.webidl +++ b/components/script/dom/webidls/CSSRule.webidl @@ -26,11 +26,6 @@ partial interface CSSRule { const unsigned short KEYFRAME_RULE = 8; }; -// https://drafts.csswg.org/css-device-adapt/#css-rule-interface -partial interface CSSRule { - const unsigned short VIEWPORT_RULE = 15; -}; - // https://drafts.csswg.org/css-conditional-3/#extentions-to-cssrule-interface partial interface CSSRule { const unsigned short SUPPORTS_RULE = 12; diff --git a/components/script/dom/webidls/CSSViewportRule.webidl b/components/script/dom/webidls/CSSViewportRule.webidl deleted file mode 100644 index e53b0461358..00000000000 --- a/components/script/dom/webidls/CSSViewportRule.webidl +++ /dev/null @@ -1,9 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ - -// https://drafts.csswg.org/css-device-adapt/#css-viewport-rule-interface -[Exposed=Window] -interface CSSViewportRule : CSSRule { - // readonly attribute CSSStyleDeclaration style; -}; diff --git a/components/script_traits/script_msg.rs b/components/script_traits/script_msg.rs index afa3eeaea83..d49e9c6bba5 100644 --- a/components/script_traits/script_msg.rs +++ b/components/script_traits/script_msg.rs @@ -36,7 +36,6 @@ use servo_url::ServoUrl; use smallvec::SmallVec; use std::collections::{HashMap, VecDeque}; use std::fmt; -use style_traits::viewport::ViewportConstraints; use style_traits::CSSPixel; use webgpu::{wgpu, WebGPU, WebGPUResponseResult}; use webrender_api::units::{DeviceIntPoint, DeviceIntSize}; @@ -60,8 +59,6 @@ pub enum LayoutMsg { /// Requests that the constellation inform the compositor that it needs to record /// the time when the frame with the given ID (epoch) is painted. PendingPaintMetric(PipelineId, Epoch), - /// Notifies the constellation that the viewport has been constrained in some manner - ViewportConstrained(PipelineId, ViewportConstraints), } impl fmt::Debug for LayoutMsg { @@ -70,7 +67,6 @@ impl fmt::Debug for LayoutMsg { let variant = match *self { IFrameSizes(..) => "IFrameSizes", PendingPaintMetric(..) => "PendingPaintMetric", - ViewportConstrained(..) => "ViewportConstrained", }; write!(formatter, "LayoutMsg::{}", variant) } diff --git a/components/style/stylesheets/viewport_rule.rs b/components/style/stylesheets/viewport_rule.rs index 3353662cb4b..89f604be01b 100644 --- a/components/style/stylesheets/viewport_rule.rs +++ b/components/style/stylesheets/viewport_rule.rs @@ -36,16 +36,8 @@ use style_traits::viewport::{Orientation, UserZoom, ViewportConstraints, Zoom}; use style_traits::{CssWriter, ParseError, PinchZoomFactor, StyleParseErrorKind, ToCss}; /// Whether parsing and processing of `@viewport` rules is enabled. -#[cfg(feature = "servo")] pub fn enabled() -> bool { - use servo_config::pref; - pref!(layout.viewport.enabled) -} - -/// Whether parsing and processing of `@viewport` rules is enabled. -#[cfg(not(feature = "servo"))] -pub fn enabled() -> bool { - false // Gecko doesn't support @viewport. + false } macro_rules! declare_viewport_descriptor { diff --git a/resources/prefs.json b/resources/prefs.json index 68d9cbb89e0..a46c93aa413 100644 --- a/resources/prefs.json +++ b/resources/prefs.json @@ -100,7 +100,6 @@ "layout.columns.enabled": false, "layout.flexbox.enabled": false, "layout.threads": 3, - "layout.viewport.enabled": false, "layout.writing-mode.enabled": false, "media.glvideo.enabled": false, "media.testing.enabled": false, diff --git a/tests/unit/style/lib.rs b/tests/unit/style/lib.rs index ba1c8992e75..51257d6d11a 100644 --- a/tests/unit/style/lib.rs +++ b/tests/unit/style/lib.rs @@ -36,4 +36,3 @@ mod specified_values; mod str; mod stylesheets; mod stylist; -mod viewport; diff --git a/tests/unit/style/stylesheets.rs b/tests/unit/style/stylesheets.rs index c70aaa08f5c..24cc03b73ee 100644 --- a/tests/unit/style/stylesheets.rs +++ b/tests/unit/style/stylesheets.rs @@ -72,7 +72,6 @@ impl ParseErrorReporter for TestingErrorReporter { #[test] fn test_report_error_stylesheet() { - set_pref!(layout.viewport.enabled, true); let css = r" div { background-color: red; @@ -88,7 +87,6 @@ fn test_report_error_stylesheet() { @media screen { @invalid; } @supports (color: green) and invalid and (margin: 0) {} @keyframes foo { from invalid {} to { margin: 0 invalid 0; } } - @viewport { width: 320px invalid auto; } "; let url = ServoUrl::parse("about::test").unwrap(); let error_reporter = TestingErrorReporter::new(); @@ -135,11 +133,6 @@ fn test_report_error_stylesheet() { 52, "Unsupported keyframe property declaration: 'margin: 0 invalid 0;'", ), - ( - 20, - 29, - "Unsupported @viewport descriptor declaration: 'width: 320px invalid auto;'", - ), ]); assert_eq!(error_reporter.errors.borrow()[0].url, url); diff --git a/tests/unit/style/viewport.rs b/tests/unit/style/viewport.rs deleted file mode 100644 index c12939f8f34..00000000000 --- a/tests/unit/style/viewport.rs +++ /dev/null @@ -1,629 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ - -use cssparser::{Parser, ParserInput}; -use euclid::{Scale, Size2D}; -use servo_arc::Arc; -use servo_config::set_pref; -use servo_url::ServoUrl; -use style::context::QuirksMode; -use style::media_queries::{Device, MediaList, MediaType}; -use style::parser::ParserContext; -use style::shared_lock::{SharedRwLock, StylesheetGuards}; -use style::stylesheets::viewport_rule::*; -use style::stylesheets::{AllowImportRules, CssRuleType, Origin, Stylesheet, StylesheetInDocument}; -use style::values::generics::length::LengthPercentageOrAuto::{self, Auto}; -use style::values::generics::NonNegative; -use style::values::specified::LengthPercentage; -use style::values::specified::NoCalcLength::{self, ViewportPercentage}; -use style::values::specified::ViewportPercentageLength::Vw; -use style_traits::viewport::*; -use style_traits::{ParsingMode, PinchZoomFactor}; - -macro_rules! stylesheet { - ($css:expr, $origin:ident) => { - stylesheet!($css, $origin, SharedRwLock::new()) - }; - ($css:expr, $origin:ident, $shared_lock:expr) => { - Arc::new(Stylesheet::from_str( - $css, - ServoUrl::parse("http://localhost").unwrap(), - Origin::$origin, - Arc::new($shared_lock.wrap(MediaList::empty())), - $shared_lock, - None, - None, - QuirksMode::NoQuirks, - 0, - AllowImportRules::Yes, - )) - }; -} - -fn test_viewport_rule(css: &str, device: &Device, callback: F) -where - F: Fn(&Vec, &str), -{ - set_pref!(layout.viewport.enabled, true); - let stylesheet = stylesheet!(css, Author); - let mut rule_count = 0; - stylesheet.effective_viewport_rules(&device, &stylesheet.shared_lock.read(), |rule| { - rule_count += 1; - callback(&rule.declarations, css); - }); - assert!(rule_count > 0); -} - -fn test_meta_viewport(meta: &str, callback: F) -where - F: Fn(&Vec, &str), -{ - if let Some(mut rule) = ViewportRule::from_meta(meta) { - // from_meta uses a hash-map to collect the declarations, so we need to - // sort them in a stable order for the tests - rule.declarations.sort_by(|a, b| { - let a = a.descriptor.discriminant_value(); - let b = b.descriptor.discriminant_value(); - a.cmp(&b) - }); - - callback(&rule.declarations, meta); - } else { - panic!("no @viewport rule for {}", meta); - } -} - -macro_rules! assert_decl_len { - ($declarations:ident == 1) => { - assert_eq!( - $declarations.len(), - 1, - "expected 1 declaration; have {}: {:?})", - $declarations.len(), - $declarations - ) - }; - ($declarations:ident == $len:expr) => { - assert_eq!( - $declarations.len(), - $len, - "expected {} declarations; have {}: {:?})", - $len, - $declarations.len(), - $declarations - ) - }; -} - -macro_rules! viewport_length { - ($value:expr, px) => { - ViewportLength::Specified(LengthPercentageOrAuto::LengthPercentage(NonNegative( - LengthPercentage::Length(NoCalcLength::from_px($value)), - ))) - }; - ($value:expr, vw) => { - ViewportLength::Specified(LengthPercentageOrAuto::LengthPercentage(NonNegative( - LengthPercentage::Length(ViewportPercentage(Vw($value))), - ))) - }; -} - -#[test] -fn empty_viewport_rule() { - let device = Device::new( - MediaType::screen(), - QuirksMode::NoQuirks, - Size2D::new(800., 600.), - Scale::new(1.0), - ); - - test_viewport_rule("@viewport {}", &device, |declarations, css| { - println!("{}", css); - assert_decl_len!(declarations == 0); - }); -} - -macro_rules! assert_decl_eq { - ($d:expr, $origin:ident, $expected:ident: $value:expr) => {{ - assert_eq!($d.origin, Origin::$origin); - assert_eq!($d.descriptor, ViewportDescriptor::$expected($value)); - assert_eq!($d.important, false, "descriptor should not be !important"); - }}; - ($d:expr, $origin:ident, $expected:ident: $value:expr, !important) => {{ - assert_eq!($d.origin, Origin::$origin); - assert_eq!($d.descriptor, ViewportDescriptor::$expected($value)); - assert_eq!($d.important, true, "descriptor should be !important"); - }}; -} - -#[test] -fn simple_viewport_rules() { - let device = Device::new( - MediaType::screen(), - QuirksMode::NoQuirks, - Size2D::new(800., 600.), - Scale::new(1.0), - ); - - test_viewport_rule( - "@viewport { width: auto; height: auto;\ - zoom: auto; min-zoom: 0; max-zoom: 200%;\ - user-zoom: zoom; orientation: auto; }", - &device, - |declarations, css| { - println!("{}", css); - assert_decl_len!(declarations == 9); - assert_decl_eq!( - &declarations[0], - Author, - MinWidth: ViewportLength::Specified(Auto) - ); - assert_decl_eq!( - &declarations[1], - Author, - MaxWidth: ViewportLength::Specified(Auto) - ); - assert_decl_eq!( - &declarations[2], - Author, - MinHeight: ViewportLength::Specified(Auto) - ); - assert_decl_eq!( - &declarations[3], - Author, - MaxHeight: ViewportLength::Specified(Auto) - ); - assert_decl_eq!(&declarations[4], Author, Zoom: Zoom::Auto); - assert_decl_eq!(&declarations[5], Author, MinZoom: Zoom::Number(0.)); - assert_decl_eq!(&declarations[6], Author, MaxZoom: Zoom::Percentage(2.)); - assert_decl_eq!(&declarations[7], Author, UserZoom: UserZoom::Zoom); - assert_decl_eq!(&declarations[8], Author, Orientation: Orientation::Auto); - }, - ); - - test_viewport_rule( - "@viewport { min-width: 200px; max-width: auto;\ - min-height: 200px; max-height: auto; }", - &device, - |declarations, css| { - println!("{}", css); - assert_decl_len!(declarations == 4); - assert_decl_eq!( - &declarations[0], - Author, - MinWidth: viewport_length!(200., px) - ); - assert_decl_eq!( - &declarations[1], - Author, - MaxWidth: ViewportLength::Specified(Auto) - ); - assert_decl_eq!( - &declarations[2], - Author, - MinHeight: viewport_length!(200., px) - ); - assert_decl_eq!( - &declarations[3], - Author, - MaxHeight: ViewportLength::Specified(Auto) - ); - }, - ); -} - -#[test] -fn simple_meta_viewport_contents() { - test_meta_viewport("width=500, height=600", |declarations, meta| { - println!("{}", meta); - assert_decl_len!(declarations == 4); - assert_decl_eq!( - &declarations[0], - Author, - MinWidth: ViewportLength::ExtendToZoom - ); - assert_decl_eq!( - &declarations[1], - Author, - MaxWidth: viewport_length!(500., px) - ); - assert_decl_eq!( - &declarations[2], - Author, - MinHeight: ViewportLength::ExtendToZoom - ); - assert_decl_eq!( - &declarations[3], - Author, - MaxHeight: viewport_length!(600., px) - ); - }); - - test_meta_viewport("initial-scale=1.0", |declarations, meta| { - println!("{}", meta); - assert_decl_len!(declarations == 3); - assert_decl_eq!( - &declarations[0], - Author, - MinWidth: ViewportLength::ExtendToZoom - ); - assert_decl_eq!( - &declarations[1], - Author, - MaxWidth: ViewportLength::ExtendToZoom - ); - assert_decl_eq!(&declarations[2], Author, Zoom: Zoom::Number(1.)); - }); - - test_meta_viewport( - "initial-scale=2.0, height=device-width", - |declarations, meta| { - println!("{}", meta); - assert_decl_len!(declarations == 5); - assert_decl_eq!( - &declarations[0], - Author, - MinWidth: ViewportLength::Specified(Auto) - ); - assert_decl_eq!( - &declarations[1], - Author, - MaxWidth: ViewportLength::Specified(Auto) - ); - assert_decl_eq!( - &declarations[2], - Author, - MinHeight: ViewportLength::ExtendToZoom - ); - assert_decl_eq!( - &declarations[3], - Author, - MaxHeight: viewport_length!(100., vw) - ); - assert_decl_eq!(&declarations[4], Author, Zoom: Zoom::Number(2.)); - }, - ); - - test_meta_viewport( - "width=480, initial-scale=2.0, user-scalable=1", - |declarations, meta| { - println!("{}", meta); - assert_decl_len!(declarations == 4); - assert_decl_eq!( - &declarations[0], - Author, - MinWidth: ViewportLength::ExtendToZoom - ); - assert_decl_eq!( - &declarations[1], - Author, - MaxWidth: viewport_length!(480., px) - ); - assert_decl_eq!(&declarations[2], Author, Zoom: Zoom::Number(2.)); - assert_decl_eq!(&declarations[3], Author, UserZoom: UserZoom::Zoom); - }, - ); -} - -#[test] -fn cascading_within_viewport_rule() { - let device = Device::new( - MediaType::screen(), - QuirksMode::NoQuirks, - Size2D::new(800., 600.), - Scale::new(1.0), - ); - - // normal order of appearance - test_viewport_rule( - "@viewport { min-width: 200px; min-width: auto; }", - &device, - |declarations, css| { - println!("{}", css); - assert_decl_len!(declarations == 1); - assert_decl_eq!( - &declarations[0], - Author, - MinWidth: ViewportLength::Specified(Auto) - ); - }, - ); - - // !important order of appearance - test_viewport_rule( - "@viewport { min-width: 200px !important; min-width: auto !important; }", - &device, - |declarations, css| { - println!("{}", css); - assert_decl_len!(declarations == 1); - assert_decl_eq!( - &declarations[0], - Author, - MinWidth: ViewportLength::Specified(Auto), - !important - ); - }, - ); - - // !important vs normal - test_viewport_rule( - "@viewport { min-width: auto !important; min-width: 200px; }", - &device, - |declarations, css| { - println!("{}", css); - assert_decl_len!(declarations == 1); - assert_decl_eq!( - &declarations[0], - Author, - MinWidth: ViewportLength::Specified(Auto), - !important - ); - }, - ); - - // normal longhands vs normal shorthand - test_viewport_rule( - "@viewport { min-width: 200px; max-width: 200px; width: auto; }", - &device, - |declarations, css| { - println!("{}", css); - assert_decl_len!(declarations == 2); - assert_decl_eq!( - &declarations[0], - Author, - MinWidth: ViewportLength::Specified(Auto) - ); - assert_decl_eq!( - &declarations[1], - Author, - MaxWidth: ViewportLength::Specified(Auto) - ); - }, - ); - - // normal shorthand vs normal longhands - test_viewport_rule( - "@viewport { width: 200px; min-width: auto; max-width: auto; }", - &device, - |declarations, css| { - println!("{}", css); - assert_decl_len!(declarations == 2); - assert_decl_eq!( - &declarations[0], - Author, - MinWidth: ViewportLength::Specified(Auto) - ); - assert_decl_eq!( - &declarations[1], - Author, - MaxWidth: ViewportLength::Specified(Auto) - ); - }, - ); - - // one !important longhand vs normal shorthand - test_viewport_rule( - "@viewport { min-width: auto !important; width: 200px; }", - &device, - |declarations, css| { - println!("{}", css); - assert_decl_len!(declarations == 2); - assert_decl_eq!( - &declarations[0], - Author, - MinWidth: ViewportLength::Specified(Auto), - !important - ); - assert_decl_eq!( - &declarations[1], - Author, - MaxWidth: viewport_length!(200., px) - ); - }, - ); - - // both !important longhands vs normal shorthand - test_viewport_rule( - "@viewport { min-width: auto !important; max-width: auto !important; width: 200px; }", - &device, - |declarations, css| { - println!("{}", css); - assert_decl_len!(declarations == 2); - assert_decl_eq!( - &declarations[0], - Author, - MinWidth: ViewportLength::Specified(Auto), - !important - ); - assert_decl_eq!( - &declarations[1], - Author, - MaxWidth: ViewportLength::Specified(Auto), - !important - ); - }, - ); -} - -#[test] -fn multiple_stylesheets_cascading() { - set_pref!(layout.viewport.enabled, true); - let device = Device::new( - MediaType::screen(), - QuirksMode::NoQuirks, - Size2D::new(800., 600.), - Scale::new(1.0), - ); - let shared_lock = SharedRwLock::new(); - let stylesheets = vec![ - stylesheet!( - "@viewport { min-width: 100px; min-height: 100px; zoom: 1; }", - UserAgent, - shared_lock.clone() - ), - stylesheet!( - "@viewport { min-width: 200px; min-height: 200px; }", - User, - shared_lock.clone() - ), - stylesheet!( - "@viewport { min-width: 300px; }", - Author, - shared_lock.clone() - ), - ]; - - let declarations = Cascade::from_stylesheets( - stylesheets.iter().map(|s| (&**s, Origin::Author)), - &StylesheetGuards::same(&shared_lock.read()), - &device, - ) - .finish(); - assert_decl_len!(declarations == 3); - assert_decl_eq!(&declarations[0], UserAgent, Zoom: Zoom::Number(1.)); - assert_decl_eq!( - &declarations[1], - User, - MinHeight: viewport_length!(200., px) - ); - assert_decl_eq!( - &declarations[2], - Author, - MinWidth: viewport_length!(300., px) - ); - - let stylesheets = vec![ - stylesheet!("@viewport { min-width: 100px !important; }", - UserAgent, shared_lock.clone()), - stylesheet!("@viewport { min-width: 200px !important; min-height: 200px !important; }", - User, shared_lock.clone()), - stylesheet!("@viewport { min-width: 300px !important; min-height: 300px !important; zoom: 3 !important; }", - Author, shared_lock.clone()) - ]; - let declarations = Cascade::from_stylesheets( - stylesheets.iter().map(|s| (&**s, Origin::Author)), - &StylesheetGuards::same(&shared_lock.read()), - &device, - ) - .finish(); - assert_decl_len!(declarations == 3); - assert_decl_eq!( - &declarations[0], - UserAgent, - MinWidth: viewport_length!(100., px), - !important - ); - assert_decl_eq!( - &declarations[1], - User, - MinHeight: viewport_length!(200., px), - !important - ); - assert_decl_eq!(&declarations[2], Author, Zoom: Zoom::Number(3.), !important); -} - -#[test] -fn constrain_viewport() { - let url = ServoUrl::parse("http://localhost").unwrap(); - let context = ParserContext::new( - Origin::Author, - &url, - Some(CssRuleType::Viewport), - ParsingMode::DEFAULT, - QuirksMode::NoQuirks, - None, - None, - ); - - macro_rules! from_css { - ($css:expr) => { - &ViewportRule::parse(&context, &mut Parser::new(&mut $css)).unwrap() - }; - } - - let initial_viewport = Size2D::new(800., 600.); - let device = Device::new( - MediaType::screen(), - QuirksMode::NoQuirks, - initial_viewport, - Scale::new(1.0), - ); - let mut input = ParserInput::new(""); - assert_eq!( - ViewportConstraints::maybe_new(&device, from_css!(input), QuirksMode::NoQuirks), - None - ); - - let mut input = ParserInput::new("width: 320px auto"); - assert_eq!( - ViewportConstraints::maybe_new(&device, from_css!(input), QuirksMode::NoQuirks), - Some(ViewportConstraints { - size: initial_viewport, - - initial_zoom: PinchZoomFactor::new(1.), - min_zoom: None, - max_zoom: None, - - user_zoom: UserZoom::Zoom, - orientation: Orientation::Auto - }) - ); - - let mut input = ParserInput::new("width: 320px auto"); - assert_eq!( - ViewportConstraints::maybe_new(&device, from_css!(input), QuirksMode::NoQuirks), - Some(ViewportConstraints { - size: initial_viewport, - - initial_zoom: PinchZoomFactor::new(1.), - min_zoom: None, - max_zoom: None, - - user_zoom: UserZoom::Zoom, - orientation: Orientation::Auto - }) - ); - - let mut input = ParserInput::new( - "width: 800px; height: 600px;\ - zoom: 1;\ - user-zoom: zoom;\ - orientation: auto;", - ); - assert_eq!( - ViewportConstraints::maybe_new(&device, from_css!(input), QuirksMode::NoQuirks), - Some(ViewportConstraints { - size: initial_viewport, - - initial_zoom: PinchZoomFactor::new(1.), - min_zoom: None, - max_zoom: None, - - user_zoom: UserZoom::Zoom, - orientation: Orientation::Auto - }) - ); - - let initial_viewport = Size2D::new(200., 150.); - let device = Device::new( - MediaType::screen(), - QuirksMode::NoQuirks, - initial_viewport, - Scale::new(1.0), - ); - let mut input = ParserInput::new("width: 320px auto"); - assert_eq!( - ViewportConstraints::maybe_new(&device, from_css!(input), QuirksMode::NoQuirks), - Some(ViewportConstraints { - size: Size2D::new(320., 240.), - - initial_zoom: PinchZoomFactor::new(1.), - min_zoom: None, - max_zoom: None, - - user_zoom: UserZoom::Zoom, - orientation: Orientation::Auto - }) - ); -} diff --git a/tests/wpt/mozilla/meta-legacy-layout/css/meta_viewport_resize.html.ini b/tests/wpt/mozilla/meta-legacy-layout/css/meta_viewport_resize.html.ini deleted file mode 100644 index 09ce5ee9245..00000000000 --- a/tests/wpt/mozilla/meta-legacy-layout/css/meta_viewport_resize.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[meta_viewport_resize.html] - type: testharness - prefs: [layout.viewport.enabled:true] diff --git a/tests/wpt/mozilla/meta-legacy-layout/css/viewport_meta.html.ini b/tests/wpt/mozilla/meta-legacy-layout/css/viewport_meta.html.ini deleted file mode 100644 index e21ca57b360..00000000000 --- a/tests/wpt/mozilla/meta-legacy-layout/css/viewport_meta.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -prefs: [layout.viewport.enabled:true] -[viewport_meta.html] - type: reftest diff --git a/tests/wpt/mozilla/meta-legacy-layout/css/viewport_rule.html.ini b/tests/wpt/mozilla/meta-legacy-layout/css/viewport_rule.html.ini deleted file mode 100644 index a015a2452bf..00000000000 --- a/tests/wpt/mozilla/meta-legacy-layout/css/viewport_rule.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -prefs: [layout.viewport.enabled:true] -[viewport_rule.html] - type: reftest diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index f8838691376..bb2ee866365 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -6910,21 +6910,6 @@ {} ] ], - "viewport_meta.html": [ - "69c57539ec5076335582a4c40fc19886b6d2620f", - [ - null, - [ - [ - "/_mozilla/css/viewport_rule_ref.html", - "==" - ] - ], - { - "viewport_size": "800x600" - } - ] - ], "viewport_percentage_vmin_vmax_a.html": [ "903e4ea87426e2909ee0e2b683d6f097683f5c81", [ @@ -6985,21 +6970,6 @@ } ] ], - "viewport_rule.html": [ - "09d9c72a1651adf01cb14651c0eae4c5a563e682", - [ - null, - [ - [ - "/_mozilla/css/viewport_rule_ref.html", - "==" - ] - ], - { - "viewport_size": "800x600" - } - ] - ], "visibility_hidden.html": [ "95dbf18a0eacacb7162ab220f0d08113745efa14", [ @@ -9373,10 +9343,6 @@ "4fe2cd7165aa4832ac91493bc376b8cb3df84ab5", [] ], - "meta_viewport_resize_iframe.html": [ - "86de04da1bdc3b72e52e8f17964389a6779d7456", - [] - ], "min_max_height_b.html": [ "8723d65b2585b02664f01b84d1fda328321fc412", [] @@ -10231,10 +10197,6 @@ "488c1aada28cc3ab41e7a6d63d3f4e5b950b1f35", [] ], - "viewport_ignore_desktop.html.ini": [ - "696f7ab3ac81362267fa882303d687cbffe454df", - [] - ], "viewport_ignore_desktop_ref.html": [ "149d364517b397c14628550e5af1c7fa37c84e90", [] @@ -10247,10 +10209,6 @@ "07146c46a08ffe5c5e1bfd0ac451242202e93397", [] ], - "viewport_rule_ref.html": [ - "4c7be62919ac9cd9dd65861637bf10c958595e0d", - [] - ], "visibility_hidden_ref.html": [ "8f0a447ccb8175a8278438537e7597ad5116393b", [] @@ -12564,13 +12522,6 @@ {} ] ], - "meta_viewport_resize.html": [ - "7cde945198d744559f65b9a2cfb473cd02550e40", - [ - null, - {} - ] - ], "offset_properties_inline.html": [ "44eaa4490fc515f203c3062476121f94b4337d78", [ @@ -13480,7 +13431,7 @@ ] ], "interfaces.html": [ - "b58b16ca333f9e00afade02c2ac60689ee7eef3a", + "995631527b5ab6ad2001a97574d4114576064299", [ null, {} diff --git a/tests/wpt/mozilla/meta/css/viewport_meta.html.ini b/tests/wpt/mozilla/meta/css/viewport_meta.html.ini deleted file mode 100644 index 120d74eeff8..00000000000 --- a/tests/wpt/mozilla/meta/css/viewport_meta.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[viewport_meta.html] - expected: FAIL diff --git a/tests/wpt/mozilla/meta/css/viewport_rule.html.ini b/tests/wpt/mozilla/meta/css/viewport_rule.html.ini deleted file mode 100644 index 01154a208c5..00000000000 --- a/tests/wpt/mozilla/meta/css/viewport_rule.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[viewport_rule.html] - expected: FAIL diff --git a/tests/wpt/mozilla/tests/css/meta_viewport_resize.html b/tests/wpt/mozilla/tests/css/meta_viewport_resize.html deleted file mode 100644 index 7cde945198d..00000000000 --- a/tests/wpt/mozilla/tests/css/meta_viewport_resize.html +++ /dev/null @@ -1,33 +0,0 @@ - - -Resizing the initial containing block dynamically with <meta name="viewport"> - https://github.com/servo/servo/issues/8443 - - - - diff --git a/tests/wpt/mozilla/tests/css/meta_viewport_resize_iframe.html b/tests/wpt/mozilla/tests/css/meta_viewport_resize_iframe.html deleted file mode 100644 index 86de04da1bd..00000000000 --- a/tests/wpt/mozilla/tests/css/meta_viewport_resize_iframe.html +++ /dev/null @@ -1,4 +0,0 @@ - - -Test - diff --git a/tests/wpt/mozilla/tests/css/viewport_ignore_desktop.html.ini b/tests/wpt/mozilla/tests/css/viewport_ignore_desktop.html.ini deleted file mode 100644 index 696f7ab3ac8..00000000000 --- a/tests/wpt/mozilla/tests/css/viewport_ignore_desktop.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -prefs: ["layout.viewport.enabled:false"] - diff --git a/tests/wpt/mozilla/tests/css/viewport_meta.html b/tests/wpt/mozilla/tests/css/viewport_meta.html deleted file mode 100644 index 69c57539ec5..00000000000 --- a/tests/wpt/mozilla/tests/css/viewport_meta.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - -
-
-
-
- - diff --git a/tests/wpt/mozilla/tests/css/viewport_rule.html b/tests/wpt/mozilla/tests/css/viewport_rule.html deleted file mode 100644 index 09d9c72a165..00000000000 --- a/tests/wpt/mozilla/tests/css/viewport_rule.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - -
-
-
-
- - diff --git a/tests/wpt/mozilla/tests/css/viewport_rule_ref.html b/tests/wpt/mozilla/tests/css/viewport_rule_ref.html deleted file mode 100644 index 4c7be62919a..00000000000 --- a/tests/wpt/mozilla/tests/css/viewport_rule_ref.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - -
-
-
-
- - diff --git a/tests/wpt/mozilla/tests/mozilla/interfaces.html b/tests/wpt/mozilla/tests/mozilla/interfaces.html index b58b16ca333..995631527b5 100644 --- a/tests/wpt/mozilla/tests/mozilla/interfaces.html +++ b/tests/wpt/mozilla/tests/mozilla/interfaces.html @@ -54,7 +54,6 @@ test_interfaces([ "CSSStyleRule", "CSSStyleSheet", "CSSSupportsRule", - "CSSViewportRule", "DOMMatrix", "DOMMatrixReadOnly", "DOMPoint",