Commit graph

20 commits

Author SHA1 Message Date
Andreas Kling
c0d7f748ed LibWeb: Avoid FlyString lookups when setting IDL interface prototypes
This commit introduces a WEB_SET_PROTOTYPE_FOR_INTERFACE macro that
caches the interface name in a local static FlyString. This means that
we only pay for FlyString-from-literal lookup once per browser lifetime
instead of every time the interface is instantiated.
2024-03-16 16:35:54 +01:00
Aliaksandr Kalenik
dd07c7f729 LibWeb: Delete AnimationEffect::create() function
It should not be possible to create AnimationEffect because it is
an abstract interface according to the spec.
2024-03-16 09:49:40 +01:00
Matthew Olsson
62f62a0e52 LibWeb: Correctly set timing function in AnimationEffect::update_timing
Also pulls out the parse_easing_string function out since it will be
needed elsewhere
2024-02-25 08:51:50 +01:00
Matthew Olsson
35859c0467 LibWeb: Add helpers to convert between FillMode and Direction enums 2024-02-22 07:31:54 +01:00
Matthew Olsson
145ae54718 LibWeb: Add a few Animation/AnimationEffect getters 2024-02-21 19:52:35 +01:00
Matthew Olsson
2ade834655 LibWeb: Add Animation::is_replaceable() 2024-02-21 19:52:35 +01:00
Matthew Olsson
3721a1a81c LibWeb: Run update_finished_state when setting AnimationEffect's timing
This will need to a necessary style invalidation
2024-02-16 12:02:11 -07:00
Matthew Olsson
6d25bf3aac LibWeb: Invalidate element when setting AnimationEffect's animation 2024-02-16 12:02:11 -07:00
Matthew Olsson
a7727215a6 LibWeb: Implement missing members of AnimationEffect.getComputedTiming() 2024-02-06 08:42:07 +01:00
Matthew Olsson
360082544c LibWeb: Fix incorrect Animation active_time in the after phase 2024-02-06 08:42:07 +01:00
Shannon Booth
96af80acd1 LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
Andreas Kling
bfd354492e LibWeb: Put most LibWeb GC objects in type-specific heap blocks
With this change, we now have ~1200 CellAllocators across both LibJS and
LibWeb in a normal WebContent instance.

This gives us a minimum heap size of 4.7 MiB in the scenario where we
only have one cell allocated per type. Of course, in practice there will
be many more of each type, so the effective overhead is quite a bit
smaller than that in practice.

I left a few types unconverted to this mechanism because I got tired of
doing this. :^)
2023-11-19 22:00:48 +01:00
Matthew Olsson
0d3c8a1cd9 LibWeb: Implement AnimationEffect's transformed_progress helper 2023-11-11 08:58:08 +01:00
Matthew Olsson
1915e603c9 LibWeb: Implement AnimationEffect progress helper functions
This excludes transformed_progress (which is the progress value used to
interpolate CSS values) as it requires a timing function
2023-11-09 16:08:50 +01:00
Matthew Olsson
7f303729f3 LibWeb: Implement AnimationEffect::active_time()
This is split into two functions since there are other places in the
specification that invoke this algorithm with a particular FillMode
(i.e. not the one that the object has in m_fill_mode).
2023-11-09 16:08:50 +01:00
Matthew Olsson
02c4973681 LibWeb: Implement AnimationEffect's phase helpers 2023-11-09 16:08:50 +01:00
Matthew Olsson
6a9c03482f LibWeb: Implement AnimationEffect's active_boundary time getters 2023-11-09 16:08:50 +01:00
Matthew Olsson
baf5220212 LibWeb: Implement some AnimationEffect timing-related helpers
end_time, local_time, and active_duration
2023-11-09 16:08:50 +01:00
Matthew Olsson
d6fb1c24f6 LibWeb: Implement AnimationEffect::animation_direction() 2023-11-09 16:08:50 +01:00
Matthew Olsson
0df06ce273 LibWeb: Add the AnimationEffect IDL object 2023-11-08 09:58:18 +01:00