about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
...
* dom: mark insertBefore "before" as Optionbptato2025-01-132-12/+14
|
* dom: fix leak, HTMLOptionsCollection length getterbptato2025-01-131-0/+4
| | | | Fixes acid3 test 57
* dom: HTMLTemplateElement content getterbptato2025-01-131-1/+1
|
* container: use linked list instead of dequebptato2025-01-132-6/+19
|
* cookie: improve Expires parsingbptato2025-01-133-56/+38
|
* Fix typobptato2025-01-131-1/+1
|
* config: switch to camel casebptato2025-01-1313-183/+166
| | | | | | We already need a camel -> kebab converter anyway. Unfortunately this also changes JS binding names, so it's a breaking change. Oh well.
* loader: remove obsolete todobptato2025-01-121-1/+0
|
* cssvalues: set text-decoration to bit, vertical-align to wordbptato2025-01-121-27/+25
| | | | they fit into 8 and 64 bits respectively
* cssvalues: reduce CSSValues sizebptato2025-01-1210-279/+336
| | | | | | | | | | | | | | | | * switch from float64 -> float32; other browsers use 32-bit floats too * specify integer size as 32-bit * use NetworkBitmap for background-image value (currently just an invalid dummy value) * remove "none" property & value types CSSValue's payload is always one word (plus another for the type tag). CSSValues keeps its size, but no longer has to heap-alloc + refcount word-sized CSSValues. (On 32-bit systems, CSSValues might actually be larger than before, but I expect it's still a net benefit with the removal of refcounting and the switch to 32-bit floats.)
* cssvalues, sheet: fix quotes parsing, misc cleanupbptato2025-01-124-81/+75
|
* cascade: collapse inited into one arraybptato2025-01-122-32/+30
| | | | less work for memset
* dynstream: remove superfluous zeroMem, add sendFds/recvFdsbptato2025-01-123-26/+33
|
* buffer, dynstream: fix clone race, recvmsg/sendmsg castbptato2025-01-122-7/+7
| | | | | | | The fds must be read before the other buffer resumes execution. Also, for some reason, CMSG_SPACE/CMSG_LEN are inconsistent in their size with controllen on BSDs...
* Fix some strict defsbptato2025-01-125-10/+11
|
* ua.css: force inline-flex on selectbptato2025-01-111-1/+1
| | | | sourcehut sets inline-block on it, and that broke [] placement...
* Update readmebptato2025-01-111-1/+2
|
* loader: refcount LoaderBuffer pagesbptato2025-01-111-24/+9
| | | | | | | | | | | | One less unsafe/error prone construct. Refcounting the page as seq is unfortunate, but still miles better than zero-filling a non-refcounted array. (Plus it works better for base64 decoding.) The len field is still necessary, because old runtime doesn't support setLenUninit. Oh well, it's one wasted word, not the end of the world. As for the chunks, it looks like the allocator still uses small ones for the seq, so we're good.
* loader: fix memory leak on x-saveoutput + various fd leaksbptato2025-01-114-11/+22
|
* loader: truncate existing files on downloadbptato2025-01-111-1/+1
|
* loader: fix loader buffer page size optimizationbptato2025-01-111-1/+5
| | | | | | The goal is to get "SmallChunk" pages from the allocator. I think I stole the idea from faststreams, but the overhead might be different with raw pointers...
* bufreader, bufwriter: send all fds in one messagebptato2025-01-1110-268/+184
| | | | | | | | Moves sendfd/recvfd out of C, and fixes some of its flaws too. The main one is that now all file descriptors are sent together. Also, I've decided to remove the ServerSocket after all; it's easy to add it back if it's ever needed again.
* pager: add some option wrappersbptato2025-01-101-4/+4
| | | | to mark nilable ref objects
* dom: reflect titlebptato2025-01-101-1/+2
|
* dom: add createDocumentbptato2025-01-102-19/+55
|
* dom: more select interfacesbptato2025-01-105-12/+80
| | | | this should be all of them
* buffer, ua.css, dom: more select adjustmentsbptato2025-01-106-143/+88
| | | | | | | ok, now it works like in w3m. (mostly, barring CSS limitations...) we'll see how this works out Also adds/fixes some select and option DOM APIs.
* ua.css: improve select renderingbptato2025-01-093-21/+19
| | | | | | | | | Regular select is now rendered as flex, and does not wrap. This gets rid of the pointless whitespace before/after options. multiple still looks weird, but maybe a bit less? Probably we should just render it with pseudo-checkboxes, and drop the special mode from select.nim.
* buffer: remove server socketbptato2025-01-0913-367/+178
| | | | | | | | | | | Now we just pass through a socket created in pager. This removes the need for a socket directory, and strengthens the buffer sandbox slightly. I've kept the ServerSocket code, because I want to add some form of RPC and communication between separate instances in the future. However, I don't expect this to be handled outside the main process, so I've removed the Capsicum-specific connectat/bindat code.
* dynstream: remove safeClose, add moveFdbptato2025-01-094-30/+22
| | | | | | | | | | | | | | | | | | | safeClose was originally added to prevent this bug: let fd = doSomething() # allocates fd on 0, e.g. by opening a socket let ps = newPosixStream(fd) ... discard dup2(ps.fd, STDIN_FILENO) ps.sclose() # stdin is now closed, despite the opposite intention. With safeClose called on fds that could be stdin, the goal was that stdin/stdout/stderr would never be allocated as a different file, but it was still error-prone. Enter moveFd: ps.moveFd(STDIN_FILENO) If ps is already stdin, this does nothing. If not, it dup2's ps to stdin, closes ps.fd, and sets it to stdin.
* layout: remove needsReLayoutbptato2025-01-091-7/+3
| | | | we always do 2 passes
* bufstream: allow 0-width packetsbptato2025-01-094-9/+6
|
* buffer: make iframes clickablebptato2025-01-097-6/+35
| | | | better than nothing
* dom: add data setter for CharacterDatabptato2025-01-091-1/+1
|
* env: basic postMessagebptato2025-01-093-10/+50
|
* Add performance modulebptato2025-01-093-0/+39
| | | | | Just to replace what QJS-NG has, because I don't want to expose a nanosecond precision clock.
* buffer: fix crash on clonebptato2025-01-082-0/+3
| | | | welp. bufreader chokes on 0-sized packets...
* domexception: add legacy constant namesbptato2025-01-081-1/+32
|
* layout: clear intrinsic minimum block size on shrink-to-fit relayoutbptato2025-01-083-0/+13
| | | | starting to run out of test case names
* tools, format: disable ARCbptato2025-01-083-6/+2
| | | | it's still not quite there yet T_T
* config.toml: add C-g as C-c alternativebptato2025-01-081-0/+1
|
* lineedit: skip last history entry if identical to inputbptato2025-01-081-6/+14
|
* pager: add omni-rewrites to URL historybptato2025-01-081-0/+1
| | | | | | | This way, you can C-p and edit searches again. It is somewhat unfortunate that two entries are saved too, but the alternatives are more complex and not necessarily better.
* ua.css: add missing case insensitivitybptato2025-01-081-16/+16
|
* dom: fix content type detection for user-provided codecsbptato2025-01-081-1/+1
| | | | | contentType is the network type; t may be different depending on the extension.
* dom: implement HTMLMetaElement interfacebptato2025-01-081-3/+13
|
* loader: use per-process control socketsbptato2025-01-0812-412/+415
| | | | | | | | | | | | | | | | | | | | | | | | Previously, each message (load, resume, passFd, etc.) would open a new connection to loader's UNIX socket, and assumed the loader was dead when the loader did not respond (ECONNREFUSED). As it turns out, this model was hopelessly broken: POSIX does not specify when a UNIX socket can refuse connections, so while it happened to work on Linux (which just blocks if it can't accept right now), FreeBSD would randomly refuse connections whenever its listen queue was full. Instead, we now take a socketpair() from the loader in addClient, and pass on one half to the client (the other half stays in loader); this is the control stream, and all messages from the specific client are sent through it. If a message includes a new stream (e.g. lcLoad), then it sends a new socketpair through the control stream. Aside from not being completely broken (and being marginally more efficient), this arrangement has several other benefits: it removes the need for authentication, almost removes the need for sockdir (now only buffers use it), and will make it easier to add async message processing in the future.
* dynstream: simplify, fix fd leakbptato2025-01-081-9/+5
|
* cssparser, mediaquery: factor out tflagb, fix a media query bugbptato2025-01-075-54/+48
| | | | @media (grid: 1) works again.
* dom: standard tagNamebptato2025-01-072-2/+8
| | | | Fixes acid3 test 21