mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Auto merge of #19510 - servo:heapsize, r=nox
Update some dependencies, remove heapsize from the build <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19510) <!-- Reviewable:end -->
This commit is contained in:
commit
07bd84ecc8
47 changed files with 247 additions and 264 deletions
|
@ -25,7 +25,7 @@ servo = ["serde", "style_traits/servo", "servo_atoms", "servo_config", "html5eve
|
|||
gecko_debug = ["nsstring/gecko_debug"]
|
||||
|
||||
[dependencies]
|
||||
app_units = "0.5.5"
|
||||
app_units = "0.6"
|
||||
arrayvec = "0.4.6"
|
||||
atomic_refcell = "0.1"
|
||||
bitflags = "1.0"
|
||||
|
@ -33,7 +33,7 @@ byteorder = "1.0"
|
|||
cfg-if = "0.1.0"
|
||||
cssparser = "0.23.0"
|
||||
encoding_rs = {version = "0.7", optional = true}
|
||||
euclid = "0.15"
|
||||
euclid = "0.16"
|
||||
fallible = { path = "../fallible" }
|
||||
fnv = "1.0"
|
||||
hashglobe = { path = "../hashglobe" }
|
||||
|
|
|
@ -10,8 +10,8 @@ use bloom::StyleBloom;
|
|||
use data::{EagerPseudoStyles, ElementData};
|
||||
use dom::{TElement, SendElement};
|
||||
#[cfg(feature = "servo")] use dom::OpaqueNode;
|
||||
use euclid::ScaleFactor;
|
||||
use euclid::Size2D;
|
||||
use euclid::TypedScale;
|
||||
use fnv::FnvHashMap;
|
||||
use font_metrics::FontMetricsProvider;
|
||||
#[cfg(feature = "gecko")] use gecko_bindings::structs;
|
||||
|
@ -171,7 +171,7 @@ impl<'a> SharedStyleContext<'a> {
|
|||
}
|
||||
|
||||
/// The device pixel ratio
|
||||
pub fn device_pixel_ratio(&self) -> ScaleFactor<f32, CSSPixel, DevicePixel> {
|
||||
pub fn device_pixel_ratio(&self) -> TypedScale<f32, CSSPixel, DevicePixel> {
|
||||
self.stylist.device().device_pixel_ratio()
|
||||
}
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ use app_units::AU_PER_PX;
|
|||
use app_units::Au;
|
||||
use context::QuirksMode;
|
||||
use cssparser::{CssStringWriter, Parser, RGBA, Token, BasicParseErrorKind};
|
||||
use euclid::ScaleFactor;
|
||||
use euclid::Size2D;
|
||||
use euclid::TypedScale;
|
||||
use gecko::values::{convert_nscolor_to_rgba, convert_rgba_to_nscolor};
|
||||
use gecko_bindings::bindings;
|
||||
use gecko_bindings::structs;
|
||||
|
@ -187,12 +187,12 @@ impl Device {
|
|||
}
|
||||
|
||||
/// Returns the device pixel ratio.
|
||||
pub fn device_pixel_ratio(&self) -> ScaleFactor<f32, CSSPixel, DevicePixel> {
|
||||
pub fn device_pixel_ratio(&self) -> TypedScale<f32, CSSPixel, DevicePixel> {
|
||||
let override_dppx = self.pres_context().mOverrideDPPX;
|
||||
if override_dppx > 0.0 { return ScaleFactor::new(override_dppx); }
|
||||
if override_dppx > 0.0 { return TypedScale::new(override_dppx); }
|
||||
let au_per_dpx = self.pres_context().mCurAppUnitsPerDevPixel as f32;
|
||||
let au_per_px = AU_PER_PX as f32;
|
||||
ScaleFactor::new(au_per_px / au_per_dpx)
|
||||
TypedScale::new(au_per_px / au_per_dpx)
|
||||
}
|
||||
|
||||
/// Returns whether document colors are enabled.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
use app_units::Au;
|
||||
use context::QuirksMode;
|
||||
use cssparser::{Parser, RGBA};
|
||||
use euclid::{ScaleFactor, Size2D, TypedSize2D};
|
||||
use euclid::{TypedScale, Size2D, TypedSize2D};
|
||||
use media_queries::MediaType;
|
||||
use parser::ParserContext;
|
||||
use properties::ComputedValues;
|
||||
|
@ -31,7 +31,7 @@ pub struct Device {
|
|||
/// The current viewport size, in CSS pixels.
|
||||
viewport_size: TypedSize2D<f32, CSSPixel>,
|
||||
/// The current device pixel ratio, from CSS pixels to device pixels.
|
||||
device_pixel_ratio: ScaleFactor<f32, CSSPixel, DevicePixel>,
|
||||
device_pixel_ratio: TypedScale<f32, CSSPixel, DevicePixel>,
|
||||
|
||||
/// The font size of the root element
|
||||
/// This is set when computing the style of the root
|
||||
|
@ -57,7 +57,7 @@ impl Device {
|
|||
pub fn new(
|
||||
media_type: MediaType,
|
||||
viewport_size: TypedSize2D<f32, CSSPixel>,
|
||||
device_pixel_ratio: ScaleFactor<f32, CSSPixel, DevicePixel>
|
||||
device_pixel_ratio: TypedScale<f32, CSSPixel, DevicePixel>
|
||||
) -> Device {
|
||||
Device {
|
||||
media_type,
|
||||
|
@ -121,7 +121,7 @@ impl Device {
|
|||
}
|
||||
|
||||
/// Returns the device pixel ratio.
|
||||
pub fn device_pixel_ratio(&self) -> ScaleFactor<f32, CSSPixel, DevicePixel> {
|
||||
pub fn device_pixel_ratio(&self) -> TypedScale<f32, CSSPixel, DevicePixel> {
|
||||
self.device_pixel_ratio
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
//! Generic types for CSS values that are related to transformations.
|
||||
|
||||
use app_units::Au;
|
||||
use euclid::{Radians, Rect, Transform3D};
|
||||
use euclid::{self, Rect, Transform3D};
|
||||
use num_traits::Zero;
|
||||
use std::fmt;
|
||||
use style_traits::ToCss;
|
||||
|
@ -457,18 +457,20 @@ where
|
|||
let theta = TWO_PI - theta.as_ref().radians64();
|
||||
let (ax, ay, az, theta) =
|
||||
get_normalized_vector_and_angle(ax.into(), ay.into(), az.into(), theta);
|
||||
Transform3D::create_rotation(ax as f64, ay as f64, az as f64, Radians::new(theta))
|
||||
Transform3D::create_rotation(
|
||||
ax as f64, ay as f64, az as f64, euclid::Angle::radians(theta)
|
||||
)
|
||||
},
|
||||
RotateX(theta) => {
|
||||
let theta = Radians::new(TWO_PI - theta.as_ref().radians64());
|
||||
let theta = euclid::Angle::radians(TWO_PI - theta.as_ref().radians64());
|
||||
Transform3D::create_rotation(1., 0., 0., theta)
|
||||
},
|
||||
RotateY(theta) => {
|
||||
let theta = Radians::new(TWO_PI - theta.as_ref().radians64());
|
||||
let theta = euclid::Angle::radians(TWO_PI - theta.as_ref().radians64());
|
||||
Transform3D::create_rotation(0., 1., 0., theta)
|
||||
},
|
||||
RotateZ(theta) | Rotate(theta) => {
|
||||
let theta = Radians::new(TWO_PI - theta.as_ref().radians64());
|
||||
let theta = euclid::Angle::radians(TWO_PI - theta.as_ref().radians64());
|
||||
Transform3D::create_rotation(0., 0., 1., theta)
|
||||
},
|
||||
Perspective(ref d) => {
|
||||
|
@ -503,20 +505,20 @@ where
|
|||
},
|
||||
Skew(theta_x, theta_y) => {
|
||||
Transform3D::create_skew(
|
||||
Radians::new(theta_x.as_ref().radians64()),
|
||||
Radians::new(theta_y.map_or(0., |a| a.as_ref().radians64())),
|
||||
euclid::Angle::radians(theta_x.as_ref().radians64()),
|
||||
euclid::Angle::radians(theta_y.map_or(0., |a| a.as_ref().radians64())),
|
||||
)
|
||||
},
|
||||
SkewX(theta) => {
|
||||
Transform3D::create_skew(
|
||||
Radians::new(theta.as_ref().radians64()),
|
||||
Radians::new(0.),
|
||||
euclid::Angle::radians(theta.as_ref().radians64()),
|
||||
euclid::Angle::radians(0.),
|
||||
)
|
||||
},
|
||||
SkewY(theta) => {
|
||||
Transform3D::create_skew(
|
||||
Radians::new(0.),
|
||||
Radians::new(theta.as_ref().radians64()),
|
||||
euclid::Angle::radians(0.),
|
||||
euclid::Angle::radians(theta.as_ref().radians64()),
|
||||
)
|
||||
},
|
||||
Matrix3D(m) => m.into(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue