diff options
author | Glenn Watson <github@intuitionlibrary.com> | 2017-07-21 12:50:38 +1000 |
---|---|---|
committer | Glenn Watson <github@intuitionlibrary.com> | 2017-07-24 13:02:21 +1000 |
commit | dc82366f7272dc71c0296002817159e6b6f88f53 (patch) | |
tree | 0e7b3cfcc9971746c876657760ab527278e08648 /components/layout/webrender_helpers.rs | |
parent | 548d65dc7a08805bb941d83304c30a12c834ca90 (diff) | |
download | servo-dc82366f7272dc71c0296002817159e6b6f88f53.tar.gz servo-dc82366f7272dc71c0296002817159e6b6f88f53.zip |
Update WR (switch to new text-decorations API in WR).
This only makes use of the "Solid" text decoration type, which
matches the existing support. WR now supports dotted, dashed
and wavy text decorations, but supporting those will need some
extra work in Servo to pass through the correct values.
Diffstat (limited to 'components/layout/webrender_helpers.rs')
-rw-r--r-- | components/layout/webrender_helpers.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/components/layout/webrender_helpers.rs b/components/layout/webrender_helpers.rs index 29236533f80..b2521ff159d 100644 --- a/components/layout/webrender_helpers.rs +++ b/components/layout/webrender_helpers.rs @@ -432,8 +432,16 @@ impl WebRenderDisplayItemConverter for DisplayItem { rect.size, webrender_api::LayoutSize::zero()); } - DisplayItem::Line(..) => { - println!("TODO DisplayItem::Line"); + DisplayItem::Line(ref item) => { + let box_bounds = item.base.bounds.to_rectf(); + builder.push_line(Some(item.base.local_clip), + box_bounds.origin.y + box_bounds.size.height, + box_bounds.origin.x, + box_bounds.origin.x + box_bounds.size.width, + webrender_api::LineOrientation::Horizontal, + box_bounds.size.height, + item.color, + item.style); } DisplayItem::BoxShadow(ref item) => { let rect = item.base.bounds.to_rectf(); |