Commit Graph

46287 Commits

Author SHA1 Message Date
Timothy Flynn
2692db8699 LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors
Note that as of this commit, there aren't any such throwers, and the
call site in Heap::allocate will drop exceptions on the floor. This
commit only serves to change the declaration of the overrides, make sure
they return an empty value, and to propagate OOM errors frm their base
initialize invocations.
2023-01-29 00:02:45 +00:00
Timothy Flynn
1c1b902a6a LibJS+LibWeb: Move headers around to allow including Value from Cell
The goal here is to allow Cell::initialize to return a ThrowCompletion,
to handle OOM for example. Cell.h will then need to include Completion.h
which must include Value.h. This currently can't happen because Value.h
includes BigInt.h, which in turn includes Cell.h. So we would have an
include cycle.

This removes BigInt.h from Value.h, as it is forward-declarable (it is
only referred to with a reference or pointer). Then the Value overload
for Cell::Visitor::visit is moved to Cell.h, and missing BigInt.h
includes as peppered as needed.
2023-01-29 00:02:45 +00:00
Timothy Flynn
b0a4df76de LibJS: Define Date constants such that translation units don't copy them
Variables that are constexpr must be delcared inline in the global
namespace to prevent copying them.

The static keyword is meaningless on variables in headers in the global
namespace. Declare the static bigint as extern and define it out-of-line
instead.
2023-01-29 00:02:45 +00:00
Linus Groh
e4158d8555 LibJS: Replace some deprecated_string() with utf8_string() in Temporal
The remaining ones are needed for PropertyKey, which is not yet String
compatible.
2023-01-28 22:58:03 +00:00
Linus Groh
b41e7b7e86 LibJS: Replace to_deprecated_string() with to_string() in Temporal
Turns out all of these can already be replaced with no further changes!
2023-01-28 22:54:44 +00:00
MacDue
890b4d7980 LibWeb: Replace ARIA role static FlyStrings with an enum
This replaces the FlyStrings for ARIA roles that were constructed in
a [[gnu::constructor]] with a single enum. I came across this as the
DOM inspector was crashing due to a null FlyString for an ARIA role.

After fixing that, I was confused as to why these roles were not an
enum. Looking at the spec there's a fixed list of roles and switching
from references to static strings to an enum was pretty much an
exercise in find and replace :).

No functional changes (outside of fixing the mentioned crash).
2023-01-28 22:09:18 +00:00
Karol Kosek
f23eba1ba8 ImageDecoder: Actually set is_animated and loop_count variables
Before 649f78d0a4, the is_animated and
loop_count objects were set directly when making a return object.

