aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-01-08 21:46:13 +0100
committerbptato <nincsnevem662@gmail.com>2023-01-08 21:46:13 +0100
commit4821ab4b408d02a08ac2eda14e99259d672b91ea (patch)
treeac5dc89dda1b1773cfdf46472f5d2459c77b0915 /src
parent5b1829f1756876fbdc34c1e0ca9af27cd0a05701 (diff)
downloadchawan-4821ab4b408d02a08ac2eda14e99259d672b91ea.tar.gz
css/values: remove equals
it had zero practical use and was annoying anyways
Diffstat (limited to 'src')
-rw-r--r--src/css/values.nim32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/css/values.nim b/src/css/values.nim
index c6f4572f..5d8cc2fb 100644
--- a/src/css/values.nim
+++ b/src/css/values.nim
@@ -1183,38 +1183,6 @@ proc getComputedValues(d: CSSDeclaration): seq[(CSSComputedValue, CSSGlobalValue
#TODO list-style-image
discard
-func equals*(a, b: CSSComputedValue): bool =
- if a == b:
- return true
- if a == nil or b == nil:
- return false
- if a.v != b.v:
- return false
- case a.v
- of VALUE_COLOR: return a.color == b.color
- of VALUE_LENGTH: return a.length == b.length
- of VALUE_FONT_STYLE: return a.fontstyle == b.fontstyle
- of VALUE_DISPLAY: return a.display == b.display
- of VALUE_CONTENT: return a.content == b.content
- of VALUE_WHITESPACE: return a.whitespace == b.whitespace
- of VALUE_INTEGER: return a.integer == a.integer
- of VALUE_TEXT_DECORATION: return a.textdecoration == b.textdecoration
- of VALUE_WORD_BREAK: return a.wordbreak == b.wordbreak
- of VALUE_LIST_STYLE_TYPE: return a.liststyletype == b.liststyletype
- of VALUE_VERTICAL_ALIGN: return a.verticalalign == b.verticalalign
- of VALUE_TEXT_ALIGN: return a.textalign == b.textalign
- of VALUE_LIST_STYLE_POSITION: return a.liststyleposition == b.liststyleposition
- of VALUE_POSITION: return a.position == b.position
- of VALUE_CAPTION_SIDE: return a.captionside == b.captionside
- of VALUE_LENGTH2: return a.length2 == b.length2
- of VALUE_BORDER_COLLAPSE: return a.bordercollapse == b.bordercollapse
- of VALUE_QUOTES: return a.quotes == b.quotes
- of VALUE_COUNTER_RESET: return a.counterreset == b.counterreset
- of VALUE_IMAGE: return a.image == b.image
- of VALUE_FLOAT: return a.float == b.float
- of VALUE_NONE: return true
- return false
-
proc newComputedValueBuilder*(parent: CSSComputedValues): CSSComputedValuesBuilder =
result.parent = parent