Commit graph

36113 commits

Author SHA1 Message Date
Idan Horowitz
e18632660f Kernel: Use the pre-image kernel memory range introduced by KASLR
This ensures we don't just waste the memory range between the default
base load address and the actual load address that was shifted by the
KASLR offset.
2022-03-22 16:46:51 +01:00
Idan Horowitz
d850e483f7 Kernel: Keep kernel base load address 2 MiB aligned
This requirement comes from the fact the Prekernel mapping logic only
uses 2 MiB pages.
This unfortunately reduces the bits of entropy in kernel addresses from
16 bits to 7, but it could be further improved in the future by making
the Prekernel mapping logic a bit more dynamic.
2022-03-22 16:46:51 +01:00
Lady Gegga
025cfacd46 Base: Add Slovakian and Ukrainian flags
Slovakian flags:
Banská Bystrica, Bratislava, Košice, Nitra, Prešov, Trnava, Trenčín,
Žilina
Ukrainian flags:
Vinnychchyna, Volyn, Luhanshchyna, Dnipropetrovshchyna,
Zhytomyrshchyna, Zakarpattia, Zaporizhzhya, Prykarpattia,
Kiev, Kyivshchyna, Kirovohradschyna, Sevastopol, Lvivshchyna,
Mykolayivschyna, Odeshchyna, Poltavshchyna, Rivnenshchyna,
Sumshchyna, Ternopilshchyna, Kharkivshchyna, Khersonshchyna,
Khmelnychchyna, Cherkashchyna, Chernihivshchyna, Chernivtsi Oblast
2022-03-22 15:35:42 +00:00
Timothy Flynn
859a75fd4c LibWeb: Handle input element value setting & getting closer to the spec
We should not set the 'value' attribute when an input element's value is
changed (by the user or programmatically). Instead, we should track the
value internally and mark it with a dirty flag when it is changed.
2022-03-22 16:06:38 +01:00
Sam Atkins
31b24c2b29 LibWeb: Remove now-unused null values from Selector enums
Now that we use a Variant for the SimpleSelector's data, we don't need
to instantiate empty structs or variables for the types that aren't
used, and so we can remove `PseudoElement::None`,
`PsuedoClass::Type::None` and `Attribute::MatchType::None`.

Also, we now always initialize a SimpleSelector with a type, so
`SimpleSelector::Type::Invalid` can go too.
2022-03-22 15:47:36 +01:00
Sam Atkins
cbe2eaebab LibWeb: Tidy up CSS::Token::to_debug_string()
The ifs below the switch no longer functioned, so let's move everything
into the switch cases. This also means we can replace the StringBuilder
usage with String::formatted().
2022-03-22 15:47:36 +01:00
Sam Atkins
13e1232d79 LibWeb: Remove separate Token::m_unit field
Dimension tokens don't make use of the m_value string for anything else,
so we can sneak the unit string in there.

- Token goes from 72 to 64 bytes
- StyleComponentValueRule goes from 80 to 72 bytes
2022-03-22 15:47:36 +01:00
Sam Atkins
c0d3f1a5e4 LibWeb: Use CSS::Number for CalculatedStyleValue numbers 2022-03-22 15:47:36 +01:00
Sam Atkins
fe372cd073 LibWeb: Use CSS::Number for Token numeric values 2022-03-22 15:47:36 +01:00
Sam Atkins
e8ab2dab11 LibWeb: Implement a CSS::Number class
We have the same "number and is-integer flag" structure in several
places, so let's put that in a class.
2022-03-22 15:47:36 +01:00
Sam Atkins
0795b9f7bb LibWeb: Use floats instead of doubles for CSS numbers
Using doubles isn't necessary, and they make things slightly bigger and
slower, so let's use floats instead.
2022-03-22 15:47:36 +01:00
Sam Atkins
1f5b5d3f99 LibWeb: Use intermediate ints when converting strings to numbers in CSS
These three are all integers - we just repeatedly multiply them by 10
and then add a digit - so using an integer here is both faster and more
accurate. :^)
2022-03-22 15:47:36 +01:00
Sam Atkins
404a7cb63a LibGfx+LibWeb: Use floats not doubles to create HSL colors
There's really no reason to use doubles here, except at the time I
wanted to use doubles everywhere in CSS. I now realize that is
excessive, so everything can be floats instead.
2022-03-22 15:47:36 +01:00
Sam Atkins
75ec960495 LibWeb: Initialize PseudoClass/PseudoElement selectors in one go
There was no real benefit to creating the SimpleSelector early and then
modifying it, and doing so made this code harder to follow than it
needs to be.
2022-03-22 15:47:36 +01:00
Sam Atkins
c0db19f63c LibWeb: Use a Variant for SimpleSelector's contents
This reduces SimpleSelector's size from 112 bytes to 80 bytes. :^)
2022-03-22 15:47:36 +01:00
Sam Atkins
218a9af6b3 LibWeb: Make StyleComponentValueRule use a Variant
This shrinks its size from 96 bytes to 80. It's now limited by the size
of Token.
2022-03-22 15:47:36 +01:00
Sam Atkins
ca1b855d99 LibWeb: Allow percentages in word/letter-spacing properties
This is a change to CSS-TEXT-4, listed here:
https://www.w3.org/TR/2022/WD-css-text-4-20220318/#changes

We don't actually support these properties yet, but it doesn't hurt to
keep them up to date for when they get implemented in the future. :^)
2022-03-22 15:45:46 +01:00
Linus Groh
701d437205 LibWeb: Explicitly ignore [[nodiscard]] values returned from TRY(), pt 2 2022-03-22 13:36:44 +00:00
Linus Groh
70b1f18e58 LibWeb: Explicitly ignore [[nodiscard]] values returned from TRY()
This broke the clang build.
2022-03-22 13:20:06 +00:00
Timothy Flynn
c3f9cd6dbd LibWeb: Convert Range to use TRY for error propagation 2022-03-22 12:09:27 +00:00
Timothy Flynn
f9cc5d1071 LibWeb: Convert HTMLOptionsCollection to use TRY for error propagation 2022-03-22 12:09:27 +00:00
Timothy Flynn
2d34216628 LibWeb: Make DOM::ExceptionOr compatible with the TRY macro
This will help reduce the quite repetitive pattern of:

    auto result_or_error = dom_node->do_something();
    if (result_or_error.is_exception())
        return result_or_error.exception();
    auto result = result_or_error.release_value();

Similar to LibJS completions, this adds an alias to the error accessors.
This also removes the requirement on release_value() for ValueType to
not be Empty, which we also had to do for TRY compatibility in LibJS.
2022-03-22 12:09:27 +00:00
Linus Groh
f36f9c106b LibCrypto: Fix grammar in a couple of comments 2022-03-22 11:26:29 +00:00
Linus Groh
bd110be367 Kernel: Fix typo in a comment 2022-03-22 11:26:29 +00:00
Nícolas F. R. A. Prado
2c44c7fc89 KeyboardSettings: Allow changing and applying active keymap
Previously only the list of allowed keymaps could be modified and
applied to the system.

Add a new button to activate the selected keymap from the list. When
applying the changes to the system, also apply the active keymap.
2022-03-22 12:21:21 +01:00
Nícolas F. R. A. Prado
a48d7d6adc KeyboardSettings: Rename m_current_applied_keymap
Rename it to m_initial_active_keymap to denote that it's the keymap that
was active when the application started up.
2022-03-22 12:21:21 +01:00
int16
256744ebdf Kernel: Make mmap validation functions return ErrorOr<void> 2022-03-22 12:20:19 +01:00
int16
4b96d9c813 Kernel: Move mmap validation functions to Process 2022-03-22 12:20:19 +01:00
int16
479929b06c Kernel: Check wxallowed mount flag when validating mmap call 2022-03-22 12:20:19 +01:00
int16
3f391d80c4 SystemMonitor: Recognise wxallowed mount flag 2022-03-22 12:20:19 +01:00
int16
8a523568cb Mount: Add wxallowed mount option to mount documentation 2022-03-22 12:20:19 +01:00
int16
a4d96c159c Mount: Implement wxallowed mount option 2022-03-22 12:20:19 +01:00
int16
4307c4480e Kernel: Define MS_WXALLOWED mount option 2022-03-22 12:20:19 +01:00
Rok Povsic
5bb5967259 Browser: Append .com when pressing CTRL+Enter in the URL text editor
This is the behavior in Firefox / Chrome.
2022-03-22 12:17:48 +01:00
Rok Povsic
7da0d94d03 LibGUI: Add CTRL+Enter callback to TextEditor 2022-03-22 12:17:48 +01:00
Linus Groh
883768c646 Base: Use technically accurate term in unveil(2) man page 2022-03-22 11:16:19 +00:00
Jelle Raaijmakers
d195972ec2 Applications: Do not crash if decoded bitmap is null
ImageViewer and PixelPaint would crash when the ImageDecoderClient
returns a frame without a bitmap. This can happen with `.ico` files
with an unsupported BPP, for example.
2022-03-22 12:14:09 +01:00
Nicholas Cellino
1db7c423db disk_benchmark: Port to LibMain 2022-03-22 11:51:32 +01:00
Brian Gianforcaro
0a9e84aff0 readelf: Port to LibMain 2022-03-22 11:39:20 +01:00
Brian Gianforcaro
575fcc42c3 purge: Port to LibMain 2022-03-22 11:39:20 +01:00
Brian Gianforcaro
fbceebb717 ping: Utilize TRY + Core::System wrappers 2022-03-22 11:39:20 +01:00
Brian Gianforcaro
08d65e8c38 traceroute: Port to LibMain 2022-03-22 11:39:20 +01:00
Brian Gianforcaro
6eebd69b70 LibCore: Add Core::System::drop_privileges()
In a few places we intentionally drop privileges to reduce the potential
security surface area of networked program, with the pattern of:

```
if (setgid(getgid()) || setuid(getuid()) {
    return 1;
}
```

We can make this a bit nicer to use by creating a wrapper.
2022-03-22 11:39:20 +01:00
Brian Gianforcaro
7403342387 true: Port to LibMain 2022-03-22 11:39:20 +01:00
Brian Gianforcaro
544609b40f printf: Port to LibMain 2022-03-22 11:39:20 +01:00
Brian Gianforcaro
dba23c55dd matroska: Port to LibMain 2022-03-22 11:39:20 +01:00
Andreas Kling
b6e767f953 Kernel: Disable KASLR on i686
The 32-bit CI runners don't seem to happy with KASLR, so let's make it
x86-64 only for now.
2022-03-22 02:47:27 +01:00
Jamie Mansfield
9b9d32dfb2 LibWeb: Fix crash when removing event listeners 2022-03-22 02:35:07 +01:00
Timothy Flynn
27eb70cbba LibWeb: Implement HTMLSelectElement.add()
HTMLSelectElement simply defers to its HTMLOptionsCollection.
2022-03-22 02:08:15 +01:00
Timothy Flynn
ff9856a214 LibWeb: Implement HTMLOptionsCollection.add() 2022-03-22 02:08:15 +01:00