(a: CoreTypes.PercentLengthType, b: CoreTypes.PercentLengthType)
| 8 | function equalsCommon(a: CoreTypes.LengthType, b: CoreTypes.LengthType): boolean; |
| 9 | function equalsCommon(a: CoreTypes.PercentLengthType, b: CoreTypes.PercentLengthType): boolean; |
| 10 | function equalsCommon(a: CoreTypes.PercentLengthType, b: CoreTypes.PercentLengthType): boolean { |
| 11 | if (a == 'auto' || isCssWideKeyword(a)) { |
| 12 | return b == 'auto' || isCssWideKeyword(b); |
| 13 | } |
| 14 | |
| 15 | if (b == 'auto' || isCssWideKeyword(b)) { |
| 16 | return false; |
| 17 | } |
| 18 | |
| 19 | if (typeof a === 'number') { |
| 20 | if (typeof b === 'number') { |
| 21 | return a == b; |
| 22 | } |
| 23 | if (!b) { |
| 24 | return false; |
| 25 | } |
| 26 | return (b as CoreTypes.LengthDipUnit).unit == 'dip' && a == (b as CoreTypes.LengthDipUnit).value; |
| 27 | } |
| 28 | |
| 29 | if (typeof b === 'number') { |
| 30 | return a ? (a as CoreTypes.LengthDipUnit).unit == 'dip' && (a as CoreTypes.LengthDipUnit).value == b : false; |
| 31 | } |
| 32 | if (!a || !b) { |
| 33 | return false; |
| 34 | } |
| 35 | return (a as CoreTypes.LengthDipUnit).value == (b as CoreTypes.LengthDipUnit).value && (a as CoreTypes.LengthDipUnit).unit == (b as CoreTypes.LengthDipUnit).unit; |
| 36 | } |
| 37 | |
| 38 | function convertToStringCommon(length: CoreTypes.LengthType | CoreTypes.PercentLengthType): string { |
| 39 | if (length == 'auto' || isCssWideKeyword(length)) { |
nothing calls this directly
no test coverage detected