Commit graph

60519 commits

Author SHA1 Message Date
Space Meyer
bba94804c2 Kernel: Deduplicate backtrace printing 2024-04-15 21:16:22 -06:00
Space Meyer
a721e4d507 Kernel: Track KCOVInstance via Process instead of HashMap
While this clutters Process.cpp a tiny bit, I feel that it's worth it:
- 2x speed on the kcov_loop benchmark. Likely more during fuzzing.
- Overall code complexity is going down with this change.
- By reducing the code reachable from __sanitizer_cov_trace_pc code,
  we can now instrument more code.
2024-04-15 21:16:22 -06:00
Space Meyer
83020a48a8 Kernel: Add basic KCOV test and benchmark 2024-04-15 21:16:22 -06:00
Space Meyer
fdc0328ce3 Kernel: Exclude individual functions from coverage instrumentation
Sticking this to the function source has multiple benefits:
- We instrument more code, by not excluding entire files.
- NO_SANITIZE_COVERAGE can be used in Header files.
- Keeping the info with the source code, means if a function or
  file is moved around, the NO_SANITIZE_COVERAGE moves with it.
2024-04-15 21:16:22 -06:00
Space Meyer
ca89116a46 Kernel: Only build kcov object files, if feature is enabled 2024-04-15 21:16:22 -06:00
Space Meyer
106d4636a4 Revert "Kernel+SystemServer: Make KCOVDevice a character device"
This reverts commit 9dbec601b0.

For KCOV to be performant (or at least not even slower) we need to
mmap the PC buffer from both user and kernel space at the same time.
You can't mmap a character device, so this change didn't make sense.

Plus even if we did invent a new method to exfiltrate the coverage
information out of the kernel, it would be incompatible with existing
kernel fuzzers. That would be kind of annoying. 🙃
2024-04-15 21:16:22 -06:00
Space Meyer
f870841bee LibJS: Use toolchain agnostic NO_SANITIZE_ADDRESS 2024-04-15 21:16:22 -06:00
Space Meyer
7d8431dcfc AK: Toolchain dependend instrumentation __attribute__
GCC sometimes complains about the The `no_sanitize("address")` syntax,
and clang sometimes complains abouth the `no_sanitize_address` syntax.
Both claim to support both, so that's neat!
2024-04-15 21:16:22 -06:00
Space Meyer
8050ef24a6 Meta: Correct kaddr2line example in serenity.sh 2024-04-15 21:16:22 -06:00
Dan Klishch
50911e6f96 Utilities/w: Work around Clang 18 bug with templated lambda + Variant
This was missed in 6f972c1 since this file is not compiled as a part of 
a Lagom build.
2024-04-15 17:58:47 -06:00
Nico Weber
7296b0fa43 LibGfx/JPEG2000: Implement tag trees
A tag tree is a data structure used for deserializing JPEG2000
packet headers.

We don't use them for anything yet, except from tests.

The implementation feels a bit awkward to me, but we can always polish
it later.

The spec thankfully includes two concrete examples. The code is
correct enough to pass those -- I added them as test.
2024-04-16 00:40:16 +02:00
Tim Ledbetter
99b2eff988 LibWeb: Invalidate style when CSSStyleRule selectorText changes
Previously, any change to the selectorText of a CSSStyleRule was not
reflected in the document style.
2024-04-15 22:12:49 +02:00
Nico Weber
69fa1d1b6e LibGfx/WebP: Remove a bounds check that is never hit
No behavior change.
2024-04-15 15:53:52 +02:00
Nico Weber
04c6af7dfd LibGfx/WebP: Add two spec comments 2024-04-15 15:53:52 +02:00
Aryan Baburajan
def486305a SQLStudio: Port to GML Compilation 2024-04-15 14:01:13 +02:00
Aryan Baburajan
3336d00241 IncrementalSearchBanner: Port to GML compilation 2024-04-15 14:01:13 +02:00
Aryan Baburajan
b2587cb11b EmojiInputDialog: Port to GML compilation 2024-04-15 14:01:13 +02:00
Aryan Baburajan
d6ca054935 GMLCompiler: GML compile compatibility for ScrollableContainerWidget 2024-04-15 14:01:13 +02:00
Aryan Baburajan
72a5c8f3d8 TwentyFourtyEight: Port to GML compilation 2024-04-15 14:01:13 +02:00
Aryan Baburajan
1c75aa98b8 2048: Rename to TwentyFourtyEight for GML compatibility 2024-04-15 14:01:13 +02:00
Aryan Baburajan
342fb906cf MouseSettingsWidget: Port to GML compilation 2024-04-15 14:01:13 +02:00
Aryan Baburajan
03f4ec8032 MailSettingsWidget: Port to GML compilation 2024-04-15 14:01:13 +02:00
Aryan Baburajan
e488928509 FontPickerDialog: Port to GML compilation 2024-04-15 14:01:13 +02:00
Aryan Baburajan
3ab05dbbb9 FilePickerDialog: Port to GML compilation 2024-04-15 14:01:13 +02:00
Aryan Baburajan
ddbed25bb5 PasswordInputDialog: Port to GML compilation 2024-04-15 14:01:13 +02:00
Andreas Kling
24157e4d1b LibWeb: Only invalidate style/layout on mutation for connected DOM nodes
If a DOM node isn't connected, there's no need to invalidate, since it's
not going to be visible anyway. The node will be automatically inserted
if/when it becomes connected in the future.
2024-04-15 12:58:27 +02:00
Andreas Kling
2fbcaadef0 LibWeb: Don't schedule style/layout updates in detached documents
There's no need to do any kind of style or layout work in documents that
aren't attached to a browsing context.
2024-04-15 12:58:27 +02:00
Andreas Kling
d0076aaa24 LibWeb: Remove unnecessary Document::force_layout() API
The only remaining client of this API can simply not call it, and let
normal DOM layout invalidation happen.
2024-04-15 12:58:27 +02:00
Andreas Kling
c08ba8ac4c LibWeb: Fix new ImageData(width, height) when width != height 2024-04-15 11:27:34 +02:00
Andreas Kling
134c4b6335 LibWeb: Fix CRC2D.getImageData() when width != height
We were mistakenly using the width as both width and height when getting
ImageData from a 2D canvas.
2024-04-15 11:27:34 +02:00
Jamie Mansfield
e487f70bbf LibWeb: Support "importmap" scripts 2024-04-15 10:11:54 +02:00
Aliaksandr Kalenik
ccb363c443 LibWeb: Add hashchange event support 2024-04-15 01:02:51 -07:00
Aliaksandr Kalenik
efefd44a9f LibWeb: Navigate to changed url in Location::set_hash()
This step assumes copyURL is modified in place, while
`URL::Parser::basic_parse()` returns it as a result.

