servo/components/script_bindings/Cargo.toml
Martin Robinson 0346a62214
script: Pass more information to the MouseEvent constructor (#37672)
- Instead of eagerly computing `pageX` and `pageY`, collect the offset
  from the content's initial containing block in the compositor and pass
  that information through to `MouseEvent`. This prevents a layout flush
  that was happening when eagerly trying to fetch `Document` scroll
  offsets.
- Pass keyboard modifiers properly to `MouseEvent`.
- Now all this information is stored and passed as `Point2D` (typed) and
  `Modifiers` which greatly reduces the amount of arguments that need to
  be passed around.

Testing: It is difficult to test input events as they require WebDriver
which
isn't completely working yet. I have manually run Speedometer 2.1 and I
have
verified that this fixes the regression from #37601.
Fixes: #37601.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-06-25 12:29:27 +00:00

63 lines
1.7 KiB
TOML

[package]
name = "script_bindings"
build = "build.rs"
version.workspace = true
authors.workspace = true
license.workspace = true
edition.workspace = true
publish.workspace = true
rust-version.workspace = true
# https://github.com/rust-lang/cargo/issues/3544
links = "script_bindings_crate"
[lib]
name = "script_bindings"
path = "lib.rs"
[dependencies]
bitflags = { workspace = true }
crossbeam-channel = { workspace = true }
cssparser = { workspace = true }
deny_public_fields = { path = "../deny_public_fields" }
dom_struct = { path = "../dom_struct" }
domobject_derive = { path = "../domobject_derive" }
html5ever = { workspace = true }
indexmap = { workspace = true }
js = { workspace = true }
jstraceable_derive = { path = "../jstraceable_derive" }
libc = { workspace = true }
log = { workspace = true }
keyboard-types = { workspace = true }
malloc_size_of = { workspace = true }
malloc_size_of_derive = { workspace = true }
num-traits = { workspace = true }
parking_lot = { workspace = true }
phf = "0.11"
regex = { workspace = true }
servo_arc = { workspace = true }
servo_config = { path = "../config" }
servo_url = { path = "../url" }
smallvec = { workspace = true }
stylo = { workspace = true }
stylo_atoms = { workspace = true }
tendril = { version = "0.4.1", features = ["encoding_rs"] }
tracing = { workspace = true, optional = true }
webxr-api = { workspace = true, optional = true }
xml5ever = { workspace = true }
[build-dependencies]
phf_codegen = "0.11"
phf_shared = "0.11"
serde_json = { workspace = true }
[features]
bluetooth = []
testbinding = []
tracing = ["dep:tracing"]
webgpu = []
webxr = ["webxr-api"]
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(crown)'] }
unsafe_op_in_unsafe_fn = { level = "allow" }