mirror of
https://github.com/servo/servo.git
synced 2025-08-18 11:55:39 +01:00
Use bitflags for multikeyword properties
This commit is contained in:
parent
1afae52c47
commit
2dec238d1c
3 changed files with 31 additions and 31 deletions
|
@ -2502,16 +2502,16 @@ fn static_assert() {
|
|||
|
||||
pub fn set_text_decoration_line(&mut self, v: longhands::text_decoration_line::computed_value::T) {
|
||||
let mut bits: u8 = 0;
|
||||
if v.underline {
|
||||
if v.contains(longhands::text_decoration_line::UNDERLINE) {
|
||||
bits |= structs::NS_STYLE_TEXT_DECORATION_LINE_UNDERLINE as u8;
|
||||
}
|
||||
if v.overline {
|
||||
if v.contains(longhands::text_decoration_line::OVERLINE) {
|
||||
bits |= structs::NS_STYLE_TEXT_DECORATION_LINE_OVERLINE as u8;
|
||||
}
|
||||
if v.line_through {
|
||||
if v.contains(longhands::text_decoration_line::LINE_THROUGH) {
|
||||
bits |= structs::NS_STYLE_TEXT_DECORATION_LINE_LINE_THROUGH as u8;
|
||||
}
|
||||
if v.blink {
|
||||
if v.contains(longhands::text_decoration_line::BLINK) {
|
||||
bits |= structs::NS_STYLE_TEXT_DECORATION_LINE_BLINK as u8;
|
||||
}
|
||||
self.gecko.mTextDecorationLine = bits;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue