nebulon
запушил(а) master в nebulon/nebos
c5f21a2ab9 Use the Adwaita cursor set instead of the single arrow
NebOS had one 16x16 two-colour arrow. It now has the 35 CSS cursor
shapes from GNOME's Adwaita theme (adwaita-cursors 51, LGPL-3 /
CC-BY-SA-3.0): the arrow, hand, I-beam, the resize arrows, move, help,
not-allowed, zoom, the animated wait/progress spinners and the rest.
This system ships no SVG cursor theme, only Xcursor bitmaps, so the
assets are Adwaita's Xcursor files cut down to their 24 px images
(assets/cursors/adwaita/, 424 KB instead of 12 MB, by
tools/xcursor_trim.py). The host tool mkcursors turns them into one
NBCUR1 bundle (include/cursor_abi.h: size, hotspot, frames, premultiplied
ARGB), packed as cursors/adwaita24.cur in the full pack only (~18 KB
gzip; the floppy has no room and keeps the built-in arrow). The
spinners keep every fourth of their 60 x 16 ms frames.
kernel/cursor.c copies the bundle out of the ramfs at boot and after a
runtime pack replacement. mouse.c treats the position as the hotspot,
clips the image at the screen edges and blends it over the saved
background (up to 32x32); Intel Ironlake and Radeon load the ARGB image
into their 64x64 planes, Cirrus reduces it to its two colours.
SYS_WIN_SET_CURSOR (117) sets a window's content cursor and
SYS_WM_SET_CURSOR (118) is the WM's override. The window server
resolves the shape on every WM poll: the override, else the window
holding the pointer capture, else the window under the pointer, else
the arrow. The WM uses resize arrows on the grip, the move cross while
dragging a title bar and a hand over launchers and the status area.
ngui asks for the I-beam over text fields, the terminal uses it for its
cells, the browser honours CSS `cursor` (a hand over links, the I-beam
over text fields and the progress cursor while loading for `auto`), and
the gallery shows every shape. browser-host maps them to SDL system
cursors.
make test-cursors checks the bundle. Verified in QEMU with the
software and Cirrus cursors; the Intel/Radeon paths are untested.
ce76a5ac91 Add browser visit history with URL-bar autocomplete
Every page that finishes loading is recorded (URL, title, visit count and
a stamp counter that orders visits across windows and reboots) in a
128-entry BSS table. Browser windows share /share/bhist, merged on every
write, and it is persisted to /data/BHIST.DAT at most every 3 s.
While the address bar has the focus a dropdown lists up to six entries:
the top sites for an empty bar, otherwise URL prefixes (with or without
the scheme and www.) ranked above URL and title substrings, plus visits
and recency. Typing at the end completes inline to the next '/' of the
best match, and Enter opens the history URL it stands for. Up/Down
preview a row, Delete forgets it, Esc closes the list, a click opens it.
The browser no longer fits the floppy lite pack: it is now in the full
pack only, and floppy boots run BROWSER from root.img through the
existing launcher fallback. browser-host gains --keys for scripted
headless typing.
d00a58bec0 Use the Adwaita symbolic icons for ngui
ngui's icons (browser back/forward/reload/home, the files and gallery
icons) are now GNOME Adwaita symbolic icons instead of line drawings.
The unchanged *-symbolic.svg files live in assets/icons/adwaita/
(LGPL-3 / CC-BY-SA-3.0). ICON_LIST in include/icon_abi.h names them and
generates enum ngui_icon and ngui_icon_name(); the order is the bundle
order, so append only. STOP, CLOSE, SEARCH and MENU are new.
The host tool mkicons rasterizes each SVG with the browser's svg_raster.c
into a 16x16 coverage mask and writes one NBICO1 bundle,
/ramfs/icons/adwaita16.icn (3.3 KB, ~0.8 KB gzip). Its XML reader only
accepts what symbolic icons use and fails the build on transforms,
strokes or unknown elements; -v prints an ASCII preview.
ngui_icon() reads the bundle once per process into BSS (safe across the
browser's heap_reset()), capped at the ids it knows, and blends the mask
tinted with the caller's colour. The procedural fallback is gone: it
cost ~2 KB of code per app, and dropping it lets both packs carry the
bundle while the floppy lite pack still shrinks. browser-host symlinks
icons/ into its /ramfs like fonts/.
9eb38faa14 Fix xHCI EP0 max packet size so the VL805 sees the boot stick
On the 970A-DS3P's VIA VL805 (1106:3483) a high-speed USB stick never
enumerated: Address Device kept the USB core's 8-byte first-read guess
for EP0, and the 18-byte device descriptor read failed with Babble
Detected, so the booted stick was never usb0 and install had no source.
- Address Device uses the speed's fixed EP0 size (8 low, 64 high, 512
SuperSpeed); a full-speed EP0 is corrected with Evaluate Context once
the core knows bMaxPacketSize0.
- Do not PED-disable a SuperSpeed port before its reset (that leaves the
link in SS.Disabled).
- Set the Setup TRB transfer type only on xHCI >= 1.0.
- Always log the controller id/version and every failed control
transfer (completion code, PORTSC, slot/EP0 state) to COM1/netmon.
Verified on the board: the SanDisk stick enumerates first try and
mounts as usb0; QEMU xHCI USB3 boot + HID unchanged.
7254b400be Render google.com: inert noscript, 4 KB URLs and author-styled controls
google.com showed only its "Klicke hier ... nicht automatisch
weitergeleitet" fallback. Its <noscript> holds a meta refresh and
`table,div,span,p{display:none}`, and the parser treated noscript content
as live DOM/CSS although scripting is always on. <noscript> is now a
raw-text, display:none element (HTML's scripting-enabled parsing).
The page's form controls then rendered in the dark UI theme:
- Google's stylesheet URL (~720 B) and main script URL (~3.7 KB) were
truncated by 512 B browser URLs, 480 B href/src attributes, the curl
helper's 768 B request file and uhttp's 1 KB paths. All are 4 KB now
(BR_URL_MAX, BR_URL_ATTR_MAX, UHTTP_PATH_MAX; header lines 4.5 KB).
- ~94 KB of inline <style> overflowed the 64 KB BR_CSS_SIZE, dropping
the form-control rules; it is 256 KB.
- Inputs, textareas and buttons with author CSS (background, border or
radius) are painted with that background/border/radius and text
colour and sized from padding, height, min-width and margins;
unstyled controls keep the ngui theme. `background: transparent|none`
is now a cascaded value (PROP_BG_NONE shares PROP_BG's slot).
Layout fixes found on the same page:
- float shrink-to-fit width includes borders ("Anmelden" wrapped);
- a max-width clamp makes the width definite, so margin:auto centres;
- a flex row under 160 px stays a row when its items fit;
- align-self overrides the row's align-items;
- forced-colors/prefers-contrast/hover/pointer media features are
answered for a normal-contrast mouse screen (Google's forced-colors
border no longer applies);
- U+2010..2015 map to '-'.
Large leaf buffers in uhttp and the browser are static to spare the
128 KB ring-3 stack. New compat pages 072 (styled controls) and 073
(noscript) fail on the old build and pass now; pages 001-071 render
pixel-identical in browser-host.
- Просмотр сравнение для этих 5 коммитов »
3 дней назад