Skip to content

Commit 6605bdb

Browse files
committedNov 21, 2024·
1 parent b1317ca commit 6605bdb

File tree

2 files changed

+1
-32
lines changed

2 files changed

+1
-32
lines changed
 

‎style/properties/properties.mako.rs

-9
Original file line numberDiff line numberDiff line change
@@ -2248,15 +2248,6 @@ impl ComputedValuesInner {
22482248
}
22492249
}
22502250

2251-
#[cfg(feature = "servo")]
2252-
impl crate::properties::style_structs::InheritedUI {
2253-
/// Returns the ColorSchemeFlags corresponding to the value of `color-scheme`.
2254-
#[inline]
2255-
pub fn color_scheme_bits(&self) -> ColorSchemeFlags {
2256-
ColorSchemeFlags::default()
2257-
}
2258-
}
2259-
22602251
/// A reference to a style struct of the parent, or our own style struct.
22612252
pub enum StyleStructRef<'a, T: 'static> {
22622253
/// A borrowed struct from the parent, for example, for inheriting style.

‎style/servo/media_queries.rs

+1-23
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ use crate::font_metrics::FontMetrics;
1111
use crate::queries::feature::{AllowsRanges, Evaluator, FeatureFlags, QueryFeatureDescription};
1212
use crate::logical_geometry::WritingMode;
1313
use crate::media_queries::MediaType;
14-
use crate::parser::ParserContext;
1514
use crate::properties::style_structs::Font;
1615
use crate::properties::ComputedValues;
1716
use crate::values::computed::{CSSPixelLength, Context, Length, LineHeight, NonNegativeLength, Resolution};
1817
use crate::values::computed::font::GenericFontFamily;
19-
use crate::values::specified::color::ColorSchemeFlags;
18+
use crate::values::specified::color::{ColorSchemeFlags, ForcedColors};
2019
use crate::values::specified::font::{FONT_MEDIUM_LINE_HEIGHT_PX, FONT_MEDIUM_PX};
2120
use crate::values::specified::ViewportVariant;
2221
use crate::values::KeyframesName;
@@ -391,24 +390,3 @@ pub static MEDIA_FEATURES: [QueryFeatureDescription; 5] = [
391390
FeatureFlags::empty(),
392391
),
393392
];
394-
395-
/// Possible values for the forced-colors media query.
396-
/// <https://drafts.csswg.org/mediaqueries-5/#forced-colors>
397-
#[derive(Clone, Copy, Debug, FromPrimitive, Parse, PartialEq, ToCss)]
398-
#[repr(u8)]
399-
pub enum ForcedColors {
400-
/// Page colors are not being forced.
401-
None,
402-
/// Page colors would be forced in content.
403-
#[parse(condition = "ParserContext::chrome_rules_enabled")]
404-
Requested,
405-
/// Page colors are being forced.
406-
Active,
407-
}
408-
409-
impl ForcedColors {
410-
/// Returns whether forced-colors is active for this page.
411-
pub fn is_active(self) -> bool {
412-
matches!(self, Self::Active)
413-
}
414-
}

0 commit comments

Comments
 (0)
Please sign in to comment.