Commit graph

29310 commits

Author SHA1 Message Date
Liav A
d395ac8f59 Kernel/PCI: Rename Access::scan_pci_domains method
We rename it to scan_pci_domains_from_acpi_mcfg_table to ensure clarity,
because this method relies on the ACPI MCFG table to work.
2021-10-23 19:17:44 +02:00
Liav A
ca32ee5714 Kernel/PCI: Simplify detect_optimal_access_type function
Instead of getting the kernel commandline argument as function parameter
we just take internally in the function.
2021-10-23 19:17:44 +02:00
Sam Atkins
79522db5d0 HackStudio: Add syntax-highlighting for CSS files 2021-10-23 19:07:44 +02:00
Sam Atkins
d2690e551c TextEditor: Add syntax-highlighting for CSS files 2021-10-23 19:07:44 +02:00
Sam Atkins
6f71516409 LibWeb: Syntax-highlight CSS within HTML :^) 2021-10-23 19:07:44 +02:00
Sam Atkins
38f6140159 LibWeb: Implement first draft of CSS syntax highlighting :^)
This works at the Token level, which is quick and easy but has
drawbacks: We don't know when something is a property name or a value,
or if something is part of a selector. But, this works for now.
2021-10-23 19:07:44 +02:00
Sam Atkins
ecf5368535 LibWeb: Record position information in CSS Tokens
This is a requirement to be able to use the Tokens for syntax
highlighting.
2021-10-23 19:07:44 +02:00
Sam Atkins
9a2eecaca4 LibWeb: Add CSS Tokenizer::consume_as_much_whitespace_as_possible()
This is a step in the spec in 3 places, and we had it implemented
differently in each one. This unifies them and makes it clearer what
we're doing.
2021-10-23 19:07:44 +02:00
Sam Atkins
dfbdc20f87 LibWeb: Add spec links to CSS Tokenizer
Also renamed `starts_with_a_number()` -> `would_start_a_number()` to
better match spec terminology.
2021-10-23 19:07:44 +02:00
Sam Atkins
6edd7a4d73 LibWeb: Implement hashless hex color quirk
https://quirks.spec.whatwg.org/#the-hashless-hex-color-quirk

The CSS parser should now be completely quirky! :^)

The code is a bit awkward, especially the prepending-0s step, but at
least it won't be running too often.
2021-10-23 18:53:17 +02:00
Sam Atkins
d1f489b847 LibWeb: Explicitly cast parameters to Color::from_hsl/hsla()
CLion was giving me the angry red underlines about this.
2021-10-23 18:53:17 +02:00
Sam Atkins
21b65de1ec LibGfx+LibWeb: Move "transparent" keyword into Color::from_string()
It seemed odd to have this one color handled separately, when
`Color::from_string()` implements all other CSS colors.
2021-10-23 18:53:17 +02:00
Idan Horowitz
2ab089fa21 LibJS: Convert RegExpStringIteratorPrototype to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
063ce946b7 LibJS: Convert RegExpPrototype functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
9b3c91aa65 LibJS: Convert the RegExpExec AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
a89d9d2c6f LibJS: Convert the RegExpBuiltinExec AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
a2fbf6a3d5 LibJS: Convert the MakeIndicesArray AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
e3181a7ded LibJS: Convert RegExpConstructor functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
844be7a0a5 LibJS: Convert the RegExpCreate AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
d9f5e2d461 LibJS: Convert the RegExpInitialize AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
35faf50941 LibJS: Convert PromisePrototype functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
5af8f72d54 LibJS: Convert PromiseConstructor functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
81bdb20c61 LibJS: Convert the PromiseResolve AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
0d602c5ec5 LibJS: Convert the NewPromiseCapability AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
2b87f77578 LibJS: Convert DatePrototype functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
ba39a54bb8 LibJS: Convert DateConstructor functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
306c25f3c2 LibJS: Convert the NumberToBigInt AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
f7bafea661 LibJS: Convert TypedArrayConstructor functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
92b25cacd1 LibJS: Convert TypedArrayPrototype functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
94be1f772a LibJS: Convert typed_array_merge_sort to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
86aa8a14ea LibJS: Convert the TypedArraySpeciesCreate AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
18c2d537c7 LibJS: Convert StringPrototype functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
38c4693c70 LibJS: Convert the CreateHTML AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
0948bd8c1e LibJS: Convert the PadString AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
70a35f9600 LibJS: Convert resolve_best_locale to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Idan Horowitz
28e1e03234 LibJS: Convert StringConstructor functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Andreas Kling
f27d768745 LibGUI: Don't force flush pending paints whenever mouse moves
This patch removes a hack that forced any pending repaints to happen
immediately whenever you moved the mouse over a window.

