Commit graph

44605 commits

Author SHA1 Message Date
Andreas Kling
1eb653115b Ladybird: Initial import :^) 2022-12-25 07:58:58 -07:00
Xexxa
26fb41d1f8 Base: Adjust emoji
🥕 - U+1F955 CARROT
Add some shadow
🔝 - U+1F51D TOP ARROW
Adjust "o" in emoji
2022-12-25 15:50:58 +01:00
Xexxa
b89bdd9497 Base: Add more emoji
💞 - U+1F49E REVOLVING HEARTS
🧅 - U+1F9C5 ONION
🎾 - U+1F3BE TENNIS
🛷 - U+1F6F7 SLED
👛 - U+1F45B PURSE
🎼 - U+1F3BC MUSICAL SCORE
🧻 - U+1F9FB ROLL OF PAPER
㊗️ - U+3297 JAPANESE “CONGRATULATIONS” BUTTON
❤️‍🩹 - U+2764 U+200D U+1FA79 MENDING HEART
👩‍❤️‍👩 - U+1F469 U+200D U+2764 U+200D U+1F469
COUPLE WITH HEART: WOMAN, WOMAN
👨‍👩‍👦 - U+1F468 U+200D U+1F469 U+200D U+1F466
FAMILY: MAN, WOMAN, BOY
👨‍👩‍👧 - U+1F468 U+200D U+1F469 U+200D U+1F467
FAMILY: MAN, WOMAN, GIRL
👨‍👨‍👦 - U+1F468 U+200D U+1F468 U+200D U+1F466
FAMILY: MAN, MAN, BOY
👨‍👨‍👧 - U+1F468 U+200D U+1F468 U+200D U+1F467
FAMILY: MAN, MAN, GIRL
👩‍👩‍👦 - U+1F469 U+200D U+1F469 U+200D U+1F466
FAMILY: WOMAN, WOMAN, BOY
👩‍👩‍👧 - U+1F469 U+200D U+1F469 U+200D U+1F467
FAMILY: WOMAN, WOMAN, GIRL
👨‍👦 - U+1F468 U+200D U+1F466 FAMILY: MAN, BOY
👨‍👧 - U+1F468 U+200D U+1F467 FAMILY: MAN, GIRL
👨‍👧‍👦 - U+1F468 U+200D U+1F467 U+200D U+1F466
FAMILY: MAN, GIRL, BOY
👨‍👧‍👧 - U+1F468 U+200D U+1F467 U+200D U+1F467
FAMILY: MAN, GIRL, GIRL
🪒 - U+1FA92 RAZOR
2022-12-25 15:50:58 +01:00
Jelle Raaijmakers
ae82b14e59 LibGL+LibWeb: Remove WebGL-specific API from GLContext
The OpenGL API has ways to retrieve these values, so let's make sure to
implement them. :^)
2022-12-25 15:48:59 +01:00
Aayush
bc1293925a Hackstudio: Use `GUI::TextEditor' actions for cut/copy/paste buttons
This fixes a bug where hackstudio's language server will crash upon
clicking the 'cut' button when no text is selected.  This was because
the actions were not disabled on empty selection.

We now disable the actions depending on if there is empty selection
inside current tab. We update the cut/copy/paste buttons' actions when
changing tabs.
2022-12-25 15:40:46 +01:00
MacDue
2b1342b120 LibWeb: Remove done gradient painting TODO
This code is already generalised to every gradient in existence.
2022-12-25 15:35:31 +01:00
MacDue
f2fe3245cf LibWeb: Speed up gradient painting quite a lot
Previously gradient painting was dominated by the clipping checks in
Painter::set_pixel(). This commit changes gradient painting to use the
new Painter::fill_pixels() function (which does all these checks outside
the hot loop).

With this change gradient painting drops from 96% of the profile to 51%
when scrolling around on gradients.html. A nice 45% reduction :^)
2022-12-25 15:35:31 +01:00
MacDue
ca01017f32 LibGfx: Add Painter::fill_pixels()
This function fills a region of pixels with the result of a callback
function. This is an alternative to a for loop that repeatedly calls
Painter::set_pixel(), which can get very expensive due to the clipping
checks set_pixel() does each call.
2022-12-25 15:35:31 +01:00
Luke Wilde
7e701f6256 LibWeb: Keep unhandledrejection event promises alive when task is queued
This is fixed by making the "about to be notified rejected promises
list" use JS::Handle instead of JS::NonnullGCPtr. This UAF happens
because notify_about_rejected_promises makes a local copy of this list,
empties the member variable list and then moves the local copy into a
JS::SafeFunction lambda. JS::SafeFunction can only see GC pointers that
are in its storage, not external storage.

Example exploit (requires fixed microtask timing by removing the dummy
execution context):
```html
<script>
Promise.reject(new Error);

