Further changes required by Servo

This commit is contained in:
Oriol Brufau 2023-08-11 14:39:17 +02:00 committed by Martin Robinson
parent 1003d644aa
commit 16cfd01823
2 changed files with 8 additions and 3 deletions

View file

@ -13,7 +13,9 @@ animationcancel
animationend animationend
animationiteration animationiteration
animationstart animationstart
aspect-ratio
beforeunload beforeunload
block-size
button button
canplay canplay
canplaythrough canplaythrough
@ -51,11 +53,13 @@ fullscreenchange
fullscreenerror fullscreenerror
gattserverdisconnected gattserverdisconnected
hashchange hashchange
height
hidden hidden
icecandidate icecandidate
iceconnectionstatechange iceconnectionstatechange
icegatheringstatechange icegatheringstatechange
image image
inline-size
input input
inputsourceschange inputsourceschange
invalid invalid
@ -83,6 +87,7 @@ none
number number
onchange onchange
open open
orientation
pagehide pagehide
pageshow pageshow
password password

View file

@ -30,14 +30,14 @@ pub enum FeatureType {
impl FeatureType { impl FeatureType {
fn features(&self) -> &'static [QueryFeatureDescription] { fn features(&self) -> &'static [QueryFeatureDescription] {
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
use crate::gecko::media_features::MEDIA_FEATURES; let media_features = &crate::gecko::media_features::MEDIA_FEATURES;
#[cfg(feature = "servo")] #[cfg(feature = "servo")]
use crate::servo::media_queries::MEDIA_FEATURES; let media_features = &*crate::servo::media_queries::MEDIA_FEATURES;
use crate::stylesheets::container_rule::CONTAINER_FEATURES; use crate::stylesheets::container_rule::CONTAINER_FEATURES;
match *self { match *self {
FeatureType::Media => &MEDIA_FEATURES, FeatureType::Media => media_features,
FeatureType::Container => &CONTAINER_FEATURES, FeatureType::Container => &CONTAINER_FEATURES,
} }
} }