Commit Graph

33871 Commits

Author SHA1 Message Date
Ali Mohammad Pur
63b4c35ec7 WebSocket: Pledge rpath and unveil /etc/timezone
This is required for timezone stuff, otherwise we'd just crash.
2022-02-06 13:10:10 +01:00
Ali Mohammad Pur
6f5ab30253 LibTLS: Remove some unused/unimplemented declarations 2022-02-06 13:10:10 +01:00
Ali Mohammad Pur
aafc451016 Userland: Convert TLS::TLSv12 to a Core::Stream::Socket
This commit converts TLS::TLSv12 to a Core::Stream object, and in the
process allows TLS to now wrap other Core::Stream::Socket objects.
As a large part of LibHTTP and LibGemini depend on LibTLS's interface,
this also converts those to support Core::Stream, which leads to a
simplification of LibHTTP (as there's no need to care about the
underlying socket type anymore).
Note that RequestServer now controls the TLS socket options, which is a
better place anyway, as RS is the first receiver of the user-requested
options (though this is currently not particularly useful).
2022-02-06 13:10:10 +01:00
Ali Mohammad Pur
7a95c451a3 LibCore: Stop buffering when a zero-size slice is read regardless of EOF
The meaning of EOF depends on the underlying socket, but an empty slice
should terminate the buffering (otherwise we'd just spin forever).
2022-02-06 13:10:10 +01:00
Ali Mohammad Pur
9ee5107871 LibCore: Rewrite BufferedStream::read_until_any_of() with memmem
This function used to sometimes return the entire input instead of the
value up to the delimiter, fix that and rewrite it to be a bit more
readable.
2022-02-06 13:10:10 +01:00
Ali Mohammad Pur
f4d841077d LibCore: Make sure BufferedSocket takes the buffer into account
pending_bytes() and can_read_without_blocking() should also take
the buffered data into account, otherwise we'll end up pretending that
the socket cannot be read from while it has buffered data.
2022-02-06 13:10:10 +01:00
Ali Mohammad Pur
33a4048f55 LibCore: Add Core::Stream::Socket::set_notifications_enabled()
This is equivalent to Core::Socket::set_notifications_enabled(), and
serves to disable the on_ready_to_read() notifications, as the sockets
often implement these using the event loop, this method can help avoid
waking the event loop and spamming useless calls to on_ready_to_read().
2022-02-06 13:10:10 +01:00
Ali Mohammad Pur
07f444439c LibCore: Take StringViews by value in Stream::* function arguments 2022-02-06 13:10:10 +01:00
Ali Mohammad Pur
8a1dfbd484 LibCore: Add a pure virtual parent to Core::Stream::BufferedSocket<T>
And declare a few of the stream classes in the forwarding header.
2022-02-06 13:10:10 +01:00
Ali Mohammad Pur
9cf1c382df AK: Replace 'consteval' with 'constexpr' in some Variant helpers
CLion and/or clangd didn't like the consteval and highlighted visit() as
an error, just replace it with constexpr as it makes no difference here.
2022-02-06 13:10:10 +01:00
sin-ack
04d68117c2 LibCore: Remove Core::LocalSocket :^) 2022-02-06 10:28:19 +01:00
sin-ack
0249c92313 LibCore: Use Core::Stream::LocalSocket in InspectorServerConnection 2022-02-06 10:28:19 +01:00
sin-ack
f823648bae LibCore: Use SystemServerTakeover functionality in LocalServer
This removes the duplicate code in
LocalServer::take_over_from_system_server and replaces it with
Core::take_over_accepted_socket_from_system_server.
2022-02-06 10:28:19 +01:00
sin-ack
259ed04087 LibCore: Implement LocalSocket::release_fd
release_fd() releases the fd associated with the LocalSocket it is
called on. This is analogous to release_value() on container objects in
AK, after which the object does not contain the value.
2022-02-06 10:28:19 +01:00
sin-ack
89d9a1afc0 LibCore+LibIPC: Move SystemServerTakeover.{h,cpp} to LibCore
This functionality is required by Core::LocalServer and LibIPC depends
on LibCore.

take_over_accepted_socket_from_system_server has also been renamed to
take_over_socket_from_system_server as the socket need not be accepted
before taking it over. :^)
2022-02-06 10:28:19 +01:00
Matthias-Sleurink
032ffbcf64 PixelPaint: Don't overwrite images with project file on save
The ImageEditor tracks whether it was loaded from an image
(the alternative being a project file.) If it was loaded from an image
file we redirect save project actions to save as instead.
2022-02-06 07:22:57 +00:00
BodgeMaster
e74e6087b0 Ports: Update nano to version 6.0
This is just a bump of the version number in a couple places.
Tested to work.
2022-02-06 07:16:59 +00:00
BodgeMaster
d49a516366 Ports: Update wget to version 1.21.2
This is another one where I just changed the version number and it
worked.
2022-02-06 03:20:25 +00:00
Morten Larsen
951e4490fb LibGfx: Avoid inclusion of xmmintrin.h on non-X86 architectures
Gamma.h includes xmmintrin.h, which is X86-only. The file contains
code in other places that is compiled conditionally on __SSE__, so the
same macro is used to determine inclusion of the header.
2022-02-06 03:15:00 +00:00
Morten Larsen
2c3b297895 Lagom: Exclude libraries with X86 code when building for macOS on Arm
The CMakeLists.txt for Lagom contains a few libraries and executables
with X86-specific code. By excluding those libraries, Lagom builds
for macOS on Arm as well. The places are marked FIXME to be removed
when the libraries will build for Arm.
2022-02-06 03:15:00 +00:00
Andreas Kling
d30cbf5d72 LibWeb: Remove unnecessary check for 0-sized fragments in InlineNode
We should no longer be generating empty fragments at the start and end
of an InlineNode, so we can drop this check.
2022-02-06 02:15:59 +01:00
Andreas Kling
3ad08a932c LibWeb: Only compute containing block rect once in InlineNode::paint() 2022-02-06 02:15:49 +01:00
Andreas Kling
04539d4930 Kernel: Propagate sys$profiling_enable() buffer allocation failure
Caught a kernel panic when enabling profiling of all threads when there
was very little memory available.
2022-02-06 01:25:32 +01:00
Andreas Kling
c1c5444c14 LibWeb: Make window.inner{Width,Height} return *viewport* size
These were incorrectly returning the content width and height of the
initial containing block. Also added spec links and comments.
2022-02-06 01:12:57 +01:00
Andreas Kling
0608de8c12 LibWeb: Rename Layout::Box::size() to content_size()
This property represents the CSS content size, so let's reduce ambiguity
by using the spec terminology.

We also bring a bunch of related functions along for the ride.
2022-02-06 01:07:47 +01:00
Andreas Kling
dbe5af3c6f LibWeb: Keep tree order of sibling stacking contexts with same z-index 2022-02-05 22:50:39 +01:00
Andreas Kling
270aa9e5d0 Browser: Add Debug menu action for dumping the stacking context tree 2022-02-05 22:50:39 +01:00
Andreas Kling
e2c71b6725 LibWeb: Add a partial implementation of Element.setAttributeNS()
This implementation does some of the required validation and then passes
through the localName and value to Element.setAttribute().
2022-02-05 22:50:39 +01:00
Andreas Kling
2518f2045e LibJS: Explicitly initialize primitive IndexedPropertyIterator members 2022-02-05 22:50:39 +01:00
Andreas Kling
0d60cf211d LibJS: Cache valid indices in IndexedPropertyIterator
Refetching the list of indices every time we increment the iterator was
showing up hot & heavy in a profile of Discord.
2022-02-05 22:50:39 +01:00
Andreas Kling
483dce9750 LibWeb: Put ClassicScript debug spam behind HTML_SCRIPT_DEBUG 2022-02-05 22:50:39 +01:00
Andreas Kling
ad2180ba6c LibWeb: Put CSS parser debug spam behind CSS_PARSER_DEBUG 2022-02-05 22:50:39 +01:00
Andreas Kling
23795738fb Browser: Don't log every content filter string when loaded 2022-02-05 22:50:39 +01:00
Andreas Kling
1d411a46c1 Kernel: Put kmalloc heap expansion debug spam behind KMALLOC_DEBUG 2022-02-05 22:50:39 +01:00
Andreas Kling
04bec7a4f5 LibWeb: Remove CSS::StyleInvalidator in favor of dirtying + lazy update
Style updates are lazy since late last year, so the StyleInvalidator is
actually hurting us more than it's helping by running the entire CSS
selector machine on the whole DOM for every attribute change.