// Exit the script block, causing a microtask checkpoint and thus
// queuing of a task to fire the unhandled rejection event for the
// above promise.
// During the time after being queued but before being ran, these
// promises are not kept alive. This is because JS::SafeFunction cannot
// see into a Vector, meaning it can't visit the stored NonnullGCPtrs.
</script>

<script defer>
// Cause a garbage collection, destroying the above promise.
const b = [];
for (var i = 0; i < 200000; i++)
    b.push({});

// Some time after this script block, the queued unhandled rejection
// event task will fire, with the event object containing the dead
// promise.
window.onunhandledrejection = (event) => {
    let value = event.promise;
    console.log(value);
}
</script>
```
2022-12-25 15:32:51 +01:00
Timothy Flynn
2334b4cebd Meta: Move UCD/CLDR/TZDB downloaded artifacts to Build/caches
They currently reside under Build/<arch>, meaning that they would be
redownloaded for each architecture/toolchain build combo. Move them to a
location that can be re-used for all builds.
2022-12-24 09:46:28 -05:00
Timothy Flynn
186accb81d Meta: Add downloaded artifact caches to nightly static analysis builds 2022-12-24 09:46:28 -05:00
Timothy Flynn
fba1569eaf Meta: Use correct cache key for CLDR data during CI
Not a huge deal because this at least would still differ from the UCD
cache due to the locale_data.cmake. But this will use the same cache key
as other CI jobs.
2022-12-24 09:46:28 -05:00
Andreas Kling
32e35a02f9 LibWeb: Apply CSS text-transform during layout
Previously we were doing this at the painting stage, which meant that
layout potentially used the wrong glyphs when measuring text.

This would lead to incorrect layout metrics and was visible on the
HTML5Test score display, for example. :^)
2022-12-24 12:27:46 +01:00
Kampsjaak
cf47c850e7 TextEditor: Add option to open the current file in File Manager
This change adds functionality to open the current file in the File
Manager from the File menu or through a button on the toolbar. If
there is no saved data then the functionality is disabled.
2022-12-23 19:20:53 -05:00
Yedaya Katsman
c2655d3733 LibSQL: Output a more specific error on failed socket creation
This can fail if /run/user/$pid/ doesn't exist, which can happen on wsl
without systemd.
2022-12-23 23:31:07 +01:00
Thomas Keppler
6805f71a83 pro: Add ability to log request/response metadata for HTTP URLs
In order to debug WebServer and responses we can't handle yet, it's
beneficial to being able to see what we request and what we get back.
As a first measure, we just log URL, response code, reason phrase and
headers.
2022-12-23 23:29:57 +01:00
Karol Kosek
b67762a7f3 HackStudio: Make a new ProjectBuilder object when opening a project
We couldn't compile a project after creating it, because the project
builder was still holding a reference to the previous freed project.

Fixes: #15715
2022-12-23 23:27:45 +01:00
Karol Kosek
98fa3736ed HackStudio: Open projects after the action tab was created
This change also removes the path argument from the GitWidget
constructor because otherwise, the app wouldn't work now, as it doesn't
yet know the project path.

But it'll be set right away in open_project(), so nothing's lost. :^)
2022-12-23 23:27:45 +01:00
Timothy Flynn
661c02b914 Snake: Use a statusbar to display the current and high score
The food bitmaps would sometimes be placed underneath the score text,
which was a bit hard to see. Use a statusbar like we do in other games
like Solitaire.

Note the default height change of the Snake window is to make the inner
game widget fit exactly 20x20 cells.
2022-12-23 23:26:21 +01:00
Timothy Flynn
cb66c02bc4 Snake: Convert the game window to GML
Unfortunately, GML widget registration requires a non-fallible construct
method to create the widget. So this does a bit of manual error checking
when loading the food bitmaps.
2022-12-23 23:26:21 +01:00
Timothy Flynn
ae90f490bd Snake: Move GUI into Snake namespace and rename SnakeGame to Game
The former is required for GML, and the latter is to avoid the verbosity
and redundancy of Snake::SnakeGame (and matches most other games in the
system).
2022-12-23 23:26:21 +01:00
Timothy Flynn
36042fc1d6 Snake: Save configured base color to Snake's configuration file 2022-12-23 23:26:21 +01:00
Timothy Flynn
69beda23c3 LibConfig+LibCore+ConfigServer: Support u32 configuration entries 2022-12-23 23:26:21 +01:00
ericLemanissier
49f697ed56 LibGfx: GIFLoader: Propagate more errors
Migrate bool and Optional<> result types
to ErrorOr<>
2022-12-23 16:48:30 -05:00
ericLemanissier
05b9e6ac3b LibGfx: JPGLoader: Centralize error handling in read_be_word 2022-12-23 16:48:30 -05:00
ericLemanissier
14eefedbf9 LibGfx: JPGLoader: Propagate errors properly
Use our normal error propagation mechanism instead of returning booleans
2022-12-23 16:48:30 -05:00
ericLemanissier
030d380ed2 LibGfx: GIFLoader: Propagate errors properly
Use our normal error propagation mechanism instead of returning booleans
2022-12-23 16:48:30 -05:00
ericLemanissier
d0ddbf4aad LibGfx: DDSLoader: Propagate errors properly
Use our normal error propagation mechanism instead of returning booleans
2022-12-23 16:48:30 -05:00
ericLemanissier
a6d710612f LibGfx: BMPLoader: Propagate errors properly
Use our normal error propagation mechanism instead of returning booleans
2022-12-23 16:48:30 -05:00
Tim Schumacher
8455d58a44 LibCore: Use a StringView for the file path in File::remove
This allows us to use our nice syscall wrappers, avoids some accidental
string copying, and starts to unlink us from the old DeprecatedString.
2022-12-23 10:38:14 -05:00
Tim Schumacher
9805f73704 LibCore: Remove the force parameter from File::remove
About half of the usages were not using `force` anyways, and the other
half presumably just got confused about what "force" really means in
this context (which is "ignore nonexistent files").

The only 'legitimate' user, which is `rm`, instead now handles this
completely internally instead.
2022-12-23 10:38:14 -05:00
Tim Schumacher
355e761a02 LibCore: Let File::remove return a normal ErrorOr
Having the file path in there is nice, but it makes us incompatible with
comfortable error propagation in everything that isn't File::remove.
2022-12-23 10:38:14 -05:00
ericLemanissier
7fa78b2456 Taskbar: Propagate errors while loading bmp 2022-12-23 12:23:05 +00:00
ericLemanissier
2e1f7c5ac8 GameOfLife: Propagate errors while loading bmp 2022-12-23 12:23:05 +00:00
ericLemanissier
21e8099e42 FileManager: Propagate errors while loading bmp 2022-12-23 12:23:05 +00:00
FrHun
f413033a50 Magnifier: Add ability to drag the location when it is locked 2022-12-23 12:16:46 +00:00
FrHun
9d3debcbbe Magnifier: Remember grid color 2022-12-23 12:16:46 +00:00
FrHun
79f5c49afe Magnifier: Eliminate flickering when downsizing
Previously the content flickered when downsizing the window, because the
previously grabbed frame was still active, but was now too large for the
window.
This crops the source rect to a size where it now perfectly fits the
content area.
2022-12-23 12:16:46 +00:00
FrHun
6187cfec49 WindowServer: Remove overcropping for magnifier
This function is only used by the magnifier currently.
Since we now apply the scaling factor in Bitmap::cropped(), this is not
necessary anymore.
2022-12-23 12:16:46 +00:00
FrHun
4236177e4f LibGfx: Preserve scale on Bitmap crop 2022-12-23 12:16:46 +00:00
FrHun
cf47dae6a5 LibGfx: Repair SharableBitmap scaling support 2022-12-23 12:16:46 +00:00
FrHun
9e0deb76b2 Magnifier: Prevent 0 size that otherwise hangs 2022-12-23 12:16:46 +00:00
FrHun
808eafcf1e Magnifier: Add option to choose grid color 2022-12-23 12:16:46 +00:00
FrHun
2b635b5330 Magnifier: Add option to display grid over the image 2022-12-23 12:16:46 +00:00
FrHun
df30440117 LibGfx: Add NearestFractional scaling type to painter
This is useful for cases where you want to avoid scaling artifacts.
2022-12-23 12:16:46 +00:00
FrHun
837625e422 Magnifier: Allow locking location at current cursor position 2022-12-23 12:16:46 +00:00
FrHun
6d4e37138e WindowServer: Allow overriding position when getting bitmap 2022-12-23 12:16:46 +00:00
Optimoos
d856dae07c Spreadsheet: Allow Functions Help HorizontalSplitter to resize
Using set_fixed_width prevents the splitter from resizing, so it has
been changed to set_preferred_width. Added a FIXME that I'm not
familiar enough with the codebase to tackle yet.

This addresses issue #16589
2022-12-23 07:53:26 +00:00
Liav A
2b5d7a8a72 Base: Mention new immutable memory mappings security feature 2022-12-22 20:32:57 -08:00
Timothy Flynn
4b4b15adb1 AK: Rearrange Error's members to reduce its size by 8 bytes
This shrinks sizeof(Error) from 32 bytes to 24 bytes, which in turn will
shrink sizeof(ErrorOr<T>) by the same amount (in cases where sizeof(T)
is less than sizeof(Error)).
2022-12-22 14:13:56 -05:00