about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
...
* gopher: url decode path & query before submissionbptato2024-11-121-1/+3
|
* container: fix `U' cursor repositioning (really)bptato2024-11-122-25/+16
| | | | I swear this feature is cursed
* Remove useless filebptato2024-11-121-1/+0
|
* buffer: fix broken gotoAnchor behaviorbptato2024-11-125-90/+123
| | | | | | | | | | | | | | | | | 23beebe6 introduced a regression that broke gotoAnchor. This fixes that, plus a couple other long-standing gotoAnchor bugs: * If no anchor is found, do not dupe the buffer. Desktop browsers still add a history entry, while w3m prints an error. I've copied the latter because it makes more sense as a user, but this will have to be refined for the navigation API at some point. * If the anchor *is* found, then always jump to it, even if it's not visible. This was a limitation of relying on the line array, so now we rely on the box tree instead. (Sooner or later, the former must go anyway.) Also, fix `U' reload not restoring the position (hopefully this time for good).
* client: do not reopen istream if stdin is a ttybptato2024-11-121-6/+5
|
* url: reduce URL object size, simplifybptato2024-11-118-292/+212
| | | | | | | * query, fragment are now strings, not options * get rid of Host, Path types, now hostname/pathname are strings * fix ipv4 parsing error case * in file protocol, fix URL for dirlist without slash with a redirection
* client: run actions for mouse clicksbptato2024-11-101-12/+16
| | | | | stopgap measure until I think of a more flexible mouse configuration method
* dom: add replaceChild, requestAnimationFramebptato2024-11-104-7/+17
|
* cascade: adjust prefers-color-scheme based on terminal backgroundbptato2024-11-104-1/+10
| | | | also, default link color is now blue for light terminal backgrounds
* layout -> cssbptato2024-11-109-12/+12
| | | | as much as I wish it weren't, layout *is* css.
* dom: misc fixes & additionsbptato2024-11-092-0/+28
| | | | | | | | * fix cloneNode not cloning id/name atoms * fix HTMLOptionsCollection named item getter * fix HTMLCollection named item getter not refreshing snapshot * support named item getter for form * add basic createEvent
* dom: skip alternate stylesheets, add disabledbptato2024-11-092-6/+14
| | | | seems to work ok
* layout: improve image sizingbptato2024-11-091-24/+16
| | | | | fixes a bug where only setting max-height and width would not re-scale the image
* renderdocument: basic stacking context supportbptato2024-11-098-27/+59
| | | | | negative z-index and inline positioning are still not respected, but better than nothing I guess.
* Update monouchabptato2024-11-092-6/+6
|
* layout: adjust fixed positioningbptato2024-11-091-2/+12
| | | | | | | | | | | | | | | | | | In CSS, `position: fixed' either a) moves the box on scroll (with `@media screen'), or b) repeats the box on every page (with `@media print'). a) would completely mess up our document model, and even if it didn't, the renderer couldn't handle a redraw on every single scroll. b) sounds better, but still doesn't work because it's incompatible with `@media screen' semantics. e.g. in a) I can read text despite any banner on the bottom of the screen, because the box moves when I scroll, but in b), the same box will obscure some text on every single page. So instead, make the `position: fixed' containing box width: max(:root.width, 100vw); height: max(:root.height, 100vh)). This is completely non-standard, but at least both TOC-like fixed boxes *and* banners are placed somewhere that makes some sense.
* layout: fix a few more flex sizing bugsbptato2024-11-095-61/+118
| | | | | | | | * fix min-width, max-width, etc. not being accounted for properly on the main axis * fix fit-content sizing being overridden for flex items * fix baseline not being set * somewhat unrelated: fix firstBaseline not being set for block boxes
* dom: support all HTMLHyperlinkElementUtils gettersbptato2024-11-0920-130/+220
|
* layout: fix initial flex item width calculationbptato2024-11-087-18/+60
| | | | | | | | | | | | | | | Before, the initial layout of a flex item would have inherited the parent's sizing constraint. This almost worked, except when a descendant of a flex item with an unspecified width would resolve its percentage against this incorrectly inherited width - per standard, this must resolve to auto. Also, the shrink case was wrong, because it did not scale the unit to the respective widths; the standard mandates this as well. Hopefully I got it right this time. Finally, this fixes positioned inline container blocks not being set as the absolute container.
* Fix some C warnings, more makefile vars, etc.bptato2024-11-089-58/+74
| | | | | | | * add some more env vars to makefile * remove fpermissive from GCC builds * update Monoucha * fix borked seccomp filter length safety check (ugh)
* poll: fix clear()bptato2024-11-072-3/+6
| | | | | setLen(0) inside the events iterator was wrong; it should have just set all items to -1.
* ftp: improve sendCommand error handlingbptato2024-11-071-17/+15
|
* url: fix compilation on Nim 1.6.14bptato2024-11-075-28/+29
| | | | it handles side effects differently
* chaseccomp: update docs, remove redundant importbptato2024-11-073-9/+11
|
* luwrap: fix compilation on 2.0.8 and refactor a bitbptato2024-11-055-23/+16
| | | | ref. https://todo.sr.ht/~bptato/chawan/21
* gopher: rewrite in shellbptato2024-11-057-175/+123
| | | | | | also, make gopher2html more lenient, and add some functioning error handling in our nc clone. (other scripts still have to be updated to benefit from this)
* gopher: move ipv6 handling to lcgibptato2024-11-042-10/+18
|
* url: fix crash on invalid ipv6 syntaxbptato2024-11-042-1/+2
|
* chaseccomp: lock down clone; fix mprotect on bionicbptato2024-11-045-10/+23
| | | | | | | | | | | * add restrictions on clone for buffer filter - hardcoded it for musl, glibc and bionic. hopefully they don't change it too soon... * remove define directive from gen_syscalls - now the arch nr check is hardcoded in gen_defs. makes things a bit less complex. * fix borked mprotect filter on bionic - this completely broke the browser.
* dynstream: fix crash on *BSDbptato2024-11-041-1/+4
| | | | turns out fchmod on sockets only works on Linux.
* utils, types: merge some modulesbptato2024-11-0333-323/+266
| | | | | * line, vector, matrix -> path * twtuni, charcategory -> twtstr
* renderdocument: recurse in renderBlockBoxbptato2024-11-031-54/+47
| | | | Looks like this no longer overflows the stack.
* layout: fix a small table bugbptato2024-11-023-2/+10
|
* dom: add localName, simplifybptato2024-11-022-16/+24
|
* layout: remove inline roundingbptato2024-11-024-6/+5
| | | | | | | | | It broke styles like "margin-top: -5px; padding-top: 5px", because the margin would be taken as-is, and the padding rounded to 0. Now they cancel each other out again. (I think I had added this to reduce error caused by line-height, but we don't have line-height anymore.)
* remove an empty filebptato2024-11-021-0/+0
|
* cssparser: fix parsing of unrecognized at rulesbptato2024-11-025-26/+30
| | | | + clean up a bit
* protocol: sandbox more network processes + fix some gemini bugsbptato2024-11-028-15/+19
|
* container: fix nil deref on cancelbptato2024-11-021-3/+4
|
* layout: fix yet another inline float bugbptato2024-11-013-1/+12
| | | | | | | | | you can't just set the BFC offset to your own offset when the BFC's origin is your inner offset. (in block layout, this is addressed by initBlockPositionStates & co, but we don't call that for inline because the offset is already resolved there anyway. so this is a special case)
* dom: fix <select> default state with size=1bptato2024-11-011-20/+14
|
* urlenc: strip a trailing newline from input, etcbptato2024-11-013-40/+40
| | | | | | | | | * make it so 'echo "$var\n" | urlenc' works as expected * add special query encode set * set default encode set to form data * document encode sets in help message also, remove a redundant percentEncode implementation from gopher2html
* Makefile: check for cd return statusbptato2024-11-011-7/+7
|
* layout: simplify a bit, fix some inline float bugsbptato2024-11-016-113/+103
| | | | | | | | | | | | | | * simplify "positioned" value calculation: - don't include it in ResolvedSizes, since it's unused in most layouts - resolvePositioned for both absolute and relative positioning - use "size" instead of "space" for absolute positioning - include parent width in layout so that renderdocument does not have to account for it * return bottom margins as regular return values instead of var * fix child bottom margins being discarded in inline floats * fix inline float not including the parent block position in its BFC position
* chaseccomp: revert parts of d9ca197ebptato2024-10-313-5/+6
| | | | | | | | | * abort on network sandbox violation - it's probably better not to, but I want to think this through a bit more before changing it for good (and then do it consistently, i.e. also for the buffer process.) * revert case variable quoting - the lack of field splitting is specified by POSIX, and the readme states that we target POSIX. no need to be paranoid about imaginary shells.
* config: fix relative includes with -Cbptato2024-10-311-2/+3
|
* dom: add HTMLSelectElementbptato2024-10-311-8/+76
|
* layout: refactor flow and fix some bugs in the processbptato2024-10-3121-351/+347
| | | | | | | | | | | | * factor out `margin' field from box state * get rid of RootInlineFragment * `nested' -> `children' * get rid of repositionChildren pass; now we handle relative positioning and -cha-center/-cha-right separately * cha-center, cha-right no longer applies to floats * use consistent naming scheme for tests * fix float bottom margin strut not being flushed * fix inline floats changing non-fit-content width
* headers: fix formattingbptato2024-10-311-1/+1
|
* pager: fix borked error checkbptato2024-10-311-1/+1
|