Skip to content

Commit

Permalink
Remove syn 0.15 from our crate graph (fixes #24421)
Browse files Browse the repository at this point in the history
This required bumps of:

* gleam
* image
* rust-webvr
* webrender
* webxr
  • Loading branch information
nox committed Mar 3, 2020
1 parent 756cf66 commit 36da477
Show file tree
Hide file tree
Showing 35 changed files with 144 additions and 182 deletions.
222 changes: 98 additions & 124 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion components/canvas/Cargo.toml
Expand Up @@ -25,7 +25,7 @@ cssparser = "0.27"
embedder_traits = {path = "../embedder_traits"}
euclid = "0.20"
fnv = "1.0"
gleam = "0.6.7"
gleam = "0.9"
half = "1"
ipc-channel = "0.14"
log = "0.4"
Expand Down
3 changes: 1 addition & 2 deletions components/canvas/canvas_data.rs
Expand Up @@ -942,8 +942,7 @@ impl<'a> CanvasData<'a> {
stride: None,
format: webrender_api::ImageFormat::BGRA8,
offset: 0,
is_opaque: false,
allow_mipmaps: false,
flags: webrender_api::ImageDescriptorFlags::empty(),
};
let data = self.drawtarget.snapshot_data_owned();
let data = webrender_api::ImageData::Raw(Arc::new(data));
Expand Down
5 changes: 3 additions & 2 deletions components/canvas/webgl_thread.rs
Expand Up @@ -945,13 +945,14 @@ impl WebGLThread {

/// Helper function to create a `webrender_api::ImageDescriptor`.
fn image_descriptor(size: Size2D<i32>, alpha: bool) -> webrender_api::ImageDescriptor {
let mut flags = webrender_api::ImageDescriptorFlags::empty();
flags.set(webrender_api::ImageDescriptorFlags::IS_OPAQUE, !alpha);
webrender_api::ImageDescriptor {
size: webrender_api::units::DeviceIntSize::new(size.width, size.height),
stride: None,
format: webrender_api::ImageFormat::BGRA8,
offset: 0,
is_opaque: !alpha,
allow_mipmaps: false,
flags,
}
}

Expand Down
6 changes: 3 additions & 3 deletions components/compositing/Cargo.toml
Expand Up @@ -20,8 +20,8 @@ crossbeam-channel = "0.4"
embedder_traits = {path = "../embedder_traits"}
euclid = "0.20"
gfx_traits = {path = "../gfx_traits"}
gleam = {version = "0.6", optional = true}
image = "0.22"
gleam = {version = "0.9", optional = true}
image = "0.23"
ipc-channel = "0.14"
libc = "0.2"
keyboard-types = "0.4.3"
Expand All @@ -31,7 +31,7 @@ net_traits = {path = "../net_traits"}
num-traits = "0.2"
pixels = {path = "../pixels", optional = true}
profile_traits = {path = "../profile_traits"}
rust-webvr = {version = "0.17", features = ["mock", "openvr", "vrexternal"]}
rust-webvr = {version = "0.18", features = ["mock", "openvr", "vrexternal"]}
script_traits = {path = "../script_traits"}
servo_geometry = {path = "../geometry"}
servo-media = {git = "https://github.com/servo/media"}
Expand Down
2 changes: 1 addition & 1 deletion components/compositing/compositor.rs
Expand Up @@ -1396,7 +1396,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
FramebufferUintLength::new(height),
);
let dynamic_image = DynamicImage::ImageRgb8(img);
if let Err(e) = dynamic_image.write_to(&mut file, ImageFormat::PNG)
if let Err(e) = dynamic_image.write_to(&mut file, ImageFormat::Png)
{
error!("Failed to save {} ({}).", path, e);
}
Expand Down
2 changes: 1 addition & 1 deletion components/embedder_traits/Cargo.toml
Expand Up @@ -18,7 +18,7 @@ lazy_static = "1"
log = "0.4"
msg = {path = "../msg"}
num-traits = "0.2"
num-derive = "0.2"
num-derive = "0.3"
serde = "1.0"
servo_url = {path = "../url"}
webrender_api = {git = "https://github.com/servo/webrender"}
Expand Down
1 change: 1 addition & 0 deletions components/layout/display_list/items.rs
Expand Up @@ -454,6 +454,7 @@ pub fn empty_common_item_properties() -> CommonItemProperties {
spatial_id: SpatialId::root_scroll_node(wr::PipelineId::dummy()),
hit_info: None,
flags: PrimitiveFlags::empty(),
item_key: None,
}
}

