diff --git a/Cargo.lock b/Cargo.lock index fab3ceb8e28..8107c6785cb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -418,6 +418,17 @@ dependencies = [ "alloc-stdlib", ] +[[package]] +name = "build-parallel" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b5f8b148c1884e660514fb1205f36b595e96df4daac5ad526a23db44937de77" +dependencies = [ + "crossbeam-utils", + "jobserver", + "num_cpus", +] + [[package]] name = "byte-slice-cast" version = "0.2.0" @@ -495,7 +506,7 @@ dependencies = [ "embedder_traits", "euclid", "fnv", - "gleam 0.9.2", + "gleam 0.11.0", "half", "ipc-channel", "log", @@ -752,7 +763,7 @@ dependencies = [ "embedder_traits", "euclid", "gfx_traits", - "gleam 0.9.2", + "gleam 0.11.0", "image", "ipc-channel", "keyboard-types", @@ -1312,8 +1323,6 @@ checksum = "0bd1369e02db5e9b842a9b67bce8a2fcc043beafb2ae8a799dd482d46ea1ff0d" dependencies = [ "lazy_static", "libc", - "serde", - "serde_derive", "winapi", ] @@ -1761,9 +1770,9 @@ dependencies = [ "app_units", "bitflags", "byteorder", - "core-foundation 0.6.4", - "core-graphics 0.17.3", - "core-text 13.2.0", + "core-foundation 0.7.0", + "core-graphics 0.19.0", + "core-text 15.0.0", "dwrote 0.11.0", "euclid", "fnv", @@ -2016,6 +2025,15 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" +[[package]] +name = "glslopt" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f22b383fcf6f85c4a268af39a0758ec40970e5f9f8fe9809e4415d48409b8379" +dependencies = [ + "cc", +] + [[package]] name = "gobject-sys" version = "0.9.1" @@ -2734,13 +2752,11 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" -version = "0.1.17" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b1d42ef453b30b7387e113da1c83ab1605d90c5b4e0eb8e96d016ed3b8c160" +checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" dependencies = [ - "getrandom", "libc", - "log", ] [[package]] @@ -3077,7 +3093,7 @@ dependencies = [ "euclid", "gaol", "gfx", - "gleam 0.9.2", + "gleam 0.11.0", "gstreamer", "ipc-channel", "keyboard-types", @@ -3918,7 +3934,7 @@ dependencies = [ [[package]] name = "peek-poke" version = "0.2.0" -source = "git+https://github.com/servo/webrender#4ba17a61580a03b68881ffba7ee22bcf8e1aac72" +source = "git+https://github.com/servo/webrender#01082a9091ab98c392af8934d04271eb1dd546df" dependencies = [ "euclid", "peek-poke-derive 0.2.1", @@ -3945,7 +3961,7 @@ dependencies = [ [[package]] name = "peek-poke-derive" version = "0.2.1" -source = "git+https://github.com/servo/webrender#4ba17a61580a03b68881ffba7ee22bcf8e1aac72" +source = "git+https://github.com/servo/webrender#01082a9091ab98c392af8934d04271eb1dd546df" dependencies = [ "proc-macro2 1.0.1", "quote 1.0.2", @@ -5316,6 +5332,9 @@ name = "smallvec" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05720e22615919e4734f6a99ceae50d00226c3c5aca406e102ebc33298214e0a" +dependencies = [ + "serde", +] [[package]] name = "smithay-client-toolkit" @@ -5722,12 +5741,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "thread_profiler" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5920e77802b177479ab5795767fa48e68f61b2f516c2ac0041e2978dd8efe483" - [[package]] name = "tiff" version = "0.4.0" @@ -5998,6 +6011,12 @@ dependencies = [ "serde", ] +[[package]] +name = "tracy-rs" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3aa118469b61af5fead107a4882dc4661a05591b6653bbc546c1c8bbc181047" + [[package]] name = "truetype" version = "0.26.0" @@ -6358,22 +6377,24 @@ dependencies = [ [[package]] name = "webrender" version = "0.61.0" -source = "git+https://github.com/servo/webrender#4ba17a61580a03b68881ffba7ee22bcf8e1aac72" +source = "git+https://github.com/servo/webrender#01082a9091ab98c392af8934d04271eb1dd546df" dependencies = [ "base64 0.10.1", "bincode", "bitflags", + "build-parallel", "byteorder", "cfg-if", - "core-foundation 0.6.4", - "core-graphics 0.17.3", - "core-text 13.2.0", + "core-foundation 0.7.0", + "core-graphics 0.19.0", + "core-text 15.0.0", "cstr", - "dwrote 0.9.0", + "dwrote 0.11.0", "euclid", "freetype", "fxhash", - "gleam 0.9.2", + "gleam 0.11.0", + "glslopt", "image", "lazy_static", "libc", @@ -6385,11 +6406,10 @@ dependencies = [ "ron", "serde", "serde_json", - "sha2", - "smallvec 0.6.13", + "smallvec 1.3.0", "svg_fmt", - "thread_profiler", "time", + "tracy-rs", "webrender_api", "webrender_build", "wr_malloc_size_of", @@ -6399,13 +6419,13 @@ dependencies = [ [[package]] name = "webrender_api" version = "0.61.0" -source = "git+https://github.com/servo/webrender#4ba17a61580a03b68881ffba7ee22bcf8e1aac72" +source = "git+https://github.com/servo/webrender#01082a9091ab98c392af8934d04271eb1dd546df" dependencies = [ "app_units", "bitflags", "byteorder", - "core-foundation 0.6.4", - "core-graphics 0.17.3", + "core-foundation 0.7.0", + "core-graphics 0.19.0", "derive_more", "euclid", "malloc_size_of_derive", @@ -6420,9 +6440,10 @@ dependencies = [ [[package]] name = "webrender_build" version = "0.0.1" -source = "git+https://github.com/servo/webrender#4ba17a61580a03b68881ffba7ee22bcf8e1aac72" +source = "git+https://github.com/servo/webrender#01082a9091ab98c392af8934d04271eb1dd546df" dependencies = [ - "sha2", + "bitflags", + "lazy_static", ] [[package]] @@ -6597,7 +6618,7 @@ dependencies = [ [[package]] name = "wr_malloc_size_of" version = "0.0.1" -source = "git+https://github.com/servo/webrender#4ba17a61580a03b68881ffba7ee22bcf8e1aac72" +source = "git+https://github.com/servo/webrender#01082a9091ab98c392af8934d04271eb1dd546df" dependencies = [ "app_units", "euclid", diff --git a/components/canvas/Cargo.toml b/components/canvas/Cargo.toml index c3dac83a4a3..607ac99c501 100644 --- a/components/canvas/Cargo.toml +++ b/components/canvas/Cargo.toml @@ -25,7 +25,7 @@ cssparser = "0.27" embedder_traits = {path = "../embedder_traits"} euclid = "0.20" fnv = "1.0" -gleam = "0.9" +gleam = "0.11" half = "1" ipc-channel = "0.14" log = "0.4" diff --git a/components/compositing/Cargo.toml b/components/compositing/Cargo.toml index 50f1d6f8456..c3b5861eeca 100644 --- a/components/compositing/Cargo.toml +++ b/components/compositing/Cargo.toml @@ -21,7 +21,7 @@ crossbeam-channel = "0.4" embedder_traits = {path = "../embedder_traits"} euclid = "0.20" gfx_traits = {path = "../gfx_traits"} -gleam = {version = "0.9", optional = true} +gleam = {version = "0.11", optional = true} image = "0.23" ipc-channel = "0.14" libc = "0.2" diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml index bc7507fd87b..35e6abde759 100644 --- a/components/gfx/Cargo.toml +++ b/components/gfx/Cargo.toml @@ -43,9 +43,9 @@ ucd = "0.1.1" [target.'cfg(target_os = "macos")'.dependencies] byteorder = "1.0" -core-foundation = "0.6" -core-graphics = "0.17" -core-text = "13.0" +core-foundation = "0.7" +core-graphics = "0.19" +core-text = "15.0" [target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies] freetype = "0.4" diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs index e4d20d48de7..3efb254cd32 100644 --- a/components/layout/display_list/builder.rs +++ b/components/layout/display_list/builder.rs @@ -70,7 +70,7 @@ use style_traits::ToCss; use webrender_api::units::{LayoutRect, LayoutTransform, LayoutVector2D}; use webrender_api::{self, BorderDetails, BorderRadius, BorderSide, BoxShadowClipMode, ColorF}; use webrender_api::{ColorU, ExternalScrollId, FilterOp, GlyphInstance, ImageRendering, LineStyle}; -use webrender_api::{NinePatchBorder, NinePatchBorderSource, NormalBorder}; +use webrender_api::{NinePatchBorder, NinePatchBorderSource, NormalBorder, PropertyBinding}; use webrender_api::{ScrollSensitivity, StickyOffsetBounds}; static THREAD_TINT_COLORS: [ColorF; 8] = [ @@ -721,8 +721,9 @@ impl Fragment { state.add_display_item(DisplayItem::Rectangle(CommonDisplayItem::new( base, webrender_api::RectangleDisplayItem { - color: background_color.to_layout(), + color: PropertyBinding::Value(background_color.to_layout()), common: items::empty_common_item_properties(), + bounds: bounds.to_layout(), }, ))); }); @@ -1468,7 +1469,8 @@ impl Fragment { base, webrender_api::RectangleDisplayItem { common: items::empty_common_item_properties(), - color: background_color.to_layout(), + color: PropertyBinding::Value(background_color.to_layout()), + bounds: stacking_relative_border_box.to_layout(), }, ))); } @@ -1514,7 +1516,8 @@ impl Fragment { base, webrender_api::RectangleDisplayItem { common: items::empty_common_item_properties(), - color: self.style().get_inherited_text().color.to_layout(), + color: PropertyBinding::Value(self.style().get_inherited_text().color.to_layout()), + bounds: insertion_point_bounds.to_layout(), }, ))); } @@ -1697,7 +1700,8 @@ impl Fragment { base, webrender_api::RectangleDisplayItem { common: items::empty_common_item_properties(), - color: ColorF::TRANSPARENT, + color: PropertyBinding::Value(ColorF::TRANSPARENT), + bounds: content_size.to_layout(), }, ))); } diff --git a/components/layout/display_list/items.rs b/components/layout/display_list/items.rs index 62924fa6c2f..58ec79cb0fa 100644 --- a/components/layout/display_list/items.rs +++ b/components/layout/display_list/items.rs @@ -455,7 +455,6 @@ 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, } } diff --git a/components/layout/display_list/mod.rs b/components/layout/display_list/mod.rs index 257d9eb6ddc..0ac0f81e7ee 100644 --- a/components/layout/display_list/mod.rs +++ b/components/layout/display_list/mod.rs @@ -12,7 +12,7 @@ pub use self::conversions::ToLayout; mod background; mod border; mod builder; -mod conversions; +pub(crate) mod conversions; mod gradient; pub mod items; mod webrender_helpers; diff --git a/components/layout/display_list/webrender_helpers.rs b/components/layout/display_list/webrender_helpers.rs index cc0e70a77ec..de6ffc0e4fe 100644 --- a/components/layout/display_list/webrender_helpers.rs +++ b/components/layout/display_list/webrender_helpers.rs @@ -277,7 +277,6 @@ impl DisplayItem { }, item_rect, node.clip.complex.clone(), - None, ); state.spatial_ids[item.node_index.to_index()] = Some(parent_spatial_id); @@ -293,7 +292,6 @@ impl DisplayItem { node.content_rect, node.clip.main, node.clip.complex.clone(), - None, scroll_sensitivity, webrender_api::units::LayoutVector2D::zero(), ); @@ -341,6 +339,5 @@ fn build_common_item_properties( // TODO(gw): Make use of the WR backface visibility functionality. flags: PrimitiveFlags::default(), hit_info: tag, - item_key: None, } } diff --git a/components/layout/sequential.rs b/components/layout/sequential.rs index 8a113f39bb0..59df7de2bbf 100644 --- a/components/layout/sequential.rs +++ b/components/layout/sequential.rs @@ -5,6 +5,7 @@ //! Implements sequential traversals over the DOM and flow trees. use crate::context::LayoutContext; +use crate::display_list::conversions::ToLayout; use crate::display_list::items::{self, CommonDisplayItem, DisplayItem, DisplayListSection}; use crate::display_list::{DisplayListBuildState, StackingContextCollectionState}; use crate::floats::SpeculatedFloatPlacement; @@ -19,6 +20,7 @@ use euclid::default::{Point2D, Rect, Size2D, Vector2D}; use servo_config::opts; use style::servo::restyle_damage::ServoRestyleDamage; use webrender_api::units::LayoutPoint; +use webrender_api::PropertyBinding; pub fn resolve_generated_content(root: &mut dyn Flow, layout_context: &LayoutContext) { ResolveGeneratedContent::new(&layout_context).traverse(root, 0); @@ -83,8 +85,9 @@ pub fn build_display_list_for_subtree<'a>( // Create a base rectangle for the page background based on the root // background color. + let bounds = Rect::new(Point2D::new(Au::new(0), Au::new(0)), client_size); let base = state.create_base_display_item( - Rect::new(Point2D::new(Au::new(0), Au::new(0)), client_size), + bounds, flow_root.as_block().fragment.node, None, DisplayListSection::BackgroundAndBorders, @@ -92,8 +95,9 @@ pub fn build_display_list_for_subtree<'a>( state.add_display_item(DisplayItem::Rectangle(CommonDisplayItem::new( base, webrender_api::RectangleDisplayItem { - color: background_color, + color: PropertyBinding::Value(background_color), common: items::empty_common_item_properties(), + bounds: bounds.to_layout(), }, ))); diff --git a/components/layout_2020/display_list/mod.rs b/components/layout_2020/display_list/mod.rs index af0797d30b6..c39387fbdaf 100644 --- a/components/layout_2020/display_list/mod.rs +++ b/components/layout_2020/display_list/mod.rs @@ -341,8 +341,8 @@ impl<'a> BuilderForBoxFragment<'a> { // “The background color is clipped according to the background-clip // value associated with the bottom-most background image layer.” let layer_index = b.background_image.0.len() - 1; - let (_, common) = background::painting_area(self, builder, layer_index); - builder.wr.push_rect(&common, rgba(background_color)) + let (bounds, common) = background::painting_area(self, builder, layer_index); + builder.wr.push_rect(&common, bounds, rgba(background_color)) } // Reverse because the property is top layer first, we want to paint bottom layer first. for (index, image) in b.background_image.0.iter().enumerate().rev() { @@ -595,7 +595,6 @@ fn clip_for_radii( radii, mode: wr::ClipMode::Clip, }), - None, )) } } diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index ca933bb848c..daa5015abc6 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -54,7 +54,7 @@ embedder_traits = {path = "../embedder_traits"} env_logger = "0.7" euclid = "0.20" gfx = {path = "../gfx"} -gleam = "0.9" +gleam = "0.11" ipc-channel = "0.14" keyboard-types = "0.4" layout_thread_2013 = {path = "../layout_thread", optional = true} diff --git a/components/servo/lib.rs b/components/servo/lib.rs index 15dd2e669dc..1d362fb2fa4 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -400,14 +400,6 @@ where let viewport_size = coordinates.viewport.size.to_f32() / device_pixel_ratio; let (mut webrender, webrender_api_sender) = { - let recorder = if opts.webrender_record { - let record_path = PathBuf::from("wr-record.bin"); - let recorder = Box::new(webrender::BinaryRecorder::new(&record_path)); - Some(recorder as Box) - } else { - None - }; - let mut debug_flags = webrender::DebugFlags::empty(); debug_flags.set(webrender::DebugFlags::PROFILER_DBG, opts.webrender_stats); @@ -424,7 +416,6 @@ where resource_override_path: opts.shaders_dir.clone(), enable_aa: opts.enable_text_antialiasing, debug_flags: debug_flags, - recorder: recorder, precache_flags: if opts.precache_shaders { ShaderPrecacheFlags::FULL_COMPILE } else { diff --git a/components/webgpu/Cargo.toml b/components/webgpu/Cargo.toml index 2de49927ad3..23944e6eb8e 100644 --- a/components/webgpu/Cargo.toml +++ b/components/webgpu/Cargo.toml @@ -17,5 +17,5 @@ log = "0.4" malloc_size_of = { path = "../malloc_size_of" } serde = "1.0" servo_config = {path = "../config"} -smallvec = "0.6" +smallvec = { version = "0.6", features = ["serde"] } wgpu-core = { version = "0.1.0", git = "https://github.com/gfx-rs/wgpu", features = ["serde"] } diff --git a/tests/wpt/metadata/css/css-images/gradient-move-stops.html.ini b/tests/wpt/metadata/css/css-images/gradient-move-stops.html.ini deleted file mode 100644 index 701b8cb4e4c..00000000000 --- a/tests/wpt/metadata/css/css-images/gradient-move-stops.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[gradient-move-stops.html] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-transform-translatez.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-transform-translatez.html.ini new file mode 100644 index 00000000000..068320fb597 --- /dev/null +++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-transform-translatez.html.ini @@ -0,0 +1,2 @@ +[fieldset-transform-translatez.html] + expected: FAIL