> 6. Basic URL parse input, with copyURL as url and fragment state as
  state override.

So copyURL has to be reassigned to navigate to new url on step 8:

> 8. Location-object navigate this to copyURL.
2024-04-15 01:02:51 -07:00
Andreas Kling
037b395b5d LibWeb: Try to parse WOFF and WOFF2 even if MIME type says otherwise
As it turns out, websites can lie about this, and it doesn't really cost
us much to try decoding as other formats before giving up.
2024-04-15 10:01:05 +02:00
Timothy Flynn
9c608b46fd LibWeb+LibWebView+WebContent: Remove now-unused history change IPC 2024-04-14 18:53:58 -07:00
Timothy Flynn
6eb2052d40 LibWebView: Remove now-unused history object 2024-04-14 18:53:58 -07:00
Timothy Flynn
e5c5dcca6a Ladybird/AppKit: Use LibWeb's history state for history navigation 2024-04-14 18:53:58 -07:00
Timothy Flynn
7cf8eabb82 Browser: Use LibWeb's history state for history navigation 2024-04-14 18:53:58 -07:00
Timothy Flynn
8e2b1a8a1d LibWebView: Update the stored URL when WebContent's URL changes 2024-04-14 18:53:58 -07:00
Timothy Flynn
7c54b15d6d Ladybird/Qt: Remove unused history-related includes 2024-04-14 18:53:58 -07:00
Andreas Kling
7f0920b0e9 LibWeb: Implement HTMLScriptElement.async 2024-04-14 22:08:22 +02:00
Andreas Kling
4cc972a8ae LibWeb: Stub out HTMLElement.outerText 2024-04-14 22:08:22 +02:00
Andreas Kling
e610346fab LibWeb: Minimally implement HTMLElement.inert and HTMLElement.accessKey
This commit adds attribute reflection but nothing else.
2024-04-14 22:08:22 +02:00
Andreas Kling
afea8ccd43 LibWeb: Stub out HTMLElement.accessKeyLabel 2024-04-14 22:08:22 +02:00
Andreas Kling
0b28a310b1 LibWeb: Stub out Element.scrollBy() 2024-04-14 22:08:22 +02:00
Andreas Kling
82f8b64017 LibWeb: Stub out Element.currentCSSZoom 2024-04-14 22:08:22 +02:00
Andreas Kling
20bdda7f02 LibWeb: Implement Element.removeAttributeNode() 2024-04-14 22:08:22 +02:00
Andreas Kling
f13bda60ba LibWeb: Tidy up Element.idl
- Reorder all the entries so their order match the corresponding specs.
- Add spec links for partial interfaces and mixins.
- Add FIXMEs for unimplemented APIs.
2024-04-14 22:08:22 +02:00
Andreas Kling
cf315338ec LibWeb: Don't draw image alt text frames with "rough" rect
This was an accident in 3645b676fb
2024-04-14 18:05:48 +02:00
Andreas Kling
217cb01708 LibGfx: Clip out-of-bounds pixel accesses in Painter::draw_rect() 2024-04-14 18:05:48 +02:00