That commit moved the decode logic to a separate function but forgot to
assign `is_animated` and `loop_count`. The compiler didn't throw an
error about unused variables because we were also VERIFY()ing that these
variables were zero-initialized at the beginning of the function.
2023-01-28 21:49:23 +00:00
Linus Groh
3a9225608a LibAudio: Remove try_ prefix from fallible LoaderPlugin methods 2023-01-28 22:41:36 +01:00
Linus Groh
ee0297d9ec LibAudio: Remove try_ prefix from fallible LoaderPlugin methods 2023-01-28 22:41:36 +01:00
Linus Groh
108ea2b921 LibCore: Remove try_ prefix from fallible SharedCircularQueue methods 2023-01-28 22:41:36 +01:00
Linus Groh
65fa7db2b5 PixelPaint: Remove try_ prefix from fallible ProjectLoader methods 2023-01-28 22:41:36 +01:00
Linus Groh
86f28ceace PixelPaint: Remove try_ prefix from fallible IconBag methods 2023-01-28 22:41:36 +01:00
Linus Groh
8a884b2581 PixelPaint: Remove try_ prefix from fallible Image methods 2023-01-28 22:41:36 +01:00
Linus Groh
39f1a6eb6f PixelPaint: Remove try_ prefix from fallible Image methods 2023-01-28 22:41:36 +01:00
Linus Groh
9c08bb9555 AK: Remove try_ prefix from FixedArray creation functions 2023-01-28 22:41:36 +01:00
Nico Weber
909c2a73c4 LibGfx+icc: Read and display lut16Type and lut8Type ICC tag types 2023-01-28 21:40:45 +00:00
Nico Weber
a0513a360a LibGfx: Use AssertSize<> in ICC/Profile.cpp 2023-01-28 21:40:45 +00:00
Sam Atkins
53ebe607f8 LibWasm: Implement data.drop instruction 2023-01-28 22:57:25 +03:30
Sam Atkins
a2f42512c2 LibWasm: Move memory.init code together with other memory.foo impls
And add a spec link while I'm at it.
2023-01-28 22:57:25 +03:30
Sam Atkins
330911a274 LibWasm: Implement memory.copy instruction 2023-01-28 22:57:25 +03:30
Sam Atkins
42adba5ad4 LibWasm: Implement memory.fill instruction 2023-01-28 22:57:25 +03:30
Timothy Flynn
e96c64cdb4 AK: Add support for the new FlyString to StringView 2023-01-28 15:24:55 +00:00
Timothy Flynn
b61f8cd130 AK: Delete the StringView move-assignment operator for various types 2023-01-28 15:24:55 +00:00
Xexxa
c55a5add0f Base: Add more emoji
🔗💥 - U+1F517_U+200D_U+1F4A5 BROKEN CHAIN
🍄🟫 - U+1F344_U+200D_U+1F7EB MUSHROOM (NON-POISONOUS)
🙂‍↕ - U+1F642_U+200D_U+2195 NODDING FACE
🙂‍↔ - U+1F642_U+200D_U+2194 SHAKING FACE
🍋🟩 - U+1F34B_U+200D_U+1F7E9 LIME
🐦🔥 - U+1F426_U+200D_U+1F525 PHOENIX
🧑🧒 - U+1F9D1_U+200D_U+1F9D2 FAMILY: ADULT, CHILD
🧑🧑🧒 - U+1F9D1_U+200D_U+1F9D1_U+200D_U+1F9D2
FAMILY: ADULT, ADULT, CHILD
🧑🧒🧒 - U+1F9D1_U+200D_U+1F9D2_U+200D_U+1F9D2
FAMILY: ADULT, CHILD, CHILD
🧑🧑🧒🧒 - U+1F9D1_U+200D_U+1F9D1_U+200D_U+1F9D2_U+200D_U+1F9D2
FAMILY: ADULT, ADULT, CHILD, CHILD
2023-01-28 15:22:14 +00:00
Xexxa
816b557460 Base: Remove U+FE0F from emoji-serenity.txt 2023-01-28 15:22:14 +00:00
Nico Weber
027c97d3b2 icc: Print profile size 2023-01-28 12:42:19 +01:00
Nico Weber
6c79201f43 LibGfx: Make PNGImageDecoderPlugin::icc_data() return data if present 2023-01-28 12:42:19 +01:00
Nico Weber
53f485c5f0 LibGfx: Process colorspace-related chunks in PNGLoader
This stores the data from all these chunks on PNGLoadingContext
but doesn't do anything with it yet.
2023-01-28 12:42:19 +01:00
Andreas Kling
2dc657c77e AK: Add DeprecatedStringCodePointIterator
This is a safe iterator over the underlying code points. It will be used
in Jakt to assist in the migration away from DeprecatedString.
2023-01-28 09:50:52 +01:00
Linus Groh
0f4bbfdfb7 LibJS: Add spec comments to FunctionPrototype 2023-01-28 00:41:18 +00:00
Linus Groh
6d6ea1fffe LibJS: Add spec comments to FinalizationRegistryPrototype 2023-01-28 00:41:18 +00:00
Linus Groh
2473940526 LibJS: Add spec comments to FinalizationRegistryConstructor 2023-01-28 00:41:18 +00:00
Linus Groh
39301cce70 LibJS: Add spec comments to DataViewPrototype 2023-01-28 00:41:18 +00:00
Linus Groh
814e7260f3 LibJS: Add spec comments to DataViewConstructor 2023-01-28 00:41:18 +00:00
Linus Groh
0f3899b24a LibJS: Add spec comments to Completion 2023-01-28 00:41:18 +00:00
Linus Groh
e32265c896 LibJS: Add spec comments to BooleanConstructor 2023-01-28 00:41:18 +00:00
Linus Groh
02808948ec LibJS: Add spec comments to BigIntPrototype 2023-01-28 00:41:18 +00:00
Linus Groh
7b139c6982 LibJS: Add spec comments to ArrayConstructor 2023-01-28 00:41:18 +00:00
Linus Groh
eefb73add2 LibJS: Add spec comments to ArrayBufferConstructor 2023-01-28 00:41:18 +00:00
Linus Groh
039cd353f1 LibJS: Implement the thisBooleanValue AO and use it in BooleanPrototype 2023-01-28 00:41:18 +00:00
Nico Weber
b5deccf859 LibGfx: Split ICC/Profile.{h,cpp} into several files
s15Fixed16Number and XYZNumber are somewhat awkwardly duplicated
in both Profile.cpp and TagTypes.cpp. Other than that, this is a
pure code move.

No behavior change.
2023-01-28 00:27:07 +00:00
Nico Weber
6d51d8ad32 LibGfx: Bump copyright year in ICC/Profile.{h,cpp} 2023-01-28 00:27:07 +00:00
Nico Weber
721b280849 LibGfx: Move ICCProfile.{h,cpp} to ICC/Profile.{h,cpp} 2023-01-28 00:27:07 +00:00
MacDue
afb84df290 LibWeb: Add a few extra spec links to CanvasGradient 2023-01-28 00:26:48 +00:00
MacDue
f86b66dc2d LibWeb: Throw exception if any canvas radial gradient radius is < 0
As per the specification:
https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-createradialgradient
2023-01-28 00:26:48 +00:00
Timothy Flynn
8dc4e05ecf LibJS: Port Intl.DurationFormat to String 2023-01-28 00:13:59 +00:00
Timothy Flynn
4c8f7d76c4 LibJS: Port Intl.RelativeTimeFormat to String 2023-01-28 00:13:59 +00:00
Timothy Flynn
a824e1ac6a LibJS: Remove last use of DeprecatedString from Intl.MathematicalValue 2023-01-28 00:13:59 +00:00
Timothy Flynn
a65bf16cd5 LibLocale: Remove last use of DeprecatedString from LibLocale 2023-01-28 00:13:59 +00:00
Timothy Flynn
9e4dbea0ee LibJS: Use String::join and String::trim in Temporal AOs 2023-01-28 00:13:46 +00:00