Expand description
Browser core: application lifecycle, tab management, and engine integration.
This module contains the core glue between the browser engine (engine)
and the platform (platform). It exposes the high-level application
entrypoint BrowserApp, the Tab abstraction, and command primitives.
Processing flow (high-level)
- Resource acquisition:
resource_loader/ platform network → HTML/CSS input - Parsing: HTML tokenizer/parser → DOM
- Style resolution: CSS parser + cascade → computed style
- Layout: layout builder produces layout tree
- Render model: generate draw commands from layout tree
- Platform render: platform renderer consumes draw commands and composites output
Quick example (for contributors)
use orinium_browser::browser::{BrowserApp, BrowserUi, Tab};
// Navigate the tab to a resource or URL (error handling elided)
let mut tab = Tab::default();
tab.navigate("resource:///test/test.html".parse().unwrap());
// Create browser with the pre-configured tab and run it
let mut browser = BrowserApp::default();
browser.set_default_ui(BrowserUi::with_tab(tab));
browser.run().unwrap();Contributor notes
- Prefer small, focused commits that add tests for new behavior.
- Read module-level docs in
engine(parser / layouter) andplatform(network / renderer) before changing cross-cutting logic. - Typical edit cycle: add unit tests → implement change in
engine→ verify draw-command output → ensure platform paints correctly.
See submodules for specifics and examples.
Re-exports§
pub use tab::Tab;pub use ui::BasicChrome;pub use ui::BasicContextMenu;pub use ui::BrowserRenderer;pub use ui::BrowserUi;pub use ui::Chrome;pub use ui::ChromeAction;pub use ui::ChromeEventResult;pub use ui::ClickContext;pub use ui::ContextMenu;pub use ui::MenuEventResult;pub use ui::MenuItem;pub use ui::RenderState;
Modules§
- resource_
loader - Browser resource loading process.
- tab
- ブラウザのタブ機能。WebView を保持し、ページのタイトルや URL などのメタ情報を管理する。
- ui
- Browser UI components and window render state.
- webview
- ブラウザのwebview機能。タスクとレンダリング情報の管理を行う。
Structs§
- Browser
App - Main browser application struct.