Repository navigation
v0.19.0
Added
WebView
WebViewshows a surface engine's page inside the window. With a
backend whoserendering()isSurface, the widget paints the picture the
engine draws into, one frame pixel per device pixel, so the page clips, sits
under popovers and dialogs, and scrolls inside aScrollArealike any other
content. The engine is told the page is hidden while it is dormant or
scrolled out of view. Pointer, touch, wheel and keyboard input over the page
is forwarded to the engine at the page pixel it landed on; keys only while
the page holds the keyboard, and never Ctrl+Tab, which stays the way out.WebViewHandle::send_inputandWebViewInputEvent. The input the
widget forwards to a surface engine (pointer, touch, scroll, key, input
method, clipboard command), in the page's pixels; a native view ignores it.WebViewRegistry::pumpandWebViewPumpPayload. A surface engine that
needs to run on the UI thread posts the payload, and the registry passes the
pump on toWebViewBackend::pump.teksilo-appanswers the payload on the
UI thread without redrawing any window.- The Servo backend renders pages.
ServoBackendis now a surface
backend: each page renders offscreen into an OpenGL context of its own, on
the hardware adapter, or on the software one where there is none, with a
console warning. It needs no window of its own, so it works under Wayland.
A frame identical to the previous one costs no upload, a dormant or
scrolled-out page is throttled in Servo, and animated pages run at most 60
frames a second, only while they animate. The page is in automation
screenshots, with nowebview_hole_possiblewarning. Inline HTML
(.html(...),load_html) loads as adata:URL, and the widget reports
its URL asabout:blank. - Servo pages take input. Mouse buttons and moves, touch and pen
contacts, the wheel (lines and trackpad pixels), keys and input-method text
while the page holds the keyboard, and clipboard commands reach the page. A
page sees no physical key code (KeyboardEvent.codeis"Unidentified"):
Teksilo's key events carry none. - A surface page and the application share the keyboard. Application
shortcuts resolve first: the standard Copy, Cut and Paste act on the page's
selection while it holds the keyboard. Focus leaving the frame takes the
keyboard from the page (WebViewHandle::blur). The page's cursor shows over
it and the input method's candidate window opens at its caret
(WebViewEvent::CursorChanged,WebViewEvent::InputMethodArea). - Servo pages report their events. Navigations (
on_navigation), URL
changes with no load behind them (url_signal) and the page taking or
giving up the keyboard (page_focused_signal) now reach the widget, beside
the load and title events it already had, and its console messages reach
on_console_message. window.ipcon Servo.window.ipc.postMessage(m)in a Servo page now
reacheson_message, as on wry. Two messages posted back to back may arrive
out of order.- A Servo page's dialogs are shown.
alert(),confirm(),prompt()and
<select>lists reach aWebViewControlPresenterin app state
(teksilo_webview::controls,WebViewEvent::ControlRequested,
WebViewHandle::answer_control).install_web_view_defaultinstalls
teksilo::webview_install::WidgetsControlPresenter, built onMessageBox,
InputDialogandMenuList; with no presenter each gets its default answer.
File and colour pickers and the page's context menu are cancelled. - A Servo page's accessibility tree is in the application's. The page's
headings, paragraphs, links and text are mirrored under theWebView's
Role::WebViewnode (WebViewEvent::PageAccessibility,
PageAccessibilityUpdate), for a screen reader to read. Servo takes no
accessibility actions back, so the page is still operated through the frame
and forwarded input. WebView::on_console_message. Receives each console message with its
level and text: a Servo page's own console output, and the reports a backend
posts about itself (an operation it cannot perform, Servo falling back to its
software renderer). They were dropped before.MemoryWebViewBackend::surfaceandmemory_surface_registry. A surface
test backend that commits one frame of the bounds' device-pixel size on every
set_boundsand records forwarded input (WebViewOp::Input,
MemoryWebViewRecords::input_log).
Changed
cargo-teksilo
- The agent instructions say where to start and what exists. The skill
and the brief written intoAGENTS.mdand the other agents' rules files
open with four guides to read first (features, first application, widgets
overview, guide index) and a rule to search before adding a dependency or
building infrastructure. The brief gains a table of the optional
subsystems: the umbrella feature that enables each (async,tokio,
async-std,web-view,terminal,automation,telemetry, the theme
presets), where to start, and the two crates added as direct dependencies
(teksilo-charts,teksilo-scene). - The skill no longer carries hand-written "verified against" version stamps
or counts that go stale; the release-written "ships with" stamp is its only
version claim.
Documentation
- The features page covers
DockingLayoutand theTerminalwidget.
WebView
- A backend says how its engine shows a page.
WebViewBackend::rendering
returnsWebViewRendering::NativeSubview(a native view over the window, as
wry does) orWebViewRendering::Surface { orientation }(offscreen, into a
LiveImageWriterthe widget passes toopen, its rows laid out as
orientationsays). - Breaking. For a custom backend,
WebViewBackend::renderingis required,
andWebViewBackend::openandWebViewRegistry::opentake the writer as a
newsurfaceargument (Nonefor a native view).WebViewEventhas four
new variants (CursorChanged,InputMethodArea,ControlRequested,
PageAccessibility) andWebViewOpthree (Blur,AnswerControl,
Input), so an exhaustivematchon either needs their arms;
WebViewOp::Openhas a newsurfacefield.SyntheticKind(in
teksilo-core) has a newWebPageNodevariant. - On wry,
load_htmlloads a new page. It used to rewrite the current
document in place; it now navigates to the HTML, with the load and
navigation events a navigation brings. Back and forward call the engine's
own history instead of runninghistory.back()andhistory.forward()in
the page.
Fixed
Widgets
- A
RichTextEditorsized to its content (min_lines/max_lines) kept
its old height after a single change of width, such as a window leaving
fullscreen. The text re-wrapped, but the editor, and anything laid out
against it, stayed at the height of the old wrap until some unrelated input
caused another layout. The new height now reaches the layout on the next
frame.
WebView
servo-backendbuilds in this repository again. Its lockfile now holds
pkcs1at 0.8.0-rc.4: thersarelease in Servo's dependencies does not
compile against 0.8.0-rc.5, which its requirement allows. An application
that enablesweb-view-servoneeds the same pin in its own lockfile:
cargo update -p pkcs1 --precise 0.8.0-rc.4.- A second Servo
WebViewno longer panics. Every web view a
ServoBackendopens now shares one engine; Servo allows only one per
process. A secondServoBackendin the same process shows the error state
instead of panicking.
Full Changelog: v0.18.0...v0.19.0