Shannon Booth
5dfb825c5c
LibURL: Set IDNA's CheckHyphens to the value of beStrict
...
See: https://github.com/whatwg/url/commit/cd8f1d
2024-12-05 17:29:49 +01:00
Shannon Booth
24267db6b2
LibURL: Implement "find the IPv6 address compressed piece index" helper
...
This was an editorial change in the spec to put a somewhat complex spec
step in it's own AO.
2024-12-05 17:29:49 +01:00
Shannon Booth
0b4670fb7c
LibURL: Percent decode over byte sequence
...
Instead of going over UTF-8 code points. This better follows the spec,
and is also more performant.
2024-12-05 17:29:49 +01:00
Aliaksandr Kalenik
fd25fea3ab
LibWeb: Add missing empty size check before allocating PaintingSurface
...
Fixes crashing when Gfx::PaintingSurface::create_with_size() is called
with a size of 0.
2024-12-05 17:21:05 +01:00
Lucas CHOLLET
bd93285811
LibGfx+LibWeb: Do some color management on images with an ICC profile
...
This patch introduces the `Gfx::ColorSpace` class, this is basically a
serializable wrapper for skia's SkColorSpace. Creation of the instances
of this class (and thus ICC profiles parsing) is performed in the
ImageDecoder process. Then the object is serialized and sent through
IPC, to finally be handed to skia for rendering.
However, to make sure that we're not making all LibGfx's users dependent
on Skia as well, we need to ensure the `Gfx::ColorSpace` object has no
dependency on objects from Skia. To that end, the only member of the
`ColorSpace` class is the opaque `ColorSpaceImpl` struct. Though, there
is on issue with that design, the code in `DisplayListPlayer.cpp` needs
access to the underlying `sk_sp<SkColorSpace>`. It is provided by a
template function, that is only specialized for this type.
Doing this work allows us to pass the following WPT tests:
- https://wpt.live/css/css-color/tagged-images-001.html
- https://wpt.live/css/css-color/tagged-images-003.html
- https://wpt.live/css/css-color/tagged-images-004.html
- https://wpt.live/css/css-color/untagged-images-001.html
Other test cases can also be found here:
- https://github.com/svgeesus/PNG-ICC-tests
Note that SkColorSpace support quite a limited amount of color spaces,
so color profiles like the ones in [1] or the v4 profiles in [2] are not
supported yet. In fact, SkColorSpace only accepts skcms_ICCProfile with
a linear conversion to XYZ D50.
[1] https://www.color.org/browsertest.xalter
[2] https://www.color.org/version4html.xalter
2024-12-05 17:16:41 +01:00
Lucas CHOLLET
8f8ec146a1
LibGfx: Explicitly set color space of SkImage
s
...
If not set, when copying pixels into the SkImage, skia assumes that the
color space is the same as the input, so no transformation is done. We
are currently setting the color space to sRGB, this is fine for now as
it allows us to start making some transformations, but down the road we
will want to set that to the actual output's display color space.
2024-12-05 17:16:41 +01:00
Lucas CHOLLET
407aa629a0
LibGfx: Make PaintingSurface::write_from_bitmap take a Bitmap const&
...
It makes it a little bit easier to distinguish which one of
read_into_bitmap and write_from_bitmap actually modify the Bitmap that
was passed to the method. NFC.
2024-12-05 17:16:41 +01:00
Lucas CHOLLET
4d7b7178f9
Meta/vcpkg: Set default visibility for skcms symbols
...
Without this patch, as skia is compiled with -fvisibility=hidden, no
skcms function is accessible from outside skia's code.
2024-12-05 17:16:41 +01:00
Lucas CHOLLET
50b978fefb
LibGfx: Move BMP's ColorSpace definition into a BMP namespace
2024-12-05 17:16:41 +01:00
Lucien Fiorini
00a1dd2763
Tests: Modify canvas-shadow test to use shadowBlur
2024-12-05 17:07:13 +01:00
Lucien Fiorini
0567960ce4
Tests: Import WPT tests for shadowBlur
2024-12-05 17:07:13 +01:00
Lucien Fiorini
e8cc0dc998
LibWeb+LibGfx: Implement shadowBlur for Canvas2D
2024-12-05 17:07:13 +01:00
Pavel Shliak
b521badbef
AK: Remove QuickSelect
2024-12-05 16:53:28 +01:00
Pavel Shliak
ede0dbafc6
AK: Remove Statistics.h
...
This also removes MedianCut and GIFWriter
2024-12-05 16:53:28 +01:00
Aliaksandr Kalenik
ae6edfb845
LibWeb/WebGL: Implement getProgramInfoLog()
2024-12-05 16:42:19 +01:00
Aliaksandr Kalenik
b8109c3047
LibWeb/WebGL: Implement bindAttribLocation()
2024-12-05 16:42:19 +01:00
Aliaksandr Kalenik
11ddc88ed7
LibWeb/WebGL: Remove FIXME from isContextLost() IDL method
...
Currently this function always returns false, but that's better than
not having it at all.
2024-12-05 16:42:19 +01:00
sideshowbarker
989c2f9e87
LibWeb: Use el.aria_foo(), not el.has_attribute("aria-foo"_string)
...
This change replaces some element.has_attribute("aria-foo"_string) calls
with element.aria_value_foo() calls instead.
2024-12-05 08:05:01 -05:00
sideshowbarker
5d47ba1e38
LibWeb: Minor code cleanup; use HTML::AttributeNames::value, not string
...
This is a minor change to the Node::name_or_description code to switch
some instances of element.has_attribute("value"_string) over to instead
using element.has_attribute(HTML::AttributeNames::value).
2024-12-05 08:05:01 -05:00
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:
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:
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