mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Auto merge of #20186 - emilio:fixup-fill, r=nox
style: Fix text-emphasis-style conversion. Was accidentally broken in #20178 and is causing orange. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20186) <!-- Reviewable:end -->
This commit is contained in:
commit
2425939f9f
1 changed files with 9 additions and 10 deletions
|
@ -4766,15 +4766,17 @@ fn static_assert() {
|
||||||
|
|
||||||
if self.gecko.mTextEmphasisStyle == structs::NS_STYLE_TEXT_EMPHASIS_STYLE_NONE as u8 {
|
if self.gecko.mTextEmphasisStyle == structs::NS_STYLE_TEXT_EMPHASIS_STYLE_NONE as u8 {
|
||||||
return T::None;
|
return T::None;
|
||||||
} else if self.gecko.mTextEmphasisStyle == structs::NS_STYLE_TEXT_EMPHASIS_STYLE_STRING as u8 {
|
}
|
||||||
|
|
||||||
|
if self.gecko.mTextEmphasisStyle == structs::NS_STYLE_TEXT_EMPHASIS_STYLE_STRING as u8 {
|
||||||
return T::String(self.gecko.mTextEmphasisStyleString.to_string());
|
return T::String(self.gecko.mTextEmphasisStyleString.to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
let fill = match self.gecko.mTextEmphasisStyle as u32 {
|
let fill =
|
||||||
structs::NS_STYLE_TEXT_EMPHASIS_STYLE_FILLED => FillMode::Filled,
|
self.gecko.mTextEmphasisStyle & structs::NS_STYLE_TEXT_EMPHASIS_STYLE_OPEN as u8 == 0;
|
||||||
structs::NS_STYLE_TEXT_EMPHASIS_STYLE_OPEN => FillMode::Open,
|
|
||||||
_ => panic!("Unexpected value in style struct for text-emphasis-style property"),
|
let fill = if fill { FillMode::Filled } else { FillMode::Open };
|
||||||
};
|
|
||||||
let shape =
|
let shape =
|
||||||
match self.gecko.mTextEmphasisStyle as u32 & !structs::NS_STYLE_TEXT_EMPHASIS_STYLE_OPEN {
|
match self.gecko.mTextEmphasisStyle as u32 & !structs::NS_STYLE_TEXT_EMPHASIS_STYLE_OPEN {
|
||||||
structs::NS_STYLE_TEXT_EMPHASIS_STYLE_DOT => ShapeKeyword::Dot,
|
structs::NS_STYLE_TEXT_EMPHASIS_STYLE_DOT => ShapeKeyword::Dot,
|
||||||
|
@ -4785,10 +4787,7 @@ fn static_assert() {
|
||||||
_ => panic!("Unexpected value in style struct for text-emphasis-style property")
|
_ => panic!("Unexpected value in style struct for text-emphasis-style property")
|
||||||
};
|
};
|
||||||
|
|
||||||
T::Keyword(KeywordValue {
|
T::Keyword(KeywordValue { fill, shape })
|
||||||
fill: fill,
|
|
||||||
shape: shape
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
${impl_non_negative_length('_webkit_text_stroke_width',
|
${impl_non_negative_length('_webkit_text_stroke_width',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue