Tim Ledbetter
f3a68fc80d
mktemp: Ensure --tmpdir
and template paths are concatenated correctly
...
Previously, using the `--tempdir` option with a template containing a
path didn't work correctly, as the template path would be discarded.
2024-02-24 15:57:14 -07:00
implicitfield
84252db976
Utilities: Add mkfs.fat
...
This adds a basic `mkfs.fat` utility, which can format FAT12, FAT16
and FAT32 partitions.
This does have a few limitations, namely in that FAT12 formatting is
limited to a set known floppy disk sizes, and we can only generate
512-byte sectors.
2024-02-24 15:54:52 -07:00
implicitfield
a69e113d49
Kernel: Add a definition for the FAT32 FSInfo structure
2024-02-24 15:54:52 -07:00
implicitfield
8b77737f8e
Kernel: Move FAT structure definitions to Kernel/API
...
We need to be able to include these definitions from userspace as the
upcoming mkfs.fat utility will depend on these.
2024-02-24 15:54:52 -07:00
implicitfield
f2503b2048
CMake: Allow the names of utilities to contain extensions
...
Previously, we would remove the "longest extension" from each file name
when parsing it as the name of a utility, which made it impossible for
the names of utilities to contain any extensions.
2024-02-24 15:54:52 -07:00
implicitfield
8384bb138e
LibFileSystem: Add a helper to get the size of a block device
2024-02-24 15:54:52 -07:00
implicitfield
a70d79ff98
LibFileSystem: Add a helper to get the file size from fstat
2024-02-24 15:54:52 -07:00
implicitfield
896f213c6f
LibFileSystem+Userland: Rename size() to size_from_stat()
...
This reflects what the functions does more accurately, and allows for
adding functions to get sizes through other methods.
This also corrects the return type of said function, as size_t may only
hold sizes up to 4GB on 32-bit platforms.
2024-02-24 15:54:52 -07:00
implicitfield
d3c6e31bf3
CMake: Build lagom with -D_FILE_OFFSET_BITS=64 on Linux
...
32-bit glibc limits off_t to 32 bits without this definition, which
makes working with large files rather difficult.
2024-02-24 15:54:52 -07:00
Tom Finet
a7db718ffb
Kernel/Net: Send RST packet when socket receives in closed state
...
RFC9293 states that a closed socket should reply to all non-RST
packets with an RST. This change implements this behaviour as
specified in section 3.5.2 in bullet point 1.
2024-02-24 15:49:46 -07:00
Fabian Dellwing
29ef508b4e
tail: Collapse repeated error handling into statement expression
...
Co-authored-by: Timothy Flynn <trflynn89@pm.me>
2024-02-24 15:48:36 -07:00
Fabian Dellwing
e40aca2d77
tail: Handle truncation in follow mode
2024-02-24 15:48:36 -07:00
Fabian Dellwing
5180e41918
Kernel: Call did_modify_contents()
after truncate()
...
Truncating a file should absolutly mark it as modified. With this
change our `tail` implementation can correctly handle it.
2024-02-24 15:48:36 -07:00
Sönke Holz
525555181e
LibELF: Add riscv64 PLT trampoline
...
This code is based on the aarch64 implementation.
2024-02-24 15:41:23 -07:00
Julian Offenhäuser
bf9240c7a9
Ports: Update OpenRCT2 to version 0.4.8
2024-02-24 23:26:26 +01:00
Dan Klishch
8ac0e3f0e5
AK+LibJS: Remove null state from DeprecatedFlyString :^)
2024-02-24 15:06:52 -07:00
Dan Klishch
026c1caba0
LibJS: Don't use null DFS for binding_name parameters in ClassExpression
2024-02-24 15:06:52 -07:00
Dan Klishch
d558468d03
LibJS: Don't differentiate between empty and null DFS in CatchClause
2024-02-24 15:06:52 -07:00
Dan Klishch
fb2c929310
LibJS: Don't use null DFS in {Import,Export}Entry
2024-02-24 15:06:52 -07:00
Dan Klishch
78491204d9
LibJS: Don't use null DFS for break/continue statements without a label
2024-02-24 15:06:52 -07:00
Dan Klishch
761d16141d
LibJS: Store DFS instead of opaque StringImpl inside StringOrSymbol
...
Additionally, use the second bit (instead of the first) to differentiate
between strings and symbols there. This will allow transparent
conversion of DFS to StringBase in the future.
2024-02-24 15:06:52 -07:00
Dan Klishch
a53911717f
LibJS: Remove DeprecatedFlyString::impl use in PrimitiveString
2024-02-24 15:06:52 -07:00
Dan Klishch
061f902f95
AK+Userland: Introduce ByteString::create_and_overwrite
...
And replace two users of raw StringImpl with it.
2024-02-24 15:06:52 -07:00
Dan Klishch
f7c952f842
JSSpecCompiler: Ignore notes in algorithm steps
2024-02-24 15:03:08 -07:00
Dan Klishch
ba61b61d67
JSSpecCompiler: Parse "NewTarget" in xspec mode
2024-02-24 15:03:08 -07:00
Dan Klishch
4d8f74c149
JSSpecCompiler: Parse method headers
2024-02-24 15:03:08 -07:00
Dan Klishch
a35a751f9e
JSSpecCompiler: Parse optional arguments groups
2024-02-24 15:03:08 -07:00
Dan Klishch
3e6a07154b
JSSpecCompiler: Parse "the *this* value" in expressions
2024-02-24 15:03:08 -07:00
Dan Klishch
ddf26a768c
JSSpecCompiler: Parse "Perform <expression>." steps
2024-02-24 15:03:08 -07:00
Dan Klishch
d1fc84c638
JSSpecCompiler: Parse accessor property headers
2024-02-24 15:03:08 -07:00
Dan Klishch
a9f3a14a13
JSSpecCompiler: Simplify value handling in TextParser::parse_expression
2024-02-24 15:03:08 -07:00
Dan Klishch
e1a1f4ed1a
JSSpecCompiler: Parse lists in xspec mode
2024-02-24 15:03:08 -07:00
Dan Klishch
d14bb7e91e
JSSpecCompiler: Make function arguments parsing much simpler
...
In a nutshell, when we understand that the expression is a function
call (this happens at '(' after an expression), stop parsing expression
and start parsing function arguments. This makes
`FunctionCallCanonicalizationPass` and the workaround for zero argument
function calls obsolete.
2024-02-24 15:03:08 -07:00
Dan Klishch
990e30f458
JSSpecCompiler: Parse enumerators in xspec mode
2024-02-24 15:03:08 -07:00
Dan Klishch
3d365326af
JSSpecCompiler: Parse '?' before function calls in xspec mode
2024-02-24 15:03:08 -07:00
Dan Klishch
b800276347
JSSpecCompiler: Parse true, false, this, undefined, and null
2024-02-24 15:03:08 -07:00
Dan Klishch
86d54a8684
JSSpecCompiler: Parse arbitrarily large rational numbers in xspec mode
2024-02-24 15:03:08 -07:00
Dan Klishch
2a2e31f2ed
LibCrypto: Avoid UB in BigFraction::to_byte_string for 0/x fractions
2024-02-24 15:03:08 -07:00
Dan Klishch
bd26e5dce9
JSSpecCompiler: Parse <sup> as raising a number to a power in xspec mode
2024-02-24 15:03:08 -07:00
Dan Klishch
394c9b7006
JSSpecCompiler: Sort token types and operators alphabetically
2024-02-24 15:03:08 -07:00
Tim Ledbetter
1d825f17c0
LibWeb: Remove first rule if no argument is given for remove_rule()
...
While this isn't explicitly mentioned in the specification, there is a
WPT test that checks for this behavior.
2024-02-24 21:59:28 +01:00
Tim Ledbetter
3ea318ca8b
LibWeb: Implement CSSStyleSheet.addRule()
...
This is a legacy method that has been superseded by `insertRule()`,
although it is supported by all modern browser engines.
2024-02-24 21:59:28 +01:00
Tim Ledbetter
87b52a1816
LibWeb: Implement CSSStyleSheet.replaceSync()
...
This method behaves the same as `CSSStyleSheet.replace()` but the
operation is performed synchronously.
2024-02-24 21:59:28 +01:00
Tim Ledbetter
81c67d34eb
LibWeb: Implement CSSStyleSheet.replace()
...
This method asynchronously replaces the content of the given stylesheet
with the content passed to it.
An exception is thrown if this method is used by a stylesheet not
created with the `CSSStyleSheet()` constructor.
2024-02-24 21:59:28 +01:00
Tim Ledbetter
d209d5a84f
LibWeb: Ensure CSSStyleSheet::css_rules() always returns the same object
...
Instead of having a method that replaces the stylesheet's CSSRuleList,
we now have a method on CSSRuleList to modify it's underlying CSSRules.
2024-02-24 21:59:28 +01:00
Tim Ledbetter
811033ec19
LibWeb: Disallow inserting @import rules into a constructed stylesheet
2024-02-24 21:59:28 +01:00
Tim Ledbetter
b0f57a2785
LibWeb: Add CSSStyleSheet constructor binding
2024-02-24 21:59:28 +01:00
Tim Ledbetter
f303905875
LibWeb: Add the CSSStyleSheet.rules
alias for CSSStyleSheet.cssRules
2024-02-24 21:59:28 +01:00
Tim Ledbetter
9b1ea4e2fc
LibWeb: Add CSSStyleSheet.ownerRule
attribute
...
This returns the `CSSImportRule` corresponding to the `@import` at-rule
that imported the stylesheet into the document. If the stylesheet
wasn't imported then this property is null.
2024-02-24 21:59:28 +01:00
Tim Ledbetter
588a031e2d
LibWeb: Clamp calculated border width values to zero
...
Previously, a calculated CSS border-width property with a resolved
value of less than zero pixels would cause a crash.
2024-02-24 21:57:24 +01:00