Commit graph

18258 commits

Author SHA1 Message Date
Andreas Kling 0f85753014 Base: Desaturate the audio applet icons 2021-04-04 09:54:10 +02:00
Andreas Kling 721572410e ClipboardHistory: Use the "edit-copy" icon instead of a colorized one 2021-04-04 09:53:41 +02:00
Andreas Kling ee7693afa0 Base: Tweak default shell prompt 2021-04-04 09:03:16 +02:00
Will fdffd8ece5
Meta: Removed commas from command in macOS prereqs (#6109)
The commas cause Homebrew to attempt to install "osxfuse,"
instead of osxfuse. "osxfuse," doesn't exist.
2021-04-04 09:00:44 +02:00
Jelle Raaijmakers a856e8d805 Ports: Add ScummVM 2021-04-04 08:28:47 +02:00
Jelle Raaijmakers 5e5f0245b6 LibC: Teach vsscanf() to consume the width specifier
Previously, `vsscanf()` would crash whenever it encountered a width
specification. Now, it consumes the width specification but does not
yet do anything with it.
2021-04-04 08:28:47 +02:00
Jelle Raaijmakers 7f1f6d96b4 LibC: Add NI_MAXHOST and NI_MAXSERV constants
These are not POSIX-defined but are almost always present in <netdb.h>.
2021-04-04 08:28:47 +02:00
AnotherTest 143c68755b LibC: Use 'long long' specialisations of scanf's read_element_concrete
...for 'long long' and 'unsigned long long', instead of reading them as
'long's and 'unsigned long's.
Also add a test for values that can only fit in (unsigned) long long.
Fixes #6096.
2021-04-04 00:40:41 +02:00
Dawid Wolosowicz f05cca7a9a Spreadsheet: Declare the extern GML variable as an array, not a pointer
Part of #5906
Fixes #5943
2021-04-04 00:38:02 +02:00
Linus Groh 340e1f4b28 LibWeb: Implement the Screen interface
https://drafts.csswg.org/cssom-view/#the-screen-interface
2021-04-04 00:37:54 +02:00
Linus Groh e8739ddab7 LibWeb+WebContent: Keep track of screen rect
It is now possible to get the up-to-date screen rect from a Web::Page.
2021-04-04 00:37:54 +02:00
Linus Groh 96b26ec125 Everywhere: Replace uses of GUI::Desktop's on_rect_change and remove it 2021-04-04 00:37:54 +02:00
Linus Groh 5367bbb82c LibGUI: Add ScreenRectChangeEvent and deliver it to windows and widgets
Having to rely on GUI::Desktop's on_rect_change is quite limiting and a
bit awkward (continuing to use it would mean having to setup the
callback in every application using a webview) - we need a better way of
letting widgets know of a screen rect change automatically.

The specific use case will be IPWV/OOPWV which need to keep track of the
screen rect and notify the WebContent service of any change (which on
its own deliberately can't interact with WindowServer at all).

It'll also be useful for notification windows and the taskbar, which
currently both rely on the GUI::Desktop callback but will now be able to
listen and react to the event themselves.
2021-04-04 00:37:54 +02:00
Oleg Sikorskiy a5db11c1f0 LibGfx: Use integer version of Bresenham's algorithm. 2021-04-03 23:59:37 +02:00
Manuel Palenzuela 83b5655977 Ports: Added a Prince of Persia (SDLPoP) port.
This is a port of the dissasembly version of the DOS prince of persia
game :)
2021-04-03 23:30:27 +02:00
Andreas Kling bf1ad16078 LibC: Fix FILE::flush() passing bogus arguments to lseek()
This was a regression from the 64-bit off_t changes.

When dropping buffered data after a flush, we would subtract the
buffered amount from zero to get the seek offset. This didn't work
right since the subtraction was done with a 32-bit size_t and we
ended up with e.g (i64)0xfffffffc as the offset.

Fixes #6003.
2021-04-03 23:01:14 +02:00
Andreas Kling 64d4921f35 LibGUI: Don't try to paint items in model-less IconView :^)
Fixes #6079.
2021-04-03 20:36:43 +02:00
Andreas Kling f1ea092d8f Base: Make the "little" test program compilable again 2021-04-03 20:36:25 +02:00
Liav A 8abbb7e090 Kernel/PCI: Introduce a new ECAM access mechanism
Now the kernel supports 2 ECAM access methods.
MMIOAccess was renamed to WindowedMMIOAccess and is what we had until
now - each device that is detected on boot is assigned to a
memory-mapped window, so IO operations on multiple devices can occur
simultaneously due to creating multiple virtual mappings, hence the name
is a memory-mapped window.

This commit adds a new class called MMIOAccess (not to be confused with
the old MMIOAccess class). This class creates one memory-mapped window.
On each IO operation on a configuration space of a device, it maps the
requested PCI bus region to that window. Therefore it holds a SpinLock
during the operation to ensure that no other PCI bus region was mapped
during the call.

A user can choose to either use PCI ECAM with memory-mapped window
for each device, or for an entire bus. By default, the kernel prefers to
map the entire PCI bus region.
2021-04-03 19:34:52 +02:00
Liav A 441e374396 Kernel: Enable PCI ECAM method again if available
Apparently we don't enable PCI ECAM (MMIO access to the PCI
configuration space) even if we can. This is a regression, as it was
enabled in the past and in unknown time it was regressed.

The CommandLine::is_mmio_enabled method was renamed to
CommandLine::is_pci_ecam_enabled to better represent the meaning
of this method and what it determines.

Also, an UNMAP_AFTER_INIT macro was removed from a method
in the MMIOAccess class as it halted the system when the kernel
tried to access devices after the boot process.
2021-04-03 19:34:52 +02:00
Manuel Palenzuela d09cd85b6c Ports: Added a cmatrix port 2021-04-03 18:55:02 +02:00
Andreas Kling 5c67b2cb8f LibWeb: Defer creation of subframes until host element is connected
This allows parsing of document fragments with "<iframe>" to construct
the iframe element without requiring that the fragment have a frame.
2021-04-03 16:54:33 +02:00
Linus Groh 57ead17d54 LibWeb: Implement XMLHttpRequest.getResponseHeader()
This lets jQuery's AJAX functionality progress further :^)
2021-04-03 16:34:34 +02:00
Linus Groh 288b90a297 LibWeb: Implement XMLHttpRequest.status
This lets jQuery's AJAX functionality progress further :^)
2021-04-03 16:34:34 +02:00
Linus Groh e02270c5cc LibWeb: Make XMLHttpRequest.open() work with relative URLs 2021-04-03 16:34:34 +02:00
Linus Groh 000ef96613 LibWeb: Pass optional status code to ResourceLoader callbacks
This is needed for XMLHttpRequest, and will certainly be useful for
other things, too.
2021-04-03 16:34:34 +02:00
Linus Groh 975b209b9b LibWeb: Set Constructor.name and Prototype.constructor of generated interfaces
Object introspection in the Browser's JS console is still not great, but
this makes it a lot easier to find out the exact type of an object by
checking its 'constructor' property.
It also fixes all the things that rely on these properties being set, of
course :^)
2021-04-03 16:34:34 +02:00
Linus Groh 55d9f1cced LibJS: Log any exception, not just the ones with a JS::Error value
This was super confusing as we would check if the exception's value is a
JS::Error and not log it otherwise, even with m_should_log_exceptions
set.

As a result, things like DOM exceptions were invisible to us with
execution just silently stopping, for example.
2021-04-03 16:34:34 +02:00
Linus Groh f1fde01025 LibJS: Fix returning from try statement
Not sure if this regressed at some point or just never worked, it
definitely wasn't tested at all. We would always return undefined when
returning from a try statement block, handler, or finalizer.
2021-04-03 16:34:34 +02:00
Linus Groh e46fa3ac8b LibJS: Keep RegExp.exec() results in correct order
By using regex::AllFlags::SkipTrimEmptyMatches we get a null string for
unmatched capture groups, which we then turn into an undefined entry in
the result array instead of putting all matches first and appending
undefined for the remaining number of capture groups - e.g. for

    /foo(ba((r)|(z)))/.exec("foobaz")

we now return

    ["foobaz", "baz", "z", undefined, "z"]

and not [

    ["foobaz", "baz", "z", "z", undefined]

Fixes part of #6042.

Also happens to fix selecting an element by ID using jQuery's $("#foo").
2021-04-03 16:34:34 +02:00
Jamie Mansfield 01187e58f2 LibJS: ArrayBuffer.prototype.slice
Implements the aforementioned native Javascript function, following the
specification's [1] implementation.

[1] https://tc39.es/ecma262/#sec-arraybuffer.prototype.slice
2021-04-03 16:24:44 +02:00
Timothy Flynn b50de19cd3 LibWeb: Add support for HTML input type=radio 2021-04-03 15:39:46 +02:00
Timothy Flynn 274e94224d Base: Add test page for HTML input type=radio elements 2021-04-03 15:39:46 +02:00
Andreas Kling 136d774885 LibWeb: CSSImportRule::set_style_sheet() should take a CSSStyleSheet
Spotted by @tomuta in #6086.
2021-04-03 11:57:32 +02:00
Andreas Kling dcfc357860 LibWeb: Add a FrameHostElement for frame/iframe common functionality
A FrameHostElement is an HTML element (<frame> or <iframe>) that may
have a content frame that participates in the frame tree.

This basically just moves code from <iframe> to a separate base class
so we can share it with <frame> once we implement <frame>.
2021-04-03 11:57:32 +02:00
Liav A 8e3e3a71cb Kernel: Introduce a new HID subsystem
The end goal of this commit is to allow to boot on bare metal with no
PS/2 device connected to the system. It turned out that the original
code relied on the existence of the PS/2 keyboard, so VirtualConsole
called it even though ACPI indicated the there's no i8042 controller on
my real machine because I didn't plug any PS/2 device.
The code is much more flexible, so adding HID support for other type of
hardware (e.g. USB HID) could be much simpler.

Briefly describing the change, we have a new singleton called
HIDManagement, which is responsible to initialize the i8042 controller
if exists, and to enumerate its devices. I also abstracted a bit
things, so now every Human interface device is represented with the
HIDDevice class. Then, there are 2 types of it - the MouseDevice and
KeyboardDevice classes; both are responsible to handle the interface in
the DevFS.

PS2KeyboardDevice, PS2MouseDevice and VMWareMouseDevice classes are
responsible for handling the hardware-specific interface they are
assigned to. Therefore, they are inheriting from the IRQHandler class.
2021-04-03 11:57:23 +02:00
Liav A 32dd9c554b LibKeyboard: Mark CharacterMap::get_char as const
Also, mark character_map_name method as const and make it to return
const String& instead of const String.
2021-04-03 11:57:23 +02:00
Liav A 8a12d02b9a Documentation: Add supported and tested motherboards to the list
I tested both motherboards and they seem to boot Serenity correctly :)
2021-04-03 11:57:23 +02:00
Liav A 48111f17fc Documentation: Clarify that AHCI is supported but may suffer from bugs
We do support AHCI now, but the implementation could be incomplete for
some chipsets.
Also, we should write the acronym "Non-volatile Memory Express" as
NVMe. not NVME.
2021-04-03 11:57:23 +02:00
Liav A 27bf91ab87 Revert "Kernel/PCI: Allow to set the PCI IRQ line of a device"
This reverts commit 36a82188a8.

This register is write-only for the firmware (BIOS), and read-only for
us so we shouldn't set the PCI IRQ line never.
The firmware figured out the IRQ routing to the PIC for us, so changing
it won't affect anything. I was mistaken when I thought that changing
the value of this register will allow us to change its interrupt line,
like when changing a PCI BAR to relocate device resources as desired
with the requirements of the OS.
2021-04-03 11:57:23 +02:00
Liav A 2718d7c74c Kernel/Storage: Add support for IDE controllers in PCI native mode
Also handle native and compatibility channel modes together, so if only
one IDE channel was set to work on PCI native mode, we need to handle it
separately, so the other channel continue to operate with the legacy IO
ports and interrupt line.
2021-04-03 11:57:23 +02:00
Brendan Coles 627cfe017c Kernel: NetworkTask: Remove 10.0.2.x as default IP for NIC interfaces 2021-04-03 11:25:18 +02:00
Timothy Flynn fa9ba8bce5 LibWeb: Support rendering background images with 'background-repeat'
Update the painting of background images for both <body> nodes and other
non-initial nodes. Currently, only the following values are supported:
    repeat, repeat-x, repeat-y, no-repeat

This also doesn't support the two-value syntax which allows for setting
horizontal and vertical repetition separately.
2021-04-03 11:24:33 +02:00
Timothy Flynn bd5a91269f LibWeb: Store computed CSS value of background-repeat 2021-04-03 11:24:33 +02:00
Timothy Flynn fcfeadaffa Base: Add test page for the 'background-repeat' property
This page tests the following values for background-repeat:
    repeat, repeat-x, repeat-y, no-repeat

The test is duplicated for the <body> node and for child <div> nodes,
because the code that paints these nodes are in separate locations.
2021-04-03 11:24:33 +02:00
AnotherTest 2601441486 LibCrypto: Avoid overly big allocs in intermediate ModularPower results
If we don't limit the sizes of the intermediate results, they will grow
indefinitely, causing each iteration to take longer and longer (in both
memcpy time, and algorithm runtime).
While calculating the trimmed length is fairly expensive, it's a small
cost to pay for uniform iteration times.
2021-04-03 11:22:01 +02:00
AnotherTest 2020176f0f LibTLS: Make the TLS connection options user-configurable
The user may now request specific cipher suites, the use of SNI, and
whether we should validate certificates (not that we're doing a good job
of that).
2021-04-03 11:22:01 +02:00
AnotherTest b5f24c84e4 LibTLS: Remove long-outdated comment that no longer makes sense 2021-04-03 11:22:01 +02:00
AnotherTest d6d6750dd8 LibTLS: Move TLS extensions to a separate 'extensions' struct
This has no behavioural effect.
2021-04-03 11:22:01 +02:00
Andreas Kling 22d13d8b1a Taskbar: Tweak taskbar widget margins
Basically, nudge everything down 1 pixel.
2021-04-02 23:33:17 +02:00