Use webrender_api::units::DevicePixel rather than style_traits::DevicePixel unless interfacing with Stylo (#34353)

* Use webrender_api::units::DevicePixel rather than style_traits::DevicePixel unless interfacing with Stylo

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix OpenHarmony build

Signed-off-by: Nico Burns <nico@nicoburns.com>

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
This commit is contained in:
Nico Burns 2024-11-26 12:42:04 +13:00 committed by GitHub
parent 97154d9cf8
commit 63793ccbb7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 52 additions and 46 deletions

View file

@ -10,8 +10,7 @@ use servo::compositing::windowing::{EmbedderEvent, WindowMethods};
use servo::config::opts;
use servo::embedder_traits::Cursor;
use servo::servo_geometry::DeviceIndependentPixel;
use servo::style_traits::DevicePixel;
use servo::webrender_api::units::{DeviceIntPoint, DeviceIntSize};
use servo::webrender_api::units::{DeviceIntPoint, DeviceIntSize, DevicePixel};
// This should vary by zoom level and maybe actual text size (focused or under cursor)
pub const LINE_HEIGHT: f32 = 38.0;