servo/Cargo.toml
coding-joedow 94a662193e Layout: begin support incremental box tree update
Currently, we just rebuild boxes for all nodes from the update point
downward, and the unique valid candidates as update point is just the
absolutely positioned ancestor of the style recalc dirty dom root node.
It is quite crude way for incremental box tree update and incremental
layout, because it will lead to a lot of boxes to be rebuilt even though
their originating nodes have no style change, i.e. only some child nodes
are newly added or removed. Meanwhile, all cached fragments need to be
invalidated from the update point downward, even though there is no any
change of the layout constraits and containing block for some of those
rebuilt boxes.

To preserve more boxes and cached fragments as much as possible, this PR
try to rebuild those boxes whose originating node has `REBUILD_BOX`
restyle damage and try to repair those boxes whose originating node has
`REPAIR_BOX` damage. It is a relative big task. To implement it step by
step, this PR only repair and reuse the block level boxes. In the future,
the others kind of boxes will be repaired or reused.

Signed-off-by: coding-joedow <ibluegalaxy_taoj@163.com>
2025-06-03 10:45:12 +08:00

251 lines
8.3 KiB
TOML

[workspace]
resolver = "2"
members = [
"ports/servoshell",
"tests/unit/*",
]
default-members = ["ports/servoshell"]
exclude = [".cargo", "support/crown"]
[workspace.package]
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2024"
publish = false
rust-version = "1.85.0"
[workspace.dependencies]
accountable-refcell = "0.2.2"
aes = "0.8.4"
aes-gcm = "0.10.3"
aes-kw = { version = "0.2.1", features = ["alloc"] }
app_units = "0.7"
arboard = "3"
arrayvec = "0.7"
async-tungstenite = { version = "0.28", features = ["tokio-rustls-webpki-roots"] }
atomic_refcell = "0.1.13"
aws-lc-rs = { version = "1.13", default-features = false, features = ["aws-lc-sys"] }
background_hang_monitor_api = { path = "components/shared/background_hang_monitor" }
backtrace = "0.3"
base = { path = "components/shared/base" }
base64 = "0.22.1"
bincode = "1"
bitflags = "2.9"
bluetooth_traits = { path = "components/shared/bluetooth" }
byteorder = "1.5"
canvas_traits = { path = "components/shared/canvas" }
cbc = "0.1.2"
cfg-if = "1.0.0"
chrono = { version = "0.4", features = ["serde"] }
cipher = { version = "0.4.4", features = ["alloc"] }
compositing_traits = { path = "components/shared/compositing" }
constellation_traits = { path = "components/shared/constellation" }
content-security-policy = { git = "https://github.com/servo/rust-content-security-policy/", branch = "servo-csp", features = ["serde"] }
cookie = { package = "cookie", version = "0.18" }
crossbeam-channel = "0.5"
cssparser = { version = "0.35", features = ["serde"] }
ctr = "0.9.2"
darling = { version = "0.20", default-features = false }
data-url = "0.3"
devtools_traits = { path = "components/shared/devtools" }
dpi = "0.1"
embedder_traits = { path = "components/shared/embedder" }
encoding_rs = "0.8"
env_logger = "0.11"
euclid = "0.22"
fnv = "1.0"
fonts_traits = { path = "components/shared/fonts" }
freetype-sys = "0.20"
fxhash = "0.2"
getopts = "0.2.11"
gleam = "0.15"
glib = "0.19"
glow = "0.16"
gstreamer = { version = "0.23", features = ["v1_18"] }
gstreamer-base = "0.23"
gstreamer-gl = "0.23"
gstreamer-gl-sys = "0.23"
gstreamer-sys = "0.23"
gstreamer-video = "0.23"
harfbuzz-sys = "0.6.1"
headers = "0.4"
hitrace = "0.1.5"
html5ever = "0.31"
http = "1.3"
http-body-util = "0.1"
hyper = "1.6"
hyper-rustls = { version = "0.27", default-features = false, features = ["http1", "http2", "logging", "tls12", "webpki-tokio"] }
hyper-util = { version = "0.1", features = ["client", "client-legacy", "http2", "tokio"] }
hyper_serde = { path = "components/hyper_serde" }
icu_locid = "1.5.0"
icu_segmenter = "1.5.0"
image = "0.24"
imsz = "0.2"
indexmap = { version = "2.9.0", features = ["std"] }
ipc-channel = "0.19"
itertools = "0.14"
js = { package = "mozjs", git = "https://github.com/servo/mozjs" }
keyboard-types = "0.7"
libc = "0.2"
log = "0.4"
mach2 = "0.4"
malloc_size_of = { package = "servo_malloc_size_of", path = "components/malloc_size_of" }
malloc_size_of_derive = "0.1"
markup5ever = "0.16.1"
memmap2 = "0.9.5"
mime = "0.3.13"
mime_guess = "2.0.5"
mozangle = "0.5.3"
net_traits = { path = "components/shared/net" }
nix = "0.29"
num-traits = "0.2"
num_cpus = "1.17.0"
openxr = "0.19"
parking_lot = "0.12"
percent-encoding = "2.3"
proc-macro2 = "1"
profile_traits = { path = "components/shared/profile" }
quote = "1"
rand = "0.8"
rand_core = "0.6"
rand_isaac = "0.3"
raw-window-handle = "0.6"
rayon = "1"
regex = "1.11"
resvg = "0.45.0"
rustls = { version = "0.23", default-features = false, features = ["logging", "std", "tls12"] }
rustls-pemfile = "2.0"
rustls-pki-types = "1.12"
script_layout_interface = { path = "components/shared/script_layout" }
script_traits = { path = "components/shared/script" }
selectors = { git = "https://github.com/coding-joedow/stylo", branch = "main" }
serde = "1.0.219"
serde_bytes = "0.11"
serde_json = "1.0"
servo-media = { git = "https://github.com/servo/media" }
servo-media-dummy = { git = "https://github.com/servo/media" }
servo-media-gstreamer = { git = "https://github.com/servo/media" }
servo-tracing = { path = "components/servo_tracing" }
servo_arc = { git = "https://github.com/coding-joedow/stylo", branch = "main" }
smallbitvec = "2.6.0"
smallvec = "1.15"
snapshot = { path = "./components/shared/snapshot" }
static_assertions = "1.1"
string_cache = "0.8"
string_cache_codegen = "0.5"
strum = "0.26"
strum_macros = "0.26"
stylo = { git = "https://github.com/coding-joedow/stylo", branch = "main" }
stylo_atoms = { git = "https://github.com/coding-joedow/stylo", branch = "main" }
stylo_config = { git = "https://github.com/coding-joedow/stylo", branch = "main" }
stylo_dom = { git = "https://github.com/coding-joedow/stylo", branch = "main" }
stylo_malloc_size_of = { git = "https://github.com/coding-joedow/stylo", branch = "main" }
stylo_traits = { git = "https://github.com/coding-joedow/stylo", branch = "main" }
surfman = { git = "https://github.com/servo/surfman", rev = "f7688b4585f9e0b5d4bf8ee8e4a91e82349610b1", features = ["chains"] }
syn = { version = "2", default-features = false, features = ["clone-impls", "derive", "parsing"] }
synstructure = "0.13"
taffy = { version = "0.7.7", default-features = false, features = ["detailed_layout_info", "grid", "serde", "std"] }
thin-vec = "0.2.14"
tikv-jemalloc-sys = "0.6.0"
tikv-jemallocator = "0.6.0"
time = { package = "time", version = "0.3", features = ["large-dates", "local-offset", "serde"] }
tokio = "1"
tokio-rustls = { version = "0.26", default-features = false, features = ["logging"] }
tower-service = "0.3"
tracing = "0.1.41"
tracing-perfetto = "0.1.5"
tracing-subscriber = "0.3.19"
tungstenite = "0.24"
uluru = "3.0"
unicode-bidi = "0.3.18"
unicode-properties = { version = "0.1.3", features = ["emoji"] }
unicode-script = "0.5"
unicode-segmentation = "1.12.0"
url = "2.5"
urlpattern = "0.3"
uuid = { version = "1.12.1", features = ["v4"] }
webdriver = "0.53.0"
webgpu_traits = { path = "components/shared/webgpu" }
webpki-roots = "0.26"
webrender = { git = "https://github.com/servo/webrender", branch = "0.67", features = ["capture"] }
webrender_api = { git = "https://github.com/servo/webrender", branch = "0.67" }
webxr-api = { path = "components/shared/webxr" }
wgpu-core = "25"
wgpu-types = "25"
winapi = "0.3"
windows-sys = "0.59"
wio = "0.2"
wr_malloc_size_of = { git = "https://github.com/servo/webrender", branch = "0.67" }
xi-unicode = "0.3.0"
xml5ever = "0.22"
[profile.release]
opt-level = 3
debug-assertions = true
# A profile between `dev` and `release` which aims to offer a compromise between
# fast incremental rebuilds and runtime speed.
[profile.medium]
inherits = "release"
opt-level = 2
incremental = true
debug = "line-tables-only"
[profile.production]
inherits = "release"
debug-assertions = false
lto = true
codegen-units = 1
opt-level = "s"
[profile.production-stripped]
inherits = "production"
strip = true
[profile.profiling]
inherits = "release"
debug-assertions = false
debug = true
lto = "thin"
codegen-units = 1
[patch.crates-io]
# If you need to temporarily test Servo with a local fork of some upstream
# crate, add that here. Use the form:
#
# <crate> = { path = "/path/to/local/checkout" }
#
# For html5ever:
#
# html5ever = { path = "../html5ever/html5ever" }
# markup5ever = { path = "../html5ever/markup5ever" }
# xml5ever = { path = "../html5ever/xml5ever" }
#
# Or for Stylo:
#
# [patch."https://github.com/servo/stylo"]
# selectors = { path = "../stylo/selectors" }
# servo_arc = { path = "../stylo/servo_arc" }
# stylo = { path = "../stylo/style" }
# stylo_atoms = { path = "../stylo/stylo_atoms" }
# stylo_config = { path = "../stylo/stylo_config" }
# stylo_dom = { path = "../stylo/stylo_dom" }
# stylo_malloc_size_of = { path = "../stylo/malloc_size_of" }
# stylo_traits = { path = "../stylo/style_traits" }
#
# Or for WebRender:
#
# [patch."https://github.com/servo/webrender"]
# webrender = { path = "../webrender/webrender" }
# webrender_api = { path = "../webrender/webrender_api" }
# wr_malloc_size_of = { path = "../webrender/wr_malloc_size_of" }
#
# Or for another Git dependency:
#
# [patch."https://github.com/servo/<repository>"]
# <crate> = { path = "/path/to/local/checkout" }
#
# [patch."https://github.com/servo/rust-content-security-policy"]
# content-security-policy = { path = "../rust-content-security-policy/" }
# content-security-policy = { git = "https://github.com/timvdlippe/rust-content-security-policy/", branch = "fix-report-checks", features = ["serde"] }