diff --git a/Cargo.lock b/Cargo.lock index 119302c8d0e..4d00a12dc3f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3175,7 +3175,7 @@ dependencies = [ [[package]] name = "webrender" version = "0.35.0" -source = "git+https://github.com/servo/webrender#04eeee4593c11a0d9c934722896c67aa5ddd9554" +source = "git+https://github.com/servo/webrender#861fb7b5570d69de37d8a1f364f42f38c87cb2d3" dependencies = [ "app_units 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "bincode 1.0.0-alpha6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3203,10 +3203,11 @@ dependencies = [ [[package]] name = "webrender_traits" version = "0.35.0" -source = "git+https://github.com/servo/webrender#04eeee4593c11a0d9c934722896c67aa5ddd9554" +source = "git+https://github.com/servo/webrender#861fb7b5570d69de37d8a1f364f42f38c87cb2d3" dependencies = [ "app_units 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "dwrote 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 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); }