mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Render text-decoration: line-through on layout 2020
This commit is contained in:
parent
c87a4dd788
commit
107af9e769
1 changed files with 9 additions and 0 deletions
|
@ -159,6 +159,15 @@ impl Fragment {
|
||||||
rgba(color),
|
rgba(color),
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Line-through.
|
||||||
|
if text_decorations.line_through {
|
||||||
|
let mut rect = rect;
|
||||||
|
rect.origin.y = rect.origin.y + font_metrics.ascent - font_metrics.strikeout_offset;
|
||||||
|
// XXX(ferjm) This does not work on MacOS #942
|
||||||
|
rect.size.height = font_metrics.strikeout_size;
|
||||||
|
self.build_display_list_for_text_decoration(builder, &rect, color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn build_display_list_for_text_decoration(
|
fn build_display_list_for_text_decoration(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue