From 6340e6a2c041abb9273241897c485aabe87ff5dd Mon Sep 17 00:00:00 2001 From: bptato Date: Mon, 27 May 2024 23:32:55 +0200 Subject: stylednode: move invalidation data to DOM this way, we do not refer to nodes of previous cascade passes --- src/html/dom.nim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/html/dom.nim') diff --git a/src/html/dom.nim b/src/html/dom.nim index 14d46037..4f8b7cef 100644 --- a/src/html/dom.nim +++ b/src/html/dom.nim @@ -66,6 +66,9 @@ type DocumentReadyState* = enum rsComplete = "complete" type + DependencyType* = enum + dtHover, dtChecked, dtFocus + Location = ref object window: Window @@ -228,6 +231,10 @@ type style_cached*: CSSStyleDeclaration children_cached: HTMLCollection + # The owner StyledNode is marked as invalid when one of these no longer + # matches the DOM value. + prev*: array[DependencyType, bool] + AttrDummyElement = ref object of Element CSSStyleDeclaration* = ref object -- cgit 1.4.1-2-gfad0