mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
Add support for text-decoration-style
This commit is contained in:
parent
928bd0d1d2
commit
689b413bde
3 changed files with 22 additions and 3 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
use crate::geom::{PhysicalPoint, PhysicalRect, PhysicalSides, PhysicalSize};
|
||||
use style::computed_values::mix_blend_mode::T as ComputedMixBlendMode;
|
||||
use style::computed_values::text_decoration_style::T as ComputedTextDecorationStyle;
|
||||
use style::computed_values::transform_style::T as ComputedTransformStyle;
|
||||
use style::values::computed::Filter as ComputedFilter;
|
||||
use style::values::computed::Length;
|
||||
|
@ -100,3 +101,16 @@ impl ToWebRender for PhysicalSides<Length> {
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl ToWebRender for ComputedTextDecorationStyle {
|
||||
type Type = webrender_api::LineStyle;
|
||||
fn to_webrender(&self) -> Self::Type {
|
||||
match *self {
|
||||
ComputedTextDecorationStyle::Solid => wr::LineStyle::Solid,
|
||||
ComputedTextDecorationStyle::Dotted => wr::LineStyle::Dotted,
|
||||
ComputedTextDecorationStyle::Dashed => wr::LineStyle::Dashed,
|
||||
ComputedTextDecorationStyle::Wavy => wr::LineStyle::Wavy,
|
||||
_ => wr::LineStyle::Solid,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue