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

View file

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