about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
...
* quickjs: disable JSValueConst distinction in release modebptato2025-04-111-12/+23
| | | | | | | | | Regrettably, Nim implements converters using procedures instead of templates, so with JSValueConst it will gladly generate a gazillion pointless function calls for the linker to optimize away. Since JSValueConst itself is just a development tool, it's fine to disable in release mode.
* config: unify table arrays and tablesbptato2025-04-118-140/+195
| | | | | | | | | | | | | | | | | | [[siteconf]] now just means [siteconf.0], etc. So you can now override parts of default siteconfs/omnirules, e.g. to change the Google search substitute-url, etc. To celebrate this, I've added some more default search engines: * wk: -> Wikipedia * wd: -> Wiktionary * ms: -> Marginalia Search These can be replaced by setting e.g. omnirule.wk = {}, etc. Also, siteconf = {} can be used to clear pre-defined siteconfs. This is an unfortunate deviation in semantics from TOML, but in practice the way it worked before didn't match the spec either, so at least it is now consistent.
* layout, render: fix positioning of absolute flex item descendantsbptato2025-04-106-53/+40
| | | | | | | | Always placing boxes relative to their parent *seems* prettier, but the implementation was broken and I can't come up with a sane working one. So we're back to just special casing position: absolute in render. Sad, but at least it works. (I think it's also a bit more efficient.)
* Update docsbptato2025-04-1011-18/+14
|
* newhttp: stop reading when Content-Length is exceededbptato2025-04-101-10/+13
|
* formdata: avoid sending CRLF for epiloguebptato2025-04-101-2/+0
| | | | | it *is* allowed by the RFC, but others don't do it and some servers choke on it.
* cookie: accept secure through http on localhostbptato2025-04-101-1/+1
| | | | others do this too
* cssvalues: add canvas, canvastext colorsbptato2025-04-091-0/+5
| | | | | I've set them to -cha-ansi(default) to avoid having to add even more color type flags.
* config: remove deprecated ColorMode valuesbptato2025-04-091-19/+0
|
* sftp: fix IdentityFile scan orderbptato2025-04-091-2/+4
|
* layout: always treat flex items as positioned boxesbptato2025-04-073-37/+47
| | | | | it still isn't really correct, they aren't supposed to behave as absolute positioning containers...
* layout: factor out canClear flagbptato2025-04-071-19/+14
| | | | ugly hack that is no longer needed
* layout: fix cleared floats not flushing previous exclusionsbptato2025-04-063-3/+27
| | | | | | | Well, I was trying to reproduce *another* float bug when I accidentally stumbled upon this... The fix is somewhat ugly, but not as bad as I expected.
* Update docsbptato2025-04-062-2/+1
|
* loader: support Set-Cookie for non-initial requestsbptato2025-04-0511-111/+253
| | | | | | | | | For compatibility with mainstream browsers. e.g. this should allow log-ins through ajax. To synchronize the loader's cookie jar with that of the pager, we open a stream (about:cookie-stream) to pass over serialized cookies when required.
* Update docsbptato2025-04-041-7/+7
|
* mailcap: remove double negativebptato2025-04-041-1/+1
|
* mailcap: various fixesbptato2025-04-044-28/+31
| | | | | | | * print path on error (like in toml) * fix line tracking * accept non-ASCII commands * (also adjusted some error messages in config & toml)
* layout: correct table-caption width calculationbptato2025-04-037-39/+126
| | | | It's surprisingly tricky.
* Update docsbptato2025-04-032-16/+43
|
* Update docsbptato2025-04-021-1/+1
|
* csstree: add ::marker pseudo elementbptato2025-04-028-15/+46
|
* cssparser: ignore case in AnB parsing of odd/evenbptato2025-04-023-60/+68
|
* cssparser: optimize out some copiesbptato2025-04-025-457/+403
| | | | | | | | | The input buffer is no longer copied, and parseFloat32 gets an openArray instead of a copy of the string to parse. I've also simplified the parser somewhat so it now operates on openArrays of CSSComponentValues. It's still far more complex and wasteful than it should be, but it's progress.
* cssparser: fix escape sequence parsingbptato2025-04-013-1/+8
|
* config: fix semicolon handling in user-style importbptato2025-04-013-4/+12
| | | | | ok so apparently you can leave out the semicolon, but *only* if the at rule is at EOF
* config: remove exceptionsbptato2025-04-011-164/+187
| | | | | in this case they actually made sense, but I want to remove them altogether
* config: add user-style, deprecate [css] and stylesheetbptato2025-04-018-71/+174
| | | | | I'm not 100% content with this syntax either, but it's a significant improvement over the previous solution.
* tinfl: small cleanupbptato2025-03-312-11/+6
|
* url, twtstr: misc cleanupbptato2025-03-292-28/+16
|
* dom: remove expensive assertionbptato2025-03-291-1/+0
|
* jserror: simplify custom error creationbptato2025-03-297-75/+70
| | | | | | | The old API was needlessly complex and suggested that it could only be used for DOMException (which is not the case). (Also optimized out code lookup from the DOMException constructor.)
* config.toml: restore old UA stringbptato2025-03-281-1/+1
| | | | | | | | | | | | | | | Originally I added Mozilla/5.0 because Google refused to serve valid HTML without it, and some websites really disliked us not sending it. Since then, I've had to special case Google anyway because now it only serves usable results to a specific set of UA strings. Meanwhile, an aggressive client blocking software has been spreading lately, which shows a (broken, for various reasons) JS POW page if you *do* send Mozilla/5.0. So I guess it's better to switch back for now. The drawback of course is that now we are broken on sites that expect us to send Mozilla/5.0. Hopefully this is no longer as common as before.
* Update docsbptato2025-03-281-2/+2
|
* Monoucha version 0.10.0bptato2025-03-284-11/+36
|
* xhr: support FormData/string in POST, remove redundant trybptato2025-03-281-11/+28
|
* loader: respect credentials modebptato2025-03-284-17/+37
|
* lunit: fix toFloat32 return typebptato2025-03-281-1/+1
|
* layout: remove DisplayBlockLike checkbptato2025-03-281-4/+1
| | | | Doesn't seem to be necessary anymore.
* layout: refactorbptato2025-03-282-619/+579
| | | | | | * layoutBlockChild has two branches less * better separation of code into individual layouts; layout() is now the main entry point for inner layout
* dom: fix a style invalidation bugbptato2025-03-271-5/+8
| | | | Clearing the entire dependedBy array in applyStyleDependencies is wrong.
* layout: reimplement list items with out-of-flow markersbptato2025-03-275-36/+32
| | | | | | | | Instead of generating a separate container box for list items, just set the marker's display to an internal value that is treated specially. This fixes a bug where position: relative would not register the correct block as the positioned ancestor.
* newhttp: send connected directly after establishing connectionbptato2025-03-261-5/+5
|
* render: fix formatting generated for paddingbptato2025-03-251-29/+15
| | | | | | | | | | | | | | The old logic was badly copy pasted from the pass that did text formatting; accordingly, it was overly complex and did not work correctly. Now we just add a single formatting cell to override the last one if it exists. (Formatting cells go from x position -> next cell or line end, and padding implies that the line had ended before the starting position of our text.) I've left in a workaround to what I think is a bug. It may be related to cursorNextLink getting stuck at the line's end...
* bonus: update makefile, filei docsbptato2025-03-252-6/+5
|
* event: fix some refcounting bugsbptato2025-03-241-4/+10
| | | | | | | | * only free callback after setting it to undefined (just in case JS observes the free with WeakMap etc.) * do not directly call callback; QJS really doesn't seem to like it when it deletes itself with removeEventListener * fix a leak with handleEvent
* loader: do not crash on shareCachedItem with invalid source/target pidsbptato2025-03-241-3/+6
| | | | | This may happen if the buffer crashes while pager is trying to share its resources.
* newhttp: clean up state machine, fix a brotli bugbptato2025-03-241-152/+179
| | | | | | | | | The issue with brotli was that we were calling toOpenArray with a uint, and that doesn't really work in Nim (even though it looks like it does). So I've removed the circular buffer from brotli and made oqoff an int for tinfl (which unlike brotli actually needs a circular buffer).
* xmlhttprequest: fix open with credentialsbptato2025-03-234-17/+15
| | | | | * ignore username/password if undefined * do not throw on subsequent fetch with username/password
* env, client: fix fetch on Clientbptato2025-03-232-1/+7
|