Commit graph

53167 commits

Author SHA1 Message Date
Tim Schumacher
c71815bc91 Ports: Move handling for simple downloads into a separate function 2023-08-08 19:57:43 +02:00
Tim Schumacher
a37b95f465 Ports: Do file downloading in a single big loop 2023-08-08 19:57:43 +02:00
Tim Schumacher
284fee9e77 Ports: Make files a proper array 2023-08-08 19:57:43 +02:00
Timothy Flynn
3c2d846b94 CI: Restore running test262 and Wasm tests 2023-08-08 10:59:41 -04:00
Aliaksandr Kalenik
5f364e9bc1 LibWeb: Rename is_scrollable() to is_user_scrollable()
is_user_scrollable() is more appropriate name since this function
returns true only for boxes scrollable by user interaction.
2023-08-08 16:55:14 +02:00
Aliaksandr Kalenik
491da2a810 LibWeb: Use is_scroll_container instead of is_scrollable in JS APIs
is_scroll_container() returns true for "overflow: hidden" which allows
programmable scrolling while is_scrollable() returns true only for
"overflow: scroll" and "overflow: auto" which allow scrolling only by
user interactions.
2023-08-08 16:55:14 +02:00
Aliaksandr Kalenik
869bef523e LibWeb: Return true for "overflow: auto" from Box::is_scrollable()
is_scrollable() is currently used to determine if box support scroll
user interaction so it should return true for "auto" overflow.
2023-08-08 16:55:14 +02:00
Aliaksandr Kalenik
1b63095271 LibWeb: Compensate scroll offset translation before clip rect is applied
Position where box clip rect is applied should not be affected by
current scroll offset.
2023-08-08 16:55:14 +02:00
Aliaksandr Kalenik
cdf8b9e943 LibWeb/Painting: Translate by scroll offset before painting descendants
Fixes painting of nested nodes in scrollable containers by moving
painter's scroll offset translation from paint_node() to
before_children_paint() and after_children_paint().
2023-08-08 16:55:14 +02:00
Tom L
325d1553ca Base+LibCards: Add basic set of playing card backs 2023-08-08 14:56:25 +01:00
Tim Ledbetter
b073d1dd8c usermod: Make error message less verbose 2023-08-08 15:15:43 +02:00
Tim Ledbetter
0875446b38 usermod: Remove premature root user check
This allows the use of `--help`, for example.
2023-08-08 15:15:43 +02:00
Tim Ledbetter
827e23940a usermod: Don't set the EGID to 0
This is unnecessary, as usermod isn't a SUID binary.
2023-08-08 15:15:43 +02:00
Karol Kosek
55b6e07a0f Userland: Open files for save in write-only mode
WavWriter and the shot utility open files with this mode and never
truncate the files, which might leave some contents of a previous file
during overwriting.
2023-08-08 15:13:43 +02:00
Daniel Bertalan
fb305b66c2 LibJS: Enable await test that used to crash in AST mode
Now that the AST interpreter has been removed, this can be a simple
XFAIL.
2023-08-08 15:09:53 +02:00
Daniel Bertalan
7ac6af1998 LibJS: Uncomment passing tests 2023-08-08 15:09:53 +02:00
MacDue
5f0d3c083f LibWeb: Allow (explicitly) converting CSSPixels to float and int
...and remove some unnecessary cast chains.
2023-08-08 14:58:26 +02:00
Timothy Flynn
c20df34b79 LibJS: Remove bytecode option from the test262 runner
This scripts have been updated to not use this option.
2023-08-08 13:30:45 +02:00
Sam Kravitz
c97eec030c LibJS: Test function toBeCloseTo takes an optional precision argument
Modeled after the equivalent Jest function.
https://jestjs.io/docs/expect#tobeclosetonumber-numdigits
2023-08-08 13:29:56 +02:00
Sam Kravitz
73c8650ea0 LibJS: Expect this.target to have typeof number in toBeCloseTo
The previous expectation of typeof value was inconsistent with the
expect message.
2023-08-08 13:29:56 +02:00
Andreas Kling
2eaa528a0e LibJS: Rip out the AST interpreter :^)
This has been superseded by the bytecode VM, which is both faster
and more capable.
2023-08-08 13:07:13 +02:00
Andreas Kling
fcc72a787b Spreadsheet: Use the LibJS bytecode VM 2023-08-08 13:07:13 +02:00
Andreas Kling
acd366eddd Assistant: Use the LibJS bytecode VM 2023-08-08 13:07:13 +02:00
Andreas Kling
3bb06cc719 Fuzzers: Use the LibJS bytecode VM 2023-08-08 13:07:13 +02:00
Andreas Kling
e2c8d5859e LibJS: Remove ability to disable bytecode VM 2023-08-08 13:07:13 +02:00
Andreas Kling
9a709e03a3 test262-runner: Remove ability to run with AST interpreter
I'm leaving the --use-bytecode CLI option here as a no-op for now, until
we get all the scripts updated. But the program always runs in bytecode
mode now.
2023-08-08 13:07:13 +02:00
Andreas Kling
99ac34eeae Ladybird+LibWebView+Browser: Remove ability to run with AST interpreter 2023-08-08 13:07:13 +02:00
Andreas Kling
e769776bdd Ladybird: Remove ability to run with AST interpreter 2023-08-08 13:07:13 +02:00
Andreas Kling
4eb43cc107 Browser: Remove ability to run with AST interpreter 2023-08-08 13:07:13 +02:00
Andreas Kling
e7e52f95ec headless-browser: Remove ability to run with AST interpreter 2023-08-08 13:07:13 +02:00
Andreas Kling
efe3eb8f4c test-js: Remove ability to run with AST interpreter 2023-08-08 13:07:13 +02:00
Andreas Kling
a75b51de10 js: Remove ability to run with AST interpreter 2023-08-08 13:07:13 +02:00
Andreas Kling
9df7bf79cc LibJS: Add create_simple_execution_context<GlobalObjectType>() helper
This makes it easy to set up a realm, global object and root execution
context with a single call to LibJS. It will be useful to basically
everyone except LibWeb.
2023-08-08 13:07:13 +02:00
Andreas Kling
d1d24569f8 LibJS/Bytecode: Remove unused AST interpreter hacks from bytecode VM 2023-08-08 13:07:13 +02:00
Andreas Kling
196e04d1c7 CI: Stop running test-js with the AST interpreter 2023-08-08 13:07:13 +02:00
Andi Gallo
7bd00d6a42 LibWeb: Snap table grid to device pixels in separate borders mode
Build a grid snapped to device pixels and use it to construct the
rectangles for the cell edges, same as for collapsed borders. This is
especially important when border-spacing is set to 0 since it avoids
gaps between adjacent cells which have borders set.
2023-08-08 12:26:11 +02:00
Jelle Raaijmakers
14091f32c6 Browser: Synchronize database statements used for cookies
Since SQLServer is inherently asynchronous, database statements can run
in parallel. Our `CookieJar` did not require synchronous actions on the
database for its cookies, resulting in cookies not being set
immediately. This resulted in a bug that could be exposed by setting
`document.cookie` and immediately querying its value, revealing that the
cookie was not yet persisted.

Solve this by requiring all database statements to be executed
synchronously. Ideally SQLServer has a mechanism to determine interquery
dependencies and blocks until dependent queries are fully executed, but
until we have that, this works around that limitation.
2023-08-08 06:25:11 -04:00
Aliaksandr Kalenik
568c486610 LibWeb: Support positioning of abspos boxes inside grid container
- Out-of-flow items should not affect grid layout
- "The static position of an absolutely-positioned child of a grid
  container is determined as if it were the sole grid item in a grid
  area whose edges coincide with the content edges of the grid
  container."
2023-08-08 11:31:35 +02:00
Sam Kravitz
073eb46824 LibJS: Apply the correct precedence for unary + and - operators
When determining the precedence of the + and - operators, the parser
always returned the precedence using these operators in a binary
expression (lower than division!). The context of whether the operator
is used in a unary or binary expression must be taken into account.
2023-08-08 07:41:07 +02:00
Andreas Kling
18c54d8d40 LibJS: Make Cell::initialize() return void
Stop worrying about tiny OOMs.

Work towards #20405
2023-08-08 07:39:11 +02:00
Lucas CHOLLET
fde26c53f0 AK: Remove the API to explicitly construct short strings
Now that ""_string is infallible, the only benefit of explicitly
constructing a short string is the ability to do it at compile-time. But
we never do that, so let's simplify the API and remove this
implementation detail from it.
2023-08-08 07:37:21 +02:00
Lucas CHOLLET
3f35ffb648 Userland: Prefer _string over _short_string
As `_string` can't fail anymore (since 3434412), there are no real
benefits to use the short variant in most cases.
2023-08-08 07:37:21 +02:00
Lucas CHOLLET
a5edc9cdfc Userland: Prefer _short_string over String::from_utf8_short_string
This user-defined literal is a strictly equivalent but shorter alias to
`String::from_utf8_short_string`.
2023-08-08 07:37:21 +02:00
Daniel Bertalan
66645cdc94 LibJS+LibWeb: Mark NonnullGCPtr::ptr() as returns_nonnull
This invariant is enforced by the fact that `NonnullGCPtr` can only be
constructed from references.