Expand Down
1 change: 1 addition & 0 deletions components/layout/display_list/webrender_helpers.rs
Expand Up @@ -338,5 +338,6 @@ fn build_common_item_properties(
// TODO(gw): Make use of the WR backface visibility functionality.
flags: PrimitiveFlags::default(),
hit_info: tag,
item_key: None,
}
}
2 changes: 1 addition & 1 deletion components/layout_thread_2020/lib.rs
Expand Up @@ -1420,7 +1420,7 @@ impl LayoutThread {
fragment_tree.print();
}
if self.dump_display_list {
display_list.wr.print_display_list();
display_list.wr.dump_serialized_display_list();
}

debug!("Layout done!");
Expand Down
6 changes: 4 additions & 2 deletions components/net/image_cache.rs
Expand Up @@ -21,6 +21,7 @@ use std::mem;
use std::sync::{Arc, Mutex};
use std::thread;
use webrender_api::units::DeviceIntSize;
use webrender_api::ImageDescriptorFlags;

///
/// TODO(gw): Remaining work on image cache:
Expand Down Expand Up @@ -75,13 +76,14 @@ fn set_webrender_image_key(webrender_api: &WebrenderIpcSender, image: &mut Image
panic!("Not support by webrender yet");
},
};
let mut flags = ImageDescriptorFlags::ALLOW_MIPMAPS;
flags.set(ImageDescriptorFlags::IS_OPAQUE, is_opaque);
let descriptor = webrender_api::ImageDescriptor {
size: DeviceIntSize::new(image.width as i32, image.height as i32),
stride: None,
format: webrender_api::ImageFormat::BGRA8,
offset: 0,
is_opaque,
allow_mipmaps: true,
flags,
};
let data = webrender_api::ImageData::new(bytes);
let image_key = webrender_api.generate_image_key();
Expand Down
2 changes: 1 addition & 1 deletion components/net_traits/Cargo.toml
Expand Up @@ -20,7 +20,7 @@ headers = "0.2"
http = "0.1"
hyper = "0.12"
hyper_serde = "0.11"
piston_image = {package = "image", version = "0.22"}
piston_image = {package = "image", version = "0.23"}
ipc-channel = "0.14"
lazy_static = "1"
log = "0.4"
Expand Down
10 changes: 5 additions & 5 deletions components/net_traits/image/base.rs
Expand Up @@ -77,15 +77,15 @@ pub fn load_from_memory(buffer: &[u8], cors_status: CorsStatus) -> Option<Image>
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img
pub fn detect_image_format(buffer: &[u8]) -> Result<ImageFormat, &str> {
if is_gif(buffer) {
Ok(ImageFormat::GIF)
Ok(ImageFormat::Gif)
} else if is_jpeg(buffer) {
Ok(ImageFormat::JPEG)
Ok(ImageFormat::Jpeg)
} else if is_png(buffer) {
Ok(ImageFormat::PNG)
Ok(ImageFormat::Png)
} else if is_bmp(buffer) {
Ok(ImageFormat::BMP)
Ok(ImageFormat::Bmp)
} else if is_ico(buffer) {
Ok(ImageFormat::ICO)
Ok(ImageFormat::Ico)
} else {
Err("Image Format Not Supported")
}
Expand Down
2 changes: 1 addition & 1 deletion components/script/Cargo.toml
Expand Up @@ -61,7 +61,7 @@ html5ever = "0.25"
http = "0.1"
hyper = "0.12"
hyper_serde = "0.11"
image = "0.22"
image = "0.23"
indexmap = "1.0.2"
ipc-channel = "0.14"
itertools = "0.8"
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/htmlcanvaselement.rs
Expand Up @@ -392,7 +392,7 @@ impl HTMLCanvasElementMethods for HTMLCanvasElement {
// FIXME(nox): https://github.com/PistonDevelopers/image-png/issues/86
// FIXME(nox): https://github.com/PistonDevelopers/image-png/issues/87
PNGEncoder::new(&mut png)
.encode(&file, self.Width(), self.Height(), ColorType::RGBA(8))
.encode(&file, self.Width(), self.Height(), ColorType::Rgba8)
.unwrap();
let mut url = "data:image/png;base64,".to_owned();
// FIXME(nox): Should this use base64::URL_SAFE?
Expand Down
6 changes: 3 additions & 3 deletions components/script/dom/htmlmediaelement.rs
Expand Up @@ -96,7 +96,8 @@ use std::rc::Rc;
use std::sync::{Arc, Mutex};
use time::{self, Duration, Timespec};
use webrender_api::{ExternalImageData, ExternalImageId, ExternalImageType, TextureTarget};
use webrender_api::{ImageData, ImageDescriptor, ImageFormat, ImageKey, Transaction};
use webrender_api::{ImageData, ImageDescriptor, ImageDescriptorFlags, ImageFormat};
use webrender_api::{ImageKey, Transaction};

#[derive(PartialEq)]
enum FrameStatus {
Expand Down Expand Up @@ -186,8 +187,7 @@ impl VideoFrameRenderer for MediaFrameRenderer {
frame.get_width(),
frame.get_height(),
ImageFormat::BGRA8,
false,
false,
ImageDescriptorFlags::empty(),
);

match self.current_frame {
Expand Down
2 changes: 1 addition & 1 deletion components/servo/Cargo.toml
Expand Up @@ -55,7 +55,7 @@ embedder_traits = {path = "../embedder_traits"}
env_logger = "0.6"
euclid = "0.20"
gfx = {path = "../gfx"}
gleam = "0.6"
gleam = "0.9"
ipc-channel = "0.14"
keyboard-types = "0.4"
layout_thread_2013 = {path = "../layout_thread", optional = true}
Expand Down
2 changes: 1 addition & 1 deletion components/style/Cargo.toml
Expand Up @@ -53,7 +53,7 @@ malloc_size_of_derive = "0.1"
num_cpus = {version = "1.1.0"}
num-integer = "0.1"
num-traits = "0.2"
num-derive = "0.2"
num-derive = "0.3"
owning_ref = "0.4"
parking_lot = "0.9"
precomputed-hash = "0.1.1"
Expand Down
2 changes: 1 addition & 1 deletion components/webdriver_server/Cargo.toml
Expand Up @@ -17,7 +17,7 @@ cookie = "0.11"
crossbeam-channel = "0.4"
euclid = "0.20"
hyper = "0.12"
image = "0.22"
image = "0.23"
ipc-channel = "0.14"
keyboard-types = "0.4.3"
log = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion components/webdriver_server/lib.rs
Expand Up @@ -1583,7 +1583,7 @@ impl Handler {
let rgb = RgbImage::from_raw(img.width, img.height, img.bytes.to_vec()).unwrap();
let mut png_data = Vec::new();
DynamicImage::ImageRgb8(rgb)
.write_to(&mut png_data, ImageFormat::PNG)
.write_to(&mut png_data, ImageFormat::Png)
.unwrap();

Ok(base64::encode(&png_data))
Expand Down
2 changes: 1 addition & 1 deletion components/webvr/Cargo.toml
Expand Up @@ -22,7 +22,7 @@ euclid = "0.20"
ipc-channel = "0.14"
log = "0.4"
msg = {path = "../msg"}
rust-webvr = {version = "0.17", features = ["mock", "openvr", "vrexternal"]}
rust-webvr = {version = "0.18", features = ["mock", "openvr", "vrexternal"]}
rust-webvr-api = "0.17"
servo_config = {path = "../config"}
sparkle = "0.1"
Expand Down
6 changes: 3 additions & 3 deletions ports/glutin/Cargo.toml
Expand Up @@ -52,22 +52,22 @@ backtrace = "0.3"
clipboard = "0.5"
euclid = "0.20"
getopts = "0.2.11"
gleam = "0.6"
gleam = "0.9"
glutin = "0.21.0"
keyboard-types = "0.4.3"
lazy_static = "1"
libservo = {path = "../../components/servo"}
libc = "0.2"
log = "0.4"
rust-webvr = { version = "0.17", features = ["glwindow"] }
rust-webvr = { version = "0.18", features = ["glwindow"] }
servo-media = {git = "https://github.com/servo/media"}
shellwords = "1.0.0"
tinyfiledialogs = "3.0"
webxr-api = { git = "https://github.com/servo/webxr", features = ["ipc"] }
webxr = { git = "https://github.com/servo/webxr", features = ["ipc", "glwindow", "headless"] }

[target.'cfg(any(target_os = "linux", target_os = "windows"))'.dependencies]
image = "0.22"
image = "0.23"

[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
osmesa-sys = "0.1.2"
Expand Down
2 changes: 1 addition & 1 deletion ports/gstplugin/Cargo.toml
Expand Up @@ -17,7 +17,7 @@ path = "lib.rs"
[dependencies]
crossbeam-channel = "0.4"
euclid = "0.20"
gleam = "0.6"
gleam = "0.9"
glib = "0.9"
gstreamer = "0.15"
gstreamer-base = "0.15"
Expand Down
2 changes: 1 addition & 1 deletion ports/libmlservo/Cargo.toml
Expand Up @@ -20,7 +20,7 @@ layout-2020 = ["simpleservo/layout-2020"]
[dependencies]
libservo = { path = "../../components/servo", features = ["no_static_freetype"] }
simpleservo = { path = "../libsimpleservo/api", features = ["no_static_freetype"] }
rust-webvr = { version = "0.17", features = ["magicleap"] }
rust-webvr = { version = "0.18", features = ["magicleap"] }
webxr-api = { git = "https://github.com/servo/webxr", features = ["ipc"] }
webxr = { git = "https://github.com/servo/webxr", features = ["ipc", "magicleap"] }
libc = "0.2"
Expand Down
4 changes: 0 additions & 4 deletions servo-tidy.toml
Expand Up @@ -39,16 +39,12 @@ packages = [
# https://github.com/servo/servo/pull/23288#issuecomment-494687746
"gl_generator",

# Just needs a WR update.
"derive_more",

# Lots of crates to update.
"smallvec",

# https://github.com/servo/servo/issues/24421
"proc-macro2",
"quote",
"syn",
"unicode-xid",

# These can be removed once servo is updated to surfman 0.2
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

@@ -1,3 +1,3 @@
[fieldset-transform-translatez.html]
[mix-blend-mode-parent-with-text.html]
expected:
if os == "linux": FAIL
@@ -1,3 +1,3 @@
[geometry-border-image-001.https.html]
type: reftest
bug: https://github.com/servo/servo/issues/17861
expected: FAIL
@@ -1,3 +1,3 @@
[geometry-border-image-004.https.html]
type: reftest
bug: https://github.com/servo/servo/issues/17860
expected: FAIL
@@ -1,5 +1,3 @@
[transform-input-007.html]
type: reftest
bug: https://github.com/servo/servo/issues/21092
expected:
if os == "linux": FAIL
expected: FAIL
@@ -1,5 +1,3 @@
[transform-input-009.html]
type: reftest
bug: https://github.com/servo/servo/issues/21092
expected:
if os == "linux": FAIL
expected: FAIL
@@ -1,5 +1,3 @@
[transform-input-010.html]
type: reftest
bug: https://github.com/servo/servo/issues/21092
expected:
if os == "linux": FAIL
expected: FAIL
@@ -1,4 +1,4 @@
[transform-input-012.html]
type: reftest
bug: https://github.com/servo/servo/issues/21092
expected: FAIL
expected:
if os == "linux": FAIL

0 comments on commit 36da477

Please sign in to comment.