Commit Graph

60739 Commits

Author SHA1 Message Date
circl
c872fdd46d Base: Remove white pixels from warning icon
This is cleaner, and was likely the intended appearance.
2024-04-23 15:45:09 +02:00
Andreas Kling
184368285c LibWeb: Fix GC leaks in Fetch::Infrastructure::Body::fully_read()
By making this function accept the success and error steps as
HeapFunction rather than SafeFunction, we break a bunch of strong
GC cycles.
2024-04-23 12:50:40 +02:00
Andreas Kling
0c84508f87 LibJS: Fix GC leaks in promise reaction job setup
There's no need to capture things as Handle when using HeapFunction.
In this case, it was even creating a strong reference cycle, which ended
up leaking.
2024-04-23 12:50:40 +02:00
Aliaksandr Kalenik
a044e9cf4f LibWeb: Add background-clip: text support for InlinePaintable
Moves background mask calculation into `paint_background()` that is
shared between PaintableBox and InlinePaintable.
2024-04-23 12:50:07 +02:00
Tim Ledbetter
3aea14093f LibWeb: Don't crash if the document element is not visible
Previously, setting the `hidden` property on the `<html>` element would
cause a crash.
2024-04-23 11:17:54 +02:00
Aliaksandr Kalenik
dd73cccf8f LibWeb: Fire "scroll" events on DOM elements
Before this change "scroll" events were only fired on document but now
it happens for all elements with scrollable overflow.
2024-04-23 11:00:35 +02:00
Timothy Flynn
771054bff7 Ladybird: Slightly increase the size of the Task Manager window
This adds a bit more room to see most titles on one line.
2024-04-22 14:46:10 -06:00
Timothy Flynn
2851c05dee LibWebView: Display each tab's title in the Task Manager
This allows us to more easily differentiate between WebContent processes
in the Task Manager at a glance.
2024-04-22 14:46:10 -06:00
Timothy Flynn
2fc52657b6 LibWebView: Set a title on the Inspector and Task Manager views
These will be used to display the titles in the Task Manager window.
2024-04-22 14:46:10 -06:00
Timothy Flynn
d2bd692bbe Ladybird: Register RequestServer with the chrome's mach server on macOS
This ensures we register RequestServer with the appropriate mach server
name.
2024-04-22 14:46:10 -06:00
Timothy Flynn
b83babdf8b Ladybird: Register SQLServer with the task manager 2024-04-22 14:46:10 -06:00
Timothy Flynn
278fc8e57f Ladybird: Return a reference to the mach server name
Rather than a copy, return a reference so that it's a bit safer to use
the result as a StringView within the calling scope.
2024-04-22 14:46:10 -06:00
Timothy Flynn
c7ef8530bf LibWebView: Explicitly inititalize the ProcessHandle PID
Avoids UB if the PID is read from without otherwise being initialized.
2024-04-22 14:46:10 -06:00
Timothy Flynn
f16f89eb32 Ladybird+LibWebView: Move SQLServer launcher to Ladybird
It previously resided in LibWebView to hide the details of launching a
singleton process. That functionality now lives in LibCore. By moving
this to Ladybird, we will be able to register the process with the task
manager.
2024-04-22 14:46:10 -06:00
Timothy Flynn
76af4503c1 LibCore: Return the singleton process's PID along with its IPC client
The PID will be used for Ladybird's task manager.
2024-04-22 14:46:10 -06:00
Timothy Flynn
bf50881e61 LibCore+LibSQL+LibWebView: Move launching a singleton process to LibCore
This just moves the code to launch a single process such as SQLServer to
LibCore. This will allow re-using this feature for other processes, and
will allow moving the launching of SQLServer to Ladybird.
2024-04-22 14:46:10 -06:00
Timothy Flynn
5dd3b91f0e LibCore+LibWebView: Move process statistics to LibCore
This will be needed to collect statistics from processes that do not
have anything to do with LibWebView. The ProcessInfo structure must be
virtual to allow callers to add application-specific information.
2024-04-22 14:46:10 -06:00
Timothy Flynn
ac594fae5e Meta: Port recent changes to the GN build
376427380e
2024-04-22 14:46:10 -06:00
Daniel Bertalan
2f43b4ff15 Meta: Enable HVF acceleration on x86_64 macOS 2024-04-22 14:04:02 -06:00
Aliaksandr Kalenik
376427380e LibWeb: Make NavigationParams be GC-allocated
Fixes GC-leak caused by using JS::Handle for navigable.
2024-04-22 17:10:11 +02:00
Shannon Booth
5bf34ecc32 Ladybird: Add an option to enable internals object outside of test mode
Sometimes I like to play around with running Ladybird tests using full
blown Ladybird instead of just headless browser to interactively mess
around with the test page. One problem with this is that the internals
object is not exposed in this mode.

