Commit graph

39898 commits

Author SHA1 Message Date
thankyouverycool 3c1ea2861b Tests: Update TestFontHandling and add new test
Updates BitmapFont testing for fallible writes and adds a new
test font file for use in a new un/masking test.
2022-08-04 02:54:00 +02:00
thankyouverycool cc291a0ca7 LibGfx: Improve error handling for BitmapFonts
Adds fallible functions for cloning, creating, loading and writing
BitmapFonts.
2022-08-04 02:54:00 +02:00
David Smith 1bdaf92414 Profiler: Add scrollbar to FlameGraphView
The flame graph view used to draw only so much of the graph that could
be displayed. Change to draw the whole graph, and add a scrollbar.

Does some tricks with the scrolling to keep the bottom of the graph
fixed when resizing or double-clicking, since it works better then.
2022-08-04 02:52:39 +02:00
MacDue bcf0e879d3 Tests: Add a test for markdown image sizes 2022-08-04 02:49:29 +02:00
MacDue 8140b1fa18 LibMarkdown: Implement the image size extension
This implements the image size extension that's quite commonly used:
https://github.com/commonmark/commonmark-spec/wiki/Deployed-Extensions#image-size

This supports specifying...

Both width and height: ![](foo.png =100x200)
Width only: ![](foo.png =100x)
Height only: ![](foo.png =x200)

The size is always in pixels (relative sizing does not seem
to be spec'd anywhere).
2022-08-04 02:49:29 +02:00
Linus Groh fb47a87340 LibJS: Add previously skipped assertion in RegulateTime
The spec issue preventing us from doing this in the past has long been
fixed.
2022-08-03 22:46:38 +01:00
Filiph Siitam Sandström 3c1594e9ca DisplaySettings: Capitalize s in screen settings 2022-08-03 21:49:41 +01:00
davidot 301bba8c19 LibJS: Only coerce value once in BigInt constructor
See https://github.com/tc39/ecma262/pull/2812.
2022-08-03 20:59:59 +01:00
James Puleo 8c11786145 HexEditor: Rename camel case variable names in HexEditor::save_as
This also changes those variables to be references to the casted
document type, instead of pointers.
2022-08-03 10:12:11 -04:00
James Puleo 88cf40179d HexEditor: Make HexEditor::open_new_file fallible and reduce branching
Returning a `bool` is meaningless, so let's make it more expresive :^)
2022-08-03 10:12:11 -04:00
James Puleo 035d63f528 HexEditor: Remove unused readonly flag
`HexEditor::set_readonly` was never called, even though
`HexEditor::is_readonly` was occasionally queried -- so it's entirely
been removed.
2022-08-03 10:12:11 -04:00
James Puleo 8695ae4c50 HexEditor: Don't spam debug output when finding all strings
For each string found we would output it, which was way too much noise
:^)
2022-08-03 10:12:11 -04:00
James Puleo 0bfcbf0b0a HexEditor: Change Find All Strings shortcut to Ctrl + Shift + F
The previous shortcut of `Ctrl + Shift + S` conflicted with `Save As...`
action shortcut.
2022-08-03 10:12:11 -04:00
0xbigshaq af46734497 LibHTTP+WebServer: Add querystring support
Split the path from querystring when determining the requested resource.
2022-08-02 21:05:32 +00:00
Timothy Flynn a4a7efaf5f LibC+LibCore: Use tm_isdst to handle time zone offsets in DST
Previously, we were incorrectly assuming that the daylight global
variable indicated whether the current time zone is in DST. In reality,
the daylight variable only indicates whether a time zone *can* be in
DST.

Instead, the tm structure has a tm_isdst member that should be used for
this purpose. Ensure our LibC handles tm_isdst, and avoid errant usage
of the daylight variable in Core::DateTime.
2022-08-02 21:10:44 +01:00
Timothy Flynn e683ca00cc LibC: Split time_t range validation to separate helper function
Right now, the tm_to_time helper invokes time_to_tm to validate the
time_t it creates. Soon, both tm_to_time and time_to_tm will perform
some TZDB lookups to handle DST. This isn't a huge cost, but let's
avoid the double lookup here.
2022-08-02 21:10:44 +01:00
Timothy Flynn 91e3a2aaca LibC: Cache the time zone name found by tzset()
The time zone name will be needed for TZDB lookups in various time.h
functions. Cache the value found by tzset(), defaulting to the system-
wide default of UTC.

This also moves the time.h global definitions to the top of the file.
The cached time zone name will be needed above where these variables are
defined, so this is just to keep them all together.
2022-08-02 21:10:44 +01:00
thankyouverycool de9452e14b Base: Update window-close-modified icon for Redmond themes 2022-08-02 16:33:02 +02:00
Jelle Raaijmakers b44275569b Ports: Download and install ScummVM game icons 2022-08-02 13:26:49 +01:00
Jelle Raaijmakers e83d03038a Ports: Update ScummVM to 2.6.0 2022-08-02 13:26:49 +01:00
Jelle Raaijmakers 379c7c2f64 Run: Trigger on escape key only once
When you press the escape key in the Browse dialog, the key down event
closes the dialog while the key up event then closes the Run window.

Prevent this by only listening to key down events.
2022-08-02 12:54:39 +01:00
djwisdom c72482da54 Base: Update ImageViewer manual improve description 2022-08-02 07:47:43 +00:00
Kenneth Myhra 1e5d107649 LibWeb: Declare variable with the auto keyword
Use the auto keyword instead of the full type name like we do elsewhere
in the codebase.
2022-08-02 08:20:40 +01:00
Kenneth Myhra c8c5f05de5 LibWeb: Make sure Blob type is not outside range 0x0020-0x007E
This makes sure that type is set to an empty string if
BlobPropertyBag::type is outside the range 0x0020 to 0x007E.
2022-08-02 08:20:40 +01:00
Kenneth Myhra 73aec263b1 LibWeb: Move is_basic_latin() to Blob.{cpp,h}
This method needs to be accessible from both Blob and File.
2022-08-02 08:20:40 +01:00
networkException ad060befad WindowServer+LibGUI: Remove awkward roundtrip for set wallpaper response
Previously we would wait for a separate message confirming that a
wallpaper got set instead of just calling a synchronous api.

I'm guessing that this was a limitation of the IPC system when
WindowServer got ported to using it.

This patch removes the SetWallpaperFinished message and updates the
set_wallpaper api to synchronously return a success boolean.
2022-08-02 04:04:08 +00:00
networkException 2cdc7c4ca0 wallpaper: Add pledge promises 2022-08-02 04:04:08 +00:00
networkException 85b133d47f Utilities+Base: Rename pape utility to wallpaper 2022-08-02 04:04:08 +00:00
Chun Ngai Au bfa94dd0b7 Documentation: Fix c_cpp_properties.json typo
The current compilerArgs will cause an error when VSCode's C++ extension
queries the compiler for defaults, causing it to revert to the system's
default compiler.
2022-08-01 14:59:45 +01:00
djwisdom 8ab31284e7 Ports: Update serenity-theming use commit 3dc8b8e 2022-08-01 14:28:27 +01:00
Andreas Kling 548081ea23 Userland+Base: Make the window titlebar font configurable separately
Instead of defaulting to "bold variant of the system default font",
let's allow the user to set any font they want as the titlebar font.
2022-08-01 10:29:53 +02:00
Andreas Kling 419e986dcc WorkspacePicker: Hide tray applet entirely when there's only 1 workspace
Instead of collapsing to a 1x1 applet, we now hide the applet window
entirely, which stops it from taking up space in the system tray.
2022-08-01 10:29:53 +02:00
Andreas Kling 8862434376 LibGUI: Allow Tab key to switch focus from non-editable GUI::TextEditor 2022-08-01 10:29:53 +02:00
Andreas Kling 8690f36eb3 CrashReporter: Turn off line wrapping in the various text editors
It's much nicer to look at a backtrace when it has one line per stack
frame instead of a random number of lines.
2022-08-01 10:29:53 +02:00
Andreas Kling f80e19086e CrashReporter: Focus the "Close" button on startup
The most common action people will want to do with these windows is
to close them, so let's make that the first choice.
2022-08-01 10:29:53 +02:00
Andreas Kling b480f02117 CrashReporter: Add ellipsis (...) to "Save Backtrace" button
Since you must provide a file name before saving occurs, this button
should have an ellipsis.
2022-08-01 10:29:53 +02:00
Andreas Kling d18c25e973 LibGUI: Expose GUI::Button's "default" property to GML 2022-08-01 10:29:53 +02:00
Tim Schumacher 9fad80c34c Kernel: Silently discard SO_REUSEADDR
We were previously rejecting `SO_REUSEADDR` with an `ENOPROTOOPT`, but
that made QEMU unhappy. Instead, just silently discard it and print a
FIXME message in case anybody wonders what went wrong if the system
won't reuse an address.
2022-08-01 04:23:41 +00:00
networkException f722612e17 Browser: Set preferred color scheme when constructing a tab
Previously we would only tell OutOfProcessWebView about the preferred
color scheme when changing it in the browser's settings.

This patch implements reading in the current config value to set the
scheme immediately :^)

See SerenityOS update (July 2022) https://youtu.be/aO0b2X7tzuk?t=2171
2022-08-01 00:20:43 +02:00
Brian Gianforcaro ea9ef33a7f AK: Prefix CACHE_ALIGNED & SYSTEM_CACHE_ALIGNMENT_SIZE 2022-08-01 00:19:16 +02:00
Linus Groh 5f253988ef LibJS: Call HostEnsureCanCompileStrings in PerformShadowRealmEval
We now do have this host-defined abstract operation :^)
2022-07-31 14:39:06 +02:00
Linus Groh fed1498824 LibJS: Implement & use the {Ordinary,PrepareFor}WrappedFunctionCall AOs
This is a normative change in the ShadowRealm spec.

See: https://github.com/tc39/proposal-shadowrealm/commit/5a3aae8
2022-07-31 14:39:06 +02:00
Filiph Sandström 5a281336c5 AK: Fix usage of undefined variables
The commit that introduced BuiltinWrappers (548529a) accidentally used
`val` instead of `value` in the non `__GNUC__` and `__clang__` versions
of the functions.
2022-07-31 11:08:33 +02:00
Liav A fcc0e4d538 Kernel/FileSystem: Funnel calls to Inode::prepare_to_write_data method
Instead of requiring each FileSystem implementation to call this method
when trying to write data, do the calls at 2 points to avoid further
calls (or lack of them due to not remembering to use it) at other files
and locations in the codebase.
2022-07-30 23:31:08 +02:00
Liav A 38bf7863d0 Kernel: Remove PCI information node from ProcFS
The SystemMonitor program was the last client to utilize this node, and
now it is not using this node anymore, we can simply remove this for
good.
2022-07-30 23:29:07 +02:00
Liav A 889b9d029e SystemMonitor: Remove the Hardware tab
This will allow us to essentially remove /proc/pci node for good, as
well as to create a better GUI application to contain PCI information
with other system hardware info too.
2022-07-30 23:29:07 +02:00
gggggg-gggggg 6f40b19746 Kernel: Detect the Insert key 2022-07-30 23:25:20 +02:00
Karol Kosek cf69763b54 LibGfx: Compress PNGs with a better compression level
While for a general purpose encoder a good balance between compression
speed and size by default is important, in case of PNG it don't matter
that much, as it was said in #14594.

Also note that it's not the best we can have. We use zlib's compression
level, which has a range of 0-4, while our deflate implementation ranges
from 0 to 5.
2022-07-30 23:21:42 +02:00
Karol Kosek a0546318f9 LibWeb: Make <th> elements bold by default 2022-07-30 22:32:29 +02:00
MacDue d4b2eb22e1 LibWeb: Resolve circular IDL imports
These circular imports led to the generator silently failing to
generate the required methods/properties.
2022-07-30 13:20:47 +02:00