Commit Graph

61374 Commits

Author SHA1 Message Date
Ali Mohammad Pur
def379ce3f LibCrypto: Move some data around earlier in GHash to make it go faster
This makes galois_multiply() about 10% faster.
2024-05-20 08:03:35 +02:00
Ali Mohammad Pur
57714fbb38 RequestServer: Handle IPC requests on multiple threads concurrently
Previously RS handled all the requests in an event loop, leading to
issues with connections being started in the middle of other connections
being started (and potentially blowing up the stack), ultimately causing
requests to be delayed because of other requests.
This commit reworks the way we handle these (specifically starting
connections) by first serialising the requests, and then performing them
in multiple threads concurrently; which yields a significant loading
performance and reliability increase.
2024-05-20 08:03:35 +02:00
Ali Mohammad Pur
4ef24e1c7c LibThreading: Add a ThreadPool 2024-05-20 08:03:35 +02:00
Ali Mohammad Pur
d277fd4679 LibThreading: Expose the ProtectedType alias 2024-05-20 08:03:35 +02:00
Ali Mohammad Pur
e003c0bf06 LibCore: Remove the spammy "too late for a reloading timer" debug log 2024-05-20 08:03:35 +02:00
Ali Mohammad Pur
96c7e83345 LibCore: Make Timers and Notifiers aware of threads
Previously sharing a Timer/Notifier between threads (or just handing
its ownership to another thread) lead to a crash as they are
thread-specific.
This commit makes it so we can handle mutation (i.e. just deletion
or unregistering) in a thread-safe and lockfree manner.
2024-05-20 08:03:35 +02:00
Ali Mohammad Pur
5cc90f848f LibThreading: Add RWLock and RWLockedProtected 2024-05-20 08:03:35 +02:00
Ali Mohammad Pur
06d522f017 LibTLS: Clear connected/error callbacks before leaving connect()
Otherwise error events will call into our setup code, eventually leading
to a UAF.
2024-05-20 08:03:35 +02:00
Ali Mohammad Pur
a362c37c8b LibCore: Add Core::deferred_invoke_if(F, Condition)
This will invoke the function F only if the provided Condition is met,
otherwise the execution of the function F will be further deferred.
2024-05-20 08:03:35 +02:00
Tim Ledbetter
68a1a78a1a LibWeb: Use FIXME extended attribute where possible 2024-05-19 17:35:25 +02:00
Tim Ledbetter
4d02bfc722 IDLGenerators: Add FIXME attribute support for non-readonly properties 2024-05-19 17:35:25 +02:00
Hendiadyoin1
d79347dd4a LibJS: Remove an old VERIFY from break handling in try-finally blocks
The VERIFY assumed that we either have a finally block which we already
visited through a previous boundary or have no finally block what so
ever; But since 301a1fc763 we propagate
finalizers through unwind scopes breaking that assumption.
2024-05-19 17:35:04 +02:00
Jamie Mansfield
3438293e7b LibWeb/Fetch: Share a conditional in fetch response handover
See:
- https://github.com/whatwg/fetch/commit/aaada1f
2024-05-19 16:25:50 +02:00
Jamie Mansfield
951fbb1837 LibWeb/Fetch: Expose a minimised Content-Type to Resource Timing
See:
- https://github.com/whatwg/fetch/commit/931cd06
2024-05-19 16:25:50 +02:00
Jamie Mansfield
08a3904309 LibWeb/MimeSniff: Implement "minimize a supported MIME type"
See:
- https://github.com/whatwg/mimesniff/commit/227a469
2024-05-19 16:25:50 +02:00
Jamie Mansfield
08e4cf1f3b LibWeb/Fetch: Implement Body::bytes()
See:
- https://github.com/whatwg/fetch/commit/1085f4f
2024-05-19 16:25:50 +02:00
Shannon Booth
4fe0cbcf85 LibWeb: Use 'FIXME' extended attribute where possible
This improves the debuggability of many live web pages :^)
2024-05-19 16:24:11 +02:00
Shannon Booth
7c69b4737b LibWeb: Add a 'FIXME' extended attribute for stubbed IDL attrs and fn's
This allows readonly attributes and functions to have a 'FIXME' extended
attribute added to the IDL definition to stub out the function. This
makes debugging web compatibility issues on live sites much easier as a
FIXME message is logged whenever one of these functions or attributes
are called.

