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
Timothy Flynn
5133491714
LibWeb: Expose HTMLCollection's root element to its subclasses
...
For example, HTMLOptionsCollection will need to access its root
HTMLSelectElement.
2022-03-22 02:08:15 +01:00
Timothy Flynn
324f709d29
LibWeb: Support IDL default values of "null" for optional arguments
...
This is a bit strange in the IDL syntax, but e.g., in HTMLSelectElement,
we have (simplified):
undefined add(optional (HTMLElement or long)? before = null)
This could instead become:
undefined add(optional (HTMLElement or long) before)
This change generates code for the former as if it were the latter.
2022-03-22 02:08:15 +01:00
Simon Wanner
dc94879b83
LibWeb: Support transform: translate(...)
by percentage
2022-03-22 02:06:21 +01:00
Simon Wanner
bc5d39493b
Base: Add a test page for CSS transforms
...
This also acts as a little stress test for flexbox layout :^)
2022-03-22 02:06:21 +01:00
Simon Wanner
4f348f1733
LibGfx: Clip away coordinates outside the source bitmap
...
This prevents accessing the source pixels out of bounds.
2022-03-22 02:06:21 +01:00
Simon Wanner
145efbe07a
LibWeb: Apply the CSS transform-origin property
...
We don't have transform-box yet, so this applies to the border-box
for now.
This also makes us pass a couple Web Platform Tests as well :^)
For example:
https://wpt.live/css/css-transforms/css3-transform-scale-002.html
2022-03-22 02:06:21 +01:00
Simon Wanner
63055ff5ad
LibWeb: Parse the CSS transform-origin property
...
This is almost a PositionStyleValue, but it's serialized differently,
so let's use a StyleValueList with 2 length-percentage values.
2022-03-22 02:06:21 +01:00
Idan Horowitz
1ad0e05ea1
Kernel: Add an extremely primitive version of KASLR
...
This initial (and very basic) implementation of KASLR simply randomizes
the kernel base VA in the 256 MiB range following the default load base.
2022-03-21 23:33:42 +01:00
Idan Horowitz
a9764dabee
Kernel: Add helpers for rdrand and rdseed
2022-03-21 23:33:42 +01:00
Andreas Kling
8ab25f8d8c
LibWeb: Implement Range.surroundContents(newParent)
...
Here goes another Acid3 point :^)
2022-03-21 23:28:46 +01:00