1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-09 09:17:35 +00:00
Commit Graph

3935 Commits

Author SHA1 Message Date
Torstennator
490d61d694 PixelPaint: Fix broken "Color Masking" selection
This change solves a problem where the color selection via mouse click
on the color wheel was computing a wrong hue angle.
2024-06-26 20:02:27 +02:00
Torstennator
bb0bfb7944 PixelPaint: Fix Color Masking crash
This change solves a crash where it was possible that the
"Color Masking" could try to access pixel coordinates that where beyond
the boundaries of the image.
2024-06-26 20:02:27 +02:00
Tim Ledbetter
0b1adf784f SystemMonitor: Add an action to manually refresh process statistics 2024-06-23 21:20:37 +01:00
Tim Ledbetter
4091d7fc05 SystemMonitor: Add an action to pause updates 2024-06-23 21:20:37 +01:00
Tim Ledbetter
ce11613677 CrashReporter: Don't update window progress if window has been closed
This prevents a crash that could happen if crash reporter was closed
while generating a crash report.
2024-06-10 23:44:09 -04:00
Andreas Kling
8994dcb4f9 Everywhere: Use HTTP::HeaderMap for request headers
No longer just for response headers! The same type is obviously useful
and ergonomic when making requests as well.

(cherry picked from commit 260c5c50ad19f19d0d4c30984e512f56c055ecff)

Updated various SerenityOS components to make it build.
2024-06-10 12:01:57 +02:00
circl
ec1692eed2 Browser: Display name as "Browser" once again
This basically reverts 15211cd, since Ladybird has been hard-forked from
the SerenityOS project, this chrome is no longer officially part of it.
2024-06-08 10:30:07 -04:00
Andreas Kling
a3782782fa LibJS: Remove two unused members from ExecutionContext 2024-05-31 16:31:33 +02:00
Timothy Flynn
b6f824a313 Browser: Don't assume downloads have a "total size" available
Ran into a crash here while testing LibProtocol changes. The method we
invoke here (did_progress) already accepts an Optional, and handles when
that Optional is empty. So there's no need to assume `total_size` is
non-empty.
2024-05-26 18:29:24 +02:00
Timothy Flynn
168d28c15f LibProtocol+Userland: Support unbuffered protocol requests
LibWeb will need to use unbuffered requests to support server-sent
events. Connection for such events remain open and the remote end sends
data as HTTP bodies at its leisure. The browser needs to be able to
handle this data as it arrives, as the request essentially never
finishes.

To support this, this make Protocol::Request operate in one of two
modes: buffered or unbuffered. The existing mechanism for setting up a
buffered request was a bit awkward; you had to set specific callbacks,
but be sure not to set some others, and then set a flag. The new
mechanism is to set the mode and the callbacks that the mode needs in
one API.
2024-05-26 18:29:24 +02:00
Timothy Flynn
086ddd481d Ladybird+LibWeb: Move User-Agent definitions to their own file
This is to avoid including any LibProtocol header in Objective-C source
files, which will cause a conflict between the Protocol namespace and a
@Protocol interface.

See Ladybird/AppKit/Application/ApplicationBridge.cpp for why this
conflict unfortunately cannot be worked around.
2024-05-26 18:29:24 +02:00
Matthew Olsson
a98ad191c7 Userland: Add ESCAPING annotations to a bunch of places
This isn't comprehensive; just a result of a simple grep search.
2024-05-22 21:55:34 -06:00
Hugh Davenport
9772590e9a MouseSettings: Only allow valid cursor themes
To align the cursor theme tab to how DisplaySettings themes tab works,
this change forces the theme combo box to not allow free-text. Currently
on a click it puts the text cursor in the box to allow typing anything
rather than acting as a dropdown when clicking anywhere on the field.

Fixes #24306
2024-05-13 08:26:16 +01:00
Alec Murphy
8b14b5ef36 Browser: Pledge thread for FilePicker
This fixes a crash when attempting to display thumbnails for image
files in the FilePicker if thread is not pledged.
2024-05-12 15:37:36 -06:00
Isaac
653f41336b SystemMonitor: Add dropped packets count to adapter table 2024-05-09 12:02:26 +02:00
Sam Atkins
926a275794 HexEditor: Move endianness selector to Value Inspector panel
It's clearer to have the choice here than hidden away in a menu. It also
means we don't need the column heading to say the endianness.
2024-05-07 16:33:59 -06:00
Andreas Kling
493a04d5fe LibJS: Add PropertyLookupPhase enum to distinguish Object [[Get]] calls
We can now tell the difference between an own property access and a
subsequent (automatic) prototype chain access.

This will be used to implement caching of prototype chain accesses.
2024-05-04 21:42:59 +02:00
Timothy Flynn
398ae75f9a Ladybird+LibWebView: Introduce a cache for cookies backed by SQL storage
Now that the chrome process is a singleton on all platforms, we can
safely add a cache to the CookieJar to greatly speed up access. The way
this works is we read all cookies upfront from the database. As cookies
are updated by the web, we store a list of "dirty" cookies that need to
be flushed to the database. We do that synchronization every 30 seconds
and at shutdown.

There's plenty of room for improvement here, some of which is marked
with FIXMEs in the CookieJar.

Before these changes, in a SQL database populated with 300 cookies,
browsing to https://twinings.co.uk/ WebContent spent:

    19,806ms waiting for a get-cookie response
    505ms waiting for a set-cookie response

With these changes, it spends:

    24ms waiting for a get-cookie response
    15ms waiting for a set-cookie response
2024-05-01 07:06:26 +02:00
Kemal Zebari
8893836b60 Run: Don't wait for child process to end when adding it to history
When we try to start a long-running child process (e.g. a GUI app)
using a combination of the POSIX spawn and waitpid API, the Run
process ends up waiting for it to end before making any changes
to the path history. This leads to some confusion when trying to
fire up another Run process only to see that it did not save the
path to this program.

This PR resolves this by saving the path after it was created using
the POSIX spawn API.
2024-05-01 06:42:59 +02:00
Ali Mohammad Pur
eaa2d69d73 LibGUI+Everywhere: Rename the 'style' frame property to 'frame_style'
'set_frame_style' is what Frame itself uses to set the value, and a
significant number of GML files use 'frame_style' instead of just
'style', so let's switch to it and use it everywhere consistently.
2024-04-30 17:46:41 -06:00
Timothy Flynn
4b51a36044 Browser: Add support for a singleton chrome process
This partially supports the WebView::ChromeProcess mechanics. New
windows aren't totally supported and will just open a new tab for now.

