diff options
author | bptato <nincsnevem662@gmail.com> | 2024-02-14 02:11:18 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-02-14 02:11:36 +0100 |
commit | 6abe44ea0287786b5073eb63f08fce14e9688604 (patch) | |
tree | 7071fed7097f2f274001e80ee9d29e8101fec79e /src/html | |
parent | 5356de1a9e8e25c8a999c7a836727b59c565b28b (diff) | |
download | chawan-6abe44ea0287786b5073eb63f08fce14e9688604.tar.gz |
buffer: improve style invalidation
Diffstat (limited to 'src/html')
-rw-r--r-- | src/html/chadombuilder.nim | 2 | ||||
-rw-r--r-- | src/html/dom.nim | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/html/chadombuilder.nim b/src/html/chadombuilder.nim index e202bc50..221cf7f8 100644 --- a/src/html/chadombuilder.nim +++ b/src/html/chadombuilder.nim @@ -170,6 +170,8 @@ proc insertTextImpl(builder: ChaDOMBuilder, parent: Node, text: string, parent.lastChild if prevSibling != nil and prevSibling of Text: Text(prevSibling).data &= text + if parent of Element: + Element(parent).invalid = true else: let text = builder.document.createTextNode(text) discard parent.insertBefore(text, before.get(nil)) diff --git a/src/html/dom.nim b/src/html/dom.nim index cb0c41d8..622331a2 100644 --- a/src/html/dom.nim +++ b/src/html/dom.nim @@ -177,7 +177,7 @@ type all_cached: HTMLAllCollection cachedSheets: seq[CSSStylesheet] - cachedSheetsInvalid: bool + cachedSheetsInvalid*: bool children_cached: HTMLCollection #TODO I hate this but I really don't want to put chadombuilder into dom too parser*: pointer |