mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-30 00:28:44 +08:00
682 lines
30 KiB
Diff
682 lines
30 KiB
Diff
diff --git a/Cargo.toml b/Cargo.toml
|
|
index 8589f4c8078..2773d79f447 100644
|
|
--- a/Cargo.toml
|
|
+++ b/Cargo.toml
|
|
@@ -31,7 +31,7 @@ arboard = "3"
|
|
arrayvec = "0.7"
|
|
async-tungstenite = { version = "0.29", features = ["tokio-rustls-webpki-roots"] }
|
|
atomic_refcell = "0.1.13"
|
|
-aws-lc-rs = { version = "1.14", default-features = false, features = ["aws-lc-sys"] }
|
|
+aws-lc-rs = { version = "=1.13.3", 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" }
|
|
@@ -86,7 +86,7 @@ icu_segmenter = "1.5.0"
|
|
image = { version = "0.25", default-features = false, features = ["avif", "rayon", "bmp", "gif", "ico", "jpeg", "png", "webp"] }
|
|
imsz = "0.2"
|
|
indexmap = { version = "2.11.4", features = ["std"] }
|
|
-ipc-channel = "0.20.2"
|
|
+ipc-channel = { version = "0.20.2", features = ["force-inprocess"] }
|
|
itertools = "0.14"
|
|
js = { package = "mozjs", git = "https://github.com/servo/mozjs" }
|
|
keyboard-types = { version = "0.8.3", features = ["serde", "webdriver"] }
|
|
@@ -148,7 +148,7 @@ stylo_config = { git = "https://github.com/servo/stylo", branch = "2025-10-01" }
|
|
stylo_dom = { git = "https://github.com/servo/stylo", branch = "2025-10-01" }
|
|
stylo_malloc_size_of = { git = "https://github.com/servo/stylo", branch = "2025-10-01" }
|
|
stylo_traits = { git = "https://github.com/servo/stylo", branch = "2025-10-01" }
|
|
-surfman = { version = "0.10.0", features = ["chains"] }
|
|
+surfman = { git = "https://github.com/willnode/surfman", branch = "redox-orbital", features = ["chains"] }
|
|
syn = { version = "2", default-features = false, features = ["clone-impls", "derive", "parsing"] }
|
|
synstructure = "0.13"
|
|
taffy = { version = "0.9", default-features = false, features = ["calc", "detailed_layout_info", "grid", "std"] }
|
|
@@ -174,16 +174,16 @@ vello_cpu = { git = "https://github.com/linebender/vello", rev = "fdf025a88dd00c
|
|
webdriver = "0.53.0"
|
|
webgpu_traits = { path = "components/shared/webgpu" }
|
|
webpki-roots = "1.0"
|
|
-webrender = { git = "https://github.com/servo/webrender", branch = "0.68", features = ["capture"] }
|
|
-webrender_api = { git = "https://github.com/servo/webrender", branch = "0.68" }
|
|
+webrender = { git = "https://github.com/willnode/webrender.git", branch = "0.68-redox", features = ["capture"] }
|
|
+webrender_api = { git = "https://github.com/willnode/webrender.git", branch = "0.68-redox" }
|
|
webxr-api = { path = "components/shared/webxr" }
|
|
wgpu-core = "26"
|
|
wgpu-types = "26"
|
|
winapi = "0.3"
|
|
windows-sys = "0.61"
|
|
-winit = "0.30.12"
|
|
+winit = { version = "0.30.12", default-features = false }
|
|
wio = "0.2"
|
|
-wr_malloc_size_of = { git = "https://github.com/servo/webrender", branch = "0.68" }
|
|
+wr_malloc_size_of = { git = "https://github.com/willnode/webrender.git", branch = "0.68-redox" }
|
|
xi-unicode = "0.3.0"
|
|
xml5ever = "0.35"
|
|
xpath = { path = "components/xpath" }
|
|
@@ -232,6 +232,20 @@ lto = "thin"
|
|
codegen-units = 1
|
|
|
|
[patch.crates-io]
|
|
+# requires socketpair SOCK_SEQPACKET to support multiprocess (try remove force-inprocess feature)
|
|
+ipc-channel = { git = "https://github.com/willnode/ipc-channel.git", branch="redox" }
|
|
+orbclient = { git = "https://gitlab.redox-os.org/redox-os/orbclient" }
|
|
+#servo_malloc_size_of = { path = "./components/malloc_size_of" }
|
|
+tikv-jemalloc-sys = { version = "0.6.0", git = "https://gitlab.redox-os.org/njskalski/jemallocator.git", branch = "redox_mods" }
|
|
+tikv-jemallocator = { version = "0.6.0", git = "https://gitlab.redox-os.org/njskalski/jemallocator.git", branch = "redox_mods" }
|
|
+mozangle = { git = "https://gitlab.redox-os.org/willnode/mozangle.git", branch = "redox_mods"}
|
|
+aws-lc-rs = { git = "https://gitlab.redox-os.org/njskalski/aws-lc-rs.git", branch = "redox_mods" }
|
|
+# mozjs_sys = { git = "https://gitlab.redox-os.org/njskalski/mozjs.git", rev = "e2ee9c77148c3af4f11fdff9a2cbd7e449d48d33"}
|
|
+# mozjs = { git = "https://gitlab.redox-os.org/njskalski/mozjs.git", branch = "redox_mods"}
|
|
+# x11rb = { git = "https://gitlab.redox-os.org/njskalski/x11rb.git", branch = "redox_mods"}
|
|
+libz-sys = { git = "https://github.com/willnode/libz-sys.git", branch = "servo"}
|
|
+# winit = { git = "https://gitlab.redox-os.org/njskalski/winit.git", branch = "redox_mods2"}
|
|
+# freetype-sys = { git = "https://github.com/PistonDevelopers/freetype-sys.git", branch = "master" }
|
|
# If you need to temporarily test Servo with a local fork of some upstream
|
|
# crate, add that here. Use the form:
|
|
#
|
|
@@ -260,7 +274,7 @@ codegen-units = 1
|
|
#
|
|
# [patch."https://github.com/servo/webrender"]
|
|
# webrender = { path = "../webrender/webrender" }
|
|
-# webrender_api = { path = "../webrender/webrender_api" }
|
|
+# webrender_api = { git = "https://github.com/willnode/webrender.git", branch = "0.68-redox" } = { path = "../webrender/webrender_api = { git = "https://github.com/willnode/webrender.git", branch = "0.68-redox" }" }
|
|
# wr_malloc_size_of = { path = "../webrender/wr_malloc_size_of" }
|
|
#
|
|
# Or for another Git dependency:
|
|
diff --git a/components/background_hang_monitor/Cargo.toml b/components/background_hang_monitor/Cargo.toml
|
|
index f08648d3eb9..a6272f8ffb5 100644
|
|
--- a/components/background_hang_monitor/Cargo.toml
|
|
+++ b/components/background_hang_monitor/Cargo.toml
|
|
@@ -18,7 +18,7 @@ background_hang_monitor_api = { workspace = true }
|
|
backtrace = { workspace = true }
|
|
base = { workspace = true }
|
|
crossbeam-channel = { workspace = true }
|
|
-ipc-channel = { workspace = true }
|
|
+ipc-channel = { workspace = true, features = ["force-inprocess"] }
|
|
libc = { workspace = true }
|
|
log = { workspace = true }
|
|
rustc-demangle = { version = "0.1", optional = true }
|
|
diff --git a/components/constellation/Cargo.toml b/components/constellation/Cargo.toml
|
|
index 5974dd08eea..74e43604b00 100644
|
|
--- a/components/constellation/Cargo.toml
|
|
+++ b/components/constellation/Cargo.toml
|
|
@@ -67,4 +67,4 @@ webrender_api = { workspace = true }
|
|
webxr-api = { workspace = true, features = ["ipc"] }
|
|
|
|
[target.'cfg(any(target_os="macos", all(not(target_os = "windows"), not(target_os = "ios"), not(target_os="android"), not(target_env="ohos"), not(target_arch="arm"), not(target_arch="aarch64"))))'.dependencies]
|
|
-gaol = "0.2.1"
|
|
+gaol = { git = "https://github.com/willnode/gaol.git", branch = "redox" }
|
|
diff --git a/components/constellation/sandboxing.rs b/components/constellation/sandboxing.rs
|
|
index 02a6f4ed6f6..e88b3bd6ee1 100644
|
|
--- a/components/constellation/sandboxing.rs
|
|
+++ b/components/constellation/sandboxing.rs
|
|
@@ -99,7 +99,7 @@ pub fn content_process_sandbox_profile() -> Profile {
|
|
not(target_os = "android"),
|
|
not(target_env = "ohos"),
|
|
not(target_arch = "arm"),
|
|
- not(target_arch = "aarch64")
|
|
+ not(target_arch = "aarch64"),
|
|
))]
|
|
pub fn content_process_sandbox_profile() -> Profile {
|
|
use std::path::PathBuf;
|
|
@@ -175,7 +175,7 @@ pub fn spawn_multiprocess(content: UnprivilegedContent) -> Result<Process, Error
|
|
not(target_os = "android"),
|
|
not(target_env = "ohos"),
|
|
not(target_arch = "arm"),
|
|
- not(target_arch = "aarch64")
|
|
+ not(target_arch = "aarch64"),
|
|
))]
|
|
pub fn spawn_multiprocess(content: UnprivilegedContent) -> Result<Process, Error> {
|
|
use gaol::sandbox::{self, Sandbox, SandboxMethods};
|
|
diff --git a/components/fonts/Cargo.toml b/components/fonts/Cargo.toml
|
|
index a22f053f133..3ce1e22b76e 100644
|
|
--- a/components/fonts/Cargo.toml
|
|
+++ b/components/fonts/Cargo.toml
|
|
@@ -61,11 +61,11 @@ core-foundation = "0.9"
|
|
core-graphics = "0.23"
|
|
core-text = "20.1"
|
|
|
|
-[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
|
|
+[target.'cfg(any(target_os = "linux", target_os = "android", target_os = "redox"))'.dependencies]
|
|
freetype-sys = { workspace = true }
|
|
servo_allocator = { path = "../allocator" }
|
|
|
|
-[target.'cfg(all(target_os = "linux", not(target_env = "ohos")))'.dependencies]
|
|
+[target.'cfg(all(any(target_os = "linux", target_os = "redox"), not(target_env = "ohos")))'.dependencies]
|
|
fontconfig_sys = { package = "yeslogic-fontconfig-sys", version = "6" }
|
|
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
|
diff --git a/components/fonts/font.rs b/components/fonts/font.rs
|
|
index 12bde2769de..d76b3626ef5 100644
|
|
--- a/components/fonts/font.rs
|
|
+++ b/components/fonts/font.rs
|
|
@@ -912,7 +912,7 @@ pub struct FontBaseline {
|
|
/// let mapped_weight = apply_font_config_to_style_mapping(&mapping, weight as f64);
|
|
/// ```
|
|
#[cfg(all(
|
|
- any(target_os = "linux", target_os = "macos"),
|
|
+ any(target_os = "linux", target_os = "macos", target_os="redox"),
|
|
not(target_env = "ohos")
|
|
))]
|
|
pub(crate) fn map_platform_values_to_style_values(mapping: &[(f64, f64)], value: f64) -> f64 {
|
|
diff --git a/components/fonts/platform/freetype/mod.rs b/components/fonts/platform/freetype/mod.rs
|
|
index 3698087927a..42cf4b128ba 100644
|
|
--- a/components/fonts/platform/freetype/mod.rs
|
|
+++ b/components/fonts/platform/freetype/mod.rs
|
|
@@ -5,7 +5,7 @@
|
|
pub mod font;
|
|
mod freetype_face;
|
|
|
|
-#[cfg(all(target_os = "linux", not(target_env = "ohos"), not(ohos_mock)))]
|
|
+#[cfg(all(any(target_os = "linux", target_os = "redox"), not(target_env = "ohos"), not(ohos_mock)))]
|
|
pub mod font_list;
|
|
|
|
#[cfg(target_os = "android")]
|
|
diff --git a/components/fonts/platform/mod.rs b/components/fonts/platform/mod.rs
|
|
index c8e1dc14800..444364fe6d0 100644
|
|
--- a/components/fonts/platform/mod.rs
|
|
+++ b/components/fonts/platform/mod.rs
|
|
@@ -3,32 +3,32 @@
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
#[cfg(all(
|
|
- any(target_os = "linux", target_os = "macos"),
|
|
+ any(target_os = "linux", target_os = "macos", target_os="redox"),
|
|
not(target_os = "android"),
|
|
not(target_env = "ohos")
|
|
))]
|
|
use base::text::{UnicodeBlock, UnicodeBlockMethod};
|
|
#[cfg(all(
|
|
- any(target_os = "linux", target_os = "macos"),
|
|
+ any(target_os = "linux", target_os = "macos", target_os="redox"),
|
|
not(target_os = "android"),
|
|
not(target_env = "ohos")
|
|
))]
|
|
use unicode_script::Script;
|
|
|
|
#[cfg(all(
|
|
- any(target_os = "linux", target_os = "macos"),
|
|
+ any(target_os = "linux", target_os = "macos", target_os="redox"),
|
|
not(target_os = "android"),
|
|
not(target_env = "ohos")
|
|
))]
|
|
use crate::FallbackFontSelectionOptions;
|
|
-#[cfg(any(target_os = "linux", target_os = "android"))]
|
|
+#[cfg(any(target_os = "linux", target_os = "android", target_os="redox"))]
|
|
pub use crate::platform::freetype::{font, font_list};
|
|
#[cfg(target_os = "macos")]
|
|
pub use crate::platform::macos::{core_text_font_cache, font, font_list};
|
|
#[cfg(target_os = "windows")]
|
|
pub use crate::platform::windows::{font, font_list};
|
|
|
|
-#[cfg(any(target_os = "linux", target_os = "android"))]
|
|
+#[cfg(any(target_os = "linux", target_os = "android", target_os="redox"))]
|
|
pub mod freetype;
|
|
|
|
#[cfg(target_os = "macos")]
|
|
@@ -45,7 +45,7 @@ mod windows {
|
|
}
|
|
|
|
#[cfg(all(
|
|
- any(target_os = "linux", target_os = "macos"),
|
|
+ any(target_os = "linux", target_os = "macos", target_os="redox"),
|
|
not(target_os = "android"),
|
|
not(target_env = "ohos")
|
|
))]
|
|
diff --git a/components/net/Cargo.toml b/components/net/Cargo.toml
|
|
index 3d2eb3c7594..fb9db9ea4d4 100644
|
|
--- a/components/net/Cargo.toml
|
|
+++ b/components/net/Cargo.toml
|
|
@@ -76,7 +76,6 @@ url = { workspace = true }
|
|
uuid = { workspace = true }
|
|
webpki-roots = { workspace = true }
|
|
webrender_api = { workspace = true }
|
|
-
|
|
[dev-dependencies]
|
|
embedder_traits = { workspace = true, features = ["baked-default-resources"] }
|
|
flate2 = "1"
|
|
diff --git a/components/pixels/Cargo.toml b/components/pixels/Cargo.toml
|
|
index 9ba20db80c0..efd49741a7b 100644
|
|
--- a/components/pixels/Cargo.toml
|
|
+++ b/components/pixels/Cargo.toml
|
|
@@ -20,7 +20,6 @@ malloc_size_of = { workspace = true }
|
|
malloc_size_of_derive = { workspace = true }
|
|
serde = { workspace = true, features = ["derive"] }
|
|
webrender_api = { workspace = true }
|
|
-
|
|
[dev-dependencies]
|
|
criterion = { version = "0.5", features = ["html_reports"] }
|
|
|
|
diff --git a/components/script/dom/navigatorinfo.rs b/components/script/dom/navigatorinfo.rs
|
|
index f3e6ddc109b..6b539f120c9 100644
|
|
--- a/components/script/dom/navigatorinfo.rs
|
|
+++ b/components/script/dom/navigatorinfo.rs
|
|
@@ -51,6 +51,12 @@ pub(crate) fn Platform() -> DOMString {
|
|
DOMString::from("Linux")
|
|
}
|
|
|
|
+#[allow(non_snake_case)]
|
|
+#[cfg(target_os = "redox")]
|
|
+pub(crate) fn Platform() -> DOMString {
|
|
+ DOMString::from("Redox")
|
|
+}
|
|
+
|
|
#[allow(non_snake_case)]
|
|
#[cfg(target_os = "macos")]
|
|
pub(crate) fn Platform() -> DOMString {
|
|
diff --git a/components/script_bindings/build.rs b/components/script_bindings/build.rs
|
|
index c28f900f6ce..2445c2ec9e4 100644
|
|
--- a/components/script_bindings/build.rs
|
|
+++ b/components/script_bindings/build.rs
|
|
@@ -86,12 +86,12 @@ impl phf_shared::PhfHash for Bytes<'_> {
|
|
///
|
|
/// Note: This function should be kept in sync with the version in `components/script/build.rs`
|
|
fn find_python() -> Command {
|
|
- let mut command = Command::new("uv");
|
|
- command.args(["run", "--no-project", "python"]);
|
|
+ let mut command = Command::new("python3");
|
|
+ // command.args(["run", "--no-project", "python"]);
|
|
|
|
if command.output().is_ok_and(|out| out.status.success()) {
|
|
return command;
|
|
}
|
|
|
|
- panic!("Can't find python (tried `{command:?}`)! Is uv installed and in PATH?")
|
|
+ panic!("Can't find python (tried `{command:?}`)!")
|
|
}
|
|
diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml
|
|
index e400c592bed..211813cb6c6 100644
|
|
--- a/components/servo/Cargo.toml
|
|
+++ b/components/servo/Cargo.toml
|
|
@@ -13,8 +13,9 @@ path = "lib.rs"
|
|
crate-type = ["rlib"]
|
|
|
|
[features]
|
|
-default = ["clipboard", "vello_cpu"]
|
|
-background_hang_monitor = ["background_hang_monitor/sampler"]
|
|
+# clipboard cut off
|
|
+default = ["vello_cpu"]
|
|
+# background_hang_monitor = ["background_hang_monitor/sampler"]
|
|
bluetooth = [
|
|
"bluetooth_traits",
|
|
"dep:bluetooth",
|
|
@@ -131,7 +132,7 @@ webxr = { path = "../webxr", optional = true }
|
|
arboard = { workspace = true, optional = true }
|
|
webxr = { path = "../webxr", features = ["ipc", "glwindow", "headless"] }
|
|
|
|
-[target.'cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os = "android"), not(target_env = "ohos"), not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies]
|
|
+[target.'cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os = "android"), not(target_env = "ohos"), not(target_arch = "arm"), not(target_arch = "aarch64"), not(target_os = "redox")))'.dependencies]
|
|
gaol = "0.2.1"
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
@@ -141,7 +142,7 @@ webxr = { path = "../webxr", features = ["ipc", "glwindow", "headless", "openxr-
|
|
anyhow = "1.0.97"
|
|
http = { workspace = true }
|
|
libservo = { path = ".", features = ["tracing"] }
|
|
-rustls = { version = "0.23", default-features = false, features = ["aws-lc-rs"] }
|
|
+rustls = { workspace = true , default-features = false, features = ["aws-lc-rs"] }
|
|
tracing = { workspace = true }
|
|
winit = { workspace = true }
|
|
|
|
diff --git a/components/servo/lib.rs b/components/servo/lib.rs
|
|
index 4b7dcdc5052..4174dfc4348 100644
|
|
--- a/components/servo/lib.rs
|
|
+++ b/components/servo/lib.rs
|
|
@@ -77,6 +77,7 @@ use fonts::SystemFontService;
|
|
not(target_arch = "arm"),
|
|
not(target_arch = "aarch64"),
|
|
not(target_env = "ohos"),
|
|
+ not(target_os = "redox"),
|
|
))]
|
|
use gaol::sandbox::{ChildSandbox, ChildSandboxMethods};
|
|
pub use gleam::gl;
|
|
@@ -1335,6 +1336,7 @@ pub fn run_content_process(token: String) {
|
|
not(target_arch = "arm"),
|
|
not(target_arch = "aarch64"),
|
|
not(target_env = "ohos"),
|
|
+ not(target_os = "redox"),
|
|
))]
|
|
fn create_sandbox() {
|
|
ChildSandbox::new(content_process_sandbox_profile())
|
|
@@ -1349,6 +1351,7 @@ fn create_sandbox() {
|
|
target_arch = "arm",
|
|
target_arch = "aarch64",
|
|
target_env = "ohos",
|
|
+ target_os = "redox",
|
|
))]
|
|
fn create_sandbox() {
|
|
panic!("Sandboxing is not supported on Windows, iOS, ARM targets and android.");
|
|
diff --git a/components/shared/compositing/rendering_context.rs b/components/shared/compositing/rendering_context.rs
|
|
index 515533db2e2..920a9a15cab 100644
|
|
--- a/components/shared/compositing/rendering_context.rs
|
|
+++ b/components/shared/compositing/rendering_context.rs
|
|
@@ -105,7 +105,12 @@ impl Drop for SurfmanRenderingContext {
|
|
|
|
impl SurfmanRenderingContext {
|
|
fn new(connection: &Connection, adapter: &Adapter) -> Result<Self, Error> {
|
|
+ eprintln!(" SurfmanRenderingContext::new - Starting");
|
|
+ eprintln!(" GL API: {:?}", connection.gl_api());
|
|
+
|
|
+ eprintln!(" Creating device...");
|
|
let mut device = connection.create_device(adapter)?;
|
|
+ eprintln!(" Device created");
|
|
|
|
let flags = ContextAttributeFlags::ALPHA |
|
|
ContextAttributeFlags::DEPTH |
|
|
@@ -115,9 +120,16 @@ impl SurfmanRenderingContext {
|
|
GLApi::GLES => surfman::GLVersion { major: 3, minor: 0 },
|
|
GLApi::GL => surfman::GLVersion { major: 3, minor: 2 },
|
|
};
|
|
+ eprintln!(" GL Version requested: {}.{}", version.major, version.minor);
|
|
+
|
|
+ eprintln!(" Creating context descriptor...");
|
|
let context_descriptor =
|
|
device.create_context_descriptor(&ContextAttributes { flags, version })?;
|
|
+ eprintln!(" Context descriptor created");
|
|
+
|
|
+ eprintln!(" Creating context...");
|
|
let context = device.create_context(&context_descriptor, None)?;
|
|
+ eprintln!(" Context created");
|
|
|
|
#[allow(unsafe_code)]
|
|
let gleam_gl = {
|
|
@@ -392,20 +404,41 @@ impl WindowRenderingContext {
|
|
window_handle: WindowHandle,
|
|
size: PhysicalSize<u32>,
|
|
) -> Result<Self, Error> {
|
|
+ eprintln!("WindowRenderingContext::new - Starting creation");
|
|
+ eprintln!(" Size: {}x{}", size.width, size.height);
|
|
+
|
|
+ eprintln!(" Creating connection from display_handle...");
|
|
let connection = Connection::from_display_handle(display_handle)?;
|
|
+ eprintln!(" Connection created successfully");
|
|
+
|
|
+ eprintln!(" Creating adapter...");
|
|
let adapter = connection.create_adapter()?;
|
|
+ eprintln!(" Adapter created successfully");
|
|
+
|
|
+ eprintln!(" Creating SurfmanRenderingContext...");
|
|
let surfman_context = SurfmanRenderingContext::new(&connection, &adapter)?;
|
|
+ eprintln!(" SurfmanRenderingContext created successfully");
|
|
|
|
+ eprintln!(" Creating native widget from window handle...");
|
|
let native_widget = connection
|
|
.create_native_widget_from_window_handle(
|
|
window_handle,
|
|
Size2D::new(size.width as i32, size.height as i32),
|
|
)
|
|
.expect("Failed to create native widget");
|
|
+ eprintln!(" Native widget created successfully");
|
|
|
|
+ eprintln!(" Creating surface...");
|
|
let surface = surfman_context.create_surface(SurfaceType::Widget { native_widget })?;
|
|
+ eprintln!(" Surface created successfully");
|
|
+
|
|
+ eprintln!(" Binding surface...");
|
|
surfman_context.bind_surface(surface)?;
|
|
+ eprintln!(" Surface bound successfully");
|
|
+
|
|
+ eprintln!(" Making context current...");
|
|
surfman_context.make_current()?;
|
|
+ eprintln!(" Context made current successfully");
|
|
|
|
Ok(Self {
|
|
size: Cell::new(size),
|
|
diff --git a/components/shared/fonts/font_identifier.rs b/components/shared/fonts/font_identifier.rs
|
|
index 8029252a20c..5d13b8010ee 100644
|
|
--- a/components/shared/fonts/font_identifier.rs
|
|
+++ b/components/shared/fonts/font_identifier.rs
|
|
@@ -22,7 +22,7 @@ impl FontIdentifier {
|
|
}
|
|
}
|
|
|
|
-#[cfg(any(target_os = "linux", target_os = "android"))]
|
|
+#[cfg(any(target_os = "linux", target_os = "android", target_os = "redox"))]
|
|
mod platform {
|
|
use std::fs::File;
|
|
use std::path::{Path, PathBuf};
|
|
diff --git a/components/shared/net/Cargo.toml b/components/shared/net/Cargo.toml
|
|
index f727fa008a5..90dbbceeb01 100644
|
|
--- a/components/shared/net/Cargo.toml
|
|
+++ b/components/shared/net/Cargo.toml
|
|
@@ -43,6 +43,5 @@ servo_url = { path = "../../url" }
|
|
url = { workspace = true }
|
|
uuid = { workspace = true }
|
|
webrender_api = { workspace = true }
|
|
-
|
|
[dev-dependencies]
|
|
embedder_traits = { workspace = true, features = ["baked-default-resources"] }
|
|
diff --git a/ports/servoshell/Cargo.toml b/ports/servoshell/Cargo.toml
|
|
index c18a68219b8..54ea23823a7 100644
|
|
--- a/ports/servoshell/Cargo.toml
|
|
+++ b/ports/servoshell/Cargo.toml
|
|
@@ -35,7 +35,8 @@ OriginalFilename = "servo.exe"
|
|
ProductName = "Servo"
|
|
|
|
[features]
|
|
-default = ["max_log_level", "webgpu", "webxr"]
|
|
+# cutting , "webxr" for redox
|
|
+default = ["max_log_level", "webgpu"]
|
|
crown = ["libservo/crown"]
|
|
debugmozjs = ["libservo/debugmozjs"]
|
|
jitspew = ["libservo/jitspew"]
|
|
@@ -65,7 +66,8 @@ image = { workspace = true }
|
|
ipc-channel = { workspace = true }
|
|
keyboard-types = { workspace = true }
|
|
libc = { workspace = true }
|
|
-libservo = { path = "../../components/servo", features = ["background_hang_monitor", "bluetooth", "testbinding"] }
|
|
+# removed "background_hang_monitor",
|
|
+libservo = { path = "../../components/servo", features = [ "bluetooth", "testbinding"] }
|
|
log = { workspace = true }
|
|
mime_guess = { workspace = true }
|
|
raw-window-handle = { workspace = true }
|
|
@@ -105,12 +107,31 @@ nix = { workspace = true, features = ["fs"] }
|
|
serde_json = { workspace = true }
|
|
surfman = { workspace = true, features = ["sm-angle-default"] }
|
|
|
|
-[target.'cfg(not(any(target_os = "android", target_env = "ohos")))'.dependencies]
|
|
-accesskit_winit = "0.27"
|
|
+# I removed the problematic dependencies from everywhere even though they should not be pulled for redox. The thing is that cargo is still complaining about them, even
|
|
+# though they should be ignored.
|
|
+[target.'cfg(not(any(target_os = "android", target_env = "ohos", target_os = "redox")))'.dependencies]
|
|
+# accesskit_winit = "0.27"
|
|
dirs = "6.0"
|
|
-egui = { version = "0.32.3", features = ["accesskit"] }
|
|
+# egui = { version = "0.32.3", features = ["accesskit"] }
|
|
+# egui-file-dialog = "0.11.0"
|
|
+# egui-winit = { version = "0.32.3", default-features = false, features = ["accesskit", "clipboard", "wayland"] }
|
|
+# egui_glow = { version = "0.32.3", features = ["winit"] }
|
|
+gilrs = "0.11.0"
|
|
+# glow = "0.16.0"
|
|
+headers = { workspace = true }
|
|
+net = { path = "../../components/net" }
|
|
+net_traits = { workspace = true }
|
|
+serde_json = { workspace = true }
|
|
+# For optional feature servo_allocator/use-system-allocator
|
|
+servo_allocator = { path = "../../components/allocator" }
|
|
+surfman = { workspace = true, features = ["sm-raw-window-handle-06", "sm-x11"] }
|
|
+winit = { workspace = true }
|
|
+
|
|
+[target.'cfg(target_os = "redox")'.dependencies]
|
|
+dirs = "6.0"
|
|
+egui = { version = "0.32.1", default-features = false }
|
|
egui-file-dialog = "0.11.0"
|
|
-egui-winit = { version = "0.32.3", default-features = false, features = ["accesskit", "clipboard", "wayland"] }
|
|
+egui-winit = { version = "0.32.3", default-features = false, features = [] }
|
|
egui_glow = { version = "0.32.3", features = ["winit"] }
|
|
gilrs = "0.11.0"
|
|
glow = { workspace = true }
|
|
diff --git a/ports/servoshell/desktop/app.rs b/ports/servoshell/desktop/app.rs
|
|
index a77d1060051..0691b3909cc 100644
|
|
--- a/ports/servoshell/desktop/app.rs
|
|
+++ b/ports/servoshell/desktop/app.rs
|
|
@@ -699,18 +699,18 @@ impl ApplicationHandler<AppEvent> for App {
|
|
}
|
|
|
|
fn user_event(&mut self, event_loop: &ActiveEventLoop, event: AppEvent) {
|
|
- if let AppEvent::Accessibility(ref event) = event {
|
|
- let Some(ref mut minibrowser) = self.minibrowser else {
|
|
- return;
|
|
- };
|
|
- if !minibrowser.handle_accesskit_event(&event.window_event) {
|
|
- return;
|
|
- }
|
|
- if let Some(window) = self.windows.get(&event.window_id) {
|
|
- window.winit_window().unwrap().request_redraw();
|
|
- }
|
|
- return;
|
|
- }
|
|
+ // if let AppEvent::Accessibility(ref event) = event {
|
|
+ // let Some(ref mut minibrowser) = self.minibrowser else {
|
|
+ // return;
|
|
+ // };
|
|
+ // if !minibrowser.handle_accesskit_event(&event.window_event) {
|
|
+ // return;
|
|
+ // }
|
|
+ // if let Some(window) = self.windows.get(&event.window_id) {
|
|
+ // window.winit_window().unwrap().request_redraw();
|
|
+ // }
|
|
+ // return;
|
|
+ // }
|
|
|
|
let now = Instant::now();
|
|
let event = winit::event::Event::UserEvent(event);
|
|
diff --git a/ports/servoshell/desktop/events_loop.rs b/ports/servoshell/desktop/events_loop.rs
|
|
index 8bb978c7bfb..94e946928b2 100644
|
|
--- a/ports/servoshell/desktop/events_loop.rs
|
|
+++ b/ports/servoshell/desktop/events_loop.rs
|
|
@@ -20,14 +20,14 @@ pub type EventLoopProxy = winit::event_loop::EventLoopProxy<AppEvent>;
|
|
pub enum AppEvent {
|
|
/// Another process or thread has kicked the OS event loop with EventLoopWaker.
|
|
Waker,
|
|
- Accessibility(accesskit_winit::Event),
|
|
+ // Accessibility(accesskit_winit::Event),
|
|
}
|
|
|
|
-impl From<accesskit_winit::Event> for AppEvent {
|
|
- fn from(event: accesskit_winit::Event) -> AppEvent {
|
|
- AppEvent::Accessibility(event)
|
|
- }
|
|
-}
|
|
+// impl From<accesskit_winit::Event> for AppEvent {
|
|
+// fn from(event: accesskit_winit::Event) -> AppEvent {
|
|
+// AppEvent::Accessibility(event)
|
|
+// }
|
|
+// }
|
|
|
|
/// The real or fake OS event loop.
|
|
#[allow(dead_code)]
|
|
diff --git a/ports/servoshell/desktop/headed_window.rs b/ports/servoshell/desktop/headed_window.rs
|
|
index bfe35feca4e..1e3220cad1f 100644
|
|
--- a/ports/servoshell/desktop/headed_window.rs
|
|
+++ b/ports/servoshell/desktop/headed_window.rs
|
|
@@ -153,10 +153,24 @@ impl Window {
|
|
let window_handle = winit_window
|
|
.window_handle()
|
|
.expect("could not get window handle from window");
|
|
- let window_rendering_context = Rc::new(
|
|
- WindowRenderingContext::new(display_handle, window_handle, inner_size)
|
|
- .expect("Could not create RenderingContext for Window"),
|
|
- );
|
|
+
|
|
+ eprintln!("headed_window: Creating WindowRenderingContext...");
|
|
+ eprintln!(" DISPLAY env var: {:?}", std::env::var("DISPLAY"));
|
|
+ eprintln!(" Display handle obtained: {:?}", display_handle);
|
|
+ eprintln!(" Window handle obtained: {:?}", window_handle);
|
|
+ eprintln!(" Inner size: {}x{}", inner_size.width, inner_size.height);
|
|
+
|
|
+ let window_rendering_context = match WindowRenderingContext::new(display_handle, window_handle, inner_size) {
|
|
+ Ok(context) => {
|
|
+ eprintln!(" WindowRenderingContext created successfully!");
|
|
+ Rc::new(context)
|
|
+ },
|
|
+ Err(e) => {
|
|
+ eprintln!(" Failed to create WindowRenderingContext!");
|
|
+ eprintln!(" Error: {:?}", e);
|
|
+ panic!("Could not create RenderingContext for Window: {:?}", e);
|
|
+ }
|
|
+ };
|
|
|
|
// Setup for GL accelerated media handling. This is only active on certain Linux platforms
|
|
// and Windows.
|
|
diff --git a/ports/servoshell/desktop/headless_window.rs b/ports/servoshell/desktop/headless_window.rs
|
|
index 9910ed941d4..4937cee1120 100644
|
|
--- a/ports/servoshell/desktop/headless_window.rs
|
|
+++ b/ports/servoshell/desktop/headless_window.rs
|
|
@@ -168,7 +168,7 @@ impl WindowPortsMethods for Window {
|
|
// notification (such as from the display manager) that it has changed size, so we
|
|
// must notify the compositor here.
|
|
webview.move_resize(self.screen_size.to_f32().into());
|
|
- webview.resize(PhysicalSize::new(
|
|
+ webview.resize(PhysicalSize::<u32>::new(
|
|
self.screen_size.width as u32,
|
|
self.screen_size.height as u32,
|
|
));
|
|
diff --git a/ports/servoshell/desktop/minibrowser.rs b/ports/servoshell/desktop/minibrowser.rs
|
|
index ba4127a241f..6026edc93a4 100644
|
|
--- a/ports/servoshell/desktop/minibrowser.rs
|
|
+++ b/ports/servoshell/desktop/minibrowser.rs
|
|
@@ -107,9 +107,9 @@ impl Minibrowser {
|
|
);
|
|
|
|
let winit_window = window.winit_window().unwrap();
|
|
- context
|
|
- .egui_winit
|
|
- .init_accesskit(event_loop, winit_window, event_loop_proxy);
|
|
+ // context
|
|
+ // .egui_winit
|
|
+ // .init_accesskit(event_loop, winit_window, event_loop_proxy);
|
|
winit_window.set_visible(true);
|
|
|
|
context.egui_ctx.options_mut(|options| {
|
|
@@ -571,6 +571,7 @@ impl Minibrowser {
|
|
}
|
|
|
|
/// Returns true if a redraw is required after handling the provided event.
|
|
+ /*
|
|
pub(crate) fn handle_accesskit_event(&mut self, event: &accesskit_winit::WindowEvent) -> bool {
|
|
match event {
|
|
accesskit_winit::WindowEvent::InitialTreeRequested => {
|
|
@@ -589,7 +590,7 @@ impl Minibrowser {
|
|
},
|
|
}
|
|
}
|
|
-
|
|
+ */
|
|
pub(crate) fn set_zoom_factor(&self, factor: f32) {
|
|
self.context.egui_ctx.set_zoom_factor(factor);
|
|
}
|
|
diff --git a/ports/servoshell/desktop/tracing.rs b/ports/servoshell/desktop/tracing.rs
|
|
index b1f0b1d742e..046b016a2e2 100644
|
|
--- a/ports/servoshell/desktop/tracing.rs
|
|
+++ b/ports/servoshell/desktop/tracing.rs
|
|
@@ -52,7 +52,7 @@ mod from_winit {
|
|
Self::WindowEvent { event, .. } => event.log_target(),
|
|
Self::DeviceEvent { .. } => target!("DeviceEvent"),
|
|
Self::UserEvent(AppEvent::Waker) => target!("UserEvent(Waker)"),
|
|
- Self::UserEvent(AppEvent::Accessibility(..)) => target!("UserEvent(Accessibility)"),
|
|
+ // Self::UserEvent(AppEvent::Accessibility(..)) => target!("UserEvent(Accessibility)"),
|
|
Self::Suspended => target!("Suspended"),
|
|
Self::Resumed => target!("Resumed"),
|
|
Self::AboutToWait => target!("AboutToWait"),
|
|
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
|
|
deleted file mode 100644
|
|
index 97ac30608ba..00000000000
|
|
--- a/rust-toolchain.toml
|
|
+++ /dev/null
|
|
@@ -1,17 +0,0 @@
|
|
-[toolchain]
|
|
-# Be sure to update the 'rust-overlay' module's url in shell.nix to point to a
|
|
-# commit which supports the required rustc version and also update the version
|
|
-# in support/crown/rust-toolchain.toml when bumping this!
|
|
-channel = "1.89.0"
|
|
-
|
|
-components = [
|
|
- "clippy",
|
|
- # For support/crown
|
|
- "llvm-tools",
|
|
- # For support/crown
|
|
- "rustc-dev",
|
|
- "rustfmt",
|
|
- "rustc-dev",
|
|
- # For rust-analyzer
|
|
- "rust-src",
|
|
-]
|