Instead, simply mark the entire DOM dirty and let the lazy style update
mechanism run *once* on next event loop iteration.
2022-02-05 22:50:39 +01:00
Andreas Kling
e6f279dada LibWeb: Implement CanvasGradient.addColorStop() according to spec
The object is still not usable for anything, but at least now it behaves
correctly with regards to throwing exceptions.
2022-02-05 22:50:39 +01:00
Andreas Kling
7e1bf4d300 LibWeb: Compute element style in Layout::TreeBuilder
Instead of making each Layout::Node compute style for itself, we now
compute it in TreeBuilder before even calling create_layout_node().

For non-element DOM nodes, we create the style and layout tree node
in TreeBuilder. This allows us to move create_layout_node() from
DOM::Node to DOM::Element.
2022-02-05 22:50:39 +01:00
Maciej
3451673ac8 Base: Add missing HiDPI versions of cursors
Note: The "hidden" cursor must be 2x upscaled because LibGfx would
fail loading HiDPI images with size not divisible by scale.
2022-02-05 23:28:06 +02:00
Maciej
c8183f2651 LibGfx: Fail gracefully when trying to load invalid-sized HiDPI image 2022-02-05 23:28:06 +02:00
Lady Gegga
592a51855c Base: Add Old Turkic to font Katica Regular 10
10C00-10C48 https://www.unicode.org/charts/PDF/U10C00.pdf
2022-02-05 21:15:45 +00:00
Lady Gegga
e91d84ba79 Base: Add Old North Arabian to font Katica Regular 10
10A80-10A9F https://www.unicode.org/charts/PDF/U10A80.pdf
2022-02-05 21:15:45 +00:00
Lady Gegga
4952da0663 Base: Add Avestan to font Katica Regular 10
10B00-10B3F https://www.unicode.org/charts/PDF/U10B00.pdf
2022-02-05 21:15:45 +00:00
Lady Gegga
fb4ed428d4 Base: Add 10CD1B-10CD1D, 10CD68 emojis to PUA codepoints
10CD1B (Angelyak), 10CD1C (Yak), 10CD1D (Yakgone), 10CD69 (Yakbane)
2022-02-05 21:15:45 +00:00
Jason
cdcf097aa8 FileManager: Add an animation for deleting files 2022-02-05 19:57:45 +00:00
Ali Mohammad Pur
e53117a9b9 Base: Add a quote to the fortunes database 2022-02-05 19:37:42 +00:00
Στέφανος
43d706a29e Meta: Fix problematic e2fsck behavior (Debian)
Under Debian `e2fsck` is found in `/sbin/` which does not match the
existing "version" the script currently uses (`/usr/sbin/e2fsck`
versus `/sbin/e2fsck`); therefore I added a simple `if` condition to
remedy the situation by verifying whether the original path exists or
not, so I can use the one Debian expects.

Special thanks goes to Tim Flynn a.k.a. `trflynn89` for his valuable
feedback.
2022-02-05 19:34:40 +00:00
Timothy Flynn
2212aa2388 LibRegex: Support non-ASCII whitespace characters when matching \s or \S
ECMA-262 defines \s as:

    Return the CharSet containing all characters corresponding to a code
    point on the right-hand side of the WhiteSpace or LineTerminator
    productions.

The LineTerminator production is simply: U+000A, U+000D, U+2028, or
U+2029. Unfortunately there isn't a Unicode property that covers just
those code points.

The WhiteSpace production is: U+0009, U+000B, U+000C, U+FEFF, or any
code point with the Space_Separator general category.

If the Unicode generators are disabled, this will fall back to ASCII
space code points.
2022-02-05 22:30:10 +03:30
Liav A
54845c4bf2 AK: Remove commented-out code from Bitmap container
Instead, add a note to explain that there's a const variant of data()
method in the parent BitmapView class.
2022-02-05 18:14:12 +00:00
Liav A
b9f9cbb12c Kernel/Interrupts: Remove stale MSIHandler class
When we implement MSI support, we can rely on the IRQHandler class for
installing IRQ handlers at the right location.
2022-02-05 18:13:02 +00:00
Sam Atkins
24c4d7a842 Utilities/run-tests: Add command-line switch to also run "skipped" tests
Among other things, this lets you run flaky tests to check if they are
still flaky. :^)

This is done in two ways: It makes should_skip_test() always return
false; and skips reading and generating the skipped-tests lists since
we won't use them.
2022-02-05 18:12:19 +00:00