Commit graph

62185 commits

Author SHA1 Message Date
Tim Ledbetter 808784092c UI/Qt: Don't show URL when a new tab is initially focused
The URL is now not shown when a new tab is initially activated until
the location bar loses focus. This allows the user to see the location
bar placeholder text when opening a new tab. It also makes it easier to
paste URLs into the location bar after opening a new tab.
2024-06-17 17:26:55 +02:00
Timothy Flynn 7242fdcf23 Meta: Change the default build type to RelWithDebInfo
By default, we were linking the debug version of all vcpkg dependencies,
which was very noticeable in benchmarks. Let's default to a build type
with reasonable performance.
2024-06-17 09:25:25 -04:00
Luke Warlow 5098ed6b1f LibWeb: Add HTMLSelectElement showPicker()
Adds the showPicker() function for select elements.
This doesn't do the check for "being rendered" which is in the spec.
2024-06-17 07:01:26 -06:00
Tim Ledbetter b94ec419ac WebDriver: Use --allow-popups option when launching Ladybird
This prevents an "unable to find test window" error on tests that
attempt to open a new window.
2024-06-17 14:16:39 +03:00
Tim Ledbetter 577a7610fb UI/Qt: Add --allow-popups option to disable popup blocking by default 2024-06-17 14:16:39 +03:00
Diego 3225e6fad2 LibWasm: Improve element validation and instantiation 2024-06-17 01:55:42 +02:00
Diego 4c3071c7c2 LibWasm: Implement rest of table instructions 2024-06-17 00:58:31 +02:00
Timothy Flynn 7ecca42898 CI: Restore the code linting job
Unlike in Serenity, let's just run this job once per PR rather than on
every job. This lets us install fewer dependencies on the build-and-test
pipelines.
2024-06-16 15:30:28 -04:00
Timothy Flynn 56e9eb6f68 Meta: Restore a couple debug flags in all_the_debug_macros.cmake
These were errantly removed in 666f7338a0.
2024-06-16 15:30:28 -04:00
Timothy Flynn 06ed0dfcc1 LibWeb: Run clang-format
We mistakenly did not add the clang-format linter to the new repo's CI,
and some unformatted code made its way into the repo.
2024-06-16 15:30:28 -04:00
Andreas Kling fbc42e7d42 LibGfx: Don't try to paint glyphs that aren't in a font
Fixes https://github.com/LadybirdBrowser/ladybird/issues/88
2024-06-16 13:24:36 +02:00
Andreas Kling 1bde774918 LibGfx: Remove unused cruft 2024-06-16 13:24:36 +02:00
Daniel Bertalan bf1f631f25 Everywhere: Write dtors for types with incomplete members out-of-line
These are rejected by Clang (19) trunk as a result of
https://github.com/llvm/llvm-project/pull/77753.
2024-06-16 07:19:56 -04:00
Daniel Bertalan 397774d422 Everywhere: Remove usages of template keyword with no parameter list
These were made invalid with P1787, and Clang (19) trunk started warning
on them with https://github.com/llvm/llvm-project/pull/80801.
2024-06-16 07:19:56 -04:00
Tim Ledbetter 9b5d1382bf LibWeb: Rerun find in page query when navigating between URLs
Previously, the "Find Next Match" and "Find Previous Match" actions
simply updated the match index of the last query to be performed. This
led to incorrect results if the page had been modified after the last
query had been run.

`Page::find_in_page_next_match()` and
`Page::find_in_page_previous_match()` both now rerun the last query to
ensure the results are up to date before updating the match index.

The match index is also reset if the URL of the active document has
changed since the last query. The current match index is maintained if
only the URL fragment changes.
2024-06-16 09:46:43 +02:00
Tim Ledbetter 077cb7687d LibWeb: Limit find in page query to documents in the active window
Previously, refreshing the current page and doing a new find in page
query would result in duplicate matches being returned.
2024-06-16 09:46:43 +02:00
koenditor 33f66dcb8f WebContent: Add missing ifdef 2024-06-16 09:46:06 +02:00
Matthew Olsson 7950992fc2 LibWeb: Remove TimingFunction in favor of EasingStyleValue::Function
Now that EasingStyleValue is a lot nicer to use, there isn't much reason
to keep TimingFunction around.
2024-06-16 07:12:46 +02:00
Matthew Olsson ac35f76e67 Meta: Remove GenerateCSSEasingFunctions 2024-06-16 07:12:46 +02:00
Matthew Olsson 667e313731 LibWeb: Parse easing values manually
The values aren't that complex, so it doesn't make much sense to have a
dedicated generator for them. Parsing them manually also allows us to
have much more control over the produced values, so as a result of this
change, EasingStyleValue becomes much more ergonomic.
2024-06-16 07:12:46 +02:00
Timothy Flynn 6675ef3f24 CI+LibLocale: Remove the CLDR from the system 2024-06-16 06:57:08 +02:00
Timothy Flynn b2f7073539 LibLocale: Remove (now) needless explicit enum class underlying types
This was useful for code generation as reducing the size of the enums
had a notable impact on the size of the generated code. This is not the
case any longer.
2024-06-16 06:57:08 +02:00
Timothy Flynn 4de8adabac LibLocale: Replace available locale lookups with ICU 2024-06-16 06:57:08 +02:00
Timothy Flynn 1bcc29d0d1 LibJS+LibLocale: Replace Unicode keyword lookups with ICU
Note: All of the changes to the test files in this patch are now aligned
with both Chrome and Firefox.
2024-06-16 06:57:08 +02:00
Timothy Flynn a1464342e1 LibJS+LibLocale: Remove unused parameter from keyword canonicalization 2024-06-16 06:57:08 +02:00
Timothy Flynn 5e2ee4447e LibJS+LibLocale: Replace plural rules selection with ICU
This uses ICU for all of the Intl.PluralRules prototypes, which lets us
remove all data from our plural rules generator.

Plural rules depend directly on internal data from the number formatter,
so rather than creating a separate Locale::PluralRules class (which will
make accessing that data awkward), this adds plural rules APIs to the
existing Locale::NumberFormat.
2024-06-15 06:57:16 +02:00
Timothy Flynn 7f9ccd39f5 LibJS+LibLocale: Replace relative time formatting with ICU
This uses ICU for all of the Intl.RelativeTimeFormat prototypes, which
lets us remove all data from our relative-time format generator.
2024-06-15 06:57:16 +02:00
Andreas Kling f7a83e5755 LibWeb: Improve FIXME message about getComputedStyle() properties
Let's log which property we're trying to look up, since that's the most
interesting part!
2024-06-14 20:45:37 +02:00
Andreas Kling 4c94202e97 LibWeb: Remove unnecessary FIXME marker for CSSStyleDeclaration.cssFloat 2024-06-14 20:45:37 +02:00
Andreas Kling 19fa630fa7 LibWeb: Make CSSKeyframeRule.parentRule actually point to parent rule 2024-06-14 20:45:37 +02:00
Andreas Kling 7f2c833a39 LibWeb: Implement CSSKeyframesRule.cssRuleList
To make this straightforward, CSSKeyframesRule now uses a CSSRuleList
for internal storage.
2024-06-14 20:45:37 +02:00
Andreas Kling a12d28fd30 LibWeb: Implement CSSStyleDeclaration.parentRule
This readonly attribute returns the containing CSS rule, or null (in the
case of element inline style).
2024-06-14 20:45:37 +02:00
Tim Ledbetter ec4d29849d LibWeb: Support finding text split across multiple text nodes
Previously, the find in page function would fail to find text which was
split across multiple text nodes. For example, given the following
markup: `WH<span>F` the query `WHF` would previously fail to be
matched.

This is done by traversing all of the document's text nodes -
constructing a complete string to query against and keeping track of
the locations where that string is split across multiple nodes.
2024-06-14 16:55:39 +02:00
circl dbc94ce92e Tests/LibWeb: Add test to verify correctness of getImageData 2024-06-14 16:54:32 +02:00
circl d2f9ba7db1 Revert "LibWeb: Use memcpy() in CanvasRenderingContext2D.getImageData()"
This reverts commit 59cb7994c6.

