mirror of
https://github.com/marcoallegretti/WEFT_OS.git
synced 2026-11-22 08:13:59 +00:00
With servo-embed, weft-servo-shell and weft-app-shell did not compile against the selected Servo revision: the keyboard event shape, key and mouse action variants, frame readback, shutdown, URL type and window handle APIs had changed. The frame path never called WebView::paint; the software path rebuilt its softbuffer surface every frame and read pixels without painting, and the EGL path presented nothing. weft-app-shell printed READY right after creating its WebView, before any frame, and its feature-disabled build printed READY and parked. Servo also disables CSS Grid by default, which the system UI uses. Both hosts now build against the selected API. Each frame is painted with WebView::paint and presented: the software path reads the painted frame back, presents the context and copies it into a persistent softbuffer surface; the EGL path presents its window context. Nothing is presented before Servo's first repaint request. Shutdown drops the WebView and Servo, whose drop completes the shutdown, and exits the event loop. Both hosts enable layout_grid_enabled. weft-app-shell prints READY on the first frame presented after the document has loaded and Servo reports its rendering settled: on load completion it requests WebView::take_screenshot, which completes only once every frame has fired load, render-blocking resources, images and web fonts are done and the rendering is up to date. Feature-disabled builds of both hosts exit with an error instead of reporting readiness. weft-appd does not consume the app shell's READY yet. tests/frame/check_frame.py runs weft-compositor nested on Xvfb with the winit backend, starts a host showing tests/frame/reference.html and checks the presented pixels (four colour quadrants and text). For the app host the page must be on screen within two seconds of READY; --slow-style delays a render-blocking stylesheet that reveals the page, so premature readiness fails. Validation (Ubuntu 24.04, Mesa 25.2.8 llvmpipe, software path): - check_frame.py --host system, --host app and --host app --slow-style 3: 5 of 5 runs pass each - negative fixtures fail: page with red and green swapped; a fake host printing READY without rendering; a local build printing READY on its first presented frame (--slow-style 4, 3 of 3) - cargo clippy -D warnings with and without servo-embed; cargo fmt --check - unverified: EGL path, DRM, resize, output scale, idle wakeup, input
21 lines
619 B
HTML
21 lines
619 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>WEFT frame reference</title>
|
|
<style>
|
|
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; }
|
|
body { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
|
|
#red { background: rgb(255, 0, 0); }
|
|
#green { background: rgb(0, 255, 0); }
|
|
#blue { background: rgb(0, 0, 255); }
|
|
#white { background: rgb(255, 255, 255); color: rgb(0, 0, 0); font: 32px sans-serif; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="red"></div>
|
|
<div id="green"></div>
|
|
<div id="blue"></div>
|
|
<div id="white">WEFT</div>
|
|
</body>
|
|
</html>
|