Our "frame" concept very closely matches what the web specs call a
"browsing context", so let's rename it to that. :^)
The "main frame" becomes the "top-level browsing context",
and "sub-frames" are now "nested browsing contexts".
Just casting a void* to a T* and dereferencing it is not particularly
safe. Also UBSAN was complaining. Use memcpy into a default constructed
T instead and require that the T be trivially copyable.
Previously we'd only only send one DHCP request for network interfaces
which were up when DHCPClient started. If that packet was lost we'd
never send another request for those interfaces.
Also, if an interface were to appear after DHCPClient started (not
that that is possible at the moment) we wouldn't send requests for
that interface either.
Instead of using a low-level, proprietary API inside LibGfx, let's use
Core::AnonymousBuffer which already abstracts anon_fd and offers a
higher-level API too.
This functionality, while neat, isn't really something you need enabled
all the time. Let's make it opt-in instead. Pass MakeInspectable::Yes
to the Core::EventLoop constructor if you want your program to become
inspectable.
Changes to the system font settings are now persisted in /etc.
Note that you still need to restart the system for changes to fully
apply in all programs.
This patch adds a set_system_fonts() IPC API that takes the two main
font queries as parameters. We'll probably expand this with additional
queries when we figure out what they should be.
Note that changing the system fonts on a live system mostly takes
effect in newly launched programs. This is because GUI::Widget will
currently cache a pointer to the Gfx::FontDatabase::default_font()
when first constructed. This is something we'll have to fix somehow.
Also note that the settings are not yet persisted.
Instead of everybody getting their system fonts from Gfx::FontDatabase
(where it's all hardcoded), they now get it from WindowServer.
These are then plumbed into the usual Gfx::FontDatabase places so that
the old default_font() and default_fixed_width_font() APIs keep working.
Problem:
- `static` variables consume memory and sometimes are less
optimizable.
- `static const` variables can be `constexpr`, usually.
- `static` function-local variables require an initialization check
every time the function is run.
Solution:
- If a global `static` variable is only used in a single function then
move it into the function and make it non-`static` and `constexpr`.
- Make all global `static` variables `constexpr` instead of `const`.
- Change function-local `static const[expr]` variables to be just
`constexpr`.
Instead of doing a full IPC round-trip for the client and server to
greet each other upon connecting, the server now automatically sends
a "fast_greet" message when a client connects.
The client simply waits for that message to arrive before proceeding.
(Waiting is necessary since LibGUI relies on the palette information
included in the greeting.)
For compressed coredumps, CrashReporter's argv were in this order:
CrashReporter path --unlink
Core::ArgsParser doesn't like that at all and would immediately exit
from main(), causing the crash reporter to never display.
The recent patch to LexicalPath allowed relative paths like ../ to work
in requests to WebServer. This wasn't too dangerous because of unveil,
but let's still fix this :^)
This was only synchronous since WindowServer managed the ID allocation.
Doing this on the client side instead allows us to make create_menu()
an asynchronous IPC call, removing a bunch of IPC stalls during
application startup.
As we removed the support of VBE modesetting that was done by GRUB early
on boot, we need to determine if we can modeset the resolution with our
drivers, and if not, we should enable text mode and ensure that
SystemServer knows about it too.
Also, SystemServer should first check if there's a framebuffer device
node, which is an indication that text mode was not even if it was
requested. Then, if it doesn't find it, it should check what boot_mode
argument the user specified (in case it's self-test). This way if we
try to use bochs-display device (which is not VGA compatible) and
request a text mode, it will not honor the request and will continue
with graphical mode.
Also try to print critical messages with mininum memory allocations
possible.
In LibVT, We make the implementation flexible for kernel-specific
methods that are implemented in ConsoleImpl class.
Since applications using Core::EventLoop no longer need to create a
socket in /tmp/rpc/, and also don't need to listen for incoming
connections on this socket, we can remove a whole bunch of pledges!