Commit graph

3908 commits

Author SHA1 Message Date
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
Timothy Flynn 683c08744a Userland: Avoid some conversions from rvalue strings to StringView
These are all actually fine, there is no UAF here. But once e.g.
`ByteString::view() &&` is deleted, these instances won't compile.
2024-04-04 11:23:21 +02:00
Timothy Flynn b5f22b6e90 AK+Userland: Remove some needlessly explicit conversions to StringView 2024-04-04 11:23:21 +02:00
Timothy Flynn c23060e21b Userland: Avoid some now-unneeded explicit conversions to Bytes 2024-04-04 11:23:21 +02:00
Andrew Kaster d1fdfead54 LibWebView+Browser: Collect memory and cpu usage for helpers on Serenity 2024-04-03 20:56:33 +02:00
Andrew Kaster a6220501ab Browser: Add a simple TaskManager window for tracking helper proccesses 2024-04-02 09:52:34 -06:00
Andrew Kaster 096feaaeb8 Ladybird+LibWebView: Add ProcessManager to track live processes
This model will be used to add a Processes tab to the inspector.
2024-04-02 09:52:34 -06:00
Timothy Flynn 8ff3cd6d76 Ladybird: Reset the default favicon when starting a new page load
This matches the AppKit chrome. This resets the favicon so that we do
not keep using the previous site's favicon if the new site does not have
one.
2024-03-29 08:52:01 -04:00
Timothy Flynn 245489e68c Browser: Implement history state change mechanics
We now appropriately update the current history item or create a new
history item in the chrome process.
2024-03-29 08:52:01 -04:00
Cubic Love 41d5fa2b07 Base+ImageViewer: Restore correct app icon
Restore ImageViewer's new application icon, which was accidentally
changed back to using the filetype icon by e800605.
Additionally, use the correct icon in the ImageViewer manpage.
2024-03-28 22:32:03 -04:00
Timothy Flynn 59fb811159 Browser: Display an audio button on tabs that are playing audio
When audio begins playing, add a button to the left of the favicon with
a speaker icon to indicate which tab is playing audio. This button is
currently disabled, but in the future may be used to mute the tab.
2024-03-28 21:08:23 +01:00
Timothy Flynn 06d1477312 Browser: Display a default favicon and title
This ensures we consistently show a favicon and that we update the title
to at least display the page URL when there isn't a <title> tag. We
would otherwise continue displaying the previous page's title.
2024-03-28 21:08:23 +01:00
Sönke Holz 6654021655 Kernel/riscv64: Don't hard-code the page fault reason on RISC-V
Instead, rewrite the region page fault handling code to not use
PageFault::type() on RISC-V.

I split Region::handle_fault into having a RISC-V-specific
implementation, as I am not sure if I cover all page fault handling edge
cases by solely relying on MM's own region metadata.
We should probably also take the processor-provided page fault reason
into account, if we decide to merge these two implementations in the
future.
2024-03-25 14:18:38 -06:00
ronak69 22586c9cc6 AnalogClock: Add feature to change and show time zone
The said time zone is local to each instance of the AnalogClock and is
separate from the system time zone.

This allows user to have clocks that use different time zones
simultaneously.
2024-03-25 14:09:23 -06:00
Timothy Flynn 0069390e1c Browser: Implement pasting content from the clipboard 2024-03-25 08:14:00 +01:00
Shannon Booth e800605ad3 AK+LibURL: Move AK::URL into a new URL library
This URL library ends up being a relatively fundamental base library of
the system, as LibCore depends on LibURL.

This change has two main benefits:
 * Moving AK back more towards being an agnostic library that can
   be used between the kernel and userspace. URL has never really fit
   that description - and is not used in the kernel.
 * URL _should_ depend on LibUnicode, as it needs punnycode support.
   However, it's not really possible to do this inside of AK as it can't
   depend on any external library. This change brings us a little closer
   to being able to do that, but unfortunately we aren't there quite
   yet, as the code generators depend on LibCore.
