about summary refs log tree commit diff stats
path: root/src/css/lunit.nim
Commit message (Collapse)AuthorAgeFilesLines
* lunit: fix toFloat32 return typebptato2025-03-281-1/+1
|
* lunit: fix negative roundingbptato2025-02-031-0/+2
|
* cssvalues: reduce CSSValues sizebptato2025-01-121-4/+8
| | | | | | | | | | | | | | | | * switch from float64 -> float32; other browsers use 32-bit floats too * specify integer size as 32-bit * use NetworkBitmap for background-image value (currently just an invalid dummy value) * remove "none" property & value types CSSValue's payload is always one word (plus another for the type tag). CSSValues keeps its size, but no longer has to heap-alloc + refcount word-sized CSSValues. (On 32-bit systems, CSSValues might actually be larger than before, but I expect it's still a net benefit with the removal of refcounting and the switch to 32-bit floats.)
* LayoutUnit -> LUnitbptato2025-01-031-38/+38
|
* lunit: use saturation arithmeticbptato2024-12-231-18/+75
| | | | | | | I'm not a fan, because it hides bugs. But working around the overflow errors is starting to get unwieldy. On 32-bit systems, we try to use compiler intrinsics as Nim does.
* lunit: remove redundant codebptato2024-12-131-5/+1
| | | | | | using div instead of / is sort of weird, but it makes it clearer if we're dividing floats or layoutunits (and is already what the code uses).
* layout -> cssbptato2024-11-101-0/+52
as much as I wish it weren't, layout *is* css.