Commit Graph

50319 Commits

Author SHA1 Message Date
Karol Kosek
e7954f62b3 GMLPlayground: Use current file name in the 'Save as...' dialog
Previously it was always "Untitled".
2023-05-16 12:57:34 +01:00
Karol Kosek
23ac52bc80 GMLPlayground: Use try_make for syntax highlighting and autocomplete 2023-05-16 12:57:34 +01:00
Karol Kosek
477ee34215 GMLPlayground: Set parent window for preview window
Closing the main window didn't close the preview window along with it.
2023-05-16 12:57:34 +01:00
Karol Kosek
94f408097a GMLPlayground: Remove one DeprecatedString usage 2023-05-16 12:57:34 +01:00
Karol Kosek
5fd4d34880 GMLPlayground: Handle drop events 2023-05-16 12:57:34 +01:00
Karol Kosek
8c00e57f56 GMLPlayground: Extract most logic into a MainWidget class 2023-05-16 12:57:34 +01:00
Karol Kosek
3c13faff57 GMLPlayground: Set file path when reading file
We weren't setting the path on the 'Open' action, which meant that a
startup file name was always visible in the title bar (unless we save a
file to a different path, or pick a file from the 'recent files' list).

By setting it to update the stored file path in the load_file()
function, it'll be guaranteed the file name will always be set.

This also will add the startup opened file to the recently opened files
list.
2023-05-16 12:57:34 +01:00
Tim Ledbetter
259f4ffce1 Base: Add man page for ping 2023-05-16 12:56:11 +02:00
Tim Ledbetter
58e75be199 ping: Add -i option to specify the time to wait between packets 2023-05-16 12:56:11 +02:00
Tim Ledbetter
755bd4d3c2 ping: Add -q option to specify quiet mode
Quiet mode suppresses all output except the statistics shown before
the program exits.
2023-05-16 12:56:11 +02:00
Sam Atkins
be71ccb690 ps: Add -u option, to list processes associated with specified users 2023-05-16 12:54:18 +02:00
Sam Atkins
cf998bc082 ps: Perform filtering step before the output loop
Previously we did some of the filtering before the loop, and some inside
it, which made things awkward to reason about. This also lets us avoid
generating a TTY string for each process unless there's a column for it.
2023-05-16 12:54:18 +02:00
Sam Atkins
3aff3c610a ps: Add -p option, and distinguish it from -q 2023-05-16 12:54:18 +02:00
Sam Atkins
45c429853a ps: Allow -q option multiple times, and separated by spaces or commas
Several differences here:
- Passing `-q` multiple times will add them together, instead of the
  last one overwriting the previous ones.
- `-q` PIDs can be separated by commas as well as spaces.
- We check that the PIDs are integers while parsing the arguments,
  instead of later on.

The "parse a list of things as an option" is extracted into a helper
function, because we're going to want the same logic for `-g`, `-G`,
`-p`, `-t`, `-u`, and `-U`.
2023-05-16 12:54:18 +02:00
Sam Atkins
a6e701a67b ps: Add the -a option, to list all processes associated with terminals 2023-05-16 12:54:18 +02:00
Sam Atkins
afb55d9fd8 ps: Add the -A option
This is identical to our existing `-e` option, but both are required by
POSIX.
2023-05-16 12:54:18 +02:00
Sam Atkins
02ee93d6c9 ps: Use Optional for column indices, instead of -1 meaning "not present" 2023-05-16 12:54:18 +02:00
Sam Atkins
e6f7b828c3 ps: Ensure columns capacity in advance
Also use unchecked_append() in a couple of other places where we can.
2023-05-16 12:54:18 +02:00
Sam Atkins
2b02c58cd3 ps: Migrate from DeprecatedString to String 2023-05-16 12:54:18 +02:00
Sam Atkins
61552415a3 ps: Use Core::System::fstat() 2023-05-16 12:54:18 +02:00
Tim Ledbetter
46510bbb64 Base: Add man page for pgrep 2023-05-16 12:49:15 +02:00
Tim Ledbetter
5a9a27cea0 pgrep: Add -d option to specify a pid delimiter
This is useful for commands which expect a comma-separated list of
pids.
2023-05-16 12:49:15 +02:00
Timothy Flynn
e30dcc7391 Ladybird: Add a context menu for image elements 2023-05-16 12:48:39 +02:00
Timothy Flynn
0d1b5e7f7a Ladybird: Add a context menu for link elements 2023-05-16 12:48:39 +02:00
Timothy Flynn
1b2394d92e Ladybird: Add a context menu for video elements 2023-05-16 12:48:39 +02:00
Timothy Flynn
a0e31bf1de Ladybird: Move the page context menu from the BrowserWindow to the Tab
This will allow us to show different context menus depending on what
element is clicked, much like we do for Browser on Serenity.
2023-05-16 12:48:39 +02:00
Timothy Flynn
1df0a141af Browser: Add a context menu for video elements
This includes actions such as controlling play state, downloading the
video, and opening the video in a new tab.
2023-05-16 12:48:39 +02:00
Timothy Flynn
c82f678fc6 LibWeb+WebContent: Add APIs to control video playback state
This allows for the browser process to control the play/pause state,
whether we paint user agent controls on the video, and whether the video
loops when it finishes playing.
2023-05-16 12:48:39 +02:00
Timothy Flynn
d8f03dda08 Browser+LibWeb+WebContent: Broadcast video element context menu requests
This just sets up the IPC to notify the browser process of context menu
requests on video elements. The IPC contains a few pieces of information
about the state of the video element.
2023-05-16 12:48:39 +02:00
Timothy Flynn
5f473bcb5f LibWeb: Propagate non-primary mouse button clicks on video elements
Otherwise, returning "no" here will disallow the browser process from
showing a context menu, as the event handler will bail early.
2023-05-16 12:48:39 +02:00
Timothy Flynn
bcfa4a34a1 LibCore: Support the WebM file extension when determining MIME type
This enables, for example, navigating to a file:// URL in Ladybird with
a .webm file extension.
2023-05-16 12:48:39 +02:00
networkException
63d2b26b17 LibVT: Correctly wrap text when the scrollbar is hidden 2023-05-16 12:47:16 +02:00
Luke Wilde
b15128c45b LibJS/Bytecode: Implement initial support for super member expressions 2023-05-16 11:26:31 +02:00
Luke Wilde
00493687f2 LibWeb: Implement location.assign 2023-05-16 11:25:44 +02:00
Andrew Kaster
baeee0effe Kernel: Restore kernel8.img for aarch64 build
This was erroneously deleted in 420952a433
2023-05-16 09:47:37 +02:00
Aliaksandr Kalenik
2d05c63c7c LibWeb: Skip frozen tracks while distributing space in GFC 2023-05-16 07:47:47 +02:00
Aliaksandr Kalenik
a613a0973e LibWeb: Reset item_incurred_increase before distributing space in GFC
item_incurred_increase should be reset before every next distirbution
because otherwise it will accumulate increases from previous
distributions which is not supposed to happen.
2023-05-16 07:47:47 +02:00
Timon Kruiper
55e8ffd122 Kernel/aarch64: Make REGISTER_STATE_SIZE a multiple of 16 bytes
This ensure that the stack pointer also stays 16 byte aligned. This
fixes a baremetal issue when getting an exception.
2023-05-15 17:16:06 -06:00
Timon Kruiper
65ed5419ae Kernel/aarch64: Dump registers when unknown exception occurs
This is useful when debugging baremetal issues.
2023-05-15 17:16:06 -06:00
Andreas Kling
5d4e9a0673 LibWeb: Basic support for CSS text-indent: <length-percentage>
Note that this simple form of text-indent only affects the first line
of formatted content in each block.

Percentages are resolved against the width of the block.
2023-05-15 19:31:09 +02:00
Sam Atkins
9c2d496dbe LibWeb: Make processBodyError take an optional exception
Changed here:
018ac19838
2023-05-15 16:28:16 +02:00
Aliaksandr Kalenik
ae5bb13f1f LibWeb: Do not layout grid items during grid container intrinsic sizing
There is not need to run layout inside grid items for intrinsic sizing
of grid container.
2023-05-15 16:27:53 +02:00
Aliaksandr Kalenik
1ecbbadf3a LibWeb: Fix specified_size_suggestion to use size of dimension
specified_size_suggestion() should use width or height depending on
specified dimension.
2023-05-15 16:20:51 +02:00
Aliaksandr Kalenik
daf86eaabc LibWeb: Fix UBSAN issue caused by invalid TemporaryTrack pointer in GFC
Fixes the issue when if there are enough rows/column to force
m_row_gap_tracks or m_column_gap_tracks be resized during gaps
initialization then pointers stored in m_grid_columns_and_gaps or
m_grid_rows_and_gaps become invalid.
2023-05-15 15:35:34 +02:00
Andreas Kling
4d0d0a99b4 LibGUI: Fix bad title alignment in GroupBox
Make a separate rect for the text and use IntRect::centered_within()
to sidestep any subpixel jitter. This way it looks good with both bitmap
and vector fonts.
2023-05-15 14:15:53 +02:00
Andreas Kling
20e2c9a7dd LibWeb: Cache state of the contenteditable attribute on HTMLElement
Instead of recomputing the state whenever someone asks for it, we now
cache it when the attribute is added/changed/removed.

Before this change, HTMLElement::is_editable() was 6.5% of CPU time
when furiously resizing Hacker News. After, it's less than 0.5%. :^)
2023-05-15 14:08:20 +02:00
Andreas Kling
990e7219d6 LibWeb: Fix iframes flickering on window resize
After finishing layout, iframe layout boxes (FrameBox) get notified
about their new size by LayoutState::commit(). This information is
forwarded to the nested browsing context, where it can be used for
layout of the nested document.

The problem here was that we notified the FrameBox twice. Once when
assigning the used offset to its paintable, and once when assigning its
size. Because the offset was assigned first, we ended up telling the
FrameBox "btw, your size is 0x0". This caused us to throw away all
the layout information we had for the nested document.

We'd then say "actually, your size is 300x200" (or something) but by
then it was already too late, and we had to do a full relayout.
This caused iframes to flicker as every time their containing document
was laid out, we'd nuke the iframe layout and redo it (on a zero timer).

The fix is pleasantly simple: we didn't need to inform the nested
document of its offset in the containing document's layout anyway. Only
its size is relevant. So we can simply remove the first call, which
removes the bogus 0x0 temporary size.

Note that iframes may still flicker if they change size in the
containing document. That's a separate issue that will require more
finesse to solve. However, this fixes a very noticeable common case.
2023-05-15 14:08:08 +02:00
thankyouverycool
44049f5ad5 WindowServer: Catch more Window stealing misbehavior
Previously it was possible for a window to register as a parentless
blocking modal then add itself to a stealable parent's modal chain,
bypassing a mode misbehavior check in create_window()

Also relaxes reciprocity for blockers with the same parent. This
scenario is usually created by simultaneous MessageBoxes. It's not
an ideal UX to cascade these, but there's no need to crash over it.
2023-05-15 12:15:39 +02:00
thankyouverycool
c87c4f6d94 LibGUI: Put a governor on Action activation
Many actions affect Window modality, so let's put a temporary change
governor on activation to stop race conditions.

Fixes being able to spam open/close shortcuts and spawn multiple
FilePickers, among other things.
2023-05-15 12:15:39 +02:00
thankyouverycool
7323a54e59 LibGUI+FileSystemAccessServer: Avoid using dummy windows
Creates two new gatekept helpers for FilePicker and MessageBox to be
used by FSAS to replace the "dummy window" approach to centering
Dialogs. There was a slight delay in creating two windows, one a
transparent intermediary hidden behind the second, to display FSAS
Dialogs. Now we only need to make the window we actually see.
2023-05-15 12:15:39 +02:00