1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-09 13:30:45 +00:00
Commit Graph

56234 Commits

Author SHA1 Message Date
Sam Atkins
1ab03ff963 LibGfx: Read OpenType table directory using structs and streams 2023-11-08 09:34:09 +01:00
Sam Atkins
5455ecf650 LibGfx: Remove OpenType::Font::m_buffer
At first glance this looks like it holds the memory that the various
slices point into... but it actually doesn't own that memory. Nobody
uses m_buffer, so it serves no purpose.
2023-11-08 09:34:09 +01:00
Sam Atkins
984a2c314b LibGfx: Read OpenType TTCHeaderV1 as a struct
Also check that the requested font index actually exists in the font
collection.
2023-11-08 09:34:09 +01:00
Sam Atkins
1a6da4fbf2 LibGfx: Mark OpenType file data structs as packed, and assert sizes
Some of these are odd sizes. We managed not to insert padding because
BigEndian is itself marked as packed, but let's be explicit instead of
relying on that. :^)
2023-11-08 09:34:09 +01:00
Sam Atkins
dfa79ba6d8 LibGfx: Move implementation code for Tables.h into Tables.cpp 2023-11-08 09:34:09 +01:00
Romain Chardiny
61ac554a34 Kernel/Net: Implement TCP_NODELAY 2023-11-08 09:31:54 +01:00
Sergey Bugaev
38a368c8f6 WebContent: Fix checking for accelerated graphics
What matters here is whether or not we can use LibAccelGfx and OpenGL,
not whether the kernel is Linux.
2023-11-08 09:29:59 +01:00
Sergey Bugaev
21b946791e LibJS: Link with libatomic on i*86
Basically, this would be needed on any platform where the compiler
cannot tell at compile time whether or not some atomic size is
lock-free.
2023-11-08 09:29:59 +01:00
Sergey Bugaev
9c6c2284d9 LibJS: Fix build error when some atomics are not lock-free
Normally, we want to avoid accidentally using such atomics, since
they're much slower. In this case however, we're just implementing
another atomics API, it is then up to the JavaScript code to avoid
using the slow atomics.
2023-11-08 09:29:59 +01:00
Lucas CHOLLET
81794df280 LibGfx/TIFF: Add support for images with PackBits compression 2023-11-08 09:28:36 +01:00
Lucas CHOLLET
ed8d82f3de Tests/LibGfx: Move the tiff image to its own folder 2023-11-08 09:28:36 +01:00
Lucas CHOLLET
472a886dfc LibGfx/TIFF: Refactor the decoding loop
This is done to ease the introduction of the support of other
compressions.
2023-11-08 09:28:36 +01:00
Timothy Flynn
bf3fce1766 LibJS: Add Date.parse formats for the output of Date.prototype.to*String
We currently cannot parse the output of `toString` and `toUTCString`.
While the spec does not require such support, test262 expects it, and
all major engines support it.
2023-11-08 09:28:17 +01:00
Timothy Flynn
9d3f942d43 LibJS: Display example Date strings inline with their format strings
The current comment style feels a bit awkward to read.
2023-11-08 09:28:17 +01:00
Timothy Flynn
99233776e6 test-js: Add a test helper to override the current time zone 2023-11-08 09:28:17 +01:00
Timothy Flynn
ee7ab5d053 LibCore: Support wildcard-skipping characters in Core::DateTime::parse
For example, LibJS will need to parse date strings of the form:

    Wed Dec 31 1969 19:00:00 GMT-0500 (Eastern Standard Time)

This string contains both the time zone offset (-05:00) and a display
name for the time zone (Eastern Standard Time). Because we will already
handle time zone adjustments when we handle the offsets, we will want to
just skip the time zone name. This patch will let us use a format string
of the form "GMT%z (%+)" to do so.
2023-11-08 09:28:17 +01:00
Timothy Flynn
350fdf1e43 LibCore+LibTimeZone: Support time zone names in Core::DateTime::parse
LibCore currently cannot depend on LibTimeZone directly. All build-time
code generators depend on LibCore, so there'd be a circular dependency:
LibCore -> LibTimeZone -> GenerateTZData -> LibCore.

