Commit graph

53683 commits

Author SHA1 Message Date
Ali Mohammad Pur 4f0f1c7c72 AK: Add support for Little/BigEndian<UFixedBigInteger<M>> 2023-08-21 13:39:32 +03:30
Ali Mohammad Pur 94f5389934 AK: Add a 'HostIsLittleEndian' constant and use it instead of BYTE_ORDER
Previously we were using the preprocessor everywhere we needed this
constant, so let's move away from that and use a constexpr constant.
2023-08-21 13:39:32 +03:30
Xexxa b3a295a5bd Base: Improve emoji
Change width to 10px, make emoji more consistent with
Base/res/icons/16x16/filetype-folder-open.png

📂 - U+1F4C2 OPEN FILE FOLDER
2023-08-21 08:27:04 +01:00
Xexxa de46c59c23 Base: Improve emoji
Change width to 10px, make emoji more consistent with
Base/res/icons/16x16/filetype-folder.png and

📁 - U+1F4C1 FILE FOLDER
2023-08-21 08:27:04 +01:00
Xexxa 7a8ac67d52 Base: Improve emoji
Align emoji to bottom to match other left or right moving vehicles
🚒 - U+1F692 FIRE ENGINE
🚜 - U+1F69C TRACTOR
2023-08-21 08:27:04 +01:00
Xexxa 762a6674c2 Base: Improve emoji
Our emoji was 7px wide earlier. Now when we can use up to 10px some
emoji deserve a little more width.

🥩 - U+1F969 CUT OF MEAT
🧊 - U+1F9CA ICE
2023-08-21 08:27:04 +01:00
Xexxa 77f307f1b1 Base: Improve emoji
Add shadow and remove unnecessary padding

🪓 - U+1FA93 AXE
2023-08-21 08:27:04 +01:00
Xexxa 4153f35c31 Base: Improve emoji
Change bottom padding to match 🚖 U+1F696 and 🚘 U+1F698

🚔 - U+1F694 ONCOMING POLICE CAR
2023-08-21 08:27:04 +01:00
Xexxa 72bb740982 Base: Improve emoji
Make U+1F4A9 look more like a shit...

💩 - U+1F4A9 PILE OF POO
2023-08-21 08:27:04 +01:00
Xexxa 885563ea9c Base: Add emoji
🦾 - U+1F9BE MECHANICAL ARM
🦿 - U+1F9BF MECHANICAL LEG
🧑‍🔧 - U+1F9D1 U+200D U+1F527 MECHANIC
🧑‍🚀 - U+1F9D1 U+200D U+1F680 ASTRONAUT
🚤 - U+1F6A4 SPEEDBOAT
🚠 - U+1F6A0 MOUNTAIN CABLEWAY
🚡 - U+1F6A1 AERIAL TRAMWAY
🪅 - U+1FA85 PIÑATA
🧣 - U+1F9E3 SCARF
2023-08-21 08:27:04 +01:00
Sam Atkins 0d021a63c7 LibUnicode: Generate data for bidirectional character types
This will let us examine code points to determine the rtl/ltr direction
of a piece of text.
2023-08-20 16:21:35 -04:00
Liav A ef6133337e Kernel: Merge PowerStateSwitchTask reboot and shutdown procedures
The reboot procedure should prepare to "shutdown" the system cleanly and
therefore has to be merged with how shutdown is handled.
2023-08-20 13:04:42 -06:00
Liav A b81b2c3fe7 Kernel: Ensure only user processes are terminated properly in shutdown
This patch ensures that the shutdown procedure can complete due to the
fact we don't kill kernel processes anymore, and only stop the scheduler
from running after the filesystems unmount procedure.

We also need kernel processes during the shutdown procedure, because we
rely on the WorkQueue threads to run WorkQueue items to complete async
IO requests initiated by filesystem sync & unmounting, etc.

This is also simplifying the code around the killing processes, because
we don't need to worry about edge cases such as the FinalizerTask
anymore.
2023-08-20 13:04:42 -06:00
Liav A 7082a1f0c4 Kernel: Reject all syscalls during the shutdown procedure 2023-08-20 13:04:42 -06:00
Liav A a43133b3c7 Kernel: Hold a weak reference to a Process object in AsyncDeviceRequest
The process could be long gone by the point the async IO request has
completed so hold a weak reference pointer to the requesting Process and
try get a strong reference only when needed.

This patch is necessary because otherwise async IO requests can hold
Process objects long after they were terminated, which would make it
impossible to perform certain tasks in the system, like killing all user
processes during the shutdown procedure.
2023-08-20 13:04:42 -06:00
Liav A dbab4d34d7 Kernel/FileSystem: Remove disk cache only after ext2 superblock flush
We first must flush the superblock through the BlockBasedFileSystem
methods properly and only then clear the DiskCache pointer, to prevent a
possible kernel panic due to nullptr dereference.
2023-08-20 13:04:42 -06:00
nipos abf7941bb9 LibCore: Change Errno to Error in FreeBSD and NetBSD-specific functions 2023-08-20 12:48:37 -06:00
0GreenClover0 719ab586c4 Kernel: Change the code point of numpad keys to 0, when Num Lock is off
Previously we would set the KeyCode correctly to the appropriate
extended keys values, like Home and End, but keep the code point of the
original keys, like 1, 2, 3, etc. Because of this, the keys would just
print the original keys, instead of behaving like the extended ones.
2023-08-20 12:21:57 -06:00
0GreenClover0 c261e5e39b Kernel: Add a Keypad modifier to the numpad Enter key 2023-08-20 12:21:08 -06:00
0GreenClover0 33921e75c9 Kernel: Stop overeagerly adding a Keypad modifier 2023-08-20 12:21:08 -06:00
Bastiaan van der Plaat abf0c8f1a6 Ladybird: Use pixelDelta() on supported platforms for better scrolling 2023-08-20 12:17:58 -06:00
Bastiaan van der Plaat 0facfd3257 LibWeb: Make handle_mousewheel wheel delta use pixels 2023-08-20 12:17:58 -06:00
Abhishek Raturi 7d588db6c8 HackStudio: Change the collection_index for highlight selected text
Change the value for `highlight_selected_text_span_collection_index`
to avoid the conflict with `search_results_span_collection_index`.
And pass the selection instead of calling selected_text() again
2023-08-20 19:13:37 +01:00
Abhishek Raturi e63cf3b94a HackStudio: Highlight all the occurances of selected text in editor
This feature is similar(somewhat) to the Clion's highlight all
occurances of word under caret. This is not perfect implementation
since there is a issue with resetting the `spans` `attributes` such as
`color`, `background_color`

HackStudio: Reset spans upon mousedown_event after double clicking

Reset the spans upon mousedown_event after double clicking the text
(to highlight all occurrances). Avoid highlighting if whitespace is
selected
2023-08-20 19:13:37 +01:00
MacDue 8cef2f7be8 Tests/LibWeb: Add ref test for SVG gradients with various spreadMethods
Note: The final three gradients in this test are currently incorrectly
rendered.
2023-08-20 20:04:10 +02:00
MacDue a93ba23e10 Base: Add some examples of SVG gradients with different spreadMethods
The radial gradients here are rendered correctly as focal radius is
zero, so the focal point is the center of the start circle.
2023-08-20 20:04:10 +02:00
MacDue 46f42d9755 LibWeb: Add support for the SVG gradient spreadMethod attribute 2023-08-20 20:04:10 +02:00
MacDue 1ecb2cf28c LibGfx: Add FIXME for SVG/canvas radial gradients
The current implementation assumes the focal point is the center of the
start circle, for most cases the difference this makes is very subtle,
but becomes more apparent with spreadMethod=repeat/reflect.
2023-08-20 20:04:10 +02:00
MacDue b9294e5fdf LibGfx: Add support for SVG repeat/reflect gradients 2023-08-20 20:04:10 +02:00
Sam Atkins a48b2c1c66 LibWeb: Fill in missing kinds of calc() expansion in StyleComputer
This is all of them currently, except Length, because we lack the needed
information to be able to expand font-relative lengths.

The whole way `expand_unresolved_values()` works is awkward, but at some
point we'll be able to run the simplification algorithm on the
calculation, which will either return a single value, or a new
calculation that's simplified as much as possible.

