mirror of
https://github.com/servo/servo.git
synced 2025-08-30 09:38:19 +01:00
Update euclid, azure, skia, offscreen_gl_context, plane-split, webrender
This commit is contained in:
parent
76270ad6c1
commit
e17697fb0e
47 changed files with 196 additions and 211 deletions
|
@ -10,7 +10,7 @@ path = "lib.rs"
|
|||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
euclid = "0.15"
|
||||
euclid = "0.16"
|
||||
gfx = {path = "../../../components/gfx"}
|
||||
gfx_traits = {path = "../../../components/gfx_traits"}
|
||||
ipc-channel = "0.9"
|
||||
|
|
|
@ -9,7 +9,7 @@ name = "script_tests"
|
|||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
euclid = "0.15"
|
||||
euclid = "0.16"
|
||||
msg = {path = "../../../components/msg"}
|
||||
script = {path = "../../../components/script"}
|
||||
servo_url = {path = "../../../components/url"}
|
||||
|
|
|
@ -13,7 +13,7 @@ doctest = false
|
|||
byteorder = "1.0"
|
||||
app_units = "0.6"
|
||||
cssparser = "0.23.0"
|
||||
euclid = "0.15"
|
||||
euclid = "0.16"
|
||||
html5ever = "0.22"
|
||||
parking_lot = "0.4"
|
||||
rayon = "0.8"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use cssparser::SourceLocation;
|
||||
use euclid::ScaleFactor;
|
||||
use euclid::TypedScale;
|
||||
use euclid::TypedSize2D;
|
||||
use servo_arc::Arc;
|
||||
use servo_url::ServoUrl;
|
||||
|
@ -38,7 +38,7 @@ fn test_media_rule<F>(css: &str, callback: F)
|
|||
let stylesheet = Stylesheet::from_str(
|
||||
css, url, Origin::Author, media_list, lock,
|
||||
None, &CSSErrorReporterTest, QuirksMode::NoQuirks, 0);
|
||||
let dummy = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), ScaleFactor::new(1.0));
|
||||
let dummy = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), TypedScale::new(1.0));
|
||||
let mut rule_count = 0;
|
||||
let guard = stylesheet.shared_lock.read();
|
||||
for rule in stylesheet.iter_rules::<AllRules>(&dummy, &guard) {
|
||||
|
@ -345,7 +345,7 @@ fn test_mq_malformed_expressions() {
|
|||
|
||||
#[test]
|
||||
fn test_matching_simple() {
|
||||
let device = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), ScaleFactor::new(1.0));
|
||||
let device = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), TypedScale::new(1.0));
|
||||
|
||||
media_query_test(&device, "@media not all { a { color: red; } }", 0);
|
||||
media_query_test(&device, "@media not screen { a { color: red; } }", 0);
|
||||
|
@ -361,7 +361,7 @@ fn test_matching_simple() {
|
|||
|
||||
#[test]
|
||||
fn test_matching_width() {
|
||||
let device = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), ScaleFactor::new(1.0));
|
||||
let device = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), TypedScale::new(1.0));
|
||||
|
||||
media_query_test(&device, "@media { a { color: red; } }", 1);
|
||||
|
||||
|
@ -402,7 +402,7 @@ fn test_matching_width() {
|
|||
|
||||
#[test]
|
||||
fn test_matching_invalid() {
|
||||
let device = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), ScaleFactor::new(1.0));
|
||||
let device = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), TypedScale::new(1.0));
|
||||
|
||||
media_query_test(&device, "@media fridge { a { color: red; } }", 0);
|
||||
media_query_test(&device, "@media screen and (height: 100px) { a { color: red; } }", 0);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use cssparser::SourceLocation;
|
||||
use euclid::ScaleFactor;
|
||||
use euclid::TypedScale;
|
||||
use euclid::TypedSize2D;
|
||||
use selectors::parser::{AncestorHashes, Selector};
|
||||
use servo_arc::Arc;
|
||||
|
@ -179,7 +179,7 @@ fn test_insert() {
|
|||
}
|
||||
|
||||
fn mock_stylist() -> Stylist {
|
||||
let device = Device::new(MediaType::screen(), TypedSize2D::new(0f32, 0f32), ScaleFactor::new(1.0));
|
||||
let device = Device::new(MediaType::screen(), TypedSize2D::new(0f32, 0f32), TypedScale::new(1.0));
|
||||
Stylist::new(device, QuirksMode::NoQuirks)
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use cssparser::{Parser, ParserInput};
|
||||
use euclid::ScaleFactor;
|
||||
use euclid::TypedScale;
|
||||
use euclid::TypedSize2D;
|
||||
use media_queries::CSSErrorReporterTest;
|
||||
use servo_arc::Arc;
|
||||
|
@ -97,7 +97,7 @@ macro_rules! viewport_length {
|
|||
|
||||
#[test]
|
||||
fn empty_viewport_rule() {
|
||||
let device = Device::new(MediaType::screen(), TypedSize2D::new(800., 600.), ScaleFactor::new(1.0));
|
||||
let device = Device::new(MediaType::screen(), TypedSize2D::new(800., 600.), TypedScale::new(1.0));
|
||||
|
||||
test_viewport_rule("@viewport {}", &device, |declarations, css| {
|
||||
println!("{}", css);
|
||||
|
@ -120,7 +120,7 @@ macro_rules! assert_decl_eq {
|
|||
|
||||
#[test]
|
||||
fn simple_viewport_rules() {
|
||||
let device = Device::new(MediaType::screen(), TypedSize2D::new(800., 600.), ScaleFactor::new(1.0));
|
||||
let device = Device::new(MediaType::screen(), TypedSize2D::new(800., 600.), TypedScale::new(1.0));
|
||||
|
||||
test_viewport_rule("@viewport { width: auto; height: auto;\
|
||||
zoom: auto; min-zoom: 0; max-zoom: 200%;\
|
||||
|
@ -192,7 +192,7 @@ fn simple_meta_viewport_contents() {
|
|||
|
||||
#[test]
|
||||
fn cascading_within_viewport_rule() {
|
||||
let device = Device::new(MediaType::screen(), TypedSize2D::new(800., 600.), ScaleFactor::new(1.0));
|
||||
let device = Device::new(MediaType::screen(), TypedSize2D::new(800., 600.), TypedScale::new(1.0));
|
||||
|
||||
// normal order of appearance
|
||||
test_viewport_rule("@viewport { min-width: 200px; min-width: auto; }",
|
||||
|
@ -258,7 +258,7 @@ fn cascading_within_viewport_rule() {
|
|||
#[test]
|
||||
fn multiple_stylesheets_cascading() {
|
||||
PREFS.set("layout.viewport.enabled", PrefValue::Boolean(true));
|
||||
let device = Device::new(MediaType::screen(), TypedSize2D::new(800., 600.), ScaleFactor::new(1.0));
|
||||
let device = Device::new(MediaType::screen(), TypedSize2D::new(800., 600.), TypedScale::new(1.0));
|
||||
let error_reporter = CSSErrorReporterTest;
|
||||
let shared_lock = SharedRwLock::new();
|
||||
let stylesheets = vec![
|
||||
|
@ -314,7 +314,7 @@ fn constrain_viewport() {
|
|||
}
|
||||
|
||||
let initial_viewport = TypedSize2D::new(800., 600.);
|
||||
let device = Device::new(MediaType::screen(), initial_viewport, ScaleFactor::new(1.0));
|
||||
let device = Device::new(MediaType::screen(), initial_viewport, TypedScale::new(1.0));
|
||||
let mut input = ParserInput::new("");
|
||||
assert_eq!(ViewportConstraints::maybe_new(&device, from_css!(input), QuirksMode::NoQuirks), None);
|
||||
|
||||
|
@ -363,7 +363,7 @@ fn constrain_viewport() {
|
|||
}));
|
||||
|
||||
let initial_viewport = TypedSize2D::new(200., 150.);
|
||||
let device = Device::new(MediaType::screen(), initial_viewport, ScaleFactor::new(1.0));
|
||||
let device = Device::new(MediaType::screen(), initial_viewport, TypedScale::new(1.0));
|
||||
let mut input = ParserInput::new("width: 320px auto");
|
||||
assert_eq!(ViewportConstraints::maybe_new(&device, from_css!(input), QuirksMode::NoQuirks),
|
||||
Some(ViewportConstraints {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue