Timothy Flynn
db87f173fb
LibJS: Implement the RegExp.escape proposal
...
https://tc39.es/proposal-regex-escaping/
2024-12-05 13:56:21 +01:00
Timothy Flynn
bd1009f3c1
LibJS: Extract some JS lexer helpers to free functions
...
We will need these in an upcoming proposal.
2024-12-05 13:56:21 +01:00
Andreas Kling
3f461b96df
LibWeb: Implement window.stop()
...
Fixes a handful of timeouts on WPT.
2024-12-05 12:13:09 +01:00
Luke Warlow
fdee82d203
LibWeb: Implement ::file-selector-button
pseudo element
...
The button for a file input now matches `::file-selector-button`.
2024-12-05 10:49:57 +00:00
Aliaksandr Kalenik
c817eb8d2b
LibWeb/WebGL: Implement getContextAttributes()
2024-12-05 09:57:10 +01:00
Aliaksandr Kalenik
a8c282a30e
IDLGenerators: Allow returning nullable dictionaries from IDL methods
2024-12-05 09:57:10 +01:00
Timothy Flynn
5e534f4d83
LibJS+LibUnicode: Designate a sort order for Intl.PluralRules categories
...
This is a normative change in the ECMA-402 spec. See:
https://github.com/tc39/ecma402/commit/62fe5db
2024-12-05 09:49:55 +01:00
Timothy Flynn
e5ec8441c9
LibJS: Remove the Intl.PluralRules GetOperands AO
...
This is an editorial change in the ECMA-402 spec. See:
https://github.com/tc39/ecma402/commit/c7bca3a
2024-12-05 09:49:55 +01:00
Aliaksandr Kalenik
110f89ee25
LibWeb/WebGL: Implement getShaderInfoLog()
...
With this change we have enough WebGL support to display demos on
https://ciechanow.ski/lights-and-shadows/ but most of them are not
redering correctly yet.
2024-12-05 01:23:10 +01:00
Timothy Flynn
fd263d3755
CI: Do not fail the entire pipeline if there are LSAN logs
...
Even in a successful LibWeb test run, on Linux, we currently always have
LSAN output. Causing this step to fail is currently making every run of
CI fail.
If LibWeb tests did fail, they should exit with a non-zero status code
on their own, causing the pipeline to fail.
2024-12-04 18:38:40 -05:00
Tim Ledbetter
f1bbba2ba5
Tests: Enable imported WPT tests that were previously too slow for CI
2024-12-04 21:25:33 +00:00
Sam Atkins
b9994c83da
Documentation: Update coding style rules about comments
...
The requirement to use // for comments wasn't described anywhere, so now
it is! Also updated the rule about TODO comments because we've allowed
those for a while now.
2024-12-04 22:22:24 +01:00
Aliaksandr Kalenik
66a38f1abc
CodeGenerators: Implement getParameter() according to the WebGL spec
...
Fixes https://github.com/LadybirdBrowser/ladybird/issues/2759
2024-12-04 22:21:13 +01:00
Psychpsyo
1881a8df4b
LibGfx: Set png interlace handling on interlaced images
2024-12-04 20:29:15 +00:00
Tim Ledbetter
9c63785d0f
Meta: Disallow importing ref tests with multiple match or mismatch links
...
Our internal test runner does not currently support this, so let's
explicitly disallow it for now to avoid potential confusion.
2024-12-04 19:50:00 +00:00
Tim Ledbetter
e059ac6a1a
Meta: Allow importing WPT ref tests with mismatch conditions
...
Previously, ref tests with mismatch conditions were misclassified as
text tests.
2024-12-04 19:50:00 +00:00
Tim Ledbetter
2455618995
WebContent+headless-browser: Implement mismatch conditions for ref tests
...
Ref tests can now have a `<link rel="mismatch">` condition. The test
will pass if the expectation page doesn't match the test page.
2024-12-04 19:50:00 +00:00
Psychpsyo
d4d335ebda
LibWebView: Display layouting information in devtools
...
Specifically, you can now see whether an element is visible,
scrollable or creates a stacking context in the devtools.
2024-12-04 17:15:15 +00:00
Psychpsyo
0320494c3f
LibWeb: Remove non-spec condition in scrollable overflow calculation
2024-12-04 17:14:10 +00:00
Psychpsyo
366f15b441
Tests: Make test less flaky
...
This increases the animation length on this test
as it has been failing for me locally.
2024-12-04 16:56:30 +00:00
Jonne Ransijn
6d1fa64f5f
AK: Allow NonnullRawPtr
to be used in constant expressions
2024-12-04 16:45:58 +00:00
Jonne Ransijn
e2b69fe7e2
AK: Restrict template parameter of JsonArray
constructor
...
This constructor doesn't need to accept iterable containers of anything
other than `JsonValue`s.
2024-12-04 16:45:58 +00:00
Jonne Ransijn
a4f23c512c
AK: Add IterableContainerOf
concept
...
This concept not only checks that the given type is iterable, but it
also checks that the iterated value is of the expected type.
2024-12-04 16:45:58 +00:00
Jonne Ransijn
e8b2d35410
AK: Add IsTemplateBaseOf<Base, Derived>
concept
...
This concept checks if any specialization of `Base<...>` is a base class
of `Derived`.
2024-12-04 16:45:58 +00:00
Jonne Ransijn
b7e22f0916
AK: Disallow creating NonnullRawPtr
s from r-value references
...
This would always result in a use-after-free.
2024-12-04 16:45:58 +00:00
Jonne Ransijn
1ddc4050f7
Meta: Print failed pre-commit steps in bold
...
This makes them easier to find, especially for colorblind people.
2024-12-04 16:45:58 +00:00
Jonne Ransijn
bea602f5ed
AK: Use Noncopyable.h
in NonnullRawPtr
2024-12-04 16:45:58 +00:00
Jonne Ransijn
501a7dbaa3
AK: Use Noncopyable.h
in Badge
2024-12-04 16:45:58 +00:00
Jonne Ransijn
cca84aa28d
AK: Fix ASSERT_NOT_REACHED
macro when NDEBUG
is not defined
...
This is supposed to be a function-like macro just like
`VERIFY_NOT_REACHED()` and when `NDEBUG` is defined.
2024-12-04 16:45:58 +00:00
Jonne Ransijn
d5fbf7323a
AK+LibJS: Allow {TRY,MUST}{,_OR_THROW_OOM}
on list-initializers
...
List initializers may contain commas without surrounding parenthesis,
causing them to be passed as multiple macro arguments.
2024-12-04 16:45:58 +00:00
Jonne Ransijn
f617127772
AK: Allow calling ASSERT
and VERIFY
on list-initializers
...
List initializers may contain commas without surrounding parenthesis,
causing them to be passed as multiple macro arguments.
2024-12-04 16:45:58 +00:00
Jonne Ransijn
0de15264ab
AK: Remove clang-tidy
warnings for ASSERT(a || b)
lines
...
Lines like these were getting a warning to simplify the expanded
boolean expression from `!(a || b)` to `(a && b)`, but since the
`!(...)` is part of the macro, that is never going to happen.
2024-12-04 16:45:58 +00:00
Shannon Booth
0fa54c2327
LibURL+LibWeb: Make URL::serialize return a String
...
Simplifying a bunch of uneeded error handling around the place.
2024-12-04 16:34:13 +00:00
Shannon Booth
d7ac0601ab
LibWeb: Simplify OOM exception handling in ImportMap
...
In some cases by crashing on OOM, and in others removing strange use of
String::formatted altogther.
2024-12-04 16:34:13 +00:00
Shannon Booth
bd2f794873
LibJS: Make output_debug_message accept a StringView
2024-12-04 16:34:13 +00:00
Shannon Booth
e9ab3e5a80
LibWeb: Remove ExceptionOr usage for 'resolve module integrity metadata'
...
We do not have any exceptions to propogate.
2024-12-04 16:34:13 +00:00
Pavel Shliak
a557632716
LibWeb: Move http response method in setter
2024-12-04 16:33:54 +00:00
Pavel Shliak
134dc57458
LibWeb: Ensure segments are copied only once in set_line_dash
2024-12-04 16:33:54 +00:00
Yuval Carmon
be979a1e65
LibWeb/CSS: Test css shadow host selector matching
...
Add a test that verifies selectors inside a shadow
root can only match their host element through :host pseudo-class.
Tests both simple selectors (#id, .class)
and complex selectors (:not, :where) to ensure they are blocked from
matching the host element directly.
Fixes issue #2319
2024-12-04 16:19:32 +00:00
Yuval Carmon
3ff8c5c8f1
LibWeb/CSS: Block shadow host matching in DOM
...
Fixes an issue where selectors inside a shadow root could incorrectly
match their shadow host directly using selectors like #host,
instead of requiring :host pseudo-class selectors.
Fixes issue #2319
2024-12-04 16:19:32 +00:00
Jelle Raaijmakers
90d884a150
LibWeb: Prevent crash when editing outside of <body>
...
Step 9 of this algorithm might end up at the document node, which does
not have a parent.
2024-12-04 17:18:00 +01:00
Lucas CHOLLET
6804ce348e
LibWeb/CSS: Interpret NaN as 0 when resolving alpha and rgb values
...
Fixes the crash in css/css-color/parsing/color-valid-hwb.html.
The crash was probably introduced in 248e4bb5
, as it was the first
commit to VERIFY that the value given to `Color::with_opacity` were in
the correct range. As the values in color-valid-hwb.html were resolved
as NaN, the check never passed.
2024-12-04 16:11:41 +00:00
Sidicer
edf29857f8
UI/Qt: Fix hover_label hiding URLs
...
m_hover_label did not have checks if the mouse is in the same location.
This caused clickable URLs to be hidden.
Also shortened the label text to not be longer than half of the window.
2024-12-04 16:09:59 +00:00
Aliaksandr Kalenik
72f093ba9f
LibWeb: Null-check surface before allocating painter for context2d
...
Fixes https://github.com/LadybirdBrowser/ladybird/issues/2755
2024-12-04 16:58:55 +01:00
Sam Atkins
1081a7f3e2
CI: Move sanitizer output into a separate CI step
...
Instead of writing ASAN and UBSAN output into the same stream we use for
test logging, direct them to log files, named asan.log.$PID and
ubsan.log.$PID, and then output them in a separate CI job that runs
afterwards. This should hopefully make it easier to see which tests are
failing.
The downside is that it's now harder to tell which tests the *SAN errors
are related to.
2024-12-04 15:35:15 +00:00
Aliaksandr Kalenik
a6810fec24
LibWeb: Allocate transparent surface based on surface null check
...
...in HTMLCanvasElement::to_data_url() and HTMLCanvasElement::to_blob().
This fixes the problem when surface is not allocated because context is
not initialized yet, even though canvas size is non-zero.
Fixes broken WebDriver screenshot endpoint.
2024-12-04 15:15:16 +00:00
Jelle Raaijmakers
f57c6a4328
Meta: Add policy on AI/LLM usage for changes and reviews
2024-12-04 14:13:39 +00:00
Sam Atkins
624b4689ac
Tests: Remove invalid WPT flexbox test
...
`css/css-flexbox/order-001.htm` is a ref test that does not include any
page to match against.
https://github.com/web-platform-tests/wpt/issues/49521
2024-12-04 13:33:42 +00:00
Timothy Flynn
3c64e4595a
LibJS: Use exact mathematical values for Intl.DurationFormat
...
We can't use doubles due to precision loss for extremely large values.
2024-12-04 08:01:35 -05:00
Timothy Flynn
912e38c5fb
LibCrypto: Add a BigFraction::is_zero helper
2024-12-04 08:01:35 -05:00