|
6 | 6 |
|
7 | 7 | #pragma once
|
8 | 8 |
|
9 |
| -#include <AK/Types.h> |
| 9 | +#include <LibWeb/Infra/Types.h> |
10 | 10 |
|
11 | 11 | namespace Web::WebIDL {
|
12 | 12 |
|
| 13 | +// https://webidl.spec.whatwg.org/#idl-boolean |
| 14 | +// The boolean type corresponds to booleans. |
| 15 | +using Boolean = Infra::Boolean; |
| 16 | + |
13 | 17 | // https://webidl.spec.whatwg.org/#idl-byte
|
14 |
| -// The byte type is a signed integer type that has values in the range [−128, 127]. |
15 |
| -using Byte = i8; |
| 18 | +// The byte type corresponds to 8-bit signed integers. |
| 19 | +using Byte = Infra::Signed8BitInteger; |
16 | 20 |
|
17 | 21 | // https://webidl.spec.whatwg.org/#idl-octet
|
18 |
| -// The octet type is an unsigned integer type that has values in the range [0, 255]. |
19 |
| -using Octet = u8; |
| 22 | +// The octet type corresponds to 8-bit unsigned integers. |
| 23 | +using Octet = Infra::Unsigned8BitInteger; |
20 | 24 |
|
21 | 25 | // https://webidl.spec.whatwg.org/#idl-short
|
22 |
| -// The short type is a signed integer type that has values in the range [−32768, 32767]. |
23 |
| -using Short = i16; |
| 26 | +// The short type corresponds to 16-bit signed integers. |
| 27 | +using Short = Infra::Signed16BitInteger; |
24 | 28 |
|
25 | 29 | // https://webidl.spec.whatwg.org/#idl-unsigned-short
|
26 |
| -// The unsigned short type is an unsigned integer type that has values in the range [0, 65535]. |
27 |
| -using UnsignedShort = u16; |
| 30 | +// The unsigned short type corresponds to 16-bit unsigned integers. |
| 31 | +using UnsignedShort = Infra::Unsigned16BitInteger; |
28 | 32 |
|
29 | 33 | // https://webidl.spec.whatwg.org/#idl-long
|
30 |
| -// The long type is a signed integer type that has values in the range [−2147483648, 2147483647]. |
31 |
| -using Long = i32; |
| 34 | +// The long type corresponds to 32-bit signed integers. |
| 35 | +using Long = Infra::Signed32BitInteger; |
32 | 36 |
|
33 | 37 | // https://webidl.spec.whatwg.org/#idl-unsigned-long
|
34 |
| -// The unsigned long type is an unsigned integer type that has values in the range [0, 4294967295]. |
35 |
| -using UnsignedLong = u32; |
| 38 | +// The unsigned long type corresponds to 32-bit unsigned integers. |
| 39 | +using UnsignedLong = Infra::Unsigned32BitInteger; |
36 | 40 |
|
37 | 41 | // https://webidl.spec.whatwg.org/#idl-long-long
|
38 |
| -// The long long type is a signed integer type that has values in the range [−9223372036854775808, 9223372036854775807]. |
39 |
| -using LongLong = i64; |
| 42 | +// The long long type corresponds to 64-bit signed integers. |
| 43 | +using LongLong = Infra::Signed64BitInteger; |
40 | 44 |
|
41 | 45 | // https://webidl.spec.whatwg.org/#idl-unsigned-long-long
|
42 |
| -// The unsigned long long type is an unsigned integer type that has values in the range [0, 18446744073709551615]. |
43 |
| -using UnsignedLongLong = u64; |
| 46 | +// The unsigned long long type corresponds to 64-bit unsigned integers. |
| 47 | +using UnsignedLongLong = Infra::Unsigned64BitInteger; |
44 | 48 |
|
45 | 49 | // https://webidl.spec.whatwg.org/#idl-double
|
46 | 50 | // The double type is a floating point numeric type that corresponds to the set of finite
|
|
0 commit comments