about summary refs log tree commit diff stats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* buffer: remove server socketbptato2025-01-0911-354/+176
| | | | | | | | | | | 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-096-3/+32
| | | | 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-081-0/+1
| | | | starting to run out of test case names
* 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.
* 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-0811-407/+410
| | | | | | | | | | | | | | | | | | | | | | | | 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-073-54/+43
| | | | @media (grid: 1) works again.
* dom: standard tagNamebptato2025-01-071-2/+6
| | | | Fixes acid3 test 21
* layout: get rid of flex-direction reverse hackbptato2025-01-072-47/+59
| | | | | This must not be handled by the tree builder, as that needlessly complicates tree caching.
* mediaquery: add serializationbptato2025-01-063-43/+49
| | | | also, reduce the number of types named MediaQueryList by 50%
* dom: add document.referrerbptato2025-01-064-8/+13
| | | | Only works if referer-from is enabled.
* env: add media query matchingbptato2025-01-065-67/+98
| | | | | | | In lite mode, it uses default window attributes. Incidentally, this also untangles media query matching from cascade, saving us a forward declaration hack (yay!)
* container: remove locationbptato2025-01-061-3/+0
| | | | undocumented alias for url; just use the latter.
* layout: wrap on inline floats that exceed the line's lengthbptato2025-01-061-4/+4
| | | | | | | In this case, it seems we have to wrap. (It's still not quite there; replace flow-root with inline-box to see another interesting bug...)
* layout, render: establish absolute container with position: stickybptato2025-01-063-19/+13
| | | | We do not support sticky scrolling, but this much should still work.
* buffer: force restyle on toggleImagesbptato2025-01-061-1/+1
| | | | In some cases, it works without restyle, but not always.
* loaderiface: fix race in poll registerbptato2025-01-063-11/+36
| | | | | | | handleRead can register through fetch, so this doesn't work out as nicely as in loader (where we control all register/unregister calls). So now we queue up register events first, and only process them after the "events" iterator exits.
* layout: fix percentage margins in shrink-to-fitbptato2025-01-051-13/+17
| | | | | | | | Turns out this doesn't work like I thought it does... the second layout is always needed. This probably means that it's possible to layout absolutes during flow after all...
* dom: clean up namespace handling, add createElementNSbptato2025-01-053-67/+139
|
* dom: DOMTokenList fixes/improvementsbptato2025-01-053-9/+16
|
* dom: add form length, fix document.getElementsByName("")bptato2025-01-051-0/+10
|
* dom: clean up, add some strict defsbptato2025-01-051-170/+171
|
* dom: button fixesbptato2025-01-052-4/+6
|
* layout: margin fixesbptato2025-01-052-15/+20
| | | | | | | | * respect flex item starting margin on main axis * pass left margin as offset input too -> fixes some sub-layout cache inconsistencies well, I *think* it does, but I haven't managed to find a case where it changes anything... either way, at least the code is prettier now
* layout: InnerBlockContext -> BlockBuilderContextbptato2025-01-041-65/+65
|
* dom: add some table interfacesbptato2025-01-042-26/+260
|
* pager: skip a pointless zero fillbptato2025-01-041-1/+1
|
* dom: radiogroup fixesbptato2025-01-042-22/+20
|
* dom: implement cssFloatbptato2025-01-041-0/+4
|
* buffer: fix regression in restyle on window resizebptato2025-01-041-2/+6
| | | | it has to clear old styles too
* Try to set close-on-exec, misc cleanupbptato2025-01-046-30/+28
| | | | | | | | | | FD_CLOEXEC should hopefully get rid of bugs where buffers outlived the main process because of some stray child process keeping the canary pipe alive. It's not perfect because of the runMailcapWriteFile/runMailcapReadFile double-forks. Ideally they should be replaced with an implementation that tracks temporary files in the main process.
* Update chamebptato2025-01-031-1/+1
|
* dom: JS input/form fixesbptato2025-01-031-1/+10
| | | | Fixes acid3 test 53
* layout: respect margin-top of root boxbptato2025-01-031-1/+1
|
* env, buffer: restyle on getComputedStylebptato2025-01-034-50/+64
| | | | | | style/layout invalidation is a mess :( Fixes acid3 test00
* dom: make stringifiers explicit, optimize tokenList toStringbptato2025-01-031-3/+3
|
* twtstr: optimize a bitbptato2025-01-031-23/+19
|
* LayoutUnit -> LUnitbptato2025-01-034-162/+162
|
* lunit: use saturation arithmeticbptato2024-12-232-23/+76
| | | | | | | I'm not a fan, because it hides bugs. But working around the overflow errors is starting to get unwieldy. On 32-bit systems, we try to use compiler intrinsics as Nim does.