Luke Wilde
d915b574ab
LibWeb/WebGL: Implement pixel format conversion for TexImageSource
...
This is done by using the combination of format and type to map to the
appropriate Skia bitmap type. With this, we then read the SkImage of
the TexImageSource into a new SkPixmap with the destination format
information and holding an appropriately sized buffer. Once created,
readPixels is called to convert and write the image into the buffer.
2025-01-21 21:36:05 +01:00
Luke Wilde
d13dd76818
LibWeb/WebGL: Map DEPTH_STENCIL to DEPTH24_STENCIL8 for WebGL 1 too
2025-01-21 21:36:05 +01:00
Luke Wilde
de77a5e3ea
LibWeb/WebGL: Move extensions into their own folder
2025-01-21 21:36:05 +01:00
Luke Wilde
442f0b9a13
LibWeb/WebGL: Implement OES_vertex_array_object extension
2025-01-21 21:36:05 +01:00
Luke Wilde
4cb5a980e5
LibWeb/WebGL: Implement getAttachedShaders
2025-01-21 21:36:05 +01:00
Luke Wilde
aa99853a5c
LibWeb/WebGL: Track the shaders attached to a program
...
This is required to return original references to the shaders attached
to a program from getAttachedShaders. This is required for Figma (and
likely all other Emscripten compiled applications that use WebGL) to
get it's own generated shader IDs from the shaders returned from
getAttachedShaders.
2025-01-21 21:36:05 +01:00
Timothy Flynn
85b424464a
AK+Everywhere: Rename verify_cast
to as
...
Follow-up to fc20e61e72
.
2025-01-21 11:34:06 -05:00
Timothy Flynn
6a564376fc
Meta+LibUnicode+LibJS: Upgrade to ICU 76.1
...
This updates our local ICU overlay port to use ICU 76.1. This includes
Unicode 16 and CLDR 46.
Upstream vcpkg is not able to supply versions past 74 yet due to various
dependency issues, but we are able to use this version ourselves. The
overlay port now includes a patch to revert ICU's dependence on autoconf
2.72 for now, as this version is not yet available on all systems.
All of the test changes were cross-referenced with Firefox to ensure
correctness.
2025-01-18 17:56:40 -05:00
Timothy Flynn
96558b98f9
Meta: Add an overlay port for ICU
...
This will allow us to upgrade to ICU 76 independent of upstream vcpkg.
2025-01-18 17:56:40 -05:00
Luke Wilde
927bdf909b
LibWeb/WebGL2: Implement a bunch of parameters read by CreepJS
...
This also fixes GLfloat and GLboolean to use their appropriate glGet
functions.
2025-01-18 10:23:07 +01:00
Tim Ledbetter
aa39aa50f7
LibWeb: Add MediaElementAudioSourceNode
interface
2025-01-17 19:04:47 +00:00
Sam Atkins
b3b9eea986
LibWeb/CSS: Merge RotationStyleValue into TransformationStyleValue
...
Same again, although rotation is more complicated: `rotate`
is "equivalent to" multiple different transform function depending on
its arguments. So we can parse as one of those instead of the full
`rotate3d()`, but then need to handle this when serializing.
2025-01-17 10:12:39 +01:00
Tim Ledbetter
ea67f37348
Meta: Support importing WPT crash tests
2025-01-17 09:08:15 +01:00
Andrew Kaster
7c3b590d44
LibWeb/WebGL2: Implement MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS
...
This is a parameter for getParameter()
2025-01-15 11:25:22 +00:00
Andrew Kaster
f5e06a2457
LibWeb/WebGL2: Implement MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS
...
This is a parameter for getParameter()
2025-01-15 11:25:22 +00:00
Sam Atkins
4e1aa96dce
LibWeb/CSS: Use CalcSV's context to determine what percentages are
...
This lets us implement the `matches_number()` and `matches_dimension()`
methods of `CSSNumericType` to spec, instead of being an ad-hoc hack.
2025-01-13 10:59:16 +00:00
Sam Atkins
4efdb76857
LibWeb/CSS: Give calc() a CalculationContext for resolving percentages
...
This is passed in at construction, meaning we will be able to refer to
it later, when we're no longer inside the Parser.
2025-01-13 10:59:16 +00:00
Shannon Booth
dfdcfc8e88
LibWeb/Bindings: Generate undefined in a union as 'Empty'
...
This can only ever be undefined, and no other JS value, so it makes
sense to use undefined to represent this case.
2025-01-12 18:39:24 +00:00
Tim Ledbetter
00ed797627
Meta/CMake: Use simple string match to find relevant vcpkg triplets
...
Previously, the build would fail if the CMake source directory
contained regex special characters.
2025-01-11 23:18:16 +01:00
Shannon Booth
64eeda6450
LibWeb: Return a representation of an 'Agent' in 'relevant agent'
...
This makes it more convenient to use the 'relvant agent' concept,
instead of the awkward dynamic casts we needed to do for every call
site.
mutation_observers is also changed to hold a GC::Root instead of raw
GC::Ptr. Somehow this was not causing problems before, but trips up CI
after these changes.
2025-01-11 10:39:48 -05:00
Tim Ledbetter
b6ec055bf9
IDLGenerators: Set Iterator @@toStringTag
with correct descriptor
2025-01-11 10:02:48 -05:00
Shannon Booth
627b7dd936
LibWeb/Bindings: Define constructor properties in the correct order
2025-01-11 01:43:31 +00:00
Ivan Zuzak
49fc569136
AK: Add tests for GenericShorthands
2025-01-09 09:03:50 +01:00
Luke Wilde
876d26c32e
LibWeb/WebGL: Respect subarrays in readPixels
2025-01-08 17:55:17 +03:00
Luke Wilde
71746c47c2
LibWeb/WebGL: Bind default frame/render buffer when binding is null
...
This fixes the depth issues on github.com, as the depth commands are
now sent to the right frame/render buffer.
2025-01-08 17:55:17 +03:00
Luke Wilde
e5d59a2d42
LibWeb/WebGL2: Implement getSyncParameter
2025-01-08 17:55:17 +03:00
Luke Wilde
6bf6cd3f19
LibWeb/WebGL: Account for subarrays in tex(Sub)Image{2D,3D}
...
This allows Ruffle to correctly upload textures.
2025-01-08 17:55:17 +03:00
Luke Wilde
2b20b8aaff
LibWeb/WebGL: Return correct types from get{Shader,Program}Parameter
...
Returning numbers instead of booleans for the statuses made Ruffle
(through the wgpu crate) think a shader/program failed to compile/link,
as it does a strict type comparison.
2025-01-08 17:55:17 +03:00
Luke Wilde
c30c1d65f4
LibWeb/WebGL2: Implement clearBuffer{fv,iv,uiv,fi}
2025-01-08 17:55:17 +03:00
Luke Wilde
f627c91bf3
LibWeb/WebGL2: Implement deleteSampler
2025-01-08 17:55:17 +03:00
Luke Wilde
09ad685238
LibWeb/WebGL2: Implement samplerParameter{i,f}
2025-01-08 17:55:17 +03:00
Luke Wilde
aa2eb7ac7d
LibWeb/WebGL2: Implement MAX_VARYING_COMPONENTS parameter
2025-01-08 17:55:17 +03:00
Luke Wilde
c4ff1a1eb0
LibWeb/WebGL2: Implement MAX_FRAGMENT_UNIFORM_BLOCKS parameter
2025-01-08 17:55:17 +03:00
Luke Wilde
0390a2328c
LibWeb/WebGL2: Implement MAX_ELEMENT_INDEX parameter
2025-01-08 17:55:17 +03:00
Luke Wilde
2d94953047
LibWeb/WebGL2: Implement COPY_WRITE_BUFFER_BINDING parameter
2025-01-08 17:55:17 +03:00
Luke Wilde
af8cb211eb
LibWeb/WebGL2: Implement COPY_READ_BUFFER_BINDING parameter
2025-01-08 17:55:17 +03:00
Luke Wilde
47699360e5
LibWeb/WebGL2: Implement TEXTURE_BINDING_2D_ARRAY parameter
2025-01-08 17:55:17 +03:00
Luke Wilde
b8416570e0
LibWeb/WebGL2: Implement UNIFORM_BUFFER_BINDING parameter
2025-01-08 17:55:17 +03:00
Luke Wilde
9b4bad4255
LibWeb/WebGL: Factor in subarrays for typed arrays for generic methods
2025-01-08 17:55:17 +03:00
Luke Wilde
42cce393f4
LibWeb/WebGL2: Implement drawElementsInstanced
2025-01-08 17:55:17 +03:00
Luke Wilde
b6bc5912d6
LibWeb/WebGL: Implement tex(Sub)Image2D with TexImageSource
2025-01-08 17:55:17 +03:00
Luke Wilde
8e453d5069
LibWeb/WebGL: Preserve original bound objects to return in getParameter
...
Required by https://qwasm2.m-h.org.uk , which adds a custom `name`
attribute to objects it generates. It then gets some of these objects
out with getParameter, and expects the `name` attribute to be there.
2025-01-08 17:55:17 +03:00
Luke Wilde
c067271897
LibWeb/WebGL2: Implement getActiveUniformBlockParameter
2025-01-08 17:55:17 +03:00
Luke Wilde
191ceb0f61
LibWeb/WebGL2: Implement getActiveUniformBlockName
2025-01-08 17:55:17 +03:00
Luke Wilde
28a73dc392
LibWeb/WebGL: Implement deleteRenderbuffer
2025-01-08 17:55:17 +03:00
Luke Wilde
4e33d8e577
LibWeb/WebGL: Mark clear as a draw operation instead of clearColor
2025-01-08 17:55:17 +03:00
Luke Wilde
e26b524721
LibWeb/WebGL2: Implement invalidateFramebuffer
2025-01-08 17:55:17 +03:00
Luke Wilde
2983ad10bc
LibWeb/WebGL2: Correctly handle offsets in uniform(Matrix) functions
2025-01-08 17:55:17 +03:00
Luke Wilde
63b792c205
LibWeb/WebGL2: Implement bufferSubData with offset and length
2025-01-08 17:55:17 +03:00
Luke Wilde
18ea91715b
LibWeb/WebGL2: Implement bufferData with offset and length
2025-01-08 17:55:17 +03:00