This commit supports this usecase by adding an option to specifically
expose the internals object without needing to run headless-browser
in test mode.
2024-04-22 08:10:08 +02:00
Shannon Booth
1ec6399c00 Everywhere: Remove uneeded short option argument where possible 2024-04-22 08:10:08 +02:00
Shannon Booth
88b343061e LibCore: Make short_name optional for ArgsParser
This allows us to not need to pass through a 0 in many cases for
options which do not support a short value.
2024-04-22 08:10:08 +02:00
Sam Atkins
59c79e848c LibWeb: Parse dimension values using TokenStream 2024-04-22 06:47:05 +02:00
Sam Atkins
efce563abd LibWeb: Parse identifier values using TokenStream 2024-04-22 06:47:05 +02:00
Sam Atkins
e8115d6a56 LibWeb: Parse transform values using the existing comma-parsing code
Also add a spec link and grammar comment.
2024-04-22 06:47:05 +02:00
Sam Atkins
e4e048f278 LibWeb: Parse color values using TokenStream 2024-04-22 06:47:05 +02:00
Sam Atkins
710e5c24d3 LibWeb: Parse string values using TokenStream 2024-04-22 06:47:05 +02:00
Sam Atkins
e42f052b00 LibWeb: Parse rect() values using TokenStream 2024-04-22 06:47:05 +02:00
Sam Atkins
e00f41a274 LibWeb: Parse URL values using TokenStream 2024-04-22 06:47:05 +02:00
Sam Atkins
cfa221944c LibWeb: Parse image values using TokenStream 2024-04-22 06:47:05 +02:00
Sam Atkins
384b18b271 LibWeb: Make parse_color_stop_list() a CSS Parser method
This lets us remove the color/dimension-parsing lambdas, since these
always forwarded to the same methods. This will make it easier to later
convert those methods to take a TokenStream.
2024-04-22 06:47:05 +02:00
Andreas Kling
8e56367092 LibWeb: Allow moving StyleSheets between documents without falling apart
We have to unregister link element stylesheets from the old document's
StyleSheetList when moving them into a new document.

This makes it possible to load GitHub contributor graphs. :^)
2024-04-22 06:43:05 +02:00
Sönke Holz
511e411def Kernel/riscv64: Implement Processor::read_cpu_counter
This simply reads the current cycle count from the cycle CSR.
x86-64 uses the similar rdtsc instruction here, which also may or may
not tick at a constant rate.
2024-04-21 13:37:32 -06:00
Sönke Holz
c57e39d52b Kernel/riscv64: Don't flush the entire TLB in Processor::flush_tlb_local 2024-04-21 13:37:06 -06:00
Dan Klishch
cf92efc497 LibELF: Get rid of DynamicLoader::m_cached_dynamic_object
The strategy of recreating an object for the second time after
DynamicLoader::map is interesting, of course, but it doesn't help
comprehensibility of the code, unfortunately.
2024-04-21 13:35:12 -06:00
Dan Klishch
c9a6bcf81d LibC+LibELF: Use AT_RANDOM ELF auxiliary vector for __stack_chk_guard
Kernel provided it for about 4 years at this point. I think it is about
time to finally use it in userspace.
2024-04-21 13:34:04 -06:00
Dan Klishch
bdfc77b725 LibELF: Treat STB_WEAK like STB_GLOBAL during global symbol lookup
This is what POSIX mandates and this also matches the behavior of modern
Linux.
2024-04-21 13:34:04 -06:00
Dan Klishch
d8119c4b4a LibLocale: Statically link LibLocaleData into LibLocale 2024-04-21 13:34:04 -06:00
Dan Klishch
932a722623 LibC+LibELF: Do not override existing weak symbols during magic lookup
Previously, the actual behavior of magic lookup and one described in its
commit description have not matched. Instead of being weak definitions
in a library that is always in the end of load order, the definitions
were normal ones and thus were able to override other weak definitions
in LibC. While this was consistent with how DynamicLoader resolves
ambiguity between normal and weak relocations, this is not the behavior
POSIX mandates -- we should always choose first available definition wrt
load order. To fix this problem, the patch makes sure we don't define
any of magic symbols in LibC.

In addition to this, it makes all provided magic symbols functions
(instead of objects), what renders MagicWeakSymbol class unnecessary.
2024-04-21 13:34:04 -06:00
Timothy Flynn
306041f4ac LibWebView: Do not update cookie access time when fetched with WebDriver
When WebDriver accesses cookies, it specifically says to run:

    the first step of the algorithm in RFC6265 to compute cookie-string

So we should skip subsequent steps. We already skip step 2, which sorts
the cookies, but neglected to skip step 3 to update their last access
time.
2024-04-21 14:46:54 -04:00
Andreas Kling
193fc7ef98 LibWeb: Allow cloneNode() to clone elements with weird attributes
We can't rely on Element.setAttribute() in cloneNode() since that will
throw on weird attribute names. Instead, just follow the spec and copy
attributes into cloned elements verbatim.

This fixes a crash when loading the "issues" tab on GitHub repos.
They are actually sending us unintentionally broken markup, but we
should still support cloning it. :^)
2024-04-21 19:51:24 +02:00
Andreas Kling
d94a6d8873 LibWeb: Avoid creating tons of temporary FlyStrings in HTMLParser 2024-04-21 19:32:49 +02:00
Andreas Kling
990f8e10a5 LibWeb: Avoid redundant UTF-8 validation in HTML tokenizer 2024-04-21 19:32:49 +02:00
Andreas Kling
df547bb321 LibUnicode: Avoid redundant UTF-8 validation in AK::String helpers 2024-04-21 19:32:49 +02:00
Andreas Kling
1068518bdf LibLocale: Use String::from_utf8_without_validation() in generated code
The unnecessary UTF-8 validation performed here was actually visible
while profiling navigation between pages on GitHub.
2024-04-21 19:32:49 +02:00
Andreas Kling
819f2c1df6 LibWeb: Don't redundantly re-sort StyleSheetList on sheet removal
The list is already kept sorted. Removing one sheet anywhere from the
list will not make it unsorted.
2024-04-21 19:32:49 +02:00
MacDue
9d8ab826cb LibWeb: Add an initial implementation of the SVG .getBBox() method
This just reuses the layout to compute the bounding box rather than
implementing the full bounding box algorithm, which is likely the slower
option, but also much simpler to implement.

This is enough to fix the faces on https://zengm.com/facesjs/.
2024-04-21 17:30:51 +02:00
Aliaksandr Kalenik
3c33e1eba9 LibWeb: Make ChangingNavigableContinuationState be GC-allocated
This struct is captured by `after_document_populated` callback so making
it be GC-allocated results in more understandable GC-graph.
2024-04-21 16:44:05 +02:00
Aliaksandr Kalenik
2f345c4ab5 LibWeb: Use HeapFunction for update_document callback 2024-04-21 16:44:05 +02:00