(a: CoreTypes.PercentLengthType, b: CoreTypes.PercentLengthType | CoreTypes.LengthDipUnit)
| 28 | function equalsCommon(a: CoreTypes.LengthType, b: CoreTypes.LengthType): boolean; |
| 29 | function equalsCommon(a: CoreTypes.PercentLengthType, b: CoreTypes.PercentLengthType): boolean; |
| 30 | function equalsCommon(a: CoreTypes.PercentLengthType, b: CoreTypes.PercentLengthType | CoreTypes.LengthDipUnit): boolean { |
| 31 | if (a == 'auto' || isCssWideKeyword(a)) { |
| 32 | return b == 'auto' || isCssWideKeyword(b); |
| 33 | } |
| 34 | |
| 35 | if (b == 'auto' || isCssWideKeyword(b)) { |
| 36 | return false; |
| 37 | } |
| 38 | |
| 39 | if (typeof a === 'number') { |
| 40 | if (typeof b === 'number') { |
| 41 | return a == b; |
| 42 | } |
| 43 | if (!b) { |
| 44 | return false; |
| 45 | } |
| 46 | return (b as CoreTypes.LengthDipUnit).unit == 'dip' && a == (b as CoreTypes.LengthDipUnit).value; |
| 47 | } |
| 48 | |
| 49 | if (typeof b === 'number') { |
| 50 | return a ? (a as CoreTypes.LengthDipUnit).unit == 'dip' && (a as CoreTypes.LengthDipUnit).value == b : false; |
| 51 | } |
| 52 | if (!a || !b) { |
| 53 | return false; |
| 54 | } |
| 55 | return (a as CoreTypes.LengthDipUnit).value == (b as CoreTypes.LengthDipUnit).value && (a as CoreTypes.LengthDipUnit).unit == (b as CoreTypes.LengthDipUnit).unit; |
| 56 | } |
| 57 | |
| 58 | function convertToStringCommon(length: CoreTypes.LengthType | CoreTypes.PercentLengthType): string { |
| 59 | if (length == 'auto' || isCssWideKeyword(length)) { |
nothing calls this directly
no test coverage detected