mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -87,9 +87,9 @@ use style::values::computed::font::GenericFontFamily;
|
|||
use style::values::computed::{CSSPixelLength, FontSize, Length, NonNegativeLength};
|
||||
use style::values::specified::font::KeywordInfo;
|
||||
use style::{driver, Zero};
|
||||
use style_traits::{CSSPixel, DevicePixel, SpeculativePainter};
|
||||
use style_traits::{CSSPixel, SpeculativePainter};
|
||||
use url::Url;
|
||||
use webrender_api::units::LayoutPixel;
|
||||
use webrender_api::units::{DevicePixel, LayoutPixel};
|
||||
use webrender_api::{units, ExternalScrollId, HitTestFlags};
|
||||
use webrender_traits::CrossProcessCompositorApi;
|
||||
|
||||
|
@ -567,7 +567,7 @@ impl LayoutThread {
|
|||
MediaType::screen(),
|
||||
QuirksMode::NoQuirks,
|
||||
window_size.initial_viewport,
|
||||
window_size.device_pixel_ratio,
|
||||
Scale::new(window_size.device_pixel_ratio.get()),
|
||||
Box::new(LayoutFontMetricsProvider(font_context.clone())),
|
||||
ComputedValues::initial_values_with_font_override(font),
|
||||
);
|
||||
|
@ -1108,7 +1108,8 @@ impl LayoutThread {
|
|||
);
|
||||
|
||||
if self.stylist.device().au_viewport_size() == au_viewport_size &&
|
||||
self.stylist.device().device_pixel_ratio() == window_size_data.device_pixel_ratio
|
||||
self.stylist.device().device_pixel_ratio().get() ==
|
||||
window_size_data.device_pixel_ratio.get()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -1117,7 +1118,7 @@ impl LayoutThread {
|
|||
MediaType::screen(),
|
||||
self.stylist.quirks_mode(),
|
||||
window_size_data.initial_viewport,
|
||||
window_size_data.device_pixel_ratio,
|
||||
Scale::new(window_size_data.device_pixel_ratio.get()),
|
||||
Box::new(LayoutFontMetricsProvider(self.font_context.clone())),
|
||||
self.stylist.device().default_computed_values().to_arc(),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue