Commit graph

49050 commits

Author SHA1 Message Date
Timothy Flynn 660b980660 LibWeb: Sort HTML event names 2023-04-07 16:02:22 +02:00
Timothy Flynn 6d5893a121 LibWeb: Implement HTMLMediaElement's networkState attribute 2023-04-07 16:02:22 +02:00
Timothy Flynn 9a370a5eed LibWeb: Support taking matching tasks out of a task queue
This will be needed for HTMLMediaElement.
2023-04-07 16:02:22 +02:00
Timothy Flynn 807891c0df LibWeb: Support unique task sources
Some elements, like HTMLMediaElement, must have a unique task sources
for every instance of that element that is created. Support this with a
simple wrapper around IDAllocator.
2023-04-07 16:02:22 +02:00
Timothy Flynn 4d9c14ca67 AK: Allow specifying a minimum value for IDs returned by IDAllocator 2023-04-07 16:02:22 +02:00
Timothy Flynn c978beb18b LibVideo: Extract video metadata for public-facing video track data
This copies the video data from the Matroska document into the Track
structure that outside users have access to. Because Track can actually
represent other media types, this is set up such that the Track can hold
metadata for those other types when they are needed.

This is needed for LibWeb's HTMLMediaElement implementation.
2023-04-07 16:02:22 +02:00
Cubic Love 952808eaaa Base: Update Assistant man page with icon & feature instructions
Add the new icon for Assistant and add instructions for using the
built-in URL launcher and calculator (taken from Tips-and-Tricks.md).
2023-04-07 11:44:23 +01:00
Cubic Love f522178881 Base: Add icons for Assistant
Add 32px and 16px application icons for Assistant
2023-04-07 11:44:23 +01:00
Liav A b87747fa64 Kernel: Fix typo in the FramebufferGetPitchMboxMessage name 2023-04-07 10:43:45 +02:00
martinfalisse c839c51b0b LibWeb: Use max-width property in table formatting 2023-04-07 10:42:26 +02:00
martinfalisse 1440845aad LibWeb: Add table formatting tests
Creates some TableFormattingContext tests based on the tests in
/html/misc.
2023-04-07 10:42:26 +02:00
martinfalisse c421f1692c LibWeb: Move table tests to their own folder 2023-04-07 10:42:26 +02:00
Andreas Kling 7b4c76788b LibWeb: Don't put abspos grid/flex items in anonymous wrapper
Grid and flex containers have their own rules for abspos items, so we
shouldn't try to be clever and put them in the "current" anonymous
wrapper block. That behavior is primarily for the benefit of block &
inline layout.
2023-04-07 10:15:16 +02:00
Nico Weber 8760376abe LibGfx: Implement SUBTRACT_GREEN_TRANSFORM for webp lossless decoder 2023-04-07 09:47:04 +02:00
Nico Weber cdc77f7512 LibGfx: Add scaffolding for applying transforms to webp lossless decoder
Each of the four transforms will inherit from this class.
2023-04-07 09:47:04 +02:00
Nico Weber b15d3b2329 LibGfx: Add more dbgln_if()s to webp decoder
They were useful while debugging the decoder. Keep them in for a bit.
2023-04-07 09:47:04 +02:00
Nico Weber 2fc682c033 LibGfx: In webp decoder, check that each transform is used only once 2023-04-07 09:47:04 +02:00
Nico Weber ae1f7124ac LibGfx: Correctly handle more than one PrefixCodeGroup in webp decoder
The `static` here meant we always kept the alphabet sizes of the
first image we happened to load -- and a single webp lossless image
can store several helper images used during decoding.

Usually, the helper images wouldn't use a color cache but the main
image would, but the main image would then use the first entry from
the helper images due to the `static`, which led us to not decoding
the codes for the color cache symbols.
2023-04-07 09:47:04 +02:00
Kenneth Myhra 4d87072201 LibWeb: Port {HTML,UIEvents,XHR}::EventNames to new String 2023-04-06 23:49:08 +02:00
Kenneth Myhra d6cf9f5329 AK: Add FlyString::is_one_of for variadic string comparison 2023-04-06 23:49:08 +02:00
Kenneth Myhra 3aa485aa09 LibWeb: Move string literals to {HTML,UIEvents}::EventNames.h
This moves the reamining string literals from GlobalEventHandlers.h to
{HTML,UIEvents}::EventNames.h.
2023-04-06 23:49:08 +02:00
Matthew Olsson bdab61ad93 LibWeb: Add the WritableStreamDefaultWriter interface 2023-04-06 22:54:58 +02:00
Matthew Olsson e93560b769 LibWeb: Add the WritableStream interface 2023-04-06 22:54:58 +02:00
Matthew Olsson 78feba401d LibWeb: Move property_to_callback to Streams/AbstractOperations
This will be necessary for UnderlyingSink, which is WritableStream's
equivalent of UnderlyingSource, and functions in much the same way.
2023-04-06 22:54:58 +02:00
Timon Kruiper 2b6c44852c Kernel/aarch64: Actually remove Arch/aarch64/init.cpp
The idea was to remove this file in bd2011406, but that did not actually
happen. Let's actually remove it.
2023-04-06 22:06:03 +03:00
Timon Kruiper e9b40863ab Kernel: Make dispatch_signal work for aarch64 2023-04-06 21:19:58 +03:00
Timon Kruiper 00df1fc060 Kernel: Store FPU state when dispatching signal on aarch64
And make sure to also restore it in sys$sigreturn.
2023-04-06 21:19:58 +03:00
Timon Kruiper 4e00c63897 Kernel: Implement signal trampoline for aarch64
With this change, we are now able to successfully boot into the text
mode! :^)
2023-04-06 21:19:58 +03:00
Timon Kruiper ec765544a5 Kernel/aarch64: Add getters/setters in RegisterState and ThreadRegisters
Specifically this commit implements two setters set_userspace_sp and
set_ip in RegisterState.h, and also adds a stack pointer getter (sp) in
ThreadRegisters.h. Contributed by konrad, thanks for that.
2023-04-06 21:19:58 +03:00
Timon Kruiper 36362b9679 Kernel/aarch64: Implement copying of kernel regs into ptrace regs
And also vice versa. Contributed by konrad, thanks for that.
2023-04-06 21:19:58 +03:00
Timon Kruiper 200e91cd7f Kernel+LibC: Modify aarch64's __mcontext to store registers in an array
This commit also removes the unnecessary ifdefs from
sys/arch/aarch64/regs.h. Contributed by konrad, thanks for that.
2023-04-06 21:19:58 +03:00
Timon Kruiper 7440112cd9 Kernel: Implement ScopedAddressSpaceSwitcher using PageDirectory
This makes the code architecture independent, and thus makes it work for
aarch64.
2023-04-06 21:19:58 +03:00
Timon Kruiper 6a8581855d Kernel/aarch64: Flush entire TLB cache when changing TTBR0_EL1
Setting the page table base register (ttbr0_el1) is not enough, and will
not flush the TLB caches, in contrary with x86_64 where setting the CR3
register will actually flush the caches. This commit adds the necessary
code to properly flush the TLB caches when context switching. This
commit also changes Processor::flush_tlb_local to use the vmalle1
variant, as previously we would be flushing the tlb's of all the cores
in the inner-shareable domain.
2023-04-06 21:19:58 +03:00
Timon Kruiper 188a52db01 Kernel: Implement TimeManagement::boot_time() for aarch64
For now just return 0 as we have no RTC support on aarch64 yet, and add
a FIXME to return the correct value.
2023-04-06 21:19:58 +03:00
Idan Horowitz 1c2dbed38a Kernel: Extend the lifetime of Regions during page fault handling
Previously we had a race condition in the page fault handling: We were
relying on the affected Region staying alive while handling the page
fault, but this was not actually guaranteed, as an munmap from another
thread could result in the region being removed concurrently.

This commit closes that hole by extending the lifetime of the region
affected by the page fault until the handling of the page fault is
complete. This is achieved by maintaing a psuedo-reference count on the
region which counts the number of in-progress page faults being handled
on this region, and extending the lifetime of the region while this
counter is non zero.
Since both the increment of the counter by the page fault handler and
the spin loop waiting for it to reach 0 during Region destruction are
serialized using the appropriate AddressSpace spinlock, eventual
progress is guaranteed: As soon as the region is removed from the tree
no more page faults on the region can start.
And similarly correctness is ensured: The counter is incremented under
the same lock, so any page faults that are being handled will have
already incremented the counter before the region is deallocated.
2023-04-06 20:30:03 +03:00
Idan Horowitz 003989e1b0 Kernel: Store a pointer to the owner process in PageDirectory
This replaces the previous owning address space pointer. This commit
should not change any of the existing functionality, but it lays down
the groundwork needed to let us properly access the region table under
the address space spinlock during page fault handling.
2023-04-06 20:30:03 +03:00
Idan Horowitz 65641187ff Kernel: Restructure execve to ensure Process::m_space is always in use
Instead of setting up the new address space on it's own, and only swap
to the new address space at the end, we now immediately swap to the new
address space (while still keeping the old one alive) and only revert
back to the old one if we fail at any point.

This is done to ensure that the process' active address space (aka the
contents of m_space) always matches actual address space in use by it.
That should allow us to eventually make the page fault handler process-
aware, which will let us properly lock the process address space lock.
2023-04-06 20:30:03 +03:00
Idan Horowitz 3f89a1b131 Kernel: Mark sys$msync as not needing the big lock
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
2023-04-06 20:30:03 +03:00
Idan Horowitz 1dae6a2e4a Kernel: Mark sys$mremap as not needing the big lock
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
2023-04-06 20:30:03 +03:00
Idan Horowitz db10f201c8 Kernel: Mark sys$munmap as not needing the big lock
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
2023-04-06 20:30:03 +03:00
Idan Horowitz d1082a00b7 Kernel: Mark sys$set_mmap_name as not needing the big lock
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
2023-04-06 20:30:03 +03:00
Idan Horowitz 2f79d0e8b9 Kernel: Mark sys$mprotect as not needing the big lock
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
2023-04-06 20:30:03 +03:00
Idan Horowitz 3697214166 Kernel: Mark sys$mmap as not needing the big lock
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
2023-04-06 20:30:03 +03:00
Idan Horowitz dcdcab0099 Kernel: Remove unused credentials() call in validate_inode_mmap_prot
For some reason GCC did not complain about this.
2023-04-06 20:30:03 +03:00
Idan Horowitz 0b14081ae1 Kernel: Mark sys$map_time_page as not needing the big lock
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
2023-04-06 20:30:03 +03:00
Idan Horowitz 0e564240a6 Kernel: Mark sys$madvise as not needing the big lock
All accesses to shared mutable data are already serialized behind the
process address space spinlock.
2023-04-06 20:30:03 +03:00
Luke Wilde cb62ffbb8a LibWeb: Transform the default path in CRC2D#fill(CanvasFillRule)
Required by Factory Balls Forever to position anything that isn't an
image.
2023-04-06 17:45:07 +02:00
Andreas Kling b97229c9b5 LibWeb: Ignore preferred width when calculating intrinsic width of block
When calculating the intrinsic width of a block-level box, we now ignore
the preferred width entirely, and not just when the preferred width
should be treated as auto.

The condition for this was both confused and wrong, as it looked at the
available width around the box, but didn't check for a width constraint
on the box itself.

Just because the available width has an intrinsic sizing constraint
doesn't mean that the box is undergoing intrinsic sizing. It could also
be the box's containing block!
2023-04-06 16:47:40 +02:00
Andreas Kling 68459d43e0 Tests/LibWeb: Move block & inline layout tests into own directory 2023-04-06 16:47:40 +02:00
Emily Trau 332bb8a299 LibEDID: Fix compiler error when ENABLE_PNP_IDS_DOWNLOAD=OFF 2023-04-06 10:26:21 -04:00