Commit graph

65857 commits

Author SHA1 Message Date
Luke Wilde
4c0872ea1b LibWeb/WebGL: Implement getBufferParameter 2024-12-05 21:27:32 +01:00
Luke Wilde
a65a981a6b LibWeb/WebGL: Add initial implementation of texImage2D with image source
a
2024-12-05 21:27:32 +01:00
Luke Wilde
362ce4b6a4 LibWeb/WebGL: Implement framebufferRenderbuffer 2024-12-05 21:27:32 +01:00
Luke Wilde
a513bdaac6 LibWeb/WebGL: Implement bindRenderbuffer 2024-12-05 21:27:32 +01:00
Luke Wilde
d185c2c28c LibWeb/WebGL: Implement createRenderbuffer 2024-12-05 21:27:32 +01:00
Luke Wilde
135facb1b5 LibWeb/WebGL: Implement framebufferTexture2D 2024-12-05 21:27:32 +01:00
Luke Wilde
b0bcecfc53 LibWeb/WebGL: Implement bindFramebuffer 2024-12-05 21:27:32 +01:00
Luke Wilde
c5e9615c29 LibWeb/WebGL: Implement createFramebuffer 2024-12-05 21:27:32 +01:00
R-Goc
2ac8408fef CMake: Fix Windows exceptions flag
This commit changes the exception flag to match the description and turn
off exceptions. This matches the behavior of -fno-exceptions. However,
on Windows SEH exceptions are always available, and there's no easy way
to turn them off. This flag should also suppress previous /EHsc flags,
if they get automatically set by cmake. Reference:
https://learn.microsoft.com/en-us/cpp/build/reference/eh-exception-handling-model?view=msvc-170
2024-12-05 20:34:22 +01:00
Sam Atkins
bc77f84359 LibWeb: Stop passing Realm unnecessarily to parse CSS properties
Also use the parse_css_value() helper in cases where we previously
constructed a Parser manually.
2024-12-05 19:59:57 +01:00
Sam Atkins
ee9db99961 LibWeb: Remove unused Realm arg from StyleComputer::get_inherit_value()
We no longer need this now that property_initial_value() doesn't take a
Realm.
2024-12-05 19:59:57 +01:00
Sam Atkins
2c3c821305 LibWeb: Remove Realm parameter from property_initial_value()
We don't need the Realm to parse a style value.

Fixes #2720
2024-12-05 19:59:57 +01:00
Sam Atkins
863ce746dc LibWeb/CSS: Make ParsingContext's Realm optional
We only need a Realm to allocate CSSOM objects on the GC heap. Style
values are not such objects, and over time, we'll be changing the
parser to only produce non-CSSOM objects.
2024-12-05 19:59:57 +01:00
Kenneth Myhra
861f6e3965 LibWeb: Commit pull-into descriptors after filling from queue
These changes make sure that we postpone calls to
ReadableByteStreamControllerCommitPullIntoDescriptor until after all
pull-into descriptors have been filled up by
ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue.

Also pulls in the WPT test which was created in relation to this spec
change. The test verifies that a patched then() will see a null
byobRequest.
2024-12-05 13:03:12 -05:00
Kenneth Myhra
5a9f602fef LibWeb: Add AO CanCopyDataBlockBytes() 2024-12-05 13:03:12 -05:00
Timothy Flynn
4152870b85 LibWeb: Use a standard x-macro to create FlyString ARIA attribute names
We are currently constructing the attribute names as FlyStrings every
time we invoke one of the ARIA attributes getters/setters. If there are
not any other instances of these strings in-memory, then we're thrashing
the FlyString cache.

Instead, let's follow suit of all other Web attributes - use an x-macro
to generate the attribute names.
2024-12-05 11:45:58 -05:00
Timothy Flynn
6381ed26f2 LibWeb: Modernize the ARIA spec comment style a bit
Namely, use consistent wrapping and hanging indents on numbered spec
lines.
2024-12-05 11:45:58 -05:00
Sam Atkins
0168ee22ad LibWeb: Redefine WebIDL types in terms of Infra spec
Corresponds to https://github.com/whatwg/webidl/pull/1452
2024-12-05 17:34:13 +01:00
Shannon Booth
87c8ae31d3 LibURL: Set IDNA's IgnoreInvalidPunycode to false
See: https://github.com/whatwg/url/commit/a6e449 - which should have no
functional change.
2024-12-05 17:29:49 +01:00
Shannon Booth
923ab8658e LibUnicode: Support IgnorePunnycode option in ToAscii algorithm
This was introduced in UTS 46 revision 31.
2024-12-05 17:29:49 +01:00
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 SkImages
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:
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