orinium_browser/browser/core/
mod.rs

1//! Browser core: application lifecycle, tab management, and engine integration.
2//!
3//! This module contains the core glue between the browser engine (`engine`)
4//! and the platform (`platform`). It exposes the high-level application
5//! entrypoint [`BrowserApp`], the [`Tab`] abstraction, and command primitives.
6//!
7//! Processing flow (high-level)
8//! - Resource acquisition: `resource_loader` / platform network → HTML/CSS input
9//! - Parsing: HTML tokenizer/parser → DOM
10//! - Style resolution: CSS parser + cascade → computed style
11//! - Layout: layout builder produces layout tree
12//! - Render model: generate draw commands from layout tree
13//! - Platform render: platform renderer consumes draw commands and composites output
14//!
15//! Quick example (for contributors)
16//! ```no_run
17//! use orinium_browser::browser::{BrowserApp, Tab};
18//!
19//! // Create browser and a new tab
20//! let mut browser = BrowserApp::default();
21//! let mut tab = Tab::new();
22//!
23//! // Navigate the tab to a resource or URL (error handling elided)
24//! tab.navigate("resource:///test/compatibility_test.html".parse().unwrap());
25//!
26//! // Register the tab and run the app
27//! browser.add_tab(tab);
28//! browser.run().unwrap();
29//! ```
30//!
31//! Contributor notes
32//! - Prefer small, focused commits that add tests for new behavior.
33//! - Read module-level docs in `engine` (parser / layouter) and `platform`
34//!   (network / renderer) before changing cross-cutting logic.
35//! - Typical edit cycle: add unit tests → implement change in `engine` → verify
36//!   draw-command output → ensure platform paints correctly.
37//!
38//! See submodules for specifics and examples.
39
40mod app;
41mod command;
42pub mod resource_loader;
43pub mod tab;
44pub mod ui;
45pub mod webview;
46
47pub use app::BrowserApp;
48pub use command::BrowserCommand;
49pub use tab::Tab;