When launched via the Browser's AppFile (either through quick launch or
the desktop shortcut), a new window will be requested.
2024-04-30 17:43:14 -06:00
Timothy Flynn
3990e630f2 FileManager: Launch applications with their AppFile-specified arguments
We should really use Core::Process here, but it does not yet support all
posix_spawn features we are currently using.
2024-04-30 17:43:14 -06:00
Dan Klishch
7b88363490 Meta+Userland: Make LibELF a proper library on Serenity
Dynamically loaded LibC doesn't need LibELF definitions, so let's not
put them there.
2024-04-26 19:08:13 -06:00
Andrew Kaster
1c3f11a5a6 Userland: Remove remaining callers of synchronous ImageDecoder API
Most of these now just await the image decoding, equivalent (ish) to
the old behavior. A more async-aware refactor should happen some time
in the future.
2024-04-23 12:32:04 -06:00
Tim Ledbetter
4611a58f8c PixelPaint: Avoid infinite loop when updating zoom level ComboBox text
After 8b4e2e20, `Combobox::set_text()` invokes the `on_change` event by
default. This led to an infinite loop at program startup which caused a
crash.
2024-04-23 16:26:39 +02:00
Timothy Flynn
771054bff7 Ladybird: Slightly increase the size of the Task Manager window
This adds a bit more room to see most titles on one line.
2024-04-22 14:46:10 -06:00
Shannon Booth
1ec6399c00 Everywhere: Remove uneeded short option argument where possible 2024-04-22 08:10:08 +02:00
Dan Klishch
d8119c4b4a LibLocale: Statically link LibLocaleData into LibLocale 2024-04-21 13:34:04 -06:00
Dan Klishch
5ed7cd6e32 Everywhere: Use east const in more places
These changes are compatible with clang-format 16 and will be mandatory
when we eventually bump clang-format version. So, since there are no
real downsides, let's commit them now.
2024-04-19 06:31:19 -04:00
Dan Klishch
b8c3e75573 Meta+Userland: Fix more instances of bad lambda-Variant interaction
These don't cause compilation to fail but they still crash crashd.
2024-04-18 13:14:33 -06:00
Daniel Bertalan
8366c9f55a LibGUI+PixelPaint: Move virtual destructors out-of-line for Clang 17 2024-04-18 13:14:33 -06:00
circl
5639ff5f97 Screenshot: Add graphical frontend to shot
Co-authored-by: cubiclove <7754483+cubiclove@users.noreply.github.com>
2024-04-17 11:25:40 -06:00
Andreas Kling
1cb5385a29 LibCore: Stop obsessing about tiny OOMs in Core::Timer
Work towards #20405
2024-04-17 07:16:52 +02:00
Aryan Baburajan
342fb906cf MouseSettingsWidget: Port to GML compilation 2024-04-15 14:01:13 +02:00
Aryan Baburajan
03f4ec8032 MailSettingsWidget: Port to GML compilation 2024-04-15 14:01:13 +02:00
Timothy Flynn
7cf8eabb82 Browser: Use LibWeb's history state for history navigation 2024-04-14 18:53:58 -07:00
Aliaksandr Kalenik
a8cf1aca7c LibWeb: Rename did_update_url() to did_history_api_push_or_replace()
The previous name was extremely misleading, because the call is used for
pushing or replacing new session history entry on chrome side instead of
only changing URL.
2024-04-14 02:42:53 -07:00
Sam Atkins
7d43685927 HexEditor: Add option to display offsets in decimal or hexadecimal 2024-04-09 09:24:23 +02:00
Sam Atkins
f6a9ea7265 HexEditor: Add option for showing/hiding the offsets column 2024-04-09 09:24:23 +02:00
Sam Atkins
4640fc2c97 HexEditor: Move some calculations out of HexEditor.h header
These are gradually becoming more complicated, so they don't really make
sense in the header file any more.

No changes, just moving.
2024-04-09 09:24:23 +02:00
Matthew Olsson
5023e5fda3 Spreadsheet: Add calls to JS_{DECLARE,DEFINE}_ALLOCATOR() 2024-04-09 09:13:06 +02:00
Matthew Olsson
31c5cdcbd5 LibWeb+Assistant: Do not ref-capture stack vars in deferred lambdas 2024-04-09 09:10:44 +02:00
Bastiaan van der Plaat
820f966b33 Ladybird: Add indentation to options in optgroup in select dropdown 2024-04-08 17:24:48 -04:00
Bastiaan van der Plaat
1475c1810f LibWeb: Add support for select options disabled state 2024-04-08 17:24:48 -04:00
Bastiaan van der Plaat
4408581ee0 LibWeb: Refactor SelectItem to allow selecting options without value
Currently the `<select>` dropdown IPC uses the option value attr to
find which option is selected. This won't work when options don't
have values or when multiple options have the same value. Also the
`SelectItem` contained so weird recursive structures that are
impossible to create with HTML. So I refactored `SelectItem` as a
variant, and gave the options a unique id. The id is send back to
`HTMLSelectElement` so it can find out exactly which option element
is selected.
2024-04-08 17:24:48 -04:00
Kyle Lanmon
c07d18c017 NetworkSettings: Use on_change when switching adapter 2024-04-08 09:35:55 -06:00
Kyle Lanmon
04708f11e1 MouseSettings: Use on_change callback to resetting default cursor theme 2024-04-08 09:35:55 -06:00
Kyle Lanmon
c2e13764bc GamesSettings: Use on_change callback for resetting cards defaults 2024-04-08 09:35:55 -06:00
Kyle Lanmon
1d243ef3e3 GamesSettings: Use on_change callback for resetting chess defaults 2024-04-08 09:35:55 -06:00
Shannon Booth
0090b916dd LibJS: Make ParserError::to_string infallible 2024-04-05 20:01:37 -04:00