Commit graph

17705 commits

Author SHA1 Message Date
Andreas Kling
33e3f0c71f LibWeb: Expose barebones CSSStyleDeclaration to JavaScript
You can now access an element's inline style via Element.style.
The interface is not very capable yet though. :^)
2021-03-13 22:41:32 +01:00
Andreas Kling
0759f54bd3 LibWeb: Rename StyleDeclaration => CSSStyleDeclaration to match CSSOM 2021-03-13 22:41:32 +01:00
Andreas Kling
e44fbbe5c0 Base: Remove ANSI color ladybug text file
This was part of a neofetch-like program we had a long time ago,
but has long since been removed.
2021-03-13 22:41:32 +01:00
Idan Horowitz
b3b920eddc tar: Implement tar archive creation
This completes our tar utility by implementing the -c option
for archive creation using TarOutputStream and optionally
GzipCompressor for compression via the -z option.
2021-03-13 20:07:25 +01:00
Idan Horowitz
7eab20bad0 LibTar: Implement TarOutputStream
This output stream creates gnu format tar archives
and currently only supports files and directories.
2021-03-13 20:07:25 +01:00
Idan Horowitz
6c1322bdc7 LibTar: Support ustar tar format
Since we ignore both the ustar prefix field and the gnu extended
header right now anyways, we can just accept both formats as the
rest of the header is exactly the same.
2021-03-13 20:07:25 +01:00
Idan Horowitz
512431a228 test-compress: Add GZip compression tests 2021-03-13 20:07:25 +01:00
Idan Horowitz
135751c3a2 LibCompress: Implement GZip compression
This commit implements a stream compressor for the gzip
specification (RFC 1952), which is essentially a thin
wrapper around the DEFLATE compression format.
2021-03-13 20:07:25 +01:00
Idan Horowitz
02569bec11 test-compress: Add DEFLATE compression tests 2021-03-13 20:07:25 +01:00
Idan Horowitz
bcbfa7db62 LibCompress: Implement DEFLATE compression
This commit adds a fully functional DEFLATE compression
implementation that can be used to implement compression
for higher level formats like gzip, zlib or zip.

A large part of this commit is based on Hans Wennborg's
great article about the DEFLATE and zip specifications:
https://www.hanshq.net/zip.html
2021-03-13 20:07:25 +01:00
Idan Horowitz
168cf6fac9 AK: Implement minimum BinaryHeap
This enables efficient implementations of priority queues,
and will also be used in LibCompress for efficient huffman
tree generation.
2021-03-13 20:07:25 +01:00
Idan Horowitz
0ddc0e45ae AK: Add OutputBitStream class
This will be used in the deflate compressor.
2021-03-13 20:07:25 +01:00
AnotherTest
5a0ebdb109 LibLine: Treat DEL as backspace by default
This can come in handy when telneting in.
2021-03-13 19:34:25 +01:00
AnotherTest
745b0800be LibLine: Don't try to print chars larger than 63 in caret form
Instead, mask them as `\xbb` so that e.g. DEL becomes `\x7f`.
Fixes #5752.
2021-03-13 19:34:25 +01:00
Linus Groh
4b65ba27ec Terminal: Create config file parent directories before unveil()'ing
Otherwise unveil() will fail, as even with "c" permissions the file's
parent directory must exist.

Fixes #5651.
2021-03-13 18:48:37 +01:00
Linus Groh
5e4808878d Ports: Fix klong's package.sh 2021-03-13 13:35:24 +01:00
Linus Groh
15a820e9ad Ports: Use SERENITY_ARCH in .port_include.sh if already defined
Instead of always hardcoding i686, only use it as fallback value as we
already do in other scripts.
2021-03-13 13:13:03 +01:00
Linus Groh
4c497228a9 Ports: Use SERENITY_ARCH in --target/--host
Recent ports already do this, let's update the others as well. One step
closer to multi-arch support for ports! :^)
2021-03-13 13:13:03 +01:00
Linus Groh
7cb9237be9 Ports: Remove/replace hardcoded i686-pc-serenity-{gcc,g++,ar,ranlib}
Except in the Lua port's Makefile patch, I couldn't figure this out...
2021-03-13 13:13:03 +01:00
Linus Groh
f9cf6bfce1 Ports: Remove redundant 'workdir' entries 2021-03-13 13:13:03 +01:00
Linus Groh
37f837bde7 Ports: Replace hardcoded versions in 'files' URLs
Let's just use $version everywhere (we already do this for most ports).
2021-03-13 13:13:03 +01:00
Ben Wiederhake
81079ae616 AK: Fix some overflows/underflows that weren't properly handled
Based on #5699. Closes #5699.
2021-03-13 10:17:28 +01:00
Tom
8a8bdb2cd7 AK: Add decrement operator to Checked 2021-03-13 10:17:28 +01:00
Itamar
8688259ed9 LanguageServers/Cpp: Support jumping to declaration of preprocessor
.. definitions.
2021-03-13 10:17:02 +01:00
Itamar
7bf6eca9d8 LanguageServers/Cpp: Complete Preprocessor definitions
Preprocessor definitions now appear in the AutoComplete suggestions box
as well as in the Locator.
2021-03-13 10:17:02 +01:00
Itamar
5b22f6f45a LibCpp: Parser no longer holds the program's source
After we moved to storing the text of each token in the token itself,
we no longer have to store the source of the program in the Parser.

This makes more sense because the parser should deal with tokens, not
with raw source code.
2021-03-13 10:17:02 +01:00
Itamar
8a102fe3ec LibCpp: Implement Parser::text_in_range using text of tokens
It was previously implemented by directly iterating over the program's
source.
2021-03-13 10:17:02 +01:00
Itamar
97f2cd596b LibCpp: Remove node_span_size, add index_of_node_at 2021-03-13 10:17:02 +01:00
Itamar
26d9485562 LibCpp: Store the text of a token as a StringView member 2021-03-13 10:17:02 +01:00
Itamar
5cd1c69b96 LibCpp: Access Cpp::Token members via getter functions 2021-03-13 10:17:02 +01:00
Itamar
d0b4f9cc0e LibCpp: Move Cpp::Token to a separate file 2021-03-13 10:17:02 +01:00
Itamar
3658c4c567 LibCpp: Replace defined preprocessor values when parsing 2021-03-13 10:17:02 +01:00
Brendan Coles
f21af0922a QuickShow: Add help documentation 2021-03-13 10:00:59 +01:00
Hendiadyoin1
7f60090c43 Kernel: Add Test for munmap of multiple regions
Tests: Improve munmap-test

We now Unmap page aligned and check if the regions were really unmappped etc.

Tests: Cleanup Munmap-test

added a cleanup and removed a useless cast
2021-03-13 10:00:46 +01:00
Hendiadyoin1
eba3fa5e72 Kernel: Make munmap more posix compliant
In case someone tries to unmap a not mapped region (fallback) we should
not return an error, but silently do nothing
2021-03-13 10:00:46 +01:00
Hendiadyoin1
b7f1171a1c Kernel: munmap multiple regions at a time
This implements a fallback to munmap that unmaps multiple regions at a
time, with splitting some when needed.

The way it is implemented is possibly not optimal, due to it searching
without looking into the cache
2021-03-13 10:00:46 +01:00
Hendiadyoin1
61f0aa6e75 Kernel: Implement helper to find multiple Regions in a Range 2021-03-13 10:00:46 +01:00
Hendiadyoin1
7874b89426 Kernel: Add a Range::intersect(other) helper 2021-03-13 10:00:46 +01:00
Brendan Coles
7b22fb70a2 Terminal: Add support for fullscreen view 2021-03-13 09:55:11 +01:00
Liav A
793d315994 Kernel: Don't reset AHCI ports during boot unless requested
Instead of blindly resetting every AHCI port, let's just reset only the
controller by default. The user can still request to reset everything
with a new kernel boot argument called ahci_reset_mode which is set
by default to "controller", so the code will only invoke an HBA reset.

This kernel boot argument can be set to 3 different values:
1. "controller" - reset the HBA and skip resetting AHCI ports
2. "none" - don't reset anything, so we rely on the firmware to
initialize the AHCI HBA and ports for us.
3. "complete" - reset the AHCI HBA and ports.
2021-03-13 09:52:31 +01:00
Liav A
a93dc8c8c9 Kernel: Don't wait for AHCI port to reset the signature
Instead of waiting for the AHCI HBA to reset the signature after SATA
reset sequence, let's just check if the Port x Serial ATA Status
register was set to value 3, indicating that device was detected
and phy communication was established.
2021-03-13 09:52:31 +01:00
Liav A
2929dc6bd7 Kernel: Change the timings when initiating AHCI port reset
The intention is to make the boot to be faster, therefore we should
decrease the time deltas in timeout loops to allow earlier break
from these.

Also, there's no need to wait 10 milliseconds before setting
the interface state to "no action request" during the reset sequence.
2021-03-13 09:52:31 +01:00
Jean-Baptiste Boric
800dca3834 Kernel: Implement triply indirect block support in Ext2FSInode 2021-03-13 09:27:18 +01:00
Jean-Baptiste Boric
facd18113b Kernel: Modify block lists in place for Ext2FSInode::resize()
This significantly reduces the number of allocations/deallocations
inside the kernel when growing files as well as reducing spam in the
kernel logs.
2021-03-13 09:27:18 +01:00
Jean-Baptiste Boric
56ecb55d9f Userland: Create stress-truncate test program 2021-03-13 09:27:18 +01:00
Linus Groh
89602c6fc0 Meta: Support 'serenity.sh gdb lagom' 2021-03-12 21:27:09 +01:00
Linus Groh
eb5b2b4b4f Lagom: Add 'test' command to serenity.sh 2021-03-12 21:27:09 +01:00
Linus Groh
04fc4a8134 Meta: Make 'serenity.sh run lagom' run Lagom executables
Running the tests will be moved to a separate test command which can
then leverage the availability of different targets and run either unit
tests on the host or the image in QEMU in self-test mode. :^)
2021-03-12 21:27:09 +01:00
Linus Groh
1c85ce0324 Meta: Don't depend on toolchain for lagom target in serenity.sh
- Only call ensure_toolchain for non-lagom targets
- Use host addr2line, we can't expect the i686 toolchain's addr2line to
  support the host's binary executable format
- Don't export SERENITY_ARCH and TOOLCHAIN_DIR, don't need them anymore
2021-03-12 21:27:09 +01:00
Linus Groh
cab2982feb Meta: Add lagom_unsupported helper function to serenity.sh 2021-03-12 21:27:09 +01:00