Commit graph

37971 commits

Author SHA1 Message Date
Tim Schumacher f8aea2a7e5 Profiler: Use absolute mmap paths as-is 2022-05-07 20:02:00 +02:00
Tim Schumacher 89da0f2da5 LibELF: Name library maps with the full file path 2022-05-07 20:02:00 +02:00
Tim Schumacher 2b7b7f2816 LibELF: Separate library resolving into a new function 2022-05-07 20:02:00 +02:00
EWouters a07e12609e Ports/mrsh: Fix workdir, remove or upgrade patches
Also removes mrsh from the list of ports missing descriptions. I tried
to be descriptive about the patches, but as I picked this port up from
someone else, I'm not 100% sure how to best explain the patches.
2022-05-07 17:00:39 +02:00
VAN BOSSUYT Nicolas 020235a841 Base: Improve icons consistency 2022-05-07 13:45:33 +02:00
Luke Wilde 05748ed607 LibJS: Convert Console to use MarkedVector<Value>
Using a Vector<Value> is unsafe as GC cannot see the stored values.
This is then vended to outside users of ConsoleClient, e.g. LibWeb and
WebContent, which is then outside of LibJS's control.

An example issue is if the client stores it for later use and forgets
to visit the stored values, meaning they can be destroyed at any time.
We can save the client from this by vending a MarkedVector<Value> to
them.
2022-05-07 01:22:09 +02:00
EWouters f04911e777 Ports/libmad: Use fresh config.guess
This fixes the build on MacOS.
2022-05-07 01:10:28 +02:00
Liav A b69c8b48fc WindowServer: Separate physical resolution from scaling factors
Physical hardware doesn't care about scale factors as this is a concept
being related to WindowServer and userland applications. To ensure we
provide the correct display resolution details to HardwareScreenBackend
objects, we must keep a separate Gfx::IntRect object that reserve the
correct details.
2022-05-06 23:38:08 +02:00
Linus Groh f7c9bd0760 LibJS: Convert remaining Date AOs using JS::Value as in/output to double
There was an awful lot of JS::Value <-> double conversion going on, even
through these AOs only work with number values anyway.
They don't need a global object either as they won't allocate or throw,
that was simply to pass it to infallible calls of ToIntegerOrInfinity.
2022-05-06 22:32:47 +02:00
Linus Groh b9b3d01bea LibJS: Add variant of to_integer_or_infinity() for plain doubles
In many cases we already know a certain value is a number, or don't have
JS values at all and would need to wrap doubles in a value. To optimize
these cases and avoid having to pass a global object into functions that
won't ever allocate or throw, add a standalone implementation of this
function that takes and returns doubles directly.
2022-05-06 22:32:47 +02:00
Linus Groh 875e59b740 LibJS: Remove unused LibCore/DateTime.h header from Date.cpp
We use a double for [[DateValue]] and the spec's own AOs for any
calculations now.
2022-05-06 22:32:47 +02:00
Linus Groh 4dd9102f5e LibJS: Move Hours/Minutes/Seconds/ms constants out of the Date class
They can remain in this header, but will be used outside the Date
context in Temporal.
2022-05-06 22:32:47 +02:00
Liav A 9bec9c2b78 Kernel: Force y offset 0 when switching between console & graphics modes
This fixes a weird bug that when sometimes a user tried to switch to
console mode, the screen was frozen on graphics mode. After a hour of
debugging this, it became apparent that the problem was that we left the
y offset of the bochs graphics device in an invalid state, so it was not
zero because the WindowServer changed it, and the framebuffer console
code is not aware of horizontal and vertical offsets of the framebuffer
screen, leading to the problem that the framebuffer console updates the
first framebuffer (y offset = 0), but hardware was indicated to show the
second framebuffer (y offset = first framebuffer height).

Therefore, when doing a switch between these modes, always set the y
offset to be zero.
2022-05-06 18:05:14 +02:00
Liav A 659b0d7fb4 WindowServer: Remove hack to restore graphics after switch from console
This hack is not necessary anymore, because WindowServer will try
constantly to write the framebuffer contents to the display connector
devices. After a switch from console mode to graphical mode, the write
syscall on these devices will not be silently ignored but will actually
write to the framebuffer screen.
2022-05-06 18:05:14 +02:00
Liav A cd08c4a5aa Kernel/HID: Take a spinlock when calling KeyboardClient::on_key_pressed
The KeyboardClient class member could be updated due to TTY switch, so
we must ensure we always use a valid pointer.
2022-05-06 18:05:14 +02:00
Liav A b8493bf70f Kernel/Graphics: Protect the list of display connectors with a Spinlock
This list could be updated in runtime if an hotplug event occurs, so we
must protect it with a spin lock to avoid corruption of the list.
2022-05-06 18:05:14 +02:00
Liav A c246d86867 Meta: Use VMWare SVGA adapter if running QEMU Q35 machine
This let us test the VMWare SVGA adapter easily. We already use the std
vga (which is compatible with bochs-display that only lacks VGA support)
on the i440FX QEMU machine so we keep testing it there too, and on the
Q35 machine we use a bochs-display device as secondary display.
2022-05-06 18:04:57 +02:00
Liav A 340773ddb7 Kernel/Graphics: Implement basic support for VMWare SVGA adapter 2022-05-06 18:04:57 +02:00
DexesTTP 530aa51816 LibWeb: Remove a superfluous verify_cast on SVGGraphicsPaintable
Since the layout_box of a SVGGraphicsPaintable is already casted to the
right type, the underlying dom_node was also always of the right type.
This triggers a warning on Lagom builds.
2022-05-06 14:11:03 +02:00
DexesTTP 1af7bfb3a6 LibWeb: Remove unneeded iteration filter on LiveNodeList
Since all items of the subtree are Nodes, the "of type" condition was
always true. This triggers a warning on Lagom builds.
2022-05-06 14:11:03 +02:00
DexesTTP 56d018f6b5 LibWeb: Remove unneeded .gitignore
This was changed a while ago so the generated files are placed in the
Build directory. Let's remove the gitignore file so any old version of
the files stop conflicting with the new generated versions.
2022-05-06 14:11:03 +02:00
DexesTTP 6027ab9e12 LibWeb: Only generate ResourceLoader signposts while on Serenity 2022-05-06 14:11:03 +02:00
DexesTTP 9e5480bcb5 LibWeb: Remove unneeded LibGUI include in Window.cpp 2022-05-06 14:11:03 +02:00
MacDue bf30348f88 Browser: Remove STL utility include from CookiesModel
This broke clang builds
2022-05-06 13:11:09 +02:00
Liav A fb7d9186b2 SystemServer: Boot to text mode if there are no device nodes at /dev/gpu
Otherwise, WindowServer will simply crash and fail due to no hardware to
utilize.
2022-05-06 12:28:19 +02:00
Liav A a0a1ac0656 Kernel/Graphics: Use boot console if the subsystem is disabled
This lets us actually to initialize VirtualConsoles later on.
2022-05-06 12:28:19 +02:00
Liav A 7ab51b6df2 SystemServer: Remove search of a FramebufferDevice
As the framebuffer devices are gone by now, searching for them makes no
sense, so instead, let's remove this check now. If the user requested to
boot into text mode, he probably knows what he is doing and we should
not try to warn him about this.
2022-05-06 12:28:19 +02:00
Liav A 0d784de3a6 Kernel/Graphics: Implement basic cursor for FramebufferConsole 2022-05-06 12:28:02 +02:00
IT6uru 00a0b1bd14 BrowserSettings: Add missing code to update filtering checkbox
reset_default_values() now sets default filtering checkbox
state using default_enable_content_filtering.
2022-05-06 11:37:38 +02:00
MacDue e268659d32 Terminal+TerminalSettings: Allow disabling close confirmations 2022-05-06 02:12:51 +04:30
MacDue d5b550096e Terminal: Close warnings for background/foreground processes
This implements the "close modified" icon on the terminal,
as well as several close warnings:

- A warning there is a foreground process running
- If there is a background process running
- Or if there are multiple background processes running

Fixes #13751
2022-05-06 02:12:51 +04:30
MacDue d951e2ca97 Kernel: Add /proc/{pid}/children to ProcFS
This exposes the child processes for a process as a directory
of symlinks to the respective /proc entries for each child.

This makes for an easier and possibly more efficient way
to find and count a process's children. Previously the only
method was to parse the entire /proc/all JSON file.
2022-05-06 02:12:51 +04:30
MacDue 222079cd80 Kernel: Expose .length() of KBufferBuilder 2022-05-06 02:12:51 +04:30
Linus Groh 88f637a505 js: Print different type for each kind of ECMAScript function object
Instead of just printing 'ECMAScriptFunctionObject' (and leaking an
implementation detail in the process - this is not a public facing name)
let's instead print a different type string for each function kind, and
only keep the old class_name() printing for other JS::FunctionObject
subclasses.
2022-05-05 22:42:10 +02:00
Linus Groh 2ad9641315 js: Implement pretty-printing of generator objects 2022-05-05 22:40:57 +02:00
Linus Groh 53619176f5 LibJS: Set "prototype" property of async generator functions 2022-05-05 22:40:57 +02:00
Linus Groh 09e263dd9c LibJS: Fix "prototype" property of generator functions, again
The change in 3ec0183 wasn't actually correct, the spec tells us to set
the "prototype" property of the function (created with a prototype of
%GeneratorFunction.prototype% itself) to a newly created object:
OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%)
2022-05-05 22:40:57 +02:00
Linus Groh dd547c3374 LibJS: Add getters for %{Async,}GeneratorFunction.prototype.prototype%
These exist as {Async,}GeneratorPrototype of course, but the spec
doesn't always refer to them by the direct name.
2022-05-05 22:40:57 +02:00
Linus Groh 0c65624a32 LibJS: Add AsyncGenerator / AsyncGeneratorPrototype
Not implementing any prototype functions yet, but stubbing out async
generator infrastructure will allow us to make some progress in that
direction.
2022-05-05 22:40:57 +02:00
Linus Groh 2c68ec9097 LibJS: Use Object* for 'manual' GlobalObject::foo_prototype() getters
Not doing so only leads to problems down the line, e.g. not being able
to pass them as function pointers to ordinary_create_from_constructor().
2022-05-05 22:40:57 +02:00
networkException f3f19f8321 Browser: Consolidate StorageWidget tabs into a single gml file
This patch removes the separate CookiesTab.gml file used to define the
layout of the cookies and local storage tabs and moves those defintions
into the StorageWidget.gml file.
2022-05-05 21:57:39 +02:00
Linus Groh e5196c8e3d WindowServer: Take vertical menu offset into account when adjusting pos
Unconditionally adding the item height offset to the adjusted vertical
position of a menu leads to an incorrect position if we previously
clamped the translation offset so the menu doesn't go off-screen.

Also add some comments to this coordinate math. Always add comments to
coordinate math.
2022-05-05 21:54:53 +02:00
Rafał Babiarz ac991b0a89 Browser: Set all cookies at once instead adding them separately 2022-05-05 21:54:38 +02:00
Rafał Babiarz dc66d16dc2 Browser: Rename "on_want_cookies" to match local storage equivalent 2022-05-05 21:54:38 +02:00
Liav A 969e5fa163 Kernel/Console: Use 8x16 character font bitmap instead of old 8x8 bitmap
This in turn makes the built-in kernel console much more nicer to look
into, so let's remove the support for 8x8 bitmap and instead add 8x16
font bitmap.
2022-05-05 21:51:57 +02:00
Andreas Kling 3a2118cc7d LibGfx: Fix Clang build failulres in VectorN
Clang didn't accept the friend declaration here, as the class has a
requires clause attached to it, and I couldn't immediately figure
out what it wants instead.

Add accessors for VectorN::m_data and use those where needed instead
for now.
2022-05-05 21:46:42 +02:00
Luke Wilde caf652799f SystemMonitor: Consistently use u64 for ValueFormat::text_formatter
ValueFormat::text_formatter is called with a u64 retrieved from
GraphWidget::m_values. However, the function pointer definition used
size_t and all the users of text_formatter used int.  If bytes was over
~2 billion, we would interpret bytes to be negative. We then pass this
into `human_readable_size` which converts it to a u64, making it out to
be about 15.9 EiB.

This is fixed by making everything in the path take a u64.
2022-05-05 21:25:04 +02:00
Liav A b96b2fb9be Kernel/Graphics: Simplify the GenericGraphicsAdapter class
The old methods are already can be considered deprecated, and now after
we removed framebuffer devices entirely, we can safely remove these
methods too, which simplfies the GenericGraphicsAdapter class a lot.
2022-05-05 20:55:57 +02:00
Liav A d49a35df31 Kernel/Graphics: Simplify the feature level of the Graphics subsystem
Instead of letting the user to determine whether framebuffer devices
will be created (which is useless because they are gone by now), let's
simplify the flow by allowing the user to choose between full, limited
or disabled functionality. The determination happens only once, so, if
the user decided to disable graphics support, the initialize method
exits immediately. If limited functionality is chosen, then a generic
DisplayConnector is initialized with the preset framebuffer resolution,
if present, and then the initialize method exits. As a default, the code
proceeds to initialize all drivers as usual.
2022-05-05 20:55:57 +02:00
Liav A e301af8352 Everywhere: Purge all support and usage of framebuffer devices
Long live the DisplayConnector object!
2022-05-05 20:55:57 +02:00