This change caused a bug where getImageData returned the image in
BGRA8888 format instead of RGBA8888.
2024-06-14 16:54:32 +02:00
Andreas Kling c14369e2e3 Tests: Update rebaseline-libweb-test script with new paths 2024-06-14 16:28:32 +02:00
Andreas Kling 60a05ef414 LibJS/Bytecode: Give TypeofBinding instructions a lookup cache
These can use an EnvironmentCoordinate for caching, just like normal
binding lookups. Saves a bunch of time for repeated typeof checks.
2024-06-14 16:08:02 +02:00
Andreas Kling 4302e07346 LibJS/Bytecode: Rename TypeofVariable => TypeofBinding 2024-06-14 16:08:02 +02:00
Andreas Kling 9d21d88374 LibJS: Allow let and const to create locals in global code
This is actually safe everywhere but in the topmost program scope.
For web compatibility reasons, we have to flush all top-level bindings
to the environment, in case a subsequent separate <script> program
comes looking for them.
2024-06-14 16:08:02 +02:00
Andreas Kling 0aa8cb7dac LibJS/Bytecode: Display local variable names in bytecode dumps
Instead of displaying locals as "locN", we now show them as "name~N".
This makes it a lot easier to follow bytecode dumps, especially in
longer functions.

Note that we keep displaying the local index, to avoid confusion in case
there are multiple separate locals with the same name in one executable.
2024-06-14 16:08:02 +02:00
Tim Ledbetter 88d134a4da UI/Qt: Add standard shortcuts for find in page actions
This commit adds the standard shortcuts for the Find Next and Find
Previous buttons on the find in page panel. These shortcuts are usually
F3 and Shift+F3 respectively, although Qt standard shortcuts may vary
across platforms.
2024-06-14 14:11:19 +02:00
Timothy Flynn fdacf8ebeb LibJS: Link LibLocale publicly to ensure ICU data is available
Linking LibLocale publicly ensures that libicudata.a is also available
in all embedders of LibJS. Otherwise, ICU crashes in hard-to-track-down
ways at runtime when the data is not available.
2024-06-14 14:05:45 +02:00
Aliaksandr Kalenik 57c735dec4 LibGfx: Remove draw_signed_distance_field() in Gfx::Painter
No longer used since we switched to vector paths for checkbox rendering.
2024-06-14 08:00:17 +02:00
Aliaksandr Kalenik 9502926b76 LibWeb: Remove painting command for drawing signed distance field
No longer used since we switched to vector paths for checkbox rendering.
2024-06-14 08:00:17 +02:00
Aliaksandr Kalenik 20c506f597 LibWeb: Replace SDFs with vector paths in CheckBoxPaintable
Initially, SDF rendering was adopted for checkbox rendering because our
vector path renderer had not yet matured. This is no longer the case.
2024-06-14 08:00:17 +02:00
Timothy Flynn f9a7fc6263 LibLocale: Remove the number formatting data generator
The last user of the remaining data (Intl.DurationFormat) no longer
consumes these APIs.
2024-06-14 07:59:42 +02:00
Timothy Flynn d634039c10 LibJS: Implement the latest Intl.DurationFormat proposal
The proposal has undergone quite a few normative changes since we last
synced with it. There was a time when it could not be implemented as it
was written, which is no longer the case. The resulting proposal has had
so many changes compared to our implementation, that it wouldn't make
sense to implement them commit-by-commit as we normally do. So instead,
this just implements the HEAD revision of the spec in one pass.
2024-06-14 07:59:42 +02:00
Timothy Flynn 0e5cd2c45a LibLocale: Add a method to access a locale's digital format options
For Intl.DurationFormat, we will need to know a locale's hours-minutes
time separator, minutes-seconds time separator, and whether the locale
prefers digital hours to always display as 2 digits.
2024-06-14 07:59:42 +02:00
Timothy Flynn 98a437d9a8 LibLocale: Initialize TrailingZeroDisplay number format rounding option
This was missed in commit 67f3de2320.
2024-06-14 07:59:42 +02:00
Aliaksandr Kalenik b2dcdf0096 LibWeb: Use button layout for input elements with button type 2024-06-14 07:58:55 +02:00