Commit Graph

18178 Commits

Author SHA1 Message Date
Timothy Flynn
316e19c3ac Base: Add a bullet emoji • 2021-03-31 23:58:45 +02:00
Timothy Flynn
53ccfc1f4c LibWeb: Don't hit test a stacked child if it is behind its parent
When hit testing a stacked context, skip hit testing children if the
child's z-index is less than the parent's. The children are already
sorted by z-index, but also need to consider the parent.
2021-03-31 23:53:15 +02:00
Timothy Flynn
2cc10c62ee Base: Add test for a box placed over links with negative z-index
In this test, a set of links has a background box placed behind them via
a negative z-index. The expectation is that a hit test on a link during
a mouse-move event should select that link, and not the background box.
2021-03-31 23:53:15 +02:00
AnotherTest
cbd62c472e UserspaceEmulator: Default-initialize the siginfo struct used in waitid
Otherwise it'll have some random value from the stack, and the kernel
will not bother setting it to zero.
Also add a debug print and tweak the FIXME message.
2021-03-31 23:49:26 +02:00
AnotherTest
c4cf4ef111 Shell: Place Pipe redirections at the beginning of the redirection list
This makes commands like `foo 2>&1 | bar` behave as expected (which is
to pipe both stdout and stderr of `foo` to stdin of `bar`).
Previously, this would've piped stderr of `foo` into stdout, and the
stdout of `foo` into the stdin of `bar`.
2021-03-31 23:49:26 +02:00
AnotherTest
e8cfa43717 Utilities/sleep: Go back to sleep if not interrupted by SIGINT
This can happen if the process is stopped and continued at a later time.
2021-03-31 23:49:26 +02:00
AnotherTest
5d19509616 Shell: Handle SIGCHLD after sending SIGCONT to job
This fixes `fg` and `bg` causing the shell to go into an infinite loop
of trying to `waitpid` until some current job changes state.

a.k.a. "Fix Shell backgrounding, yet again!" :P
2021-03-31 23:49:26 +02:00
AnotherTest
50f5959996 Shell: Use existing job state when waitpid() returns 0 in jobs 2021-03-31 23:49:26 +02:00
AnotherTest
e3fd914187 Kernel: Send SIGCHLD to the parent process when changing stopped state
This is done also by linux (signal.c:936 in v5.11) at least.
It's a pretty handy notification that allows the parent process to skip
going through a `waitpid` and guesswork to figure out the current state
of a child process.
2021-03-31 23:49:26 +02:00
AnotherTest
47080941cc Shell: Replace '#if SH_DEBUG` with dbgln_if() and if constexpr 2021-03-31 23:49:26 +02:00
Idan Horowitz
3b201da473 Utilities: Add simple traceroute utility
This utility traces the route packets take to a user specified host.

QEMU user networking (the type of networking we currently have setup)
does not support sending "real" raw IPv4 packets, and as such we cant
specify a custom TTL value. As a result, this utility will only work
on real hardware, qemu setup with tun networking (requires root) and
other hypervisors that support bridged adapters (VirtualBox/VMWare).
2021-03-31 23:42:24 +02:00
Idan Horowitz
aa6547492e LibC+ping: Move internet_checksum to serenity header
This will be useful for traceroute and any other packet related
application, so this will reduce code duplication.
2021-03-31 23:42:24 +02:00
Andreas Kling
ea34ba6fa6 WindowServer+LibGfx: Rename menu_bar => menubar
We had a mix of "menu_bar" and "menubar". Let's just use "menubar"
everywhere since that feels the most natural to write.
2021-03-31 23:38:26 +02:00
Andreas Kling
0e798234c7 WindowServer+LibGfx: Remove code for drawing the old-style menu bar 2021-03-31 23:38:26 +02:00
Baitinq
19c578024b
Kernel: Added TIOCSTI ioctl placeholder (#6037)
Added a dummy TIOCSTI ioctl placeholder. This is a dangerous ioctl that
can be used to inject input into a tty. Added for compatibility. Always
fails with EIO.
2021-03-31 22:58:41 +02:00
Brendan Coles
6718941715 Ports: Links: Bump version from 2.19 to 2.22 2021-03-31 22:47:40 +02:00
Andreas Kling
de2bf8d232 ResourceGraph.MenuApplet: Make these a little bit smaller 2021-03-30 23:43:24 +02:00
Andreas Kling
87b2725b1f Base: Tweak applet window order 2021-03-30 23:43:24 +02:00
Andreas Kling
2231205863 Taskbar: Reposition the applet area when the desktop rect changes 2021-03-30 23:43:24 +02:00
Andreas Kling
0cd60a28ba WindowServer+LibGUI: Plumb mouse/enter/leave events to applet windows
Since applet windows live in the applet area window, the AppletManager
has to keep track of which applet is hovered and send the appropriate
enter/leave events to the applet windows.

This makes applet tooltips work again. :^)
2021-03-30 23:43:24 +02:00
Andreas Kling
9bbc1c9c93 WindowServer+Taskbar: Show applets in taskbar :^)
WindowServer now collects applet windows into an "applet area" which is
really just a window that a WM (window management) client can position
via IPC.

This is rather hackish, and I think we should come up with a better
architecture eventually, but this brings back the missing applets since
the global menu where they used to live is gone.
2021-03-30 23:43:24 +02:00
Timothy Flynn
44602ae141 LibWeb: Create a new BFC when the overflow is neither visible nor clip
From MDN, a block overflow context should be created for "Block elements
where overflow has a value other than visible and clip."
2021-03-30 22:21:46 +02:00
Timothy Flynn
e0f0aa7ce0 Base: Add test page for floating boxes with overflow=hidden 2021-03-30 22:21:46 +02:00
Timothy Flynn
c21eafbf38 LibWeb: Compute position of relative blocks before placing them
Turns out compute_position should be invoked before placing the element
in normal flow. Otherwise, the position isn't set on the first layout.
The effect was that the block would "jump" into place on a secondary
layout.

This is a follow-up to commit:
deda7c8995
2021-03-30 22:21:46 +02:00
Timothy Flynn
5b617df496 LibWeb+WebContent: Support displaying tooltips in OOPWV 2021-03-30 21:21:17 +02:00
Timothy Flynn
c503047c71 LibWeb: Get the first DOM node with a 'title' attribute for tooltip area
Rather than expecting the first parent to have a 'title' attribute,
search all ancestors.
2021-03-30 21:21:17 +02:00
Linus Groh
4fac577cf0 Ports: Use 'env bash' in hatari and pt2-clone package.sh shebang 2021-03-30 21:13:12 +02:00
Manuel Palenzuela
54b4d7611c Ports: Added a chester port, a very simple GameBoy emulator. 2021-03-30 21:11:23 +02:00
Andreas Kling
6d913db9fe WindowServer: Install WindowServer headers
This is a bit clunky since we really only need WindowType.h and don't
really want to consider any other headers "public" but this is just
to make the SDL port build again now that LibGUI includes WindowType.h
from WindowServer.

Long term we should probably figure out a way to only install "API"
headers from libraries.
2021-03-30 20:20:32 +02:00
Andreas Kling
077406dc36 LibJS: Fix two issues with array (length > INT32_MAX)
1. Allow Value(size_t) and use it for array length properties.

If an array length can't fit in an Int32 value, we shouldn't go out of
or way to force it into one. Instead, for values above INT32_MAX,
we simply store them as Double values.

2. Switch to generic indexed property storage for large arrays.

Previously we would always allocate array storage eagerly when the
length property was set. This meant that "a.length = 0x80000000" would
trivially DOS the engine on 32-bit since we don't have that much VM.

We now switch to generic storage when changing the length moves us over
the 4M entry mark.

Fixes #5986.
2021-03-30 13:52:56 +02:00
Andreas Kling
54f6b52f71 Kernel: Don't dump regions twice when crashing due to bad access
For whatever reason we were dumping regions when first handling the
page fault, and then again when tearing down the process.
2021-03-30 11:50:49 +02:00
Andreas Kling
664571c88f Kernel: Clarify Thread::block() a little bit with a better local name 2021-03-30 11:50:48 +02:00
one-some
279599cbed EditingEngine: Don't jump to the beginning or end of a non-existant word
Previously, when jumping to the next word on the last column of a line,
or when jumping to the previous word on the first column, it would
crash. This checks if that is the case, and if so, will do nothing.
2021-03-30 11:32:59 +02:00
Idan Horowitz
77601e09c8 FontEditor+TextEditor+Playground: Refuse to load device files
This prevents the undefined behaviour that would come up as a result of
doing so. (For example: opening "infinite" devices like /dev/full will
result in an infinite loop until exhaustion of memory)
2021-03-30 11:29:52 +02:00
Idan Horowitz
aff774c8ac LibCore: Add Core::File is_device() helpers
The helpers check if the file is a block device or a character device
via stat and fstat.
2021-03-30 11:29:52 +02:00
Andreas Kling
4ee23752a5 Meta: Add thankyouverycool to the contributors list :^) 2021-03-30 10:52:21 +02:00
thankyouverycool
d90d07ba52 Taskbar: Update ClockWidget to Calendar view changes
And give it a nice comfy spot in its new home.
2021-03-30 10:34:34 +02:00
thankyouverycool
4465b37897 LibGUI+Calendar: Add new month and year views to Calendar
And overhaul resize and paint events to fix layout edge cases in
which Calendar wasn't filling its parent widget completely. Ensures
month views always display prior month days for click navigation.
Converts Calendar app layout to GML.
2021-03-30 10:34:34 +02:00
thankyouverycool
effb426757 MenuApplets: Remove old clock/calendar applet
Whatever the fate of MenuApplets, no need to maintain two
clock-calendars for now.
2021-03-30 10:34:34 +02:00
thankyouverycool
fec9c8034d LibGUI: Don't inflate icon text rects beyond available width
Fixes wrapped text candidates not first eliding
2021-03-30 10:33:08 +02:00
Timothy Flynn
855920fe13 Browser+LibWeb+WebContent: Add action to clear resource cache 2021-03-30 10:27:49 +02:00
Andreas Kling
50a8e0e495 LibGUI+WindowServer: Keep canonical WindowType enum in WindowServer
Having the same enum in two places was annoying. Let's just "using"
the WindowServer::WindowType enum into the GUI namespace.
2021-03-29 22:39:18 +02:00
Andreas Kling
2036d7518a SystemServer: Call endgrent() after we're finished looking up groups 2021-03-29 20:44:41 +02:00
Jelle Raaijmakers
3cd8d7e968 Ports/SQLite: Remove HAVE_UTIME compilation flag 2021-03-29 19:58:12 +02:00
Jelle Raaijmakers
3c390d65e4 LibC: Implement utimes function 2021-03-29 19:58:12 +02:00
Idan Horowitz
eab151c994 LibElf+readelf: Parse ELFs with no program headers correctly
This simply fixes a check which assumed the program header count was
always non zero.
2021-03-29 19:57:19 +02:00
Itamar
ba0df27653 Kernel: Support write() after setting O_APPEND on a non-seekable file
Previously, Process::do_write would error if the O_APPEND flag was set
on a non-seekable file.

Other systems (such as Linux) seem to be OK with doing this, so we now
do not attempt to seek to the end the file if it's not seekable.
2021-03-29 19:56:54 +02:00
Itamar
9eaa6527f7 LibC: Mark atexit() entries as 'called' before calling them
This guards as from recursing into an atexit callback if exit() is called
from within it.
2021-03-29 19:56:54 +02:00
Timothy Flynn
deda7c8995 LibWeb: Compute position of relative block elements
Section 10.3 "Calculating widths and margins" indicates that the 'left'
and 'right' properties of relatively positioned elements should be set
in accordance with the rules of section 9.4.3.
2021-03-29 19:56:23 +02:00
Idan Horowitz
13266e7d99 SystemServer: dynamically fetch device group IDs
Fixes a couple of FIXMEs that were complaining about the harcoded
group IDs.
2021-03-29 19:38:56 +02:00