diff options
author | bptato <nincsnevem662@gmail.com> | 2023-10-25 11:56:54 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-10-25 12:04:37 +0200 |
commit | 98865ac747766118b94f39f749aba4be62c78022 (patch) | |
tree | dd0d6520997eef16fa7238d1dc486affd49057b6 /src/css | |
parent | e4cccbeb7488dfe8afbbe51c60fd16557dea923f (diff) | |
download | chawan-98865ac747766118b94f39f749aba4be62c78022.tar.gz |
Add jspropnames, CSSStyleDeclaration stub
Diffstat (limited to 'src/css')
-rw-r--r-- | src/css/cascade.nim | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/css/cascade.nim b/src/css/cascade.nim index 1eaa643c..c0900394 100644 --- a/src/css/cascade.nim +++ b/src/css/cascade.nim @@ -1,6 +1,5 @@ import algorithm import options -import streams import strutils import css/cssparser @@ -254,10 +253,9 @@ proc applyDeclarations(styledNode: StyledNode, parent: CSSComputedValues, builder.addValues(rule[pseudo], ORIGIN_AUTHOR) if styledNode.node != nil: let element = Element(styledNode.node) - let style = element.attr("style") - if style.len > 0: - let inline_rules = newStringStream(style).parseListOfDeclarations2() - builder.addValues(inline_rules, ORIGIN_AUTHOR) + let style = element.style_cached + if style != nil: + builder.addValues(style.decls, ORIGIN_AUTHOR) builder.preshints = element.calcPresentationalHints() styledNode.computed = builder.buildComputedValues() |