This commit fixes an instance where we compared a pointer to null after
we have already dereferenced it.
2023-08-07 22:20:03 -04:00
Daniel Bertalan
9feb1ce39f LibJS+LibWeb: Apply the Rule of Zero to {Nonnull,}GCPtr<T>
The compiler-generated copy constructor and copy assignment operator
already do the right thing (which is to simply copy the underlying
pointer).

The [Itanium C++ ABI][1] treats any class with non-trivial copy/move
constructors and destructors as non-trivial for the purposes of calls --
even if they are functionally identical to the compiler-generated ones.
If a class is non-trivial, it cannot be passed or returned in registers,
only via an invisible reference, which is worse for codegen. This commit
makes `{Nonnull,}GCPtr` trivial.

As the compiler can be sure that capturing a `GCPtr` by value has no
side effects, a few `-Wunused-lambda-capture` warnings had to be
addressed in LibWeb.

GCC seems to have a bug that prevents `ExceptionOr<Variant<GCPtr<T>>>`
from being implicitly constructed from `GCPtr<T>` after this change. A
non-invasive workaround is to explicitly construct the inner Variant
type.

[1]: https://itanium-cxx-abi.github.io/cxx-abi/abi.html#non-trivial
2023-08-07 22:20:03 -04:00
Andrew Kaster
82495083c3 Ladybird: Ensure selected new tab URL is a valid URL before saving 2023-08-07 22:17:40 -04:00
Andrew Kaster
391beef707 Ladybird: Move Qt-specific classes and functions to a Qt subdirectory
This will help a lot with developing chromes for different UI frameworks
where we can see which helper classes and processes are really using Qt
vs just using it to get at helper data.

As a bonus, remove Qt dependency from WebDriver.
2023-08-07 14:58:04 -06:00
Liav A
ccaa423372 Utilities: Add basic Package manager skeleton utility 2023-08-07 13:24:25 -06:00
Liav A
22737b70bc LibMarkdown: Add render_for_raw_print methods to Node derived classes
This method will be used by the package manager code to render an actual
Port's name to raw text as it is stored as relative URL currently in the
AvailablePorts.md file.
2023-08-07 13:24:25 -06:00
Liav A
8073c615af LibMarkdown: Add method to get access to Table columns
This will be used later when parsing the AvailablePorts.md file in the
upcoming package manager application.
2023-08-07 13:24:25 -06:00