about summary refs log tree commit diff stats
path: root/src/css/stylednode.nim
Commit message (Collapse)AuthorAgeFilesLines
* match: optimize dependency trackingbptato2024-12-171-3/+6
| | | | | | | | | | | | | | | | | | | This is a bit tricky, but it seems to work. It optimizes selectors in the line of "div :hover" (note the space.) Previously such selectors would add a hover dependency to pretty much every element, and trigger a re-style for all elements that changed their hover status. After this patch, when :hover and friends would return false, they first try to match the element *without* pseudo selectors, and only add their dependencies if the element would match like that. (Notably, it only does this for when :hover is false. Probably it would help somewhat if we checked for the opposite with true too, but I'm not sure how much. For now, I'll keep it like this, and maybe try to further optimize it later.)
* css: CSSComputedValue -> CSSValuebptato2024-12-121-2/+2
| | | | | "Computed" was redundant; other types of values don't have a common type.
* match, stylednode: remove generics, refactorbptato2024-11-191-43/+16
| | | | | | Turns out the generics weren't really needed in the first place. Also, StyledNode is now 16 bytes smaller.
* dom: optimize element size, remove importc hack & dead codebptato2024-09-301-13/+13
| | | | | This switches CAtom to uint32; it seems better to use the same size on all platforms.
* css: clean up a bitbptato2024-07-121-23/+8
|
* cascade: fix style cachingbptato2024-07-091-3/+1
| | | | the invalid flag must be toggled after styling
* layout: reduce copiesbptato2024-07-031-2/+5
| | | | | Text data is no longer stored separately in InlineFragments; instead, we now include refs to StyledNodes.
* css, html: fix CSS dependency invalidationbptato2024-07-031-33/+13
|
* misc cleanupsbptato2024-06-221-2/+1
|
* stylednode: remove `text' fieldbptato2024-05-281-6/+6
| | | | This avoids some unnecessary string copying.
* stylednode: move invalidation data to DOMbptato2024-05-271-22/+13
| | | | this way, we do not refer to nodes of previous cascade passes
* css/values -> css/cssvaluesbptato2024-05-161-1/+1
| | | | for consistency
* Update code stylebptato2024-04-171-28/+29
| | | | | | * separate params with ; (semicolon) instead of , (colon) * reduce screaming snake case use * wrap long lines
* stylednode: clean up code stylebptato2024-03-181-30/+39
|
* Move HTML parsing into Chamebptato2023-08-151-1/+2
| | | | Operation "modularize Chawan somewhat" part 2
* Add StyledNode stringifier for debuggingbptato2023-07-081-0/+14
|
* WIP selector rewritebptato2023-01-271-0/+4
| | | | pretty slow for some reason
* css/cascade: remove scoped sheetsbptato2023-01-071-2/+0
| | | | ...in favor of handling all style elements like other browsers
* css: fix some bugs and improve cascading a bitbptato2022-12-291-1/+17
|
* More DOM workbptato2022-12-191-1/+5
|
* Display text for img tag, background-imagebptato2022-12-161-1/+3
|
* Add support for q, fix list-item counter behaviorbptato2022-12-121-1/+10
|
* Fix nth-child bugs, rename select to matchbptato2022-08-231-0/+3
|
* Add interactive <select>bptato2022-07-311-1/+7
|
* Implement revert valuebptato2022-07-301-5/+8
|
* StyledNode: avoid duplicate dependenciesbptato2022-07-291-0/+4
|
* Fix cascading bugs & performance issuesbptato2022-07-281-1/+5
|
* Fix StyledNode invalidation & othersbptato2022-07-271-5/+110
|
* Use StyledNodes instead of passing the entire DOM to the layout enginebptato2022-07-161-0/+18
This moves pseudo element generation to the cascading phase. For now it also breaks style caching.