So to support parsing time zone names and applying their offsets, add a
couple of weakly-defined helper functions. These work similar to the way
AK::String declares some methods that LibUnicode defines. Any user who
wants to parse time zone names (from outside of LibCore itself) can link
against LibTimeZone to receive full support.
2023-11-08 09:28:17 +01:00
Timothy Flynn
fd0075083a LibCore: Change Core::DateTime::parse to accept a StringView
No reason to force an allocation here, as we do not require a NUL-
terminated string.
2023-11-08 09:28:17 +01:00
Timothy Flynn
6655de189f LibCore: Add a Core::System wrapper around unsetenv 2023-11-08 09:28:17 +01:00
Timothy Flynn
2437064820 AK: Define compound subtraction operator for UnixDateTime 2023-11-08 09:28:17 +01:00
Tim Ledbetter
b3d5f9748a LibVideo/VP9: Ensure range decoder size is within expected range 2023-11-08 09:13:59 +01:00
Timothy Flynn
fefbbff0a5 LibEDID: Replace the HTML-based PNP ID parser with a CSV-based parser
The PNP ID file is now a CSV file. Update the generator to handle the
new format.
2023-11-08 08:19:04 +01:00
Timothy Flynn
a02e0afa41 LibEDID: Replace a few DeprecatedString::formatted with String::number
And remove one that was for unused data.
2023-11-08 08:19:04 +01:00
Timothy Flynn
936e97b066 LibEDID: Format PNP ID data a little more cleanly
Namely, do not append unnecessary new lines between PNP ID entries. This
just makes the generated code a bit easier to look through.
2023-11-08 08:19:04 +01:00
Sam Atkins
763b08c23f LibWeb: Remove now-unused CSS::PositionValue type and associated parsing
All the users now use PositionStyleValue instead.
2023-11-07 22:00:24 +00:00
Sam Atkins
7bcabbb325 LibWeb: Store ConicGradientStyleValue's position as PositionStyleValue 2023-11-07 22:00:24 +00:00
Sam Atkins
5cf85d30aa LibWeb: Store RadialGradientStyleValue's position as PositionStyleValue 2023-11-07 22:00:24 +00:00
Sam Atkins
2ae53bc5eb LibWeb: Add some helpers to PositionStyleValue
Both of these are needed by the gradient style values.
2023-11-07 22:00:24 +00:00
Sam Atkins
8917378aa7 LibWeb: Adapt parse_position() into parse_position_value()
Having two ways that `<position>` is represented is awkward and
unnecessary. So, let's combine the two paths together. This first step
copies and modifies the `parse_position()` code to produce a
`PositionStyleValue`.

Apart from returning a StyleValue, this also makes use of automatic enum
parsing instead of manually comparing identifier strings.
2023-11-07 22:00:24 +00:00
Sam Atkins
4ad58f0204 LibWeb: Store PositionStyleValue's edges as EdgeStyleValues
They can't be anything else, so this will make working with them easier.
2023-11-07 22:00:24 +00:00
Sam Atkins
875661a584 LibWeb: Remove unnecessary double->float->double round trip 2023-11-07 22:00:24 +00:00
Sam Atkins
88dc5886eb LibWeb: Use generated to_string() function for EdgeStyleValue edge 2023-11-07 22:00:24 +00:00
Sam Atkins
f918785698 LibWeb: Remove redundant identifier_to_edge() function
The enums generator has this covered already.
2023-11-07 22:00:24 +00:00
iliadsh
aef654592f LibJS/JIT: Bail in UnsignedRightShift fast path if result is negative 2023-11-07 21:59:03 +01:00
Sam Atkins
0875ef770f Chess: Make chess widget resilient to missing piece images
Display a warning when some images are missing, instead of crashing.

Also, don't keep old images around when loading a new set, and make use
of get_piece_graphic() more often.
2023-11-07 19:44:11 +01:00
Sam Atkins
39579436c1 GamesSettings: Make chess preview widget resilient to missing images
Previously we would give up on loading the piece images if one fails.
That was awkward because 2 out of 3 places where `set_piece_set_name()`
is called can't propagate errors, so we'd just crash.

Instead, let's skip any images that fail to load, and then when painting
the preview, skip any missing bitmaps and show a warning message that
some are missing.
2023-11-07 19:44:11 +01:00
Sam Atkins
4f99f1750e GamesSettings: Pass a String to ChessGamePreview::set_piece_set_name() 2023-11-07 19:44:11 +01:00
Matthew Olsson
13ae2a4dab LibWeb: Store all timelines associated with a document on the document
This will be required for propagating the current animation time to all
relevant timelines, which each propagate that time to all of their
relevant animations.
2023-11-07 15:17:09 +01:00
Matthew Olsson
2fbb9649e3 LibWeb: Add a default DocumentTimeline object to DOM::Document 2023-11-07 15:17:09 +01:00
Matthew Olsson
734076946b LibWeb: Add DocumentTimeline IDL object 2023-11-07 15:17:09 +01:00
Matthew Olsson
521f8bd5f2 LibWeb: Add AnimationTimeline IDL object 2023-11-07 15:17:09 +01:00
Simon Wanner
8eeb4e0aff LibJS/JIT: Use mov8/mov32 for loads in compile_get_variable 2023-11-07 14:39:13 +01:00
Simon Wanner
ff63222425 LibJIT: Add mov8/mov16/mov32 with zero- or sign-extension 2023-11-07 14:39:13 +01:00
stelar7
2bab266ba9 Tests: Add test for button type attribute 2023-11-07 11:34:21 +01:00
stelar7
5dfe21be85 LibWeb: Remove unused method on HTMLButtonElement 2023-11-07 11:34:21 +01:00
stelar7
27ae172e7e Meta: Implement correct parsing of reflected DOMString 2023-11-07 11:34:21 +01:00
stelar7
d767f14df8 LibWeb: Introduce the concept of "Enumerated" values
This does _NOT_ correspond to anything in the IDL or ECMAScript spec,
but is a custom extended attribute.
We use it to define the "enumerated" values of an attribute
2023-11-07 11:34:21 +01:00
stelar7
19bf42a7e6 LibIDL: Attach extended attributes on enums 2023-11-07 11:34:21 +01:00
Shannon Booth
ea2b733862 LibWeb: Port custom properties to FlyString 2023-11-07 11:33:41 +01:00
Shannon Booth
346825bd78 LibWeb: Remove unused DeprecatedFlyString include from HTMLCollection 2023-11-07 11:33:41 +01:00