mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 02:59:45 +00:00
LibWeb/CSS: Extract interpolation code into its own files
Apart from shrinking StyleComputer a little, we need the ability to get the current value of a transition from outside of it.
This commit is contained in:
parent
a0b96280e4
commit
70d99db992
Notes:
github-actions[bot]
2024-09-22 04:43:09 +00:00
Author: https://github.com/AtkinsSJ
Commit: 70d99db992
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1442
4 changed files with 625 additions and 571 deletions
22
Userland/Libraries/LibWeb/CSS/Interpolation.h
Normal file
22
Userland/Libraries/LibWeb/CSS/Interpolation.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Sam Atkins <sam@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/CSS/CSSStyleValue.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
ValueComparingRefPtr<CSSStyleValue const> interpolate_property(DOM::Element&, PropertyID, CSSStyleValue const& from, CSSStyleValue const& to, float delta);
|
||||
|
||||
NonnullRefPtr<CSSStyleValue const> interpolate_value(DOM::Element&, CSSStyleValue const& from, CSSStyleValue const& to, float delta);
|
||||
NonnullRefPtr<CSSStyleValue const> interpolate_box_shadow(DOM::Element&, CSSStyleValue const& from, CSSStyleValue const& to, float delta);
|
||||
RefPtr<CSSStyleValue const> interpolate_transform(DOM::Element&, CSSStyleValue const& from, CSSStyleValue const& to, float delta);
|
||||
|
||||
Color interpolate_color(Color from, Color to, float delta);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue