about summary refs log tree commit diff stats
path: root/src/css/box.nim
Commit message (Collapse)AuthorAgeFilesLines
* css: reduce StyledNode usebptato2025-01-161-4/+4
| | | | | Eventually the tree should be collapsed into the DOM, and StyledNode should be created on the stack.
* layout: margin fixesbptato2025-01-051-0/+3
| | | | | | | | * respect flex item starting margin on main axis * pass left margin as offset input too -> fixes some sub-layout cache inconsistencies well, I *think* it does, but I haven't managed to find a case where it changes anything... either way, at least the code is prettier now
* LayoutUnit -> LUnitbptato2025-01-031-27/+27
|
* layout: drop overflow trackingbptato2025-01-031-4/+0
| | | | | It's probably possible to do it in layout, but it's way too hard. Just do it in render.
* layout: cache sub-layoutsbptato2025-01-021-2/+31
| | | | | | | | Only root blocks for now; for non-roots, you'd have to cache exclusions too, and that is a fair bit harder. It isn't very noticable as an optimization, but it's a good first step towards a cached layout.
* box: InlineFragment -> InlineBoxbptato2024-12-201-14/+14
| | | | | | It was named "fragment" mainly because I added it back when there was still a separate InlineBox type and I needed another name. Now InlineBox is gone, and I'm tired of typing fragment.
* layout: propagate intrinsic minimum heightbptato2024-12-171-2/+2
| | | | | | | | | | | | Necessary for flex. Previously we just used the actual height, but that didn't account for boxes that size themselves depending on the available height (mainly just images for now). This also irons out intrinsic min width calculation somewhat, squashing several bugs. I hope it works well. It is a significant change in size calculation, so maybe there are still new bugs lurking.
* css: CSSComputedValue -> CSSValuebptato2024-12-121-2/+2
| | | | | "Computed" was redundant; other types of values don't have a common type.
* buffer: fix broken gotoAnchor behaviorbptato2024-11-121-0/+5
| | | | | | | | | | | | | | | | | 23beebe6 introduced a regression that broke gotoAnchor. This fixes that, plus a couple other long-standing gotoAnchor bugs: * If no anchor is found, do not dupe the buffer. Desktop browsers still add a history entry, while w3m prints an error. I've copied the latter because it makes more sense as a user, but this will have to be refined for the navigation API at some point. * If the anchor *is* found, then always jump to it, even if it's not visible. This was a limitation of relying on the line array, so now we rely on the box tree instead. (Sooner or later, the former must go anyway.) Also, fix `U' reload not restoring the position (hopefully this time for good).
* layout -> cssbptato2024-11-101-0/+159
| | | | as much as I wish it weren't, layout *is* css.
* Another failed attempt at the layout enginebptato2021-11-071-50/+0
|
* Add RowBox structurebptato2021-10-031-1/+6
|
* Rewrite renderer (still non-functional)bptato2021-08-281-2/+8
|
* Some refactoringbptato2021-08-101-33/+2
|
* Implement CSS display none in box renderer etc.bptato2021-08-081-1/+0
| | | | | Other changes being bugfixes and a temporary implementation of "view source"
* Reorganize importsbptato2021-08-071-3/+2
|
* HTML display with highly broken box modelbptato2021-08-061-0/+72