Commit Graph

62278 Commits

Author SHA1 Message Date
Diego
cf7937e369 LibWasm: Make memory.fill fill with single bytes
Previously, `memory.fill` filled memory with 4-byte values, even though
`memory.fill` should fill with just one byte. Also fixes some other
issues with some of the bulk memory instructions, like `memory.init`.
2024-06-13 12:13:18 +02:00
Luke Warlow
ee64684565 LibWeb: Add Contrast preference 2024-06-13 11:18:38 +02:00
Hexeption
7ac6fd2746 LibWeb: Added HTMLLinkElement.as Tests 2024-06-13 07:58:11 +02:00
Hexeption
2f4668edce LibWeb: Added HTMLLinkElement.as 2024-06-13 07:58:11 +02:00
Timothy Flynn
4b3e26c583 LibJS+LibLocale: Replace calendar weekday information with ICU 2024-06-13 07:42:09 +02:00
Timothy Flynn
9cb1857dc6 LibJS+LibLocale: Replace preferred hour cycle lookups with ICU 2024-06-13 07:42:09 +02:00
Timothy Flynn
e2bffe5612 LibJS+LibLocale: Replace time zone display names with ICU 2024-06-13 07:42:09 +02:00
Timothy Flynn
273694d8de LibJS+LibLocale: Replace date-time formatting with ICU
This uses ICU for the Intl.DateTimeFormat `format` `formatToParts`,
`formatRange`, and `formatRangeToParts`.

This lets us remove most data from our date-time format generator. All
that remains are time zone data and locale week info, which are relied
upon still for other interfaces. So they will be removed in a future
patch.

Note: All of the changes to the test files in this patch are now aligned
with other browsers. This includes:

* Some very incorrect formatting of Japanese symbols. (Looking at the
  old results now, it's very obvious they were wrong.)
* Old FIXMEs regarding range formatting not including the start/end date
  when only time fields were requested, but the dates differ.
* Day period inconsistencies.
2024-06-13 07:42:09 +02:00
Tim Ledbetter
2f5cf8ac20 LibIDL+LibWeb: Mark [FIXME] interfaces as [[Unimplemented]]
Methods and attributes marked with [FIXME] are now implemented as
direct properties with the value `undefined` and are marked with the
[[Unimplemented]] attribute. This allows accesses to these properties
to be reported, while having no other side-effects.

This fixes an issue where [FIXME] methods broke feature detection on
some sites.
2024-06-11 16:33:30 +02:00
Tim Ledbetter
88d425f32b LibJS: Add the [[Unimplemented]] attribute
Properties marked with the [[Unimplemented]] attribute behave as normal
but invoke the `VM::on_unimplemented_property_access callback` when
they are accessed.
2024-06-11 16:33:30 +02:00
Tim Ledbetter
ebfb847d34 UI/Qt: Ensure we don't add the same zoom shortcut key more than once
On my system `QKeySequence::StandardKey::ZoomIn` includes both `Ctrl++`
and `Ctrl+=`, so explicitly adding the secondary `Ctrl+=` shortcut
ourselves results in an ambiguous shortcut error message being shown.

According to the Qt documentation the key bindings returned by
`QKeySequence::StandardKey::*` are platform specific, so we may still
need to add the secondary shortcut on some systems. Therefore, we now
check whether our secondary shortcut is already in the shortcut list
before adding it.
2024-06-11 09:19:01 -04:00
circl
990cf9b4e9 LibWeb: Use viewport position for did_enter_tooltip_area
This now matches the behavior of did_request_link_context_menu and
friends. Previously the coordinates relative to the page rather than
viewport were sent to the chrome.
2024-06-11 09:51:39 +02:00
Hugh Davenport
cb657a038f UI/Qt: Update placeholder text if search disabled
The placeholder text is there to prompt the user as to what could be
added in the address bar. The current text tells the user that they can
"Search or enter web address" even when the search setting is disabled.
When attempting to "Search" the user is instead sent to page ":", with
an error in the console:
    WebContent(575249): (FIXME) Don't know how to navigate to :

This patch fixes this by checking whether the search feature is enabled
and setting the placeholder appropriately. This provides a slightly
better user experience.

Closes #132
2024-06-11 09:50:46 +02:00
Timothy Flynn
54183b8eef UI/AppKit: Display query results on the find-in-page panel 2024-06-11 09:50:13 +02:00
Diego
40fcb00c14 LibWasm: Add missing spec-test imports 2024-06-11 02:43:55 +02:00
Diego
d20f1a99f8 LibWasm: Validate imports 2024-06-11 02:43:55 +02:00
Tim Ledbetter
1a4b042664 LibURL: Convert ASCII only URLs to lowercase during parsing
This fixes an issue where entering EXAMPLE.COM into the URL bar in the
browser would fail to load as expected.
2024-06-10 20:34:57 -04:00
Tim Ledbetter
fd98076aca Meta: Ensure LibURL tests are built 2024-06-10 20:34:57 -04:00
Tim Ledbetter
e9f34c7bd1 LibWebView: Don't query public suffix list when sanitizing URLs
Previously, part of the procedure we used to sanitize URLs entered via
the command line would check the host against the public suffix
database. This led to some valid, but not publicly accessible URLs
being treated as invalid.
2024-06-10 20:34:57 -04:00
Diego
94c2b85959 LibWasm: Validate that function and code sections match 2024-06-11 01:45:12 +02:00
Diego
67749300c3 LibWasm: Validate that data section exists for some instructions 2024-06-11 01:45:12 +02:00
Diego
a7b1a9ded7 LibWasm: Disallow multiple start sections 2024-06-11 01:45:12 +02:00
Diego
3d7c824607 LibWasm: Make sure no duplicate export names are possible 2024-06-11 01:45:12 +02:00
Diego
e64ac8c177 LibWasm: Validate number of data sections 2024-06-11 01:45:12 +02:00
circl
a9f3afc29b LibAudio: Remove support for Serenity's AudioServer 2024-06-10 13:53:01 +02:00
circl
c169e43e13 Userland: Remove some SerenityOS checks 2024-06-10 13:53:01 +02:00
circl
5d2095279d Meta: Remove references to SerenityOS in the gn build README 2024-06-10 13:53:01 +02:00
circl
4509d08dde Meta: Add BINDINGS_GENERATOR_DEBUG macro back to gn build 2024-06-10 13:53:01 +02:00
Timothy Flynn
3b68bb6e73 LibJS: Store Intl mathematical values as strings when appropriate
The IntlMV is meant to be arbitrarily precise. If the user provides a
string value to be formatted, we lose precision by converting extremely
large values to a double. We were never able to address this, as support
for arbitrary precision was a big FIXME. But ICU can handle it by just
passing the raw string on through.
2024-06-10 13:51:51 +02:00
Timothy Flynn
f6bee0f5a8 LibJS+LibLocale: Replace number range formatting with ICU
This uses ICU for the Intl.NumberFormat `formatRange` and
`formatRangeToParts` prototypes.

Note: All of the changes to the test files in this patch are now aligned
with both Chrome and Safari.
2024-06-10 13:51:51 +02:00
Timothy Flynn
67f3de2320 LibJS+LibLocale: Begin replacing number formatting with ICU
This uses ICU for the Intl.NumberFormat `format` and `formatToParts`
prototypes. It does not yet port the range formatter prototypes.

Most of the new code in LibLocale/NumberFormat is simply mapping from
ECMA-402 types to ICU types. Beyond that, the only algorithmic change is
that we have to mutate the output from ICU for `formatToParts` to match
what is expected by ECMA-402. This is explained in NumberFormat.cpp in
`flatten_partitions`.

This lets us remove most data from our number format generator. All that
remains are numbering system digits and symbols, which are relied upon
still for other interfaces (e.g. Intl.DateTimeFormat). So they will be
removed in a future patch.

Note: All of the changes to the test files in this patch are now aligned
with both Chrome and Safari.
2024-06-10 13:51:51 +02:00
Aliaksandr Kalenik
cbd566a354 LibWeb+WebContent: Move PageClient::paint() into TraversableNavigable
This way we leak less LibWeb implementation details into WebContent.
2024-06-10 14:30:20 +03:00
Aliaksandr Kalenik
c7133faf26 LibWeb: Rename Navigable::paint() to record_painting_commands()
This method does not paint, but only records painting commands that
could be passed to painting commands executor, which will perform
actual painting.
2024-06-10 14:30:20 +03:00
Timothy Flynn
28927d6a0f CI: Release only arm64 JS artifacts on macOS for now
Turns out vcpkg does not yet support Universal binaries. While they are
working on it, lets produce arm64 binaries only for now to unblock the
pipeline.
2024-06-09 22:20:15 -04:00
Kenneth Myhra
e70886595a LibWeb: Implement and wire up TransformStream's cancel callback 2024-06-09 21:27:26 -04:00
Kenneth Myhra
6d7885e250 LibWeb: Update steps for transform_stream_default_sink_abort_algorithm
Updating these steps enables the writable side of a TransformStream to
raise the cancel callback when it's aborted.
2024-06-09 21:27:26 -04:00
Kenneth Myhra
38142eaf53 LibWeb: Update cancel_algorithm steps in AO initialize_transform_stream 2024-06-09 21:27:26 -04:00
Kenneth Myhra
e848249b8d LibWeb: Implement AO transform_stream_default_source_cancel_algorithm 2024-06-09 21:27:26 -04:00
Kenneth Myhra
ff5be1fd36 LibWeb: Add internal slots [[cancelAlgorithm]] and [[finishPromise]]
This adds internal slots [[cancelAlgorithm]] and [[finishPromise]] to
TransformStreamDefaultController.
2024-06-09 21:27:26 -04:00
Kenneth Myhra
afb74eca52 LibWeb: Implement AO transform_stream_unblock_write 2024-06-09 21:27:26 -04:00
Kenneth Myhra
fc37bc328e Test/LibWeb: Add test to prove a ReadableStream can be cancelled 2024-06-09 21:27:26 -04:00
Kenneth Myhra
c51d01bea7 Fetch: Make sure we iterate over HeaderMap's headers()
This fixes a build failure when built with CMake option
'-DENABLE_ALL_THE_DEBUG_MACROS=ON'.
2024-06-09 21:13:25 -04:00
Tim Ledbetter
2ea680b5b3 UI/Qt: Display query results on find in page panel
The number of matches and current match index are now displayed to the
user when a find in page query is performed.
2024-06-09 21:12:33 -04:00
Tim Ledbetter
0a3203fa25 UI/Qt: Remove unused member variable from FindInPageWidget 2024-06-09 21:12:33 -04:00
Tim Ledbetter
d33c4c751f LibWeb+WebContent: Provide feedback on find in page requests
This change allows the results of a find in page query to be reported
back to the user interface. Currently, the number of results found and
the current match index are reported.
2024-06-09 21:12:33 -04:00
Alec Murphy
6957b87ac2 Documentation: Add missing required Fedora package
Same as with #117, this package is required for building on Fedora.
2024-06-09 21:05:50 -04:00
Matthew Olsson
37a5fedcd6 Documentation: Add missing required Arch package 2024-06-09 15:55:50 +01:00
Andreas Kling
260c5c50ad LibHTTP+RequestServer: Use HTTP::HeaderMap for request headers
No longer just for response headers! The same type is obviously useful
and ergonomic when making requests as well.
2024-06-09 15:34:02 +02:00
Andreas Kling
5ac0938859 LibHTTP+LibWeb: Stop bundling "Set-Cookie" headers as JSON
Before we had HTTP::HeaderMap (which preserves multiple headers with the
same name), we collected multiple "Set-Cookie" headers and bundled them
together as a JSON array.

This was a huge hack, and now we can stop doing that, since LibWeb gets
access to the full set of headers now.
2024-06-09 15:34:02 +02:00
Andreas Kling
e636851481 LibHTTP+RequestServer: Add HTTP::HeaderMap and use for response headers
Instead of using a HashMap<ByteString, ByteString, CaseInsensitive...>
everywhere, we now encapsulate this in a class.

Even better, the new class also allows keeping track of multiple headers
with the same name! This will make it possible for HTTP responses to
actually retain all their headers on the perilous journey from
RequestServer to LibWeb.
2024-06-09 15:34:02 +02:00