about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
...
* dom: fire load event on image loadbptato2025-02-031-0/+3
|
* dom: add blur()bptato2025-02-021-0/+6
|
* javascript: derive ctor functions from parent ctor functionsbptato2025-02-026-10/+22
| | | | no idea why JS_NewCFunction3 is not public...
* javascript: inline makeCtorJSCallAndRetbptato2025-02-021-10/+5
|
* term: simplify/optimizebptato2025-02-021-38/+34
| | | | by storing capabilities as strings instead of cstrings.
* dom: load inline module scripts toobptato2025-02-012-6/+22
|
* dom: stub scrollIntoViewbptato2025-02-011-0/+3
|
* dom: handle exceptions in module scriptbptato2025-02-012-27/+80
|
* dom, layout: fix empty canvas cache idsbptato2025-02-016-9/+20
| | | | ok now I understand why I made shareCachedItem crash...
* dom: add title setter, unify newText usebptato2025-02-013-6/+20
| | | | createTextNode is redundant...
* jsopaque: add catch atombptato2025-02-011-0/+1
|
* response: stub constructorbptato2025-02-012-3/+16
|
* dom: basic module supportbptato2025-02-014-48/+97
| | | | probably breaks with TLA
* loader: do not crash on invalid shareCachedItembptato2025-01-311-3/+4
| | | | | | | It could be legitimate. (Although I found it in a case where it likely isn't legitimate. But that's another question...)
* javascript, tojs: fix an ownership bugbptato2025-01-313-8/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was breaking acid3 - occasionally. Fun times! The bug occurred in a case where a Nim object failed to transfer ownership to JS when 1. Nim object created 2. Nim drops reference, but JS keeps it 3. JS drops reference, but Nim keeps it (because of another Nim object holding onto it) 4. JS acquires reference, Nim drops it because in 4, JS got two references (per toJS behavior), and Nim didn't get any. The actual acid3 test, reduced: L1 d = document.createTextNode("iteration " + i + " at " + d); Text JS1 -> Nim1 Anchor 0 L2 document.createElement('a') Text JS1 -> Nim1 Anchor JS1 -> Nim1 L3 .appendChild(d); Text JS1 -> Nim2 Anchor JS1 <- Nim1 <-> Nim1 L4 d = d.parentNode; Text JS1 <- Nim1 Anchor JS2 -> Nim1 <-> Nim1 ^^^ bug! After this patch, the last line looks like Anchor JS1 -> Nim2 <-> Nim1 (I haven't been able to reduce the bug to a test case that doesn't have to run for seconds :/ triggering the GC manually doesn't cut it for some reason.) As noted in the comments, the implementation isn't optimal. I've described a hack there that could be used to increase performance; we'll see if it's actually needed.
* eprint: add fprintf wrapperbptato2025-01-311-0/+3
| | | | useful in situations where allocations change program behavior
* Update docsbptato2025-01-301-4/+4
|
* sheet: fix a hashing bugbptato2025-01-303-1/+7
|
* layout: fix absolute sizing order with floatsbptato2025-01-303-3/+15
| | | | | Also removed the redundant pushPositioned/popPositioned calls in popPositioned.
* img: remove intermediate C filesbptato2025-01-3011-55/+56
| | | | | | Nim doesn't consider included files when recompiling C files, which would sometimes lead to fixes not being compiled in without a clean build.
* buffer: drop pipe, pipe2, passFd privilegesbptato2025-01-306-44/+85
| | | | | All uses of these could be delegated to other processes with more privileges.
* about: move to loaderbptato2025-01-306-58/+48
| | | | | This means we can now use about:downloads for downloads. Plus it shaves off some ks from the distribution.
* mediaquery: fix some parser bugsbptato2025-01-303-12/+28
| | | | | | <media-condition-without-or> works correctly once again. ref. https://todo.sr.ht/~bptato/chawan/46
* render: fix OOB panic with scroll container outside the canvasbptato2025-01-293-1/+5
| | | | | clipBox must not be allowed to start outside the canvas, or paintBackground will happily try to setTextStr in a negative position.
* pager: fix gotoAnchor on buffers that were redirectedbptato2025-01-291-3/+4
| | | | | Redirection no longer preserves the previous cursor position, so gotoAnchor is now allowed to override it.
* lineedit: add missing nil check to nextHist, prevent empty entries in submitbptato2025-01-291-12/+9
| | | | | | | | | And clean up the function, while we're at it. ref. https://todo.sr.ht/~bptato/chawan/45 (The submit bug is unrelated, just something I discovered while testing nextHist & prevHist.)
* nanosvg: fix infinite loopbptato2025-01-293-1/+8
| | | | My bad; not present upstream.
* container: fix getSelectionText with no parametersbptato2025-01-291-7/+3
|
* javascript: fix .jsget on JSValuebptato2025-01-282-5/+27
| | | | | | | | | | | | | | Since toJS doesn't create a new value, `node' must be dup'd if it is a JSValue. Also, forbid .jsset on JSValue as it was broken as well and it's not obvious what the intention is when using it. (Probably it should free the old value, but did the user think of setting it? :P) I can see why I made toJS not dup the value - to make returning consistent with Nim's semantics - but it really makes things confusing... implicitly behaving as lent might be better, albeit less convenient.
* event: fix some refcounting bugsbptato2025-01-282-5/+6
|
* sandbox: fix compilation without sandboxingbptato2025-01-281-1/+1
|
* layout: fix flow roots in inline boxes not respecting floatsbptato2025-01-283-104/+102
| | | | Also, some more work on the unification of inline & block layouts.
* layout: fix some float margin resolution bugsbptato2025-01-285-34/+46
|
* loader: fix missing newline in downloadsbptato2025-01-281-3/+3
|
* cascade: fix variable inheritancebptato2025-01-283-13/+24
|
* layout: unify InlineContext with FlowStatebptato2025-01-271-547/+538
|
* cascade: reuse input value when possiblebptato2025-01-273-27/+39
|
* Update docsbptato2025-01-274-23/+187
|
* layout: remove obsolete comment, improve struct packingbptato2025-01-261-12/+8
|
* main: add version checkbptato2025-01-261-0/+4
| | | | ref. https://todo.sr.ht/~bptato/chawan/44
* layout: various float fixes in inline contextsbptato2025-01-269-136/+214
| | | | | | | | | | | | | * reinit line after outer block height is known * do not set wrap in finishLine preceding outer block layout * attach pending inline floats to line boxes * unify flow a bit more The last two points mean that we now (mostly) handle inline floats like block floats, which is great because only the latter ever worked properly. (Well, margin resolution still needs work...)
* layout: small cleanupbptato2025-01-261-67/+41
|
* Update docsbptato2025-01-261-2/+2
|
* loader: fix etabptato2025-01-261-4/+5
|
* buffer: do not force-invalidate on finishLoadbptato2025-01-261-1/+0
| | | | Either this is unnecessary, or it's hiding a bug.
* layout: do not generate anonymous inline boxesbptato2025-01-2521-301/+429
| | | | | | | | | | | | | | | | Anonymous inline boxes were blocking progress on layout caching, so they are now gone. Instead, we handle them in layoutInline (which meanwhile has spaghettified to beyond comprehension... now it's a special case of inner BlockBox (kind of?) - incredibly, it still passes tests :P) This seems to match what major browsers do as well; some test cases were updated to reflect the "improved" rendering this brings. Next I'd like to remove anonymous table boxes by generating them in cascade. Then it should be straightforward enough to at least reuse flow roots on relayout. (And clean up flow layout...)
* cascade: fix canvas conversionbptato2025-01-251-1/+1
|
* layout: always use computed from StyledNodebptato2025-01-251-74/+69
|
* cascade, layout: blockify flex in cascadebptato2025-01-252-23/+4
| | | | Both simpler and more efficient.
* ua.css: simplifybptato2025-01-251-2/+2
|