about summary refs log tree commit diff stats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* loader: significantly more efficient loadingbptato2024-02-112-98/+137
| | | | | | | | | | The previous version was running the processor on 100% because select would immediately return for writes even when no buffers to send were available. (This has been the case since I added asynchronous sending, but the previous commit put the console buffer's fd in loader too and that made the problem quite obvious.)
* widthconv: bugfixesbptato2024-02-111-25/+11
| | | | | | | * fix failed assertion on non-ha-column half-width chars followed by handakuten with text-transform: full-width * fix dquot full-width conversion * fix lone half-width han/dakuten conversion
* Get rid of LOAD_PIPE BufferSourcebptato2024-02-119-110/+130
| | | | | Instead, use a stream: scheme and associate hostnames with file descriptors directly from the pager.
* loader: add rejectHandlebptato2024-02-101-8/+8
|
* pager: use 644 mask for mailcap temp filesbptato2024-02-101-2/+2
|
* loader: fix teebptato2024-02-104-126/+230
| | | | | | | | | | | | My eyes are bleeding, but at least there is a chance that this does what I wanted. The previous tee implementation mixed buffer and loader fds, so it was fundamentally broken. Also, it used MultiStream which makes asynchronous streaming impossible. This time we use a flat array of output handles and link to them any buffers not written to the target yet.
* loader: fixes & cleanupbptato2024-02-104-73/+55
| | | | | | | | | | | * LoaderHandle.fd is no more, we now check ostream's fd * setBlocking converted to a PosixStream method * SocketStream now sets fd variable * handle sostream/fd redirection properly * fix suspend/resume This fixes non-HTML resource loading, mostly. However, tee is still broken :/
* loader: use recvData instead of readDatabptato2024-02-093-16/+35
| | | | | | | | recvData is a new method for PosixStream that does less weird magic than readData. Also, allow duplicates in unregWrite/unregRead; it's simpler to live with them than to prevent them.
* cgi: do not register closed istreamsbptato2024-02-091-1/+2
|
* twtstr: misc refactoringsbptato2024-02-095-143/+153
| | | | | | * move out half width <-> full width converters * snake_case -> camelCase * improve toScreamingSnakeCase slicing
* buffer: fix index defect in updateHoverbptato2024-02-081-1/+2
| | | | | | Caused by a race condition when updateHover is executed after buffer.lines.len changed in buffer but before the change has been reported to container.
* buffer: use `of' instead of tagTypebptato2024-02-081-1/+1
|
* Update chamebptato2024-02-081-1/+1
|
* loader: fix (another) double-close bugbptato2024-02-081-4/+8
|
* loader: fix memory leakbptato2024-02-081-1/+3
|
* loader: fix double-close bugsbptato2024-02-081-3/+3
|
* buffer: load external resources when they are attachedbptato2024-02-084-103/+133
| | | | | We no longer have to wait for the entire document to be loaded to start loading CSS.
* loader: fix eagain in fetch, only add URL to handle in debugbptato2024-02-082-7/+12
| | | | | | * eagain was causing fetch to add unnecessary null bytes to input streams * URL is now only added to handles in debug mode
* dom: reduce todosbptato2024-02-081-10/+20
| | | | | * enumize insertAdjacentHTML position * un-extern attrs
* js: fix fromJSEnumbptato2024-02-082-6/+17
| | | | std enum parsing uses Nim ident matching rules, which is incorrect here.
* chadombuilder: remove unnecessary pragmabptato2024-02-081-1/+1
|
* dom: enumize attribute namesbptato2024-02-088-206/+338
|
* dom: atomize id, name, DOMTokenListbptato2024-02-083-103/+162
|
* dom: reduce tagType usebptato2024-02-084-70/+46
| | | | | tagType is now a function call, but usually it's enough to just test for the object type.
* Update chamebptato2024-02-071-1/+1
|
* Fix some document.write bugsbptato2024-02-072-44/+88
|
* Incremental renderingbptato2024-02-077-224/+389
| | | | | | | | | | | | Yay! Admittedly, it is not very useful in its current form, except maybe on very slow networks. The problem is that renderDocument is *slow*, so we only run it when onload fails to consume all bytes from the network in a single pass. Even then, we are guaranteed to get a FOUC, since CSS is only downloaded in finishLoad(). Well, I think it's cool, anyway.
* Update chamebptato2024-02-0711-611/+1087
| | | | | | | | * Update chame to the latest version * Get rid of nodeType usage * Add atoms * Re-implement DOM attributes * document.write
* regex: fix 8-bit narrow strings in JSbptato2024-02-051-1/+1
| | | | | The previous approach to add UTF-8 support to libregexp was broken. This time, we use a separate flag (cbuf_len == 3) to indicate UTF-8 input.
* pager: display precnum *and* inputBuffer when precnum != 0bptato2024-02-011-3/+1
| | | | Previously we were overwriting it, and that looked a little strange.
* toml: misc refactoringsbptato2024-01-301-71/+40
|
* toml: allow EOF in values with laxnamesbptato2024-01-301-0/+2
| | | | Useful for clearing settings with -o
* config: append */* rule instead of prependingbptato2024-01-302-11/+3
| | | | | | + actually use the result. Fixes default converters when no external mailcap exists.
* Add default md2html converterbptato2024-01-301-14/+21
|
* Add command to yank link under cursor (yc)bptato2024-01-291-0/+6
|
* js: always use var destructorbptato2024-01-291-8/+2
| | | | See https://forum.nim-lang.org/t/10807
* layout: more consistent namingbptato2024-01-291-79/+41
|
* layout: consider inline positioning for absolute blocksbptato2024-01-293-78/+102
| | | | | When an absolute block is a descendant of an inline box, its positioned ancestor must be set to that box.
* forkserver: clean upbptato2024-01-295-30/+24
| | | | | Move forkBuffer into forkserver (why was it in container anyway), remove unused mainproc variable, etc.
* client: stop entire process group on suspend()bptato2024-01-291-1/+1
| | | | | * pass 0 so e.g. git does not hang * use sigtstp so e.g. cgi scripts can clean up if needed
* mimetypes: simplify parseMimeTypesbptato2024-01-272-16/+15
| | | | | * use functions like until * do not call atEnd for every line, use boolean readLine instead
* loader: clean up error handlingbptato2024-01-265-82/+71
| | | | | | | | | * remove pointless exception -> bool conversions; usually they were ignored anyway + exceptions are more convenient here * add EPIPE handler to raisePosixIOError * fix socketstream to use raisePosixIOError * fix socketstream sendFileHandle error handling * cgi: immediately return on file not found error
* cgi: fix broken libexec path env variablebptato2024-01-264-9/+10
|
* js: update pragma docsbptato2024-01-241-3/+9
|
* js: define toStringTag properlybptato2024-01-243-3/+13
|
* js: allow specifying static function name, small refactoringbptato2024-01-243-63/+62
| | | | | | | | * static function names can now be defined using the syntax `Class:functionName' (or just use `Class' to take the default name * fix URL.canParse with 1 argument only * do not store JSFuncGenerator for constructors; just put the function node in BoundFunctions
* Remove newFormatbptato2024-01-235-20/+16
| | | | Pointless; it just returned a default zero-initialized object.
* color: remove Premul typebptato2024-01-231-18/+10
|
* rendertext: add support for backspace overstrike, misc fixesbptato2024-01-232-47/+125
| | | | | * parse manpage output styled ugly backspace overstrike formatting * fix broken charset detection for large files
* container: fix b/e unnecessarily switching linesbptato2024-01-201-3/+8
| | | | | cursorWordEnd & cursorWordBegin must only change the current line if no new word was found.