diff options
Diffstat (limited to 'components/layout/webrender_helpers.rs')
-rw-r--r-- | components/layout/webrender_helpers.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/components/layout/webrender_helpers.rs b/components/layout/webrender_helpers.rs index 9756ea6d1d6..92012d71cb7 100644 --- a/components/layout/webrender_helpers.rs +++ b/components/layout/webrender_helpers.rs @@ -258,10 +258,12 @@ impl WebRenderDisplayItemConverter for DisplayItem { }; if !slice.glyphs.is_whitespace() { let glyph_offset = glyph.offset().unwrap_or(Point2D::zero()); + let x = (origin.x + glyph_offset.x).to_f32_px(); + let y = (origin.y + glyph_offset.y).to_f32_px(); + let point = webrender_traits::LayoutPoint::new(x, y); let glyph = webrender_traits::GlyphInstance { index: glyph.id(), - point: Point2D::new((origin.x + glyph_offset.x).to_f32_px(), - (origin.y + glyph_offset.y).to_f32_px()), + point: point, }; glyphs.push(glyph); } |