Timothy Flynn
03b251a704
LibJS: Convert IterableToList AO to ThrowCompletionOr
2021-10-21 00:26:45 +01:00
Timothy Flynn
ec54a7b5b0
LibJS: Implement IteratorClose with Completions and align to the spec
2021-10-21 00:26:45 +01:00
Timothy Flynn
04b4307b3d
LibJS: Convert get_iterator_values helper to ThrowCompletionOr
...
This one is a bit unusual, so to clarify:
Previously, callers of get_iterator_values() would supply a callback
that would return an IterationDecision, and an enum to indicate whether
iterator_close() should be invoked upon IterationDecision::Break.
Now, use of both those enums is removed, and callers must return an
Optional<Completion>. If a Completion is provided, the iterator will be
closed, and that completion will be returned from get_iterator_values.
Otherwise, once the iterator is exhausted, a default-initialized
Completion will be returned.
2021-10-21 00:26:45 +01:00
Timothy Flynn
7b4814f74c
LibJS: Convert IteratorValue AO to ThrowCompletionOr
2021-10-21 00:26:45 +01:00
Timothy Flynn
a64752cd34
LibJS: Convert IteratorComplete AO to ThrowCompletionOr
2021-10-21 00:26:45 +01:00
Timothy Flynn
8be1caa05d
LibJS: Convert IteratorStep AO to ThrowCompletionOr
2021-10-21 00:26:45 +01:00
Timothy Flynn
c981d7b9bd
LibJS: Convert IteratorNext AO to ThrowCompletionOr
2021-10-21 00:26:45 +01:00
Timothy Flynn
f4c8f2102f
LibJS: Retrieve GetIterator's optional 'method' function using GetMethod
...
This is in alignment with the spec.
2021-10-21 00:26:45 +01:00
Timothy Flynn
860a37640b
LibJS: Convert GetIterator AO to ThrowCompletionOr
2021-10-21 00:26:45 +01:00
Valtteri Koskivuori
a3b3800cd4
Userland: Teach the file utility more about ELF files
...
It now shows some useful at-a-glance information about ELF files, like
it does on other *nix systems.
2021-10-21 01:14:09 +02:00
Valtteri Koskivuori
efbcfe0498
LibELF: Rename the x86_64 machine type string to be less verbose
...
It looked a bit unsightly in the `readelf` output, this is much neater
while still remaining very unambiguous.
2021-10-21 01:14:09 +02:00
Valtteri Koskivuori
d1adf5bc5e
LibELF+Userland: Move a few functions to Elf::Image
...
These were originally in `readelf`, but they became useful in
`file` as well, so they are now available in Elf::Image with a slightly
revised API.
2021-10-21 01:14:09 +02:00
Karol Kosek
097902bd06
LibGUI: Convert ItemListModel's Display Role to string during search
...
Previously, you could get crashes when you tried to search for a font
size in the Font Picker or a screen resolution in Display Settings.
This is because their list models aren't made of strings
and Variant::as_string() only accepts strings.
2021-10-21 01:10:36 +02:00
Ben Wiederhake
c55527944c
LibWeb: Convert const pointer to nonnull into a reference
2021-10-21 01:08:14 +02:00
Karol Kosek
a36d13e36c
LoginServer: Mark this component as REQUIRED
...
Prior to this change, there was no requirement to build this server.
If you build serenity without -DBUILD_EVERYTHING flag, or just play
around with your build configuration[1], it left you with a blank
screen and this debug line:
SystemServer(6:6): LoginServer: binary "/bin/LoginServer" does not
exist, skipping service.
[1]: Documentation/AdvancedBuildInstructions.md#component-configuration
2021-10-21 00:25:21 +02:00
davidot
2d48529073
LibJS: Implement private identifiers in optional chains
2021-10-20 23:19:17 +01:00
davidot
4c8090a45d
LibJS: Use ClassFieldInitializerStatement for class fields
...
This is necessary as we might have to perform named evaluation with the
field name.
Ideally we would also skip some setup parts of the function like
function_declaration_instantiation however this would require bigger
changes to ECMAScriptFunctionObject.
2021-10-20 23:19:17 +01:00
davidot
7e8724db71
LibJS: Add support for the '#privateName in obj' expression
2021-10-20 23:19:17 +01:00
davidot
16cc82460f
LibJS: Add parsing and evaluation of private fields and methods
2021-10-20 23:19:17 +01:00
davidot
c7a6572789
LibJS: Add private references
2021-10-20 23:19:17 +01:00
davidot
d94b5e511f
LibJS: Add slot [[PrivateElements]] and related methods to Object
2021-10-20 23:19:17 +01:00
davidot
13ead80ee6
LibJS: Add PrivateEnvironment
2021-10-20 23:19:17 +01:00
davidot
eeb42c21d1
LibJS: Lex private identifiers, identifiers prefixed with a '#'
2021-10-20 23:19:17 +01:00
davidot
6b2accce31
LibJS: Add static initializers to classes
2021-10-20 23:19:17 +01:00
davidot
1245512c50
LibJS: Make class definition evaluation more spec like in ordering
2021-10-20 23:19:17 +01:00
Linus Groh
d3ef08217b
LibJS: Remove ErrorType::FixmeAddAnErrorString
...
Just add a proper ErrorType the first time, it's not that hard. We can
always iterate on the message later.
2021-10-20 18:46:24 +01:00
Linus Groh
cf109533de
LibJS: Add ErrorTypes for Promise ownKeys trap invariant violations
2021-10-20 18:46:24 +01:00
Linus Groh
ca09f20dcf
LibJS: Add ErrorType for IterableToListOfType value type mismatch
2021-10-20 18:46:24 +01:00
Linus Groh
8feae81025
LibJS: Add ErrorType for duplicate global environment binding
2021-10-20 18:46:24 +01:00
Tom
1d4919bb81
Meta: Document anon user's password
2021-10-20 18:07:24 +02:00
Idan Horowitz
44555eb50a
LibJS: Convert test-js/test-web/test-wasm to ThrowCompletionOr
2021-10-20 12:27:19 +01:00
Idan Horowitz
40eb3a39d4
LibJS: Rename define_native_function => define_old_native_function
...
This method will eventually be removed once all native functions are
converted to ThrowCompletionOr
2021-10-20 12:27:19 +01:00
Idan Horowitz
ca27e5eff5
LibJS: Convert NativeFunction callback to ThrowCompletionOr
2021-10-20 12:27:19 +01:00
Idan Horowitz
20163c0584
LibJS: Add ThrowCompletionOr versions of the JS native function macros
...
The old versions were renamed to JS_DECLARE_OLD_NATIVE_FUNCTION and
JS_DEFINE_OLD_NATIVE_FUNCTION, and will be eventually removed once all
native functions were converted to the new format.
2021-10-20 12:27:19 +01:00
Idan Horowitz
3355b52cca
LibJS: Remove unused JS_{DECLARE,DEFINE}_NATIVE_{GETTER,SETTER} macros
2021-10-20 12:27:19 +01:00
Idan Horowitz
56e769e4ba
LibJS: Replace usages of JS_{DECLARE, DEFINE}_NATIVE_GETTER
...
These macros are equivalent to JS_{DECLARE, DEFINE}_NATIVE_FUNCTION and
were only sometimes used, so let's just get rid of them altogether.
2021-10-20 12:27:19 +01:00
Ben Wiederhake
ae9b52e387
Meta: Enable header checking in CI
2021-10-20 09:20:18 +01:00
Ben Wiederhake
8de696bdd0
HeaderCheck: It checks some of your headers
2021-10-20 09:20:18 +01:00
Ben Wiederhake
dee26ca5cd
LibWeb: Add missing headers
2021-10-20 09:20:18 +01:00
Ben Wiederhake
0a53cf2a07
LibJS: Add missing header in EnvironmentCoordinate.h
2021-10-20 09:20:18 +01:00
Ben Wiederhake
f53b80e04f
LibC: Add missing header in search.h
2021-10-20 09:20:18 +01:00
Andreas Kling
989c0b23fe
LibWeb: Use the correct initial value for the CSS 'align-items' property
2021-10-19 19:19:29 +02:00
Andreas Kling
ff45eb7fb1
LibWeb: Make computed opacity always available
...
No need to store opacity as Optional<float> as there's always a value
(and the default initial value is 1.)
2021-10-19 19:19:13 +02:00
Andreas Kling
07f15aa550
LibWeb: Make computed flex-grow and flex-shrink always available
...
These values are not allowed to be absent (auto/none/etc) so we don't
need to use Optional<float> for them. This simplifies some things.
2021-10-19 19:17:01 +02:00
Andreas Kling
19eda59359
LibWeb: Add FlexFormattingContext to the forwarding header
2021-10-19 19:14:59 +02:00
Andreas Kling
e6e00d2a4d
LibWeb: Remove already-fixed FIXME in creates_block_formatting_context()
...
We're already creating a BFC for children of inline-flex boxes.
2021-10-19 19:14:11 +02:00
Andreas Kling
225a5f2fe6
LibWeb: Add fast_is<T>() for SVGBox and SVGPathBox
2021-10-19 19:13:58 +02:00
Sam Atkins
04c0c103e0
LibWeb: Distinguish between integer and number when checking StyleValues
2021-10-19 19:12:09 +02:00
Sam Atkins
78e57096e2
LibWeb: Distinguish between integer and float in NumericStyleValue
...
We have this information when parsing, and some properties specifically
only allow integers, so it makes sense to keep that around.
2021-10-19 19:12:09 +02:00
Sam Atkins
450b782c18
LibWeb: Distinguish between length and percentage values
...
Though most CSS properties accept either, some do not, so distinguishing
between them lets us catch some invalid values at parse time.
2021-10-19 19:12:09 +02:00