Commit graph

45044 commits

Author SHA1 Message Date
Nico Weber
25171e310b AK: Prefer VERIFY_NOT_REACHED in ByteBuffer 2022-12-31 23:20:37 +01:00
Nico Weber
47f29170b3 LibGfx+icc: Add profile connection space printing
This is a bit messy: The spec says that PCSXYZ and PCSLAB are the only
valid profile connection spaces -- except for DeviceLink profles, where
all data color spaces are valid.

So this uses the existing ColorSpace enum for profile connection spaces
instead of adding a dedicated enum, to not duplicate all the color space
parsing and printing code.  That matches what the spec does, too.
This saves about 100 lines of code, at the expense of less type
safety -- but further down the line we probably want to be able to
compare data color spaces and profile connection spaces, so the type
safety would likely get in the way then. (But if not, we can change
things around once we get to that point.)
2022-12-31 23:18:35 +01:00
Nico Weber
0b46e572b5 LibGfx+icc: Print profile flags
These flags are always 0 in practice in all profiles I've seen so far,
but hey, probably nice to dump them anyways.
2022-12-31 23:17:48 +01:00
Timothy Flynn
88d5fd4b73 LibWeb: Paint repeating background images over entire paint box
We were previously missing the bottom- and right-most pixels. This fixes
the errant red line showing on the Acid2 forehead.
2022-12-31 20:16:59 +01:00
Ben Wiederhake
b272b45137 Meta: Fix link to relocated intel.com webpage
Using archive.org, it appears that this page has moved at some point
between May 14, 2021, and December 22, 2022, for no discernible reason.
2022-12-31 13:00:13 -05:00
Ben Wiederhake
21b7c32af0 Meta: Fix link to wrong version of commit in Mitigations.md
The old commit seems to be the one from the PR, hence it is not in the
master branch.
2022-12-31 13:00:13 -05:00
Nico Weber
b1e977e18a LibGfx: Use VERIFY_NOT_REACHED() for impossible states in ICC code
The `parse_` functions reject invalid values, so we know the default is
unreachable.
2022-12-31 12:59:22 -05:00
Nico Weber
a8ee5dd9cd LibGfx: Make ICC name converters return StringView 2022-12-31 12:59:22 -05:00
Itamar
a802fb2023 LibWeb: Support MouseEvent.{pageX,pageY}
Unlike client{X,Y} which is relative to the current viewport, these
offsets are relative to the left edge of the document (i.e they take
scroll offset into account).
2022-12-31 16:17:48 +01:00
Itamar
f6862a4203 LibWeb: Use CSSPixelPoint in MouseEvent::create_from_platform_event() 2022-12-31 16:17:48 +01:00
Itamar
66ee08c3dc LibWeb: Fix calculation of MouseEvent::client_{x,y}
MouseEvent.client{X,Y} should be relative to the viewport.
2022-12-31 16:17:48 +01:00
Tom
3dccee6025 LibWeb: Fix table-row y-position
Fixes the y-position of rows when indicated through the display
attribute `table-row`. Previously there was no y-offset between rows and
so they would overlap.
2022-12-31 14:48:37 +01:00
Liav A
883b0f1390 Kernel/Graphics: Restore VirtIO GPU framebuffer console functionality
This has been done in multiple ways:
- Each time we modeset the resolution via the VirtIOGPU DisplayConnector
  we ensure that the framebuffer is updated with the new resolution.
- Each time the cursor is updated we ensure that the framebuffer console
  is marked dirty so the IO Work Queue task which is scheduled to check
  if it is dirty, will flush the surface.
- We only initialize a framebuffer console after we ensure that at the
  very least a DisplayConnector has being set with a known resolution.
- We only call GenericFramebufferConsole::enable() when enabling the
  console after the important variables of the console (m_width, m_pitch
  and m_height) have been set.
2022-12-31 05:13:21 -07:00
Liav A
658f9eec6a Utilities: Introduce the ldd utility
This utility lets a user to figure out what are the dependency libraries
for an ELF dynamic object, whether it's a dynamically loaded executable
or dynamically loaded library.
2022-12-31 05:06:39 -07:00
Liav A
efec344803 LibELF: Export static resolve_library method of the DynamicLinker code
It will be used in the following commit to introduce a new utility to
use this method.
2022-12-31 05:06:39 -07:00
Cody Hein
ab8522aa17 PixelPaint: ColorPicker updates user colors while dragging
Now the user can hold primary and/or secondary mouse buttons
and move the mouse around while previewing the color on the
statusbar and fine tune their selection. The color will update
live so the color selected when mouse is released is the final
color used.
2022-12-31 04:49:19 -07:00
Cody Hein
29665668b6 PixelPaint: Allow ImageEditor event to append info to the statusbar
This provides an event on ImageEditor for other functions to
activate functions when appended_status_info is updated
2022-12-31 04:49:19 -07:00
Lucas CHOLLET
bf06f49417 LibCore: Use CircularBuffer in BufferedHelper
This patch takes care of a FIXME :^)

Co-Authored-By: Tim Schumacher <timschumi@gmx.de>
2022-12-31 04:44:17 -07:00
Lucas CHOLLET
f12e81b74a AK: Add CircularBuffer
The class is very similar to `CircularDuplexStream` in its behavior.
Main differences are that `CircularBuffer`:
 - does not inherit from `AK::Stream`
 - uses `ErrorOr` for its API
 - is heap allocated (and OOM-Safe)

 This patch also add some tests.
2022-12-31 04:44:17 -07:00
Rafał Babiarz
3454891d38 Browser: Add window to inspect history 2022-12-31 04:36:22 -07:00
Lucas CHOLLET
ebe925b7c0 userdel: Use Core::Account::sync() to interact with sensitive files 2022-12-31 04:24:05 -07:00
Lucas CHOLLET
945d2079b4 LibCore: Add a deleted state for Account
As other setters, this only affect the in-memory copy, you need to call
`sync()` to apply changes.
2022-12-31 04:24:05 -07:00
Lucas CHOLLET
f000193ee5 LibCore: Deduplicate some code in Account::generate_shadow_file() 2022-12-31 04:24:05 -07:00
Lucas CHOLLET
3c76790d51 userdel: Use Core::File::remove() instead of spawning /bin/rm 2022-12-31 04:24:05 -07:00
implicitfield
d49fccf0d5 ThemeEditor: Support editing color schemes 2022-12-31 04:20:59 -07:00
implicitfield
1a68977457 Flood: Get the color scheme from the system theme 2022-12-31 04:20:59 -07:00
implicitfield
800c292be8 Terminal+LibVT: Get the color scheme from the system theme 2022-12-31 04:20:59 -07:00
implicitfield
8eb402f8e5 LibGfx: Support color schemes 2022-12-31 04:20:59 -07:00
implicitfield
05334169cf Themes: Add color schemes to all themes 2022-12-31 04:20:59 -07:00
implicitfield
4aec8491d6 Everywhere: Move Base/res/terminal-colors to Base/res/color-schemes 2022-12-31 04:20:59 -07:00
Tim Schumacher
534f3faa2f Ports: Bump the xash3d versions across the board 2022-12-31 04:16:57 -07:00
Tim Schumacher
83f6d5b26a LibELF: Warn if resolving a library resulted in a relative path 2022-12-31 04:16:57 -07:00
Luke Wilde
1011067a60 LibWeb: Stub HTMLInputElement.setSelectionRange
Required by Twitter to move the input caret of the 2FA <input> element
to the start. However, we don't currently handle individual <input>
element selections.
2022-12-30 21:56:54 -05:00
Luke Wilde
6d188d72c0 LibWeb: Store cookies for every HTTP response
As per Fetch, we are supposed to store cookies from Set-Cookie as soon
as we receive response headers for any HTTP response, even in error
cases.

Required by Twitter to login, as it sets cookies via XHR.
2022-12-30 21:56:54 -05:00
Arda Cinar
c9d434247d LibMarkdown: Indent blockquotes inside the terminal renderer
This removes one FIXME :^)
2022-12-31 00:09:23 +01:00
Arda Cinar
5cc984d74c LibMarkdown: Render lines to terminal instead of a single string
With this patch, the blocks in a markdown document render a vector of
lines. These lines get concatenated in Document::render_to_terminal, so
this does not change any external APIs of LibMarkdown.

This change makes it possible to indent individual lines in the rendered
markdown. So, rendering blockquotes in a similar way to code blocks :^)
2022-12-31 00:09:23 +01:00
Aayush
7a4b912ece LibGUI: Fix invalid ModelIndices during shift-click multiselection
Previously, If the widget was unfocused, the selection start index
would be invalid. This would result in invalid selections when doing
shift+click on the widget (while it is unfocused).

Now, we reassign the selection start index to current index
before we initiate multiselection, if selection start index is invalid.

Should Fix SerenityOS#11999 and the same bug inside FileManager.
2022-12-31 00:08:35 +01:00
Alex Chronopoulos
5f67d002a2 LibAudio: Prevent int overflow in the user buffer queue
The `UserSampleQueue::remaining_samples` calculates the result by
subtracting two unsigned int numbers. That can lead to integer overflow.
Add an assert to verify that the minuend is greater or equal to the
subtrahend.
2022-12-31 00:08:05 +01:00
Karol Baraniecki
451ae985bf Calculator: Add adding/subtracting/multiplying/dividing by a percentage
It's now possible to easily calculate 50% of 50. :^)
2022-12-31 00:07:13 +01:00
Karol Baraniecki
21cc8f65f5 Calculator: Support chaining and repeating operations
The calculator now supports chaining (hitting "1+2+3=" shows "6"
instead of "5") and repeating ("2+2===" shows "8") operations. :^)
2022-12-31 00:07:13 +01:00
Karol Baraniecki
ef9fd6c286 Calculator: Fix which digits get animated when pressing keyboard keys
Previously every digit press would appear like "0" was pressed on the
keypad.
2022-12-31 00:07:13 +01:00
BodilessSleeper
c65df44eee LibJS: Fix spec link and spec comment in PlainYearMonth 2022-12-31 00:05:20 +01:00
BodilessSleeper
84db0c8dbf LibJS: Remove call to ToPositiveInteger after CalendarDaysInMonth
Implements: tc39/proposal-temporal@261692a

In order to remove the call to to_positive_integer() there neeeded
to be a change of return type from ThrowCompletionOr<Value> to
ThrowCompletionOr<double>.
This is one of the changes that will come anyways with the following
commit: tc39/proposal-temporal@11aad40. :^)
2022-12-31 00:05:20 +01:00
Andrew Kaster
86995be111 LibAudio: Tolerate a file sample rate lower than the AudioServer's
Previously, trying to load a wav file in aplay or SoundPlayer with a
sample rate less than 44100 would crash in an assertion failure trying
to unchecked_append to a vector that was not resized properly.
2022-12-31 00:04:34 +01:00
Andrew Kaster
140000f37a LibAudio: Only join the background enqueuer thread if has been started
This prevent an assertion failure in SoundPlayer when closing it before
trying to play any audio files.
2022-12-31 00:04:34 +01:00
Andrew Kaster
18c559b0e3 SoundPlayer: Pledge proc so that we can actually open audio files 2022-12-31 00:04:34 +01:00
HawDevelopment
a5dfd5eeb6 Utilities: Fix top utility not calling exit() on SIGINT
Before, when running top, pressing Control+C (triggering SIGINT),
would not call the atexit handler. Therefor not restoring stdin.
2022-12-31 00:04:19 +01:00
Jan200101
058a39c6fc Ports: Use absolute path of script
The relative paths are not valid inside a port build directory.
This makes target_env source .hosted_defs.sh correctly.
2022-12-31 00:02:41 +01:00
Luke Wilde
b85f4ab66a Ladybird: Tell Qt that we manually handle the Cookie header
In some cases, Qt would silently drop the Cookie header and start
causing Cookie authenticated requests to start failing.
2022-12-30 23:52:09 +01:00
Liav A
e598f22768 Kernel: Disallow executing SUID binaries if process is jailed
Check if the process we are currently running is in a jail, and if that
is the case, fail early with the EPERM error code.

Also, as Brian noted, we should also disallow attaching to a jail in
case of already running within a setid executable, as this leaves the
user with false thinking of being secure (because you can't exec new
setid binaries), but the current program is still marked setid, which
means that at the very least we gained permissions while we didn't
expect it, so let's block it.
2022-12-30 15:49:37 -05:00