aboutsummaryrefslogtreecommitdiffstats
path: root/src/css
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-10-10 23:18:13 +0200
committerbptato <nincsnevem662@gmail.com>2024-10-10 23:22:17 +0200
commit47caa59e5d1455484c4e5b08f58177a1b2172f44 (patch)
tree7a93c967ea6c919fc2d2ee1cde339ef083fc0abd /src/css
parent15f3a9312d6df039125030f06a3d9940e62c1c8a (diff)
downloadchawan-47caa59e5d1455484c4e5b08f58177a1b2172f44.tar.gz
dom: html -> documentElement
it's effectively a dupe, except html wouldn't work in XML
Diffstat (limited to 'src/css')
-rw-r--r--src/css/cascade.nim2
-rw-r--r--src/css/match.nim2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/css/cascade.nim b/src/css/cascade.nim
index 865906aa..dea481db 100644
--- a/src/css/cascade.nim
+++ b/src/css/cascade.nim
@@ -538,7 +538,7 @@ proc appendChildren(styledStack: var seq[CascadeFrame]; frame: CascadeFrame;
# Builds a StyledNode tree, optionally based on a previously cached version.
proc applyRules(document: Document; ua, user: CSSStylesheet;
cachedTree: StyledNode): StyledNode =
- let html = document.html
+ let html = document.documentElement
if html == nil:
return
let author = document.getAuthorSheets()
diff --git a/src/css/match.nim b/src/css/match.nim
index 567f00bb..fe9e7054 100644
--- a/src/css/match.nim
+++ b/src/css/match.nim
@@ -84,7 +84,7 @@ func pseudoSelectorMatches[T: Element|StyledNode](elem: T; sel: Selector;
of pcHover:
when selem is StyledNode: felem.addDependency(elem, dtHover)
return elem.hover
- of pcRoot: return elem == elem.document.html
+ of pcRoot: return elem == elem.document.documentElement
of pcNthChild:
if sel.pseudo.ofsels.len != 0 and
not selem.selectorsMatch(sel.pseudo.ofsels, felem):