Commit graph

64831 commits

Author SHA1 Message Date
Timothy Flynn
35639ebc77 Meta: Update libpng to version 1.6.43#3
This is a fix to the vcpkg package itself to fix some exported symbols.
2024-11-06 10:38:57 -07:00
Timothy Flynn
3d200296e3 Meta: Update vcpkg to the October 2024 release 2024-11-06 10:38:57 -07:00
Aliaksandr Kalenik
2a29e348c9 LibWeb: Delete EditableTextNodeOwner
It's no longer needed after FormAssociatedTextControlElement became
responsible for managing input events for text controls.
2024-11-06 18:05:11 +01:00
Timothy Flynn
34c0303ae1 Revert "LibWeb: Make WebDriver's script executor public"
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
This reverts commit e41c668435.
2024-11-06 08:42:17 -05:00
Timothy Flynn
94a0f36b3e Revert "WebContent: Restore ability to use Inspector accessors like $0"
This reverts commit ae1c58fad1.
2024-11-06 08:42:17 -05:00
Timothy Flynn
d40b7d67b1 Revert "LibJS+LibWeb: Remove now-unused lexical environment override"
This reverts commit d39f6975f9.
2024-11-06 08:42:17 -05:00
Sam Atkins
b09b23a162 LibWeb/CSS: Avoid double promotion in CSSColorValue code
Co-authored-by: Nico Weber <thakis@chromium.org>
2024-11-06 11:48:48 +00:00
Piotr
06154b87dd LibWeb: Support for "content-language" http-equiv state
Implemented support for setting the pragma-set default language in the
`<meta/>` tag with an `http-equiv` attribute `content-language`.
2024-11-06 10:56:57 +01:00
Timothy Flynn
413cf6b329 LibWeb+LibWebView+WebContent: Remove unused back/forward navigation IPCs 2024-11-06 10:54:17 +01:00
Timothy Flynn
1a8a3979f9 WebContent: Implement the WebDriver Forward endpoint according spec 2024-11-06 10:54:17 +01:00
Timothy Flynn
d867cd26c4 WebContent: Implement the WebDriver Back endpoint according spec 2024-11-06 10:54:17 +01:00
Timothy Flynn
d4966bc2d8 LibWeb: Add a document observer for pageHide/pageShow events
WebDriver will need to "block" until a pageShow event occurs in some
cases.
2024-11-06 10:54:17 +01:00
Timothy Flynn
3afd88330b WebContent: Handle user prompts in the Take Screenshot endpoint
This is a spec issue, and WPT relies on this behavior.
2024-11-06 10:50:33 +01:00
Timothy Flynn
f4111ef1e1 LibWeb: Implement pausing the event loop a bit closer to the spec
Namely, this is to update the rendering before pausing the event loop.
2024-11-06 10:50:33 +01:00
Andreas Kling
5431db8c1c LibWeb: Avoid unnecessary style recomputation during traversal
While traversing the DOM tree, looking for nodes that need a style
update, we were recomputing style for every node visited along the way,
even nodes that didn't themselves need a style update (but one of their
descendants did).

This avoids a bunch of completely unnecessary style recomputation on
basically every website.
2024-11-06 10:49:32 +01:00
Jonne Ransijn
0de9818470 LibWeb: Remove most of the copying of CSS::Parser::ComponentValue
This class was being copied all over the place, however, most of these
cases can be easily prevented with `auto const&` or `NonnullRawPtr<>`.

It also didn't have a move constructor, causing `Vector` to copy on
every resize as well.

Removing all these copies results in an almost 15% increase in
performance for CSS parsing, as measured with callgrind.
2024-11-06 09:43:15 +00:00
Jonne Ransijn
e50b9f5478 AK: Add NonnullRawPtr<T> abstraction
It is a non-null `T*` with reference semantics.
Or a `T&` whose address can be copied and re-assigned.
Or a `NonnullRefPtr` whose memory is not managed.

It can be useful when you want to store a reference in a
data structure that needs to be copyable or assignable.
2024-11-06 09:43:15 +00:00
Jonne Ransijn
90b2142658 LibWeb: Make CSS::Parser::ComponentValue immutable
`ComponentValue` instances are never mutated, so let's make them
immutable to indicate that they could potentially be cached in the
future.
2024-11-06 09:43:15 +00:00
Jonne Ransijn
138135e0e6 LibWeb: Fix accidental copy in ComponentValue constructors
These values were being copied, despite being passed in as r-value
references.
2024-11-06 09:43:15 +00:00
Hermes Junior
5dabd468ed LibWeb: Fix out-of-bound crash when there's more table cells than cols
Added a getter to ensure we are within a valid range.
This behavior is accepted by other browsers,
and crashed on some pages.
2024-11-06 09:36:33 +00:00
Gingeh
cd5d8f4d95 LibWeb: Handle steps(x, start) like steps(x, jump-start) 2024-11-06 09:27:53 +00:00
Pavel Shliak
672590c360 Tests: Remove duplicated test for FloatingPointParsing 2024-11-06 09:22:44 +00:00
Pavel Shliak
5fe1d38955 Tests: Remove duplicated test for UnicodeCharacterTypes 2024-11-06 09:22:44 +00:00
Pavel Shliak
cf5521ec68 Tests: Remove duplicated test for StringView 2024-11-06 09:22:44 +00:00
Gingeh
453e034801 LibXML: Read code points when parsing names 2024-11-06 10:07:52 +01:00
Aliaksandr Kalenik
42b31820a6 LibWeb: Use UTF-16 code units length in CharacterData::replace_data()
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
Range API uses UTF-16 code units to represent offsets, so replace_data()
needs to use it instead of bytes count while calculating new offsets.

