mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Make MozContextProperties a different type
This commit is contained in:
parent
c72066af2d
commit
90978c1777
2 changed files with 8 additions and 7 deletions
|
@ -5257,16 +5257,16 @@ clip-path
|
|||
|
||||
self.gecko.mContextPropsBits = 0;
|
||||
for (gecko, servo) in self.gecko.mContextProps.iter_mut().zip(v) {
|
||||
if servo.0 == atom!("fill") {
|
||||
if (servo.0).0 == atom!("fill") {
|
||||
self.gecko.mContextPropsBits |= structs::NS_STYLE_CONTEXT_PROPERTY_FILL as u8;
|
||||
} else if servo.0 == atom!("stroke") {
|
||||
} else if (servo.0).0 == atom!("stroke") {
|
||||
self.gecko.mContextPropsBits |= structs::NS_STYLE_CONTEXT_PROPERTY_STROKE as u8;
|
||||
} else if servo.0 == atom!("fill-opacity") {
|
||||
} else if (servo.0).0 == atom!("fill-opacity") {
|
||||
self.gecko.mContextPropsBits |= structs::NS_STYLE_CONTEXT_PROPERTY_FILL_OPACITY as u8;
|
||||
} else if servo.0 == atom!("stroke-opacity") {
|
||||
} else if (servo.0).0 == atom!("stroke-opacity") {
|
||||
self.gecko.mContextPropsBits |= structs::NS_STYLE_CONTEXT_PROPERTY_STROKE_OPACITY as u8;
|
||||
}
|
||||
gecko.mRawPtr = servo.0.into_addrefed();
|
||||
gecko.mRawPtr = (servo.0).0.into_addrefed();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -264,7 +264,8 @@ impl ToCss for SVGPaintOrder {
|
|||
|
||||
/// Specified MozContextProperties value.
|
||||
/// Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-context-properties)
|
||||
pub type MozContextProperties = CustomIdent;
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss)]
|
||||
pub struct MozContextProperties(pub CustomIdent);
|
||||
|
||||
impl Parse for MozContextProperties {
|
||||
fn parse<'i, 't>(
|
||||
|
@ -273,6 +274,6 @@ impl Parse for MozContextProperties {
|
|||
) -> Result<MozContextProperties, ParseError<'i>> {
|
||||
let location = input.current_source_location();
|
||||
let i = input.expect_ident()?;
|
||||
CustomIdent::from_ident(location, i, &["all", "none", "auto"])
|
||||
Ok(MozContextProperties(CustomIdent::from_ident(location, i, &["all", "none", "auto"])?))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue