Commit graph

36904 commits

Author SHA1 Message Date
Kevin Nobel 8a548b1a45 Ports: Update openttd-opengfx to version 7.1 2022-04-05 22:17:04 +01:00
Kenneth Myhra 69f05a66fc LibWeb: Add XMLHttpRequest::open() overload
This adds the XMLHttpRequest::open(String, String, bool, String, String)
overload.

The following FIXMEs has been implemented:
- If method is not a method, then throw a "SyntaxError" DOMException.
- If the username argument is not null, set the username given parsedURL
  and username.
- If the password argument is not null, set the password given parsedURL
  and password.
- Set this’s synchronous flag if async is false; otherwise unset this’s
  synchronous flag.

Spec comments has also been updated.
2022-04-05 22:33:44 +02:00
Kenneth Myhra 0b86574293 LibWeb: Verify argument_check before generating if statement
This fixes an error where we would generate an empty 'if' statement body
if argument_check was empty.
2022-04-05 22:33:44 +02:00
Kenneth Myhra 887e13f364 LibWeb: Get argument count from Function::parameters::size()
Previously this retrieved argument count from Function::length() which
did not return the correct count in all situations.
2022-04-05 22:33:44 +02:00
Kenneth Myhra ba23d036bd LibWeb: Add IDLGenerators::is_primitive()
This adds the is_primitive() method as described in the Web IDL
specification. is_primitive() returns true if the type is a bigint,
boolean or numeric type.
2022-04-05 22:33:44 +02:00
Andreas Kling 9b9b05eabf Kernel: Make sys$mmap() round requested VM size to page size multiple
This fixes an issue where File::mmap() overrides would fail because they
were expecting to be called with a size evenly divisible by PAGE_SIZE.
2022-04-05 22:26:37 +02:00
djwisdom e465b59ca4 Base: Add Lucidity Bold font
Supplement Lucidity Regular font
2022-04-05 13:05:07 -04:00
Lady Gegga 43df15ceef Base: Add Miscellaneous Symbols to font Tinier Regular 5
2605, 2639, 263A, 2640, 2669
https://www.unicode.org/charts/PDF/U2600.pdf
2022-04-05 13:02:43 -04:00
Lady Gegga 53c4f574ee Base: Add Runic characters to font Tinier Regular 5
16A2, 16A6, 16B1, 16B2, 16B3, 16B4, 16B7, 16B9, 16BE, 16BF,
16C1, 16C5, 16C6, 16C7, 16CA, 16CB, 16CC, 16CE, 16CF, 16D0,
16D2, 16D5, 16D6, 16DA, 16DC, 16DD, 16DF, 16E7, 16E8, 16E9,
16EB, 16EC, 16ED, 16F2, 16F7, 16F8
https://www.unicode.org/charts/PDF/U16A0.pdf
2022-04-05 13:02:43 -04:00
Lady Gegga f207d24fe9 Base: Add Latin Extended-B to font Tinier Regular 5
0186, 0197, 019A, 01A8, 01C0, 01C1, 01C2, 01C3, 01D0, 020B,
022F, 024D
https://www.unicode.org/charts/PDF/U0180.pdf
2022-04-05 13:02:43 -04:00
Lady Gegga 79244073c6 Base: Add Latin Extended-A to font Tinier Regular 5
012B, 0131, 0140, 017F
https://www.unicode.org/charts/PDF/U0100.pdf
2022-04-05 13:02:43 -04:00
Lady Gegga 483c4bdbbf Base: Add C1 Controls and Latin-1 Supplement to font Tinier Regular 5
00A1, 00A6, 00AC, 00AF, 00B0, 00B1, 00B2, 00B4, 00B5, 00B7,
00BA, 00BF, 00D6, 00D7, 00EC, 00ED, 00EE, 00EF, 00F6, 00F7,
00FC
https://www.unicode.org/charts/PDF/U0080.pdf
2022-04-05 13:02:43 -04:00
Lady Gegga 48ffa115a3 Base: Add U+1F389 to font Katica Regular 10
1F389 https://www.unicode.org/charts/PDF/U1F300.pdf
2022-04-05 13:02:43 -04:00
Andreas Kling 217993b1d1 Revert "WebContent: Use ConsoleGlobalObject for the console's global object :^)"
This reverts commit 8296dd9955.
2022-04-05 17:47:52 +02:00
Andreas Kling 1a38ab0ca1 WindowServer+LibGUI: Notify windows when their maximized state changes
Previously, GUI::Window::is_maximized() had to make a synchronous IPC
request to WindowServer in order to find out if the window was indeed
maximized.

This patch removes the need for synchronous IPC by instead pushing the
maximization state to clients when it changes.

The motivation for this change was that GUI::Statusbar was checking
if the containing window was maximized in its resize_event(), causing
all windows with a statusbar to block on sync IPC *during* resize.
Browser would typically block for ~15 milliseconds here every time
on my machine, continuously during live resize.
2022-04-05 17:45:07 +02:00
Andreas Kling 463dc91049 WebContent: Cancel pending paint requests when removing a backing store
If there are pending paint requests waiting to be processed when the
client asks us to remove a backing store, we now prune them from the
request queue.

This avoids doing completely wasted painting work while resizing the
browser window. :^)
2022-04-05 17:28:33 +02:00
Andreas Kling b28beb691e Kernel: Protect Mutex's thread lists with a spinlock 2022-04-05 14:44:50 +02:00
Sam Atkins 8296dd9955 WebContent: Use ConsoleGlobalObject for the console's global object :^)
Seems like this got missed when ESOs were implemented. Now we can use
`$0` again!
2022-04-05 13:02:12 +01:00
Andreas Kling 0a83c03546 Kernel: Don't unregister Region from RegionTree *before* unmapping it
If we unregister from the RegionTree before unmapping, there's a race
where a new region can get inserted at the same address that we're about
to unmap. If this happens, ~Region() will then unmap the newly inserted
region, which now finds itself with cleared-out page table entries.
2022-04-05 13:46:50 +02:00
Andreas Kling a3db0ab14f Kernel: Remove MemoryManager::region_tree() accessor
Let's not have a way to grab at the RegionTree from outside of MM.
2022-04-05 13:45:10 +02:00
Andreas Kling f8d798b667 Kernel: Move allocate_unbacked_region_anywhere() to MemoryManager
This didn't need to be in RegionTree, and since it's specific to kernel
VM anyway, let's move it to MemoryManager.
2022-04-05 13:45:10 +02:00
Andreas Kling e0da8da657 Kernel: Move create_identity_mapped_region() to MemoryManager
This had no business being in RegionTree, since RegionTree doesn't track
identity-mapped regions anyway. (We allow *any* address to be identity
mapped, not just the ones that are part of the RegionTree's range.)
2022-04-05 13:45:10 +02:00
brapru 3dbb4bc3a6 Utilities: Update arp to use newer APIs
Updates the arp command to use Core::System for the socket and
ioctl calls.

Updates command line arguments to StringView.
2022-04-05 12:43:18 +02:00
brapru 26b8155530 Utilities: Pledge inet in arp command
Previously the arp command would crash when trying to set/delete from
the table.
2022-04-05 12:43:18 +02:00
Andreas Kling cfb61cbd54 Kernel: Add RegionTree::find_region_containing(address or range)
Let's encapsulate looking up regions so clients don't have to dig into
RegionTree internals.
2022-04-05 12:23:47 +02:00
Andreas Kling da7ea2556e Kernel: Add RegionTree::remove(Region&)
This allows clients to remove a region from the tree without reaching
into the RegionTree internals.
2022-04-05 11:57:53 +02:00
Ali Mohammad Pur 4b5a9bab34 LibJS: Actually generate a lexical env for SwitchStatement in BC
We had code for this in ScopeNode, but that function was never called
for a SwitchStatement.
This fixes a bunch of scoping tests for switch.
2022-04-05 11:46:48 +02:00
Ali Mohammad Pur 0e1943937c LibJS: Use InitializeOrSet to initialize function declarations in BC
A function may be redefined, in which case the existing binding is
expected to be reused.
2022-04-05 11:46:48 +02:00
Ali Mohammad Pur 5407fe8fcf LibJS: Make Handle<Value>::is_null() also consider the contained value
Previously this would've said `make_handle(Value(1234))` is null, as it
did not contain a cell (but rather a plain Value), which made throwing
primitives spin forever in BC mode.
2022-04-05 11:46:48 +02:00
Ali Mohammad Pur 431776ebb7 js: Print the accumulator instead of the returned value in BC mode
The REPL is supposed to show the last value (and not the _returned_
value), so use the accumulator register as the 'value'.
2022-04-05 11:46:48 +02:00
Andreas Kling f0f97e1db0 Kernel: Take the RegionTree spinlock when inspecting tree from outside
This patch adds RegionTree::get_lock() which exposes the internal lock
inside RegionTree. We can then lock it from the outside when doing
lookups or traversal.

This solution is not very beautiful, we should find a way to protect
this data with SpinlockProtected or something similar. This is a stopgap
patch to try and fix the currently flaky CI.
2022-04-05 01:15:22 +02:00
Andreas Kling e3e1d79a7d Kernel: Remove unused ShouldDeallocateVirtualRange parameters
Since there is no separate virtual range allocator anymore, this is
no longer used for anything.
2022-04-05 01:15:22 +02:00
Timothy Flynn b36c3a68d8 js: Convert non-UTF-8 encoded files to UTF-8 before parsing 2022-04-05 00:14:29 +01:00
Timothy Flynn 9e5abec6f1 AK: Invalidate UTF-8 encoded code points larger than U+10ffff
On oss-fuzz, the LibJS REPL is provided a file encoded with Windows-1252
with the following contents:

    /ô¡°½/

The REPL assumes the input file is UTF-8. So in Windows-1252, the above
is represented as [0x2f 0xf4 0xa1 0xb0 0xbd 0x2f]. The inner 4 bytes are
actually a valid UTF-8 encoding if we only look at the most significant
bits to parse leading/continuation bytes. However, it decodes to the
code point U+121c3d, which is not a valid code point.

This commit adds additional validation to ensure the decoded code point
itself is also valid.
2022-04-05 00:14:29 +01:00
Karol Kosek 119873b822 LibWeb: Make default text-decoration-thickness a fraction of font height
Previously the default was always 1px, which didn't look great on higher
font sizes.

This changes the default thickness to one-tenth to the font height. The
one-tenth part was chosen arbitrarily, but I think it does the job
pretty well. :^)
2022-04-04 23:44:04 +01:00
James Mintram df9a833d7a Kernel: Add VERIFY_NOT_REACHED to aarch64 PageDirectory.cpp 2022-04-04 14:35:54 -07:00
James Mintram 283d8e8f51 Kernel: Add VERIFY_NOT_REACHED to aarch64 locking functions 2022-04-04 14:35:54 -07:00
James Mintram e98ea8a977 Kernel: Add VERIFY_NOT_REACHED to the aarch64 handle_crash function 2022-04-04 14:35:54 -07:00
James Mintram d014c0501d Kernel: Remove unused dummy function from dummy.cpp 2022-04-04 14:35:54 -07:00
James Mintram bd7acd4b90 Kernel: Add VERIFY_NOT_REACHED to stub functions in aarch64 dummy.cpp 2022-04-04 14:35:54 -07:00
James Mintram 92a8383101 Kernel: Add VERIFY_NOT_REACHED to stub aarch64 Processor functions 2022-04-04 14:35:54 -07:00
James Mintram 463910df98 Kernel: Print out assertion info in __assertion_failed on aarch64 2022-04-04 22:25:33 +01:00
Ali Chraghi 04ec13cb14 Base: Update Python filetype icon 2022-04-04 22:06:48 +01:00
Ali Chraghi 44f05bc0cb Base: Update PHP filetype icon 2022-04-04 22:06:48 +01:00
Ali Chraghi 8dc071aa28 Base: Update C++ filetype icon 2022-04-04 22:06:48 +01:00
Ali Chraghi bcee4f6ffe Base: Update C filetype icon 2022-04-04 22:06:48 +01:00
Ali Chraghi ca5b939fcf Base: Update crash reporter icon 2022-04-04 22:06:48 +01:00
Ali Chraghi 7bed8d72b8 Base: Update socket filetype icon 2022-04-04 22:06:48 +01:00
Ali Chraghi 79c74eb5e1 Base: Update 32x32/MessageBoxQuestion icon 2022-04-04 22:06:48 +01:00
Ali Chraghi d3f7d0f7a7 Base: Update 32x32/MessageBoxWarning icon 2022-04-04 22:06:48 +01:00