about summary refs log tree commit diff stats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* layout: various float fixes in inline contextsbptato2025-01-261-136/+139
| | | | | | | | | | | | | * 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
|
* 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-255-278/+356
| | | | | | | | | | | | | | | | 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.
* loader: add download managerbptato2025-01-244-22/+237
| | | | | | Crude, but better than nothing. (I really wish the screen didn't flash on reload...)
* poll: fix nfds_t size on Androidbptato2025-01-241-3/+5
| | | | | | bionic uses uint. Why? Why indeed...
* config: fix compilation on older Nim versionsbptato2025-01-241-1/+2
|
* term: remove unused importbptato2025-01-241-1/+0
|
* buffer: support navigation on load/click, use origin for hover checkingbptato2025-01-243-9/+28
| | | | | | | Navigation from e.g. setTimeout still doesn't work. Also, the hover check now uses the auth origin instead of the host, and the auth origin now works for "file" as expected.
* forkserver: fix fd leakbptato2025-01-241-0/+1
|
* chadombuilder: perform microtask checkpoint on script insertionbptato2025-01-233-14/+26
|
* buffer: add placeholders for [frame]bptato2025-01-232-18/+21
| | | | | | | | | | HTML5 doesn't allow frameless processing of documents, so the <noframes> fallback never really worked. Being able to click on the individual frames feels somewhat less broken. I'm unsure how the actual solution should look like. Either we need multiple buffer support per process, or treat them as pseudo-images and handle them in pager.
* dom: fix img tag insertion stepsbptato2025-01-231-1/+1
| | | | | TAG_IMAGE does not really exist; it's auto-converted to TAG_IMG by the parser.
* buffer: improve screen state synchronizationbptato2025-01-234-161/+134
| | | | | | | | | | The intent behind the original design was that the page shouldn't change without user interaction. This sounds good in theory, but in practice it's unnecessary if you disable JS (nothing will modify the page), and annoying if you enable it (breaks pages that load with AJAX). So now we queue a task to notify us when the page has been updated, and act accordingly when the task is completed.
* term: re-add write overload for `string'bptato2025-01-231-0/+5
| | | | | | looks like we still need this fence ref. https://todo.sr.ht/~bptato/chawan/42
* cssvalues: add missing bounds checkbptato2025-01-231-3/+3
|
* layout: fix an absolute sizing bugbptato2025-01-231-5/+4
| | | | it's size.h, not size.w
* cssvalues: quick hack to make simple calc() expressions workbptato2025-01-233-2/+40
| | | | | | | | | | Most calc calls I've seen look something like "calc(100% - 2em)", i.e. just a percentage value offset by a pixel value. As it happens, we also had 24 bits available in CSSLength objects because of padding. Just enough to smuggle in that offset :) Very limited of course, but it does fix layout on a couple of websites.
* pager, term: replace execCmd, Filebptato2025-01-225-48/+82
| | | | | | | | | | pager: I want to change mailcap command parsing, so a custom implementation is needed. term: now it uses a custom buffer for the output stream too. I don't think there is much difference in performance, but stdio was in the way. (Also, this way it will be easier to make it async in the future.)
* selectorparser: optimize Selector sizebptato2025-01-222-37/+33
|
* Add annotations for move semanticsbptato2025-01-2214-62/+67
| | | | | | | | | Supposedly they aren't broken in refc after 2.0.0, so we can do this now that 1.6.14 is dropped. I've confirmed lent to work as advertised; it indeed reduces copies. sink doesn't seem to help much, but I guess it will be useful once we switch to ORC.
* javascript: add .jsrget, .jsrfgetbptato2025-01-222-17/+14
| | | | Implements the [Replaceable] WebIDL property.
* dom: add some missing nil checksbptato2025-01-221-6/+14
|
* render: actually fix the "extra unnecessary line" bugbptato2025-01-211-7/+4
| | | | Plus remove addLines, it's no longer very useful.
* render: blend in paintBackgroundbptato2025-01-212-38/+68
| | | | | | | It's an improvement, but the painting order still isn't quite right... Also fixes a bug where paintBackground would unnecessarily append an extra line to the document's end.
* cssvalues: support percentage rgb colors, hsl & hslabptato2025-01-213-41/+129
| | | | hsl is quite popular these days.
* cssvalues: add newer length unitsbptato2025-01-211-18/+36
| | | | I'm not convinced that anybody even knows these exist, but whatever.
* layout: fix division by 0bptato2025-01-211-2/+2
|
* cssvalues: fix rgba() function parsingbptato2025-01-202-5/+5
|
* cascade: support nested variablesbptato2025-01-202-78/+77
| | | | ...and refactor applyValue in the process.
* cascade: collapse StyledNode tree into DOMbptato2025-01-209-534/+317
| | | | | We now compute styles on-demand, which is both more efficient and simpler than the convoluted tree diffing logic we previously used.
* pager: do not alert on failed history write if config dir doesn't existbptato2025-01-201-1/+4
| | | | ref. https://todo.sr.ht/~bptato/chawan/41
* container, config.toml: add | commandbptato2025-01-191-0/+6
| | | | | | Particularly useful when debugging minified JS. vi always wraps; the centering behavior is from vim.
* dom: simplify a bitbptato2025-01-191-1/+1
|
* config: expandTilde -> expandPathbptato2025-01-191-2/+2
|
* dom: CSSStyleDeclaration improvementsbptato2025-01-195-21/+35
| | | | Now getComputedStyle works with pseudo-elements too.
* cascade: simplify RuleListMapbptato2025-01-181-42/+31
| | | | it can be a value type again
* dom, stylednode: move more fields, handle pseudo-element getComputedStylebptato2025-01-186-105/+132
|
* Remove submodulesbptato2025-01-182-34/+0
| | | | | I got tired of submodules. This commit doesn't build; subtrees incoming...
* pager: keep reading if term has chars bufferedbptato2025-01-182-0/+7
|
* dom: optimizebptato2025-01-182-10/+16
| | | | We'll see if the borrow checker actually works :)
* dom: compare rel case insensitivelybptato2025-01-172-7/+12
|
* dom: fix input checkedness invalidationbptato2025-01-171-0/+4
|
* sheet: dedupe tag :is hashesbptato2025-01-171-1/+2
|
* render: fix formatting being lost outside boxes with bgcolorbptato2025-01-171-21/+20
| | | | | | An ancient bug, but the fix seems to be quite simple: stop confusing the last X position before the existing string on the line with the last X position that the new string occupies.
* render: simplify some pointless delete/insert callsbptato2025-01-171-8/+4
|