| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
largely unused
lent idea from nim-results
|
| |
|
|
|
|
|
|
| |
We already need a camel -> kebab converter anyway.
Unfortunately this also changes JS binding names, so it's a breaking
change. Oh well.
|
| |
|
|
|
|
|
|
|
|
| |
Moves sendfd/recvfd out of C, and fixes some of its flaws too.
The main one is that now all file descriptors are sent together.
Also, I've decided to remove the ServerSocket after all; it's easy to
add it back if it's ever needed again.
|
|
|
|
| |
to mark nilable ref objects
|
|
|
|
|
|
|
| |
ok, now it works like in w3m. (mostly, barring CSS limitations...)
we'll see how this works out
Also adds/fixes some select and option DOM APIs.
|
|
|
|
|
|
|
|
|
| |
Regular select is now rendered as flex, and does not wrap.
This gets rid of the pointless whitespace before/after options.
multiple still looks weird, but maybe a bit less?
Probably we should just render it with pseudo-checkboxes, and drop the
special mode from select.nim.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
welp. bufreader chokes on 0-sized packets...
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Only works if referer-from is enabled.
|
|
|
|
| |
undocumented alias for url; just use the latter.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
style/layout invalidation is a mess :(
Fixes acid3 test00
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until now, we just stuffed it into the URL, which was somewhat
problematic.
Mainstream browsers like to hide the username from the user, but I've
decided to follow w3m: buffers do not receive auth info, but the pager
itself displays the username.
As for the origin: I wanted to use the regular origin, but that does not
work with any custom URL. So instead of changing the regular origin
function, I've added another.
|
|
|
|
|
|
|
|
|
| |
* add failed buffers to history too
* make buffer.history and siteconf history actually do something
* prevent history in dump mode after retry too
* disable history in test configs
ref. https://todo.sr.ht/~bptato/chawan/39
|
|
|
|
|
| |
more intuitive than shoehorning it into "view image"
(also makes it easier to apply the content type)
|
|
|
|
| |
ok I'll use result, whatever
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mostly compatible with other browsers/tools that follow the
Netscape/curl format.
Cookie jars are represented by prepending "jar@" to the host part, but
*only* if the target jar is different than the domain. Hopefully, other
software at least does not choke on this convention. (At least curl
seems to simply ignore the entries.)
Also, I've moved cookies.nim to config so that code for local files
parsed at startup remains in one place.
|
| |
|
| |
|
|
|
|
| |
Now screen.width etc. works in the pager too.
|
|
|
|
|
|
|
|
|
| |
Looking at it closer, this never actually did what it advertised to do.
It only affected first-party cookies from subdomains, but that has been
fixed; third-party cookies were never supported in the first place.
(In fact, even first-party cookies are still skipped unless directly
received on navigation. This should probably be fixed.)
|
|
|
|
|
| |
If the image has an offx or offy, then it means it is partially outside
the screen, so its offx2/offy2 is already accounted for.
|
|
|
|
| |
Also fixes the -O option.
|
|
|
|
| |
toJS is generally more efficient
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix luwrap comparison function
* strip high unicode controls in term/pager
* use wcwidth in dirlist2html
* remove combining category from strwidth
* remove unused "disallowed" field from lineedit
My initial goal with switching to wcwidth in dirlist2html was just to
get rid of the outdated combining map in charwidth_gen. Then I realized
that layout will normalize those out anyway, so we don't actually have
to deal with them anywhere.
Also, I found a few bugs in the process; high unicode control chars not
being stripped out was a particularly bad one, as it allows for pages to
mess up the terminal output. (Easiest way to replicate: just open a
random binary file without this patch.)
|
|
|
|
|
| |
It's still missing a "color visited links" feature, but it's better
than nothing.
|
| |
|
|
|
|
| |
doing it manually is too error prone
|
| |
|
|
|
|
| |
this broke saveImage
|
| |
|
|
|
|
|
|
|
|
| |
Inspired by Dillo. (Just the movement mechanism; Dillo doesn't hide the
context menu on double click, but we still do.)
Also, we now disable highlighting of menu items when the mouse is
hovering outside.
|
|
|
|
|
| |
Always override Expires with Max-Age, but never the other way (as per
spec.)
|
| |
|
|
|
|
|
| |
Whether this works or not still depends on many variables, but it
should be enough in most cases.
|
|
|
|
|
| |
now I sort of understand how it works. basically maxh and maxw represent
the inner area occupied by the widget at any time.
|
|
|
|
|
|
|
|
| |
* correct action on M-b
* add external.bookmark option
* move openFileExpand functionality into unquote
* add menu items
* update docs
|
|
|
|
|
|
|
|
| |
Both are quite useful.
readFile and writeFile got a small makeover in error handling; in
particular, readFile now returns null instead of the empty string when
the file is missing and writeFile throws a TypeError on I/O errors.
|
|
|
|
|
|
|
|
| |
Not quite sure why I had assumed that this is broken. At least on XTerm,
the previous behavior definitely was, e.g. with a white-ish background
and white foreground it would end up correcting the contrast to purple
even with black CSS color (thus breaking the "no fgcolor with bgcolor"
assumption anyway.)
|
| |
|