about summary refs log tree commit diff stats
path: root/src/css/match.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/css/match.nim')
-rw-r--r--src/css/match.nim5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/css/match.nim b/src/css/match.nim
index bb1acd9c..065d34cf 100644
--- a/src/css/match.nim
+++ b/src/css/match.nim
@@ -185,13 +185,12 @@ func matches(element: Element; sel: Selector; depends: var DependencyInfo):
   of stType:
     return element.localName == sel.tag
   of stClass:
-    let factory = element.document.factory
     for it in element.classList:
-      if sel.class == factory.toLowerAscii(it):
+      if sel.class == it.toLowerAscii():
         return mtTrue
     return mtFalse
   of stId:
-    return sel.id == element.document.factory.toLowerAscii(element.id)
+    return sel.id == element.id.toLowerAscii()
   of stAttr:
     return element.matchesAttr(sel)
   of stPseudoClass: