mirror of
https://github.com/servo/servo.git
synced 2025-09-04 12:08:21 +01:00
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:
parent
97154d9cf8
commit
63793ccbb7
17 changed files with 52 additions and 46 deletions
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use euclid::{Point2D, Size2D};
|
||||
use servo::style_traits::DevicePixel;
|
||||
use servo::webrender_api::units::DevicePixel;
|
||||
use winit::dpi::{PhysicalPosition, PhysicalSize};
|
||||
|
||||
pub fn winit_size_to_euclid_size<T>(size: PhysicalSize<T>) -> Size2D<T, DevicePixel> {
|
||||
|
|
|
@ -19,8 +19,7 @@ use servo::keyboard_types::{Key, KeyState, KeyboardEvent};
|
|||
use servo::script_traits::{TouchEventType, WheelDelta, WheelMode};
|
||||
use servo::servo_config::{opts, pref};
|
||||
use servo::servo_geometry::DeviceIndependentPixel;
|
||||
use servo::style_traits::DevicePixel;
|
||||
use servo::webrender_api::units::{DeviceIntPoint, DeviceIntRect, DeviceIntSize};
|
||||
use servo::webrender_api::units::{DeviceIntPoint, DeviceIntRect, DeviceIntSize, DevicePixel};
|
||||
use servo::webrender_api::ScrollLocation;
|
||||
use servo::webrender_traits::RenderingContext;
|
||||
use surfman::{Connection, Context, Device, SurfaceType};
|
||||
|
|
|
@ -16,8 +16,7 @@ use servo::compositing::windowing::{
|
|||
};
|
||||
use servo::config::opts;
|
||||
use servo::servo_geometry::DeviceIndependentPixel;
|
||||
use servo::style_traits::DevicePixel;
|
||||
use servo::webrender_api::units::DeviceIntSize;
|
||||
use servo::webrender_api::units::{DeviceIntSize, DevicePixel};
|
||||
use servo::webrender_traits::RenderingContext;
|
||||
use surfman::{Connection, Context, Device, SurfaceType};
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ use servo::compositing::windowing::EmbedderEvent;
|
|||
use servo::script_traits::TraversalDirection;
|
||||
use servo::servo_geometry::DeviceIndependentPixel;
|
||||
use servo::servo_url::ServoUrl;
|
||||
use servo::style_traits::DevicePixel;
|
||||
use servo::webrender_api::units::DevicePixel;
|
||||
use servo::webrender_traits::RenderingContext;
|
||||
use servo::TopLevelBrowsingContextId;
|
||||
use winit::event::{ElementState, MouseButton, WindowEvent};
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -25,7 +25,7 @@ use servo::script_traits::{
|
|||
MediaSessionActionType, MouseButton, TouchEventType, TouchId, TraversalDirection,
|
||||
};
|
||||
use servo::servo_geometry::DeviceIndependentPixel;
|
||||
use servo::style_traits::DevicePixel;
|
||||
use servo::webrender_api::units::DevicePixel;
|
||||
use servo::webrender_api::ScrollLocation;
|
||||
use servo::webrender_traits::RenderingContext;
|
||||
use servo::{gl, Servo, TopLevelBrowsingContextId};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue