From 8fe6dfb097f408dcbcdcadc0baec545374bee1a2 Mon Sep 17 00:00:00 2001 From: Nico Burns Date: Wed, 24 Jul 2024 10:38:06 +1200 Subject: [PATCH] Remove unused imports from the blitz crate --- packages/blitz/Cargo.toml | 26 +---------------------- packages/blitz/src/renderer/render.rs | 30 +++++++++++---------------- 2 files changed, 13 insertions(+), 43 deletions(-) diff --git a/packages/blitz/Cargo.toml b/packages/blitz/Cargo.toml index c1fb7f60..9d487700 100644 --- a/packages/blitz/Cargo.toml +++ b/packages/blitz/Cargo.toml @@ -8,36 +8,12 @@ default = ["tracing"] tracing = ["dep:tracing"] [dependencies] -slab = "0.4.9" +blitz-dom = { path = "../dom" } style = { workspace = true, features = ["servo"] } -euclid = { version = "0.22", features = ["serde"] } -selectors = { workspace = true } taffy = { workspace = true } parley = { workspace = true } -tokio = { workspace = true, features = ["full"] } tracing = { workspace = true, optional = true } vello = { workspace = true } wgpu = { workspace = true } - -app_units = "0.7.3" -atomic_refcell = { version = "0.1.13", features = ["serde"] } -fxhash = "0.2.1" -html5ever = { workspace = true } -string_cache = "0.8.7" -futures-util = "0.3.29" raw-window-handle = "0.6.0" -blitz-dom = { path = "../dom" } image = "0.25" - -# futures-util = "0.3.29" -# raw-window-handle = "0.5.0" -# guts pulled from blitz -# we'll need to make these more compatible with servo -# lightningcss = "1.0.0-alpha.39" -# cssparser = "0.33.0" -# tao = "0.24.0" -# glazier = { git = "https://github.com/linebender/glazier/" } -# style = { git = "https://github.com/servo/servo.git", features = ["servo"] } - -[dev-dependencies] -webbrowser = "0.8.12" diff --git a/packages/blitz/src/renderer/render.rs b/packages/blitz/src/renderer/render.rs index 73eef52a..625b78ad 100644 --- a/packages/blitz/src/renderer/render.rs +++ b/packages/blitz/src/renderer/render.rs @@ -1,25 +1,15 @@ use std::sync::Arc; +use super::multicolor_rounded_rect::{Edge, ElementFrame}; use crate::{ devtools::Devtools, util::{GradientSlice, StyloGradient, ToVelloColor}, }; -use blitz_dom::{ - node::{NodeData, TextNodeData}, - Node, -}; -use blitz_dom::{ - node::{TextBrush, TextInputData}, - Document, -}; -use html5ever::local_name; -use image::{imageops::FilterType, DynamicImage}; -use parley::layout::PositionedLayoutItem; +use blitz_dom::node::{NodeData, TextBrush, TextInputData, TextNodeData}; +use blitz_dom::{local_name, Document, Node}; + use style::{ dom::TElement, - values::{generics::image::GradientFlags, specified::position::HorizontalPositionKeyword}, -}; -use style::{ properties::generated::longhands::visibility::computed_value::T as StyloVisibility, properties::{style_structs::Outline, ComputedValues}, values::{ @@ -28,14 +18,20 @@ use style::{ }, generics::{ color::Color as StyloColor, - image::{EndingShape, GenericGradient, GenericGradientItem, GenericImage}, + image::{ + EndingShape, GenericGradient, GenericGradientItem, GenericImage, GradientFlags, + }, position::GenericPosition, NonNegative, }, - specified::{position::VerticalPositionKeyword, BorderStyle, OutlineStyle}, + specified::position::{HorizontalPositionKeyword, VerticalPositionKeyword}, + specified::{BorderStyle, OutlineStyle}, }, OwnedSlice, }; + +use image::{imageops::FilterType, DynamicImage}; +use parley::layout::PositionedLayoutItem; use taffy::prelude::Layout; use vello::{ kurbo::{Affine, Point, Rect, Shape, Stroke, Vec2}, @@ -43,8 +39,6 @@ use vello::{ Scene, }; -use super::multicolor_rounded_rect::{Edge, ElementFrame}; - /// Draw the current tree to current render surface /// Eventually we'll want the surface itself to be passed into the render function, along with things like the viewport ///