Support still needs to be extended to non-readonly attributes (and some
other special cases), but this should allow us to set a big percentage
of the commented out attributes/functions in IDL files to instead use
this extended attribute.
2024-05-19 16:24:11 +02:00
Shannon Booth
a8e3400a2a LibWeb: Make DOMImplementation IDL return an XMLDocument
Which the implementation was already doing, so no behaviour change :^)
2024-05-19 16:24:11 +02:00
Shannon Booth
f7beea1397 LibWeb: Add stub for IDBFactory.open
I saw that this not being implemented was causing a javascript exception
to be thrown when loading https://profiler.firefox.com/.

I was hoping that like the last time that partially implementing this
interface would allow the page to load further, but it seems that this
is unfortunately not the case this time!

However, this may help other pages load slightly further, and puts some
of the scaffolding in place for a proper implementation :^)
2024-05-19 16:24:11 +02:00
Shannon Booth
3aa36caa52 LibWeb: Add stub interface for IDBOpenDBRequest 2024-05-19 16:24:11 +02:00
Shannon Booth
bfa330914d LibWeb: Add stub interface for IDBRequest 2024-05-19 16:24:11 +02:00
Shannon Booth
8d5665ebe1 LibWeb: Add stub for IDBFactory 2024-05-19 16:24:11 +02:00
Matthew Olsson
74aeb57631 LibWeb: Add a few missing visits to m_rel_list members 2024-05-19 09:26:30 +02:00
Shannon Booth
3ccbc83168 LibWeb: Add a stubbed slot for DynamicsCompressorNode.reduction
For now, this slot is always 0 - (the default value per spec). But
once we start actually processing audio streams this internal slot
should be changed correspondingly.
2024-05-19 09:26:20 +02:00
Shannon Booth
cf615cbd1c LibWeb: Add AudioParams for DynamicsCompressorNode 2024-05-19 09:26:20 +02:00
Shannon Booth
8fa7b2c173 LibWeb: Log a FIXME when parsing fragments for XML documents
This will help us in detecting potential web compatability issues from
not having this implemented.

While we're at it, update the spec link, as it was moved from the DOM
parsing spec to the HTML one, and implement this function in a manner
that closr resembles spec text.
2024-05-19 07:22:48 +02:00
Shannon Booth
ccdf82c9be LibWeb: Implement scrollIntoView with 'center' block position
This fixes a crash on:

https://docs.github.com/en/get-started/learning-about-github/githubs-plans
2024-05-19 07:22:17 +02:00
Shannon Booth
b3c8974718 LibWeb: Factor out IDL generator using namespace hack into a function
So that when we need add a new namespace in LibWeb we only have a single
place that needs to be changed.
2024-05-19 07:21:08 +02:00
Lucas CHOLLET
615d845ff2 LibGfx/GIF: Prefer local tables over a global one
Let's use local tables so every frame can use its own table.
2024-05-19 07:20:15 +02:00
Lucas CHOLLET
f21a4111d2 LibGfx/GIF: Rename write_global_color_table => write_color_table
Local and Global tables are the exact same thing from an encoding
perspective.
2024-05-19 07:20:15 +02:00
Shannon Booth
dd20156010 LibWeb: Fix division by zero on a zero-height viewport SVG image 2024-05-19 07:19:42 +02:00
Shannon Booth
d48316ce15 LibWeb: Fix division by zero on a zero-width viewport SVG image
We were previously crashing by a division by zero due to an aspect ratio
of zero on https://comicbookshop.co.nz/
2024-05-19 07:19:42 +02:00
Dan Klishch
be36dbce7d AK: Don't put element count next to heap-allocated data in FixedArray
This not only makes code easier to follow but also makes it faster.
2024-05-18 18:30:42 +02:00
Lucas CHOLLET
a0401b0d86 LibGfx/GIF: Add support for colors
To determine the palette of colors we use the median cut algorithm.
While being a correct implementation, enhancements are obviously
existing on both the median cut algorithm and the encoding side.
2024-05-18 18:30:07 +02:00
Lucas CHOLLET
1ba8a6f80f LibGfx: Add an implementation of the MedianCut algorithm
This is useful to find the best matching color palette from an existing
bitmap. It can be used in PixelPaint but also in encoders of old image
formats that only support indexed colors e.g. GIF.
2024-05-18 18:30:07 +02:00
Lucas CHOLLET
c6e4563489 AK: Export Statistics to the global namespace 2024-05-18 18:30:07 +02:00
Lucas CHOLLET
02e682950e LibGfx: Make Color hashable 2024-05-18 18:30:07 +02:00
Tim Ledbetter
272cd30f17 LibWeb: Add missing visit to m_labels in HTMLElement 2024-05-18 18:29:52 +02:00
Tim Ledbetter
c36ba450be LibWeb: Generate binding for HTMLObjectElement.contentWindow attribute
This only required adding the appropriate definition to the IDL file,
as `NavigableContainer` already implements the logic that we need.
2024-05-18 18:12:08 +02:00
Andreas Kling
b2e6843055 LibJS+AK: Fix integer overflow UB on (any Int32 - -2147483648)
It wasn't safe to use addition_would_overflow(a, -b) to check if
subtraction (a - b) would overflow, since it doesn't cover this case.

I don't know why we didn't have subtraction_would_overflow(), so this
patch adds it. :^)
2024-05-18 18:11:50 +02:00
Hendiadyoin1
1de475b404 LibJS: Prepare yield object before re-routing it through finally 2024-05-18 18:11:10 +02:00
Tim Ledbetter
2447a25753 LibWeb: Implement the labels attribute for all labelable elements
This returns a `NodeList` of all the labels associated with the given
element.
2024-05-18 18:09:18 +02:00
Tim Ledbetter
3dc86747f0 LibWeb: Implement the HTMLOutputElement.htmlFor attribute
This returns a DOMTokenList that reflects the `for` attribute.
2024-05-18 11:23:20 +02:00
Tim Ledbetter
acc1fa3c62 LibWeb: Generate binding for the HTMLObjectElement.form attribute
This only required adding the appropriate definition to the IDL file,
as `FormAssociatedElement` already implements the logic that we need.
2024-05-18 11:04:04 +02:00
Tim Ledbetter
6bf22075ed LibWeb: Implement the HTMLLabelElement.form attribute
This returns the form element associated with the given label element's
control or null if the label has no control.
2024-05-18 11:04:04 +02:00
Tim Ledbetter
5296338e7a LibWeb: Check all elements in same tree to determine labeled control
Previously, when looking for the labeled control of a label element, we
were only checking its child elements. The specification says we should
check all elements in the same tree as the label element.
2024-05-18 11:04:04 +02:00
Tim Ledbetter
fc395716e9 LibWeb: Return NonnullGCPtr<DOMTokenList> from relList getters 2024-05-18 11:03:49 +02:00
Timothy Flynn
b4af851c74 Meta: Update gcc version requirement to 13+
The project can no longer be compiled with gcc-12.
2024-05-17 15:40:07 -06:00
Timothy Flynn
688599af57 Meta: Update check for clang's major version
We require clang-17 as of 76df5ae030, but
this check was not updated.
2024-05-17 15:40:07 -06:00