Mostly I just wanted that FIXME log message to go away, because it's
overwhelming on certain sites.
2023-08-20 19:38:03 +02:00
Sam Atkins 2c7603f2ae LibWeb: Add helper for creating <dimension> CSS tokens 2023-08-20 19:38:03 +02:00
Andreas Kling 27ddfa84fa LibWeb: Accept height: {min,max,fit}-content
And treat them as "auto" for now, per CSS-SIZING-3, with a FIXME about
supporting more layout directions.

This fixes an issue on MDN where `height: max-content` was not
overriding height from non-CSS presentational hints.
2023-08-20 19:37:50 +02:00
Andreas Kling 90e95d38d7 LibWeb: Make align-items: normal behave like stretch on flex items
CSS-ALIGN-3 tells us that `normal` behavior inside flex containers is
simply to behave as `stretch` so this patch makes them behave the same
inside FFC.

Furthermore, we change the `align-items` initial value to `normal`,
matching other engines.
2023-08-20 19:37:50 +02:00
Aliaksandr Kalenik d05be0d504 LibWeb: Fix Request::visit_edges to actually visit m_body
This fixes bug introduced in bdd3a16b16
that `m_body` is not visited because `BodyType` variant has
`JS::NonnullGCPtr` instead of `JS::GCPtr`.
2023-08-20 19:08:37 +02:00
Andi Gallo 769f11f9ae LibWeb: Implement table missing cells fixup
Fixes #19936.
2023-08-20 18:38:15 +02:00
Andi Gallo 4c0816b002 LibWeb: Move table grid slots functionality to separate module 2023-08-20 18:38:15 +02:00
Sam Atkins 6367b6a3d0 LibWeb: Use x-macro for StyleValue::Type instead of manual boilerplate
This saves us from having to manually write these every time we add a
new type of StyleValue:

- bool is_foo() const;
- FooStyleValue const& as_foo() const;
- FooStyleValue& as_foo();
2023-08-20 17:59:36 +02:00
Sam Atkins f7f7ab9775 LibWeb: Forward-declare RevertStyleValue 2023-08-20 17:59:36 +02:00
Sam Atkins fae05faf7f LibWeb: Rename StyleValue::Type::Url -> URL
This matches the URLStyleValue name. (This will be important shortly.)
2023-08-20 17:59:36 +02:00
Aliaksandr Kalenik 01cc14714e LibWeb: Implement getting "inclusive ancestor navigables" of a document 2023-08-20 16:07:24 +02:00
Andreas Kling e211f6c925 LibWeb: Implement getting "ancestor navigables" of a document 2023-08-20 16:07:24 +02:00
Aliaksandr Kalenik c8271ac9e6 LibWeb: Start fleshing out "navigate to a fregment" for Navigables 2023-08-20 16:06:56 +02:00
Aliaksandr Kalenik d5adb7f10c LibWeb: Implement "finalize a same-document navigation" 2023-08-20 16:06:56 +02:00
Aliaksandr Kalenik 37f5253ec9 LibWeb/Layout: Add support for grid-auto-flow in GFC 2023-08-20 15:36:18 +02:00
Andreas Kling 703c2bb06e LibWeb: Add support for parsing grid-auto-flow CSS property
Co-Authored-By: Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
2023-08-20 15:36:18 +02:00
Sam Atkins 1a5533e528 LibWeb: Tokenize CSS numbers as doubles
Every later stage uses doubles, so dropping that precision right at the
start of parsing is a little silly. :^)
2023-08-20 14:25:18 +01:00
Sam Atkins c20df751c9 LibWeb: Use correct NumericLimits in CalculatedStyleValue 2023-08-20 14:25:18 +01:00
Sam Atkins 1feacd4b52 LibWeb: Use doubles for CSS dimension types
Avoid unintentionally converting between float and double multiple times
by just using double everywhere. Also, remove the unused `int` versions
of their constructors.
2023-08-20 14:25:18 +01:00
Sam Atkins 95f80bc65b LibWeb: Use double in CSS Token
It was already a double internally, so let's expose that and get rid of
some of clangd's red wiggly underlines.
2023-08-20 14:25:18 +01:00
Shannon Booth 9cf5b67162 LibWeb: Return a HTMLFormControlsCollection from HTMLFormElement element
Instead of a HTMLCollection
2023-08-20 11:04:03 +02:00