The purpose of that mechanism was to ensure that quick button presses
still show up visually, and since that is now accomplished via
Widget::repaint(), we no longer need this.
2021-10-23 17:57:05 +02:00
Andreas Kling
d196fbce5b LibGUI: Repaint buttons immediately on mouse up/down events
This ensures that rapidly clicking a button doesn't look like it's
"swallowing" some of the mouse events.

This already worked okay due to a hack in Window, but this will allow us
to get rid of that hack.
2021-10-23 17:54:59 +02:00
Andreas Kling
24651f854c LibGUI: Add Widget::repaint() to force an immediate repaint
In most situations, Widget::update() is preferable, since that allows us
to coalesce repaints and avoid redundant work, reducing system load.

However, there are some cases where you really want a paint to happen
right away, to make sure that the user has a chance to see a short-lived
visual state.
2021-10-23 17:53:11 +02:00
Andreas Kling
da86f4e384 LibGUI: Use move semantics in GUI::MultiPaintEvent 2021-10-23 17:38:38 +02:00
Andreas Kling
877ddaa016 LibWeb: Fix off-by-one in initial containing block overflow calculation
We're using the outermost right and bottom child edges to determine the
width and height of the ICB. However, since these edges are *within* the
respective child's rectangle, we have to add 1 when turning them into
width and height values.

This fixes an issue where scrolling a document would shrink its viewport
rect by 1 pixel (on both axes) on every scroll step.
2021-10-23 16:10:44 +02:00
Andreas Kling
79f2e8ae2a LibGUI: Make exclusive button group act as a single focusable unit
Before this change, using the Tab key would cycle through all the
individual buttons in an exclusive group (e.g radio buttons.)
This felt wrong, since a group of exclusive buttons is really a single
logical input with a limited number of possible choices.

This patch makes such groups behave as a single focusable unit instead,
by dynamically updating the focus policies so that only the currently
checked button is focusable.

We also allow keyboard navigation within the button group via the arrow
keys. This had to be specialized in GUI::AbstractButton, since the
default behavior of arrow keys is to traverse the focus chain.
2021-10-23 16:10:44 +02:00
Andreas Kling
0d8373287c LibGUI: Add GUI::KeyEvent::is_arrow_key() 2021-10-23 16:10:44 +02:00
Andreas Kling
d91732f959 LibGUI: Mark GUI::RadioButton as "checkable"
Any AbstractButton that uses the "checked" state should mark itself
"checkable", this was a weird oversight.
2021-10-23 16:10:44 +02:00
Jean-Baptiste Boric
eaeed259b0 Utilities: Add -f option to ln 2021-10-23 15:06:33 +02:00
Jean-Baptiste Boric
8bbf43318f Utilities: Add ignored -f option to touch 2021-10-23 15:06:33 +02:00
Jean-Baptiste Boric
1b3090bf3c LibCore: Add ignored options to ArgsParser 2021-10-23 15:06:33 +02:00
Jean-Baptiste Boric
68c457b601 LibC: Add definition for FOPEN_MAX 2021-10-23 15:06:33 +02:00
Brendan Coles
1d03f62444 EchoServer: Defer removal of client from clients HashMap
This is necessary to avoid trying to destruct the on_ready_to_read
function from inside the function.
2021-10-23 13:57:42 +02:00
Brendan Coles
f4c181da9d TelnetServer: Defer removal of client from clients HashMap
This is necessary to avoid trying to destruct the on_ready_to_read
function from inside the function.
2021-10-23 13:57:36 +02:00