about summary refs log tree commit diff stats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* layout: clean up inline tree constructionbptato2024-06-013-292/+309
| | | | | | | Much cleaner than the previous solution. Should also be somewhat less wasteful, as we no longer constantly rebuild the same tree with new branches.
* layout: dimSum -> sumbptato2024-06-011-22/+21
|
* layout: refactor resolveSizesbptato2024-06-011-140/+126
| | | | get rid of percHeight, unify min/max sizing, etc.
* main: fix tmpdir/sockdir permsbptato2024-05-311-3/+4
|
* config: fix -C with files not in CWDbptato2024-05-312-6/+14
|
* layout: line box sizing fixesbptato2024-05-311-15/+11
| | | | | * do not use inline block computed values for wrapper fragment * fix minimum line box height calculation
* pager: rework D/discard bufferbptato2024-05-311-47/+126
| | | | | | | | | | | | | | | | | | | | | The previous solution had the issue that it switched between "delete buffer, then move back" and "delete buffer, then move forward" depending on whether the buffer was the root of the buffer tree, which made its behavior quite unpredictable. Now the pager (sort of) remembers the direction you are coming from, and D moves in that direction. So e.g.: * Enter, D just moves back to where you were coming from (as before) * Comma, D deletes the previous buffer, then returns to the current buffer If no buffer exists in the target direction, then we alert. Also, new commands are: `d,' `d.'. They do the same thing the non-d-prefixed variations do, but also delete the current buffer. Useful if you're no longer sure where you are coming from, but know where you want to go. (`d,' in particular is equivalent to w3m's `B'.)
* layout: fix a width sizing bugbptato2024-05-301-4/+1
| | | | | | | As expected, the mystery line was just hiding another bug. (In particular, indefinite containing size constraints were not denied in resolveContentWidth, so it only (accidentally) worked with stretched sizes.)
* layout: fix regressionbptato2024-05-301-0/+3
| | | | seems like this line is necessary after all
* layout: simplify percHeight handling, misc refactoringsbptato2024-05-301-67/+30
|
* layout: fix caption margin calculationbptato2024-05-301-19/+17
| | | | | | * merge caption sizing code path with layoutRootBlock * fix caption margins being disregarded * fix incorrect positioning of `caption-side: bottom'
* layout: improve baseline calculationbptato2024-05-301-56/+56
| | | | | * use current fragment's line height for percentage baselines * get rid of baseline calculating pass in verticalAlignLine
* Fix GCC 14 compilationbptato2024-05-302-17/+26
| | | | | | | | TODO: find the exact flags we need instead of -fpermissive. See also: https://todo.sr.ht/~bptato/chawan/12 https://forum.nim-lang.org/t/11587
* layout: fix clear on blocks establishing new BFCsbptato2024-05-301-1/+4
| | | | | | | | | | | As per standard: > Adjoining vertical margins collapse, except: > [...] > If the top and bottom margins of an element with clearance are > adjoining, its margins collapse with the adjoining margins of > following siblings but that resulting margin does not collapse with > the bottom margin of the parent block.
* layout: misc refactoringsbptato2024-05-293-193/+205
|
* layout: get rid of InlineBoxBuilderbptato2024-05-283-109/+103
| | | | just merge it with InlineFragment
* buffer: fix ampersand escaping in markURLbptato2024-05-281-0/+4
|
* layout: fix crash on inline tablesbptato2024-05-281-1/+1
|
* stylednode: remove `text' fieldbptato2024-05-284-16/+20
| | | | This avoids some unnecessary string copying.
* stylednode: move invalidation data to DOMbptato2024-05-273-25/+23
| | | | this way, we do not refer to nodes of previous cascade passes
* layout: remove BlockBoxBuidlerbptato2024-05-273-687/+599
| | | | | | | | | | Instead of allocating a separate object for each box, just re-use a single BlockBox on re-layouts. This means that now the (block-level) tree is built in its final form in the first pass. (Inline boxes remain the same as before for now.)
* layout: list item improvements, fix inner markersbptato2024-05-251-36/+41
| | | | | * fix list-style-position: inside * get rid of ListItemBoxBuilder
* layout: add wrapper box for table caption + misc stuffbptato2024-05-242-121/+176
| | | | | | | | | Captions are no longer positioned inside tables, yay. Also, misc: * rename some things for consistency * clamp out of bounds rgb() values * remove inherited property lookup table
* client: fix double click on double width charsbptato2024-05-231-7/+7
| | | | | This is not a perfect solution, but it's still better than not being able to double click on CJK links correctly.
* url: add URL.parsebptato2024-05-221-0/+3
| | | | | | | Pointless bloat that fixes no real problems, but it's standard now... (Are we supposed to add a helper function that returns null for *every* constructor that can throw now?)
* layout, layoutunit: remove some automatic convertersbptato2024-05-223-13/+11
| | | | | I wish we didn't need any, but fixing this for integers would be too involved and the float64 one was causing problems now.
* layout: simplifybptato2024-05-211-102/+76
| | | | removes elaborate table box type hierarchy that does nothing
* twtstr: fix overflow checkbptato2024-05-211-2/+2
|
* sandbox: add sigreturnbptato2024-05-211-0/+2
| | | | seems to get called for signal handlers
* forkserver: also skip SIGTERM socket unlinkbptato2024-05-201-5/+1
| | | | rationale: see previous commit
* buffer: never unlink controlling socket in cleanupbptato2024-05-201-5/+2
| | | | | | | | The pager already unlinks it, so ideally this should change nothing. (This was causing buffer processes to core dump on OpenBSD, because I forgot that I removed unlink promise. Better keep code paths the same when possible...)
* html: improve Request, derive Client from Windowbptato2024-05-2017-315/+362
| | | | | | | * make Client an instance of Window (for less special casing) * misc work on Request & fetch * improve origin comparison (opaque origins of same URLs are now considered the same)
* layout: fix inline tab expansionbptato2024-05-191-0/+1
|
* layout: fix BFC positioning in presence of floatsbptato2024-05-192-14/+59
| | | | | | | | | | | | | Previously, the following printed "2" instead of "12": <div style=float:left>1</div><div style=display:flow-root>2</div> This fixes the above problem in the laziest possible way: we relayout once in the smallest possible space the BFC fits in when floats exist. See the comment in the code for details. As a nice bonus, this also fixes tables overlapping with floated boxes, by pretending that they establish a BFC.
* css: stub overflowbptato2024-05-182-3/+18
| | | | | The renderer cannot handle it yet, but at least this fixes pages that expect overflow: hidden (etc.) to establish a new BFC.
* layout: fix maxFloatHeight checkbptato2024-05-181-5/+5
| | | | | Including our own position is a mistake, since the BFC starts from the inner box.
* layout: reuse box.positioned in positionAbsolutebptato2024-05-181-4/+4
|
* layout: relative positioning fixesbptato2024-05-182-75/+64
| | | | Fix percentage-based left/right etc.
* layout: slightly refactor table layoutbptato2024-05-181-27/+26
|
* forkserver: simplify fcLoadConfigbptato2024-05-183-16/+6
|
* config: separate tmp dir for sockets, usersbptato2024-05-166-21/+20
| | | | | | | * add $LOGNAME to the tmp directory name, so that tmpdirs of separate users don't conflict * use separate directory for sockets, so that we do not have to give buffers access to all cached pages
* css/values -> css/cssvaluesbptato2024-05-1610-11/+11
| | | | for consistency
* cssvalues: fix casingbptato2024-05-161-61/+61
|
* pager: editor command fixesbptato2024-05-122-3/+4
|
* js: allow var instead of ptrbptato2024-05-125-94/+100
|
* container: remove unused codebptato2024-05-121-5/+0
|
* client, pager: remove unnecessary std/streamsbptato2024-05-112-12/+7
|
* buffer: fix multipart formsbptato2024-05-1114-233/+244
| | | | | | | | | * fix enctype not getting picked up * fix form data constructor requiring open() syscall (which gets blocked by our seccomp filter) * add closing boundary to multipart end * pass fds instead of path names through WebFile/Blob and send those through bufwriter/bufreader
* pager: take $EDITOR from envbptato2024-05-111-5/+5
| | | | | | * use EDITOR environment variable in default config, fix line number ordering in fallback * autodetect vi-like editors and add line number
* term: optimize canvas redraw, remove emulate-overlinebptato2024-05-102-64/+38
| | | | | | | * Replaced the `pcanvas' comparison with a much simpler tracking of the first damaged cell in writeGrid, which is significantly faster. * Removed emulate-overline: it's of too little utility compared to the maintenance burden it caused.