2024-03-18 14:06:28 -04:00
Nico Weber 21917e7b1e LibPDF+PDFViewer+MacPDF: Don't draw hidden text by default
Text can be rendered in various ways in PDFs: Filled, stroked,
both filled and stroked, set as clipping path, hidden, or
some combinations thereof.

We don't implement any of this at the moment except "filled".

Hidden text is used in scanned documents: The image of the scan is
drawn in the background, and then OCRd text is "drawn" as hidden
on top of the scanned bitmap. That way, the (hidden) text can be
selected and copied, and it looks like you're selecting text from
the scanned bitmap. Find-in-page also works similarly. (We currently
have neither text selection nor find-in-page, but one day we will.)

Now that we have pretty good support for CCITT and are growing some
support for JBIG2, we now draw both the scanned background image
as well as the foreground text. They're not always perfectly aligned.

This change makes it so that we don't render text that's marked as
hidden. (We still do most of the coordinate math, which will probably
come in handy at some point when we implement text selection.)

This makes these scanned documents appear as they're supposed to
appear (at least in documents where we manage to decode the background
bitmap).

This also adds a debug option to force rendering of hidden text.
2024-03-16 13:10:48 -04:00
Timothy Flynn 764286676f Browser: Implement <input type=file> file type filtering 2024-03-16 08:42:33 +01:00
Timothy Flynn 6760d236e4 Ladybird+LibWeb+WebContent: Parse the <input type=file> accept attribute
This parses the accept attribute value for file input types and passes
it along to the browser chromes.
2024-03-16 08:42:33 +01:00
Sam Atkins f00afa4a71 HexEditor: Avoid painting white rectangle on a white background
Most of the time, the background color for the hex and text areas will
be the widget's normal background color, so skip painting it in those
cases.
2024-03-15 08:37:21 +00:00
Sam Atkins d4c051ece2 HexEditor: Add gaps between byte groups 2024-03-15 08:37:21 +00:00
Sam Atkins 4a2a40a3c8 HexEditor: Break bytes-per-row into numbers of groups of bytes 2024-03-15 08:37:21 +00:00
Cubic Love 3bec616893 Base+ImageViewer: Add new icons for ImageViewer
Add ImageViewer application icons (16 and 32px) and matching image
filetype icons.
2024-03-12 08:08:19 +00:00
Bastiaan van der Plaat bd86beb7e4 Maps: Add FavoritesModel and remove hacky misusage of JSONArrayModel 2024-03-11 10:40:23 +00:00
Bastiaan van der Plaat 29026ce965 Maps: Move TileProviders.json to user independent folder 2024-03-11 10:40:23 +00:00
Timothy Flynn 07a27b2ec0 AK: Replace the boolean parameter of StringView::lines with a named enum 2024-03-08 14:43:33 -05:00
Timothy Flynn 928287b782 LibCrypto: Store ASN1 certificate timestamps as UnixDateTime
We are currently using Core::DateTime, which is meant to represent local
time. However, we are doing no conversion between the parsed time in UTC
and local time, so we end up comparing time stamps from different time
zones.

Instead, store the parsed times as UnixDateTime, which is UTC. Then we
can always compare the parsed times against the current UTC time.

This also lets us store parsed milliseconds.
2024-03-08 00:41:23 +01:00
Nico Weber 2e2cae26c6 LibGfx+Fallout: Make ImageDecoder return ErrorOr
...from try_create_for_raw_bytes().

If a plugin returns `true` from sniff but then fails when calling
its `create()` method, we now no longer swallow that error.

Allows `image` (and other places in the system) to print a more
actionable error if early image headers are invalid.

(We now no longer try to find another plugin that can also handle
the image.)

Fixes a regression from #20063 / #19893 -- before then, we didn't
do fallible work this early.
2024-03-07 11:20:06 -05:00