Fixes incorrectly thrown exception when non-latin string is passed into
replace_data().
2024-11-06 05:46:30 +00:00
Tim Schumacher
f7dfe03cf6 Meta: Step down myself from maintainers
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Build Dev Container Image / build (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
2024-11-05 20:04:13 +01:00
Timothy Flynn
185255efc3 WebContent: Close top-level traversables asynchronously
The spec is a bit out-of-date here, so this works around an issue with
closing top-level traversables while a dialog is open in another window
within the same agent.
2024-11-05 10:58:34 -07:00
Timothy Flynn
4c61ce5b10 WebDriver: Don't remove windows if attempting to close the window failed
For example, if a dialog is open and the session is configured to ignore
dialogs (instead of automatically closing them), then the Close Window
endpoint will have failed. We can't remove the client-side window handle
in that case.
2024-11-05 10:58:34 -07:00
Timothy Flynn
7f4d2ef0d6 WebDriver: Pass capability-related options along to new windows 2024-11-05 10:58:34 -07:00
Timothy Flynn
d66b54fec5 WebContent+WebDriver: Transfer WebDriver capability init to Session
Capabilities are configured on a per-session basis, but we were only
applying these options to the first WebContent process created. We will
need to pass these options to new windows created from that process.
This patch re-organizes capability processing so that our session can
remember them for new windows.
2024-11-05 10:58:34 -07:00
Sam Atkins
f5d67cefc1 Tests: Import a couple of CSS nesting tests from WPT
This is partly to check that importing ref tests works, and that I
didn't break the text-test import.
2024-11-05 17:58:16 +00:00
Sam Atkins
7a5b38d577 Meta: Support importing WPT reference tests 2024-11-05 17:58:16 +00:00
Shannon Booth
9598ed1d17 LibWeb: Hook up the HostInitializeShadowRealm callback
This is enough for a basic shadow realm to work :^)

There is more that we still need to implement here such as module
loading and fixing up the global object, but this is enough to get some
basic usage working.
2024-11-05 10:43:08 -07:00
Shannon Booth
b24cd3ecf6 LibWeb: Wire up synthetic realm to settings object and execution context 2024-11-05 10:43:08 -07:00
Shannon Booth
c69a9812c8 LibWeb: Introduce the 'ShadowRealmGlobalScope' interface
This object represents the global object for a shadow realm. The IDL
generator will need to be adjusted to the '[Global]' extended attribute
and no '[Exposed]' field (the change in the test is not correct, as I
understand it), but this should be enough to get us started on
shadow realms.
2024-11-05 10:43:08 -07:00
Shannon Booth
b105c06824 LibWeb: Introduce a SyntheticHostDefined class
This class is the host defined field of a synthetic realm created as
part of a shadow realm.
2024-11-05 10:43:08 -07:00
Shannon Booth
5154df020b LibWeb: Rename Bindings::HostDefined to Bindings::PrincipalHostDefined
With the introduction of shadow realms, there will be two different
possible host defined objects. For clarity, rename the existing host
defined object to PrincipalHostDefined.
2024-11-05 10:43:08 -07:00
stasoid
16ab3c5f9d LibCore: Port DirIterator to Windows using vcpkg dirent.h 2024-11-05 10:42:44 -07:00
stasoid
cf198d0d60 Partially revert "LibCore: Add Windows version of DirIterator"
This reverts commit d92a96c40a, but
keeps changes to AK/Error{.h,.cpp} (function Error::from_windows_error)
2024-11-05 10:42:44 -07:00
Aliaksandr Kalenik
75e26af117 Tests/LibWeb: Import css grid alignment tests from WPT 2024-11-05 17:44:08 +01:00
Aliaksandr Kalenik
3833049fc8 Meta+Tests: Substitute Ahem font path in import-wpt-test.py 2024-11-05 17:44:08 +01:00
Sam Atkins
b7efb61fbe Tests/LibWeb: Restructure Ref and Screenshot test dirs to match others
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
Now each test type has the same directories:
- input
- expected
- data

Also, tests can be in subdirectories within ./input.
2024-11-05 14:02:07 +00:00
Sam Atkins
08253d6aee Tests/LibWeb: Move assets used by multiple test types into Assets/
Having to go through multiple levels of .. is not ideal, but less odd
than reaching into another test type's data files.
2024-11-05 14:02:07 +00:00
Gingeh
57ba720fb1 AK: Avoid returning null StringViews instead of empty views
This was error-prone and most users were just checking the length anyway
2024-11-05 14:01:45 +00:00
Gingeh
a4b38dda56 LibWeb: Use substrings instead of pointers when parsing unicode ranges
Fixes a segfault when parsing a wildcard-only unicode range
2024-11-05 14:01:45 +00:00
Andreas Kling
ceedfb34d2 LibWeb: Look at both namespace & tag name in HTML parser stack checks
We were neglecting to check the namespace when looking for a specific
type of element on the stack of open elements in many cases.

This caused us to confuse HTML and SVG elements.
2024-11-05 12:29:27 +01:00
Andreas Kling
7d7f8f1b48 LibWeb: Remove outdated FIXME in "in body" insertion mode
We are actually setting `onlyAddToElementStack` here. :^)
2024-11-05 12:29:27 +01:00
Andreas Kling
49b88fc095 LibWeb: Don't compare against HTML-uppercased tag names in HTML parser
Element::tag_name() returns an uppercased string for HTML elements,
which is usually not what's expected by the parser algorithms that look
at tag names.
2024-11-05 12:29:27 +01:00
Andreas Kling
79613eae7f LibWeb: Add spec comments to the "in template" insertion mode 2024-11-05 12:29:27 +01:00