about summary refs log tree commit diff stats
path: root/src/server/buffer.nim
Commit message (Collapse)AuthorAgeFilesLines
* pager: add precnum to [, ]bptato2023-12-091-9/+23
|
* pager: add `{', `}'; document externIntobptato2023-12-091-1/+20
| | | | | | | | { & } acts like in vi (except the cursor is not moved to the line beginning). No reason to leave externInto undocumented, as it is even used in the default config.
* buffer: do not needlessly copy in onloadbptato2023-12-031-9/+5
|
* dom: fix relList setter regression, remove rel()bptato2023-12-021-1/+1
|
* dom: redefine Node.contains to match standardbptato2023-12-011-1/+1
| | | | (and expose it as a JS function)
* buffer: do not set readyState if document is nilbptato2023-11-291-1/+2
| | | | | As the comment says, buffer.document only exists if buffer.ishtml is true.
* dom: add document.readyStatebptato2023-11-271-2/+4
|
* buffer: add DOMContentLoaded, misc event improvementsbptato2023-11-271-46/+72
| | | | | | | * Add DOMContentLoaded * Re-use the same event object for all elements * Reshape if an event was fired * Reshape on setTimeout/setInterval fired
* buffer: call onload function on dispatchLoadEventbptato2023-11-211-3/+13
|
* buffer: optimize findPrevLinkbptato2023-11-201-0/+8
| | | | | It's better to not do it perfectly in 100% of all cases than to loop through the entire document in all cases.
* buffer: remove viewport referencebptato2023-10-281-7/+1
| | | | | Viewport at this point is basically just the layout state, so it makes no sense to store it in buffer.
* renderdocument: slightly refactor, optimize addLinesbptato2023-10-261-4/+13
|
* buffer: close ssock on exitbptato2023-10-261-0/+1
|
* buffer: call load event on loadbptato2023-10-251-1/+13
|
* Remove trailing spacesbptato2023-10-231-1/+1
|
* warn on eprint in release modebptato2023-10-211-1/+1
| | | | Maybe it's easier to avoid accidentally including like this
* WindowAttributes: refactorbptato2023-10-191-1/+1
| | | | | | * rename module (window -> winattrs, to avoid conflict with env/window) * do not use result * remove unused cell_ratio
* container: add cursorNthLink, cursorRevNthLinkbptato2023-10-141-4/+38
|
* buffer: fix cursor unnecessarily jumping to y=0bptato2023-09-301-5/+7
| | | | | then() is called even if a nil Promise is returned, so an Opt is needed here.
* Improve implicit form submissionbptato2023-09-301-2/+11
| | | | | | * Implement the "default button" part of the standard. * If the submitter is the form, formmethod may be called on it. Check if this is the case in the function, and if yes, return the form's method.
* Add urimethodmap supportbptato2023-09-301-2/+5
| | | | yay
* buffer: improve submitFormbptato2023-09-301-6/+42
| | | | | * add handlers for javascript, mailto * HTTP-like behavior for unknown protocols
* loader: add local-cgibptato2023-09-301-1/+1
| | | | | | | | | | | Add w3m-style local CGI support. It is not quite as powerful as w3m's local CGI, because it lacks an equivalent to W3m-control. Not sure if it's worth adding; we certainly shouldn't allow passing JS in headers, but a custom language for headers does not sound like a great idea either... eh, idk. also, TODO add multipart
* Response.text: encode/decode properlybptato2023-09-271-5/+8
| | | | also, use blob() for images
* buffer: simplify contentType handlingbptato2023-09-271-24/+20
| | | | | | * remove contentType member of Buffer object * add ishtml to reduce string comparisons * consistent spelling: contenttype -> contentType
* interface clone: remove unused arg, documentbptato2023-09-271-4/+9
|
* Add precnum support to more functionsbptato2023-09-261-6/+18
|
* buffer: make readFromFd work with pipesbptato2023-09-231-4/+17
|
* buffer: make clone fork()bptato2023-09-231-19/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes e.g. on-page anchor navigation near-instantaneous. Well, as instantaneous as a fork can be. In any case, it's a lot faster than loading the entire page anew. This involves duplicating open resources (file descriptors, etc.), which is not exactly trivial. For now we have a huge clone() procedure that does an ok-ish job at it, but there remains a lot of room for improvement. e.g. cloning is still broken in some cases: * As noted in the comments, TeeStream'ing the input stream for any buffer is a horrible idea, as readout in the cloned buffer now depends on the original buffer also reading from the stream. (So e.g. if you clone, then kill the old buffer without waiting for the new one to load, the new buffer gets stuck.) * Timeouts/intervals are broken in cloned buffers. The timeout module probably needs a redesign to fix this. * If you clone before connect2, the cloned buffer gets stuck. The previous solution was even worse (i.e. broken in more cases), so this is still an improvement. For example, this fixes some issues with mailcap handling (removes the "set the Content-Type of htmloutput buffers to text/html" hack), does not reload all resources, does not completely break if the buffer is cloned during loading, etc.
* buffer: support <a name=... for anchor navigationbptato2023-09-201-3/+3
|
* loader: add gopher supportbptato2023-09-201-2/+3
| | | | works
* update chamebptato2023-09-191-1/+2
| | | | and with that, resolve the unknown input type issue
* Fix compilation with --assertions:offbptato2023-09-151-1/+2
| | | | | Remove side effects from assert statements. The flag is not used currently, but let's not depend on that.
* buffer: directly pass EncoderStream to parseStylesheetbptato2023-09-141-3/+2
| | | | No need for that extra copy into a StringStream.
* Update submodulesbptato2023-09-141-1/+3
|
* move around more modulesbptato2023-09-141-0/+1481
* ips -> io/ * loader related stuff -> loader/ * tempfile -> extern/ * buffer, forkserver -> server/ * lineedit, window -> display/ * cell -> types/ * opt -> types/