Tom Needham
21db070887
LibGfx: Add TGA Loader :^)
...
This patch adds a basic TGA Loader. Currently it can only handle
uncompressed files with a bit depth of 24 or 32 bits per pixel.
2023-01-15 12:43:03 +01:00
Arda Cinar
70da5f977b
hexdump: Add an option to specify dump offset
...
This is very helpful when trying to make sense of large binary files :^)
2023-01-15 12:10:21 +01:00
Andreas Kling
db27499865
LibWeb: Make sure that fetch() response cookies get saved
...
We have to provide the Web::Page* in order for cookies to get saved.
2023-01-15 10:53:58 +00:00
Lucas CHOLLET
667ac961b5
Presenter: Use the non-deprecated API of LibFileSystemAccessClient
...
The patch is tiny as Presenter is only using `LibFSAC` for its file
picker. Using only `LibFSAC` in Presenter would be nice.
2023-01-15 11:37:21 +01:00
nipos
bfacbe1e0d
LibCore: Enable file descriptor passing on OpenBSD
2023-01-15 01:11:46 +00:00
Agustin Gianni
4a816ed891
LibC: Fix incorrect limit for SSIZE_MAX and remove 32 bit definitions
...
The file `limits.h` had definitions for x86. This PR removes these
definitions and fixes the upper limit for the type ssize_t which was
defined to be 0x7fffffff.
2023-01-15 01:07:05 +00:00
Timothy Flynn
bb4c7b6a35
LibJS: Remove now-unused ThrowableFormat header
...
The one place this was used now uses the fallible String::formatted.
2023-01-15 01:00:20 +00:00
Timothy Flynn
9f78e8728a
LibJS: Port (most of) String.prototype to String
...
The locations that haven't been ported have a much wider footprint than
just the String.prototype files, so they've been left alone for now.
2023-01-15 01:00:20 +00:00
Timothy Flynn
ceaec41726
LibJS: Port Value to-string methods to String
2023-01-15 01:00:20 +00:00
Timothy Flynn
46dd8c1c0b
LibJS: Resolve all UTF-8 rope strings as a String
2023-01-15 01:00:20 +00:00
Timothy Flynn
58bc831750
LibUnicode: Return a String from Unicode normalization
2023-01-15 01:00:20 +00:00
Timothy Flynn
c9056b824e
LibJS: Define Value::to_string to convert a Value to a String
2023-01-15 01:00:20 +00:00
Timothy Flynn
afeb7273cc
LibJS+Everywhere: Rename Value::to_string to to_deprecated_string
2023-01-15 01:00:20 +00:00
Timothy Flynn
8f5bdce8e7
LibJS: Add initial support for creating PrimitiveStrings with AK::String
...
This will temporarily bloat the size of PrimitiveString as LibJS is
transitioned to use String throughout, but will make doing so piecemeal
much easier.
2023-01-15 01:00:20 +00:00
Timothy Flynn
0b58748156
LibJS: Define number_to_string to convert a double to a String
2023-01-15 01:00:20 +00:00
Timothy Flynn
8a88d4434f
LibJS+LibWeb: Rename number_to_string to number_to_deprecated_string
2023-01-15 01:00:20 +00:00
Timothy Flynn
c79d20be58
LibJS: Define Utf16String::to_utf8 to convert Utf16String to String
2023-01-15 01:00:20 +00:00
Timothy Flynn
4eb5eb2080
LibJS: Rename Utf16String::to_utf8 to to_deprecated_string
2023-01-15 01:00:20 +00:00
Timothy Flynn
ca655f5e7d
LibJS: Rename VM::string_cache to deprecated_string_cache
...
And rename the member variable from m_string_cache to
m_deprecated_string_cache to match.
2023-01-15 01:00:20 +00:00
Timothy Flynn
3a004e8f1a
LibJS: Rename PrimitiveString::has_utf8_string to has_deprecated_string
...
And rename the member variable from m_utf8_string to m_deprecated_string
to match.
2023-01-15 01:00:20 +00:00
Timothy Flynn
79e81e8a15
LibJS: Add ThrowableStringBuilder::to_string to create a new String
...
This wraps around the base class method to throw an OOM completion.
2023-01-15 01:00:20 +00:00
Timothy Flynn
3ad1f250e7
LibCrypto: Define *BigInteger::to_base to convert big integers to String
2023-01-15 01:00:20 +00:00
Timothy Flynn
0ddc2e1f50
LibCrypto+Everywhere: Rename *BigInteger::to_base to to_base_deprecated
2023-01-15 01:00:20 +00:00
Timothy Flynn
63c814fa2f
AK: Add String::to_number
2023-01-15 01:00:20 +00:00
Timothy Flynn
cf0899f440
AK: Add String::contains
2023-01-15 01:00:20 +00:00
Timothy Flynn
bd9b65e82f
AK: Add String::is_one_of for variadic string comparison
2023-01-15 01:00:20 +00:00
Timothy Flynn
9db9b2f9be
AK: Add a somewhat naive implementation of String::reverse
...
This will reverse the String's code points (i.e. not just its bytes),
but is not aware of grapheme clusters.
2023-01-15 01:00:20 +00:00
Andrew Kaster
f5d253dcfa
Everywhere: Fully qualify IsLvalueReference in TRY() macros
...
If USING_AK_GLOBALLY is not defined, the name IsLvalueReference might
not be available in the global namespace. Follow the pattern established
in LibTest to fully qualify AK types in macros to avoid this problem.
2023-01-15 00:56:31 +00:00
Lucas CHOLLET
56512caa73
LibCore: Don't reject an empty buffer with ENOBUFS
...
Instead, we just return the empty buffer.
2023-01-14 16:20:30 -07:00
Lucas CHOLLET
4402720a15
LibCore: Don't rely on \n
detection to populate the buffer
...
We don't need to call `can_read_line()` as the buffer will be populated
by `find_and_populate_until_any_of()`. The change is also beneficial as
the buffer will be populated until a candidate is found and not
necessarily a new line.
2023-01-14 16:20:30 -07:00
Lucas CHOLLET
8252436c18
LibCore: Resume search in find_and_populate_until_any_of
...
The search used to go through the buffer from the start, even if we just
appended a small number of bytes at the end. It now remembers the last
stop and resume the search from it.
2023-01-14 16:20:30 -07:00
Lucas CHOLLET
b21ea54af0
LibCore: Merge two search implementations in Stream::BufferedStream
...
`can_read_line()` and `read_until_any_of` used to have two different
implementations to search for a needle. This commit factorizes both
algorithms.
2023-01-14 16:20:30 -07:00
Lucas CHOLLET
9a7accddb7
AK: Add an optional starting offset to CircularBuffer::offset_of
...
This parameter allows to start searching after an offset. For example,
to resume a search.
It is unfortunately a breaking change in API so this patch also modifies
one user and one test.
2023-01-14 16:20:30 -07:00
Lucas CHOLLET
34922c0cc0
AK: Default move operators for CircularBuffer
...
The previously defined operator was swap-based. With the defaulted
implementation, both integers are now copied, but it doesn't matter as
only the `ByteBuffer` allocates memory (i.e. non-null integers values
won't affect the destruction).
2023-01-14 16:15:31 -07:00
Ben Wiederhake
23d111a459
LibWeb: Implement value_id_from_string by hash lookup
...
The old approach was basically a linear scan, which is slower than a
hash map for the currently 303 elements, as evidenced by the new
benchmark in TestCSSIDSpeed.
Before: Completed benchmark 'value_id_from_string' in 3238ms
After: Completed benchmark 'value_id_from_string' in 193ms
2023-01-14 15:43:27 -07:00
Ben Wiederhake
b3d2fdceb1
LibWeb+Tests: Demonstrate slowness of CSS::value_id_from_string
2023-01-14 15:43:27 -07:00
Ben Wiederhake
0687a75eaa
LibWeb: Run tests in lagom if ENABLE_LAGOM_LIBWEB is set
2023-01-14 15:43:27 -07:00
Ben Wiederhake
79b9dd6248
AK+Tests: Make CaseInsensitiveStringViewTraits work with HashMap again
2023-01-14 15:43:27 -07:00
Timothy Flynn
822e32eb11
LibJS: Reword and reorder some steps of the Intl ResolveLocale AO
...
This is an editorial change in the ECMA-402 spec. See:
https://github.com/tc39/ecma402/commit/4c55823
2023-01-14 19:12:48 +00:00
Timothy Flynn
0ff4d8100f
LibJS: Consistently use spaces / parentheses in NumberFormat operations
...
These are editorial changes in the ECMA-402 spec. See:
https://github.com/tc39/ecma402/commit/1508825
https://github.com/tc39/ecma402/commit/760f23a
2023-01-14 19:12:48 +00:00
Timothy Flynn
0ffad2a2d1
LibJS: Refer to String elements as code units rather than characters
...
This is an editorial change in the ECMA-402 spec. See:
https://github.com/tc39/ecma402/commit/d6b3435
2023-01-14 19:12:48 +00:00
Timothy Flynn
95cef87a9c
LibJS: Update syntax for invoking the GetOption AO from Intl objects
...
This is an editorial change in the ECMA-402 spec. See:
https://github.com/tc39/ecma402/commit/0ac2e10
2023-01-14 19:12:48 +00:00
Timothy Flynn
2cca5d6676
LibJS: Fix assignment of "isNegative" in FormatNumericToString
...
These are normative changes in the Intl.NumberFormat v3 spec. See:
https://github.com/tc39/proposal-intl-numberformat-v3/commit/5a2b1d1
https://github.com/tc39/proposal-intl-numberformat-v3/commit/cd48a3d
2023-01-14 19:12:48 +00:00
Timothy Flynn
d30e96a209
LibJS: Renumber Intl.NumberFormat v3 prototypes and AOs
...
These are editorial changes in the Intl.NumberFormat v3 spec. See:
https://github.com/tc39/proposal-intl-numberformat-v3/commit/82e2f92
https://github.com/tc39/proposal-intl-numberformat-v3/commit/ce6c33e
https://github.com/tc39/proposal-intl-numberformat-v3/commit/b982783
https://github.com/tc39/proposal-intl-numberformat-v3/commit/96010f4
https://github.com/tc39/proposal-intl-numberformat-v3/commit/9dd123f
https://github.com/tc39/proposal-intl-numberformat-v3/commit/0c2834f
https://github.com/tc39/proposal-intl-numberformat-v3/commit/31c72f3
2023-01-14 19:12:48 +00:00
Timothy Flynn
d1881da2be
LibJS: Set approximate number range format result's "source" to "shared"
...
This is a normative change in the Intl.NumberFormat v3 spec. See:
https://github.com/tc39/proposal-intl-numberformat-v3/commit/7510e7f
2023-01-14 19:12:48 +00:00
Aliaksandr Kalenik
9b6fcd8591
LibWeb: Stop using percentage column widths in compute_table_measures
2023-01-14 19:22:08 +01:00
Aliaksandr Kalenik
b44d977bf8
LibWeb: Propagate layout mode of table formatting context to table cells
2023-01-14 19:22:08 +01:00
Aliaksandr Kalenik
80578ead45
LibWeb: Table box width should be relative to wrapper containing block
2023-01-14 19:22:08 +01:00
Aliaksandr Kalenik
709fe01f52
LibWeb: Override width calculation for table wrappers
...
Introduce `TableWrapper` type so table wrappers could be
distinguished from block containers and override width
calculation for table wrappers (CSS 2.2 spec, section 17.5.2)
inside BFCs in the way that their width should be equal to
width of table box they wrap.
2023-01-14 19:22:08 +01:00
Tim Schumacher
7526f9a8b7
AK: Remove CircularDuplexStream
2023-01-14 12:05:52 -05:00