mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-17 05:29:56 +00:00
LibWeb: Implement compositing of font-variation-settings
values
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This commit is contained in:
parent
f9452b77b7
commit
b64cb89b9d
Notes:
github-actions[bot]
2025-09-26 10:22:03 +00:00
Author: https://github.com/tcl3
Commit: b64cb89b9d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6245
Reviewed-by: https://github.com/AtkinsSJ ✅
3 changed files with 147 additions and 0 deletions
|
@ -1812,6 +1812,16 @@ RefPtr<StyleValue const> composite_value(StyleValue const& underlying_value, Sty
|
|||
auto result = composite_raw_values(underlying_value.as_number().number(), animated_value.as_number().number());
|
||||
return NumberStyleValue::create(result);
|
||||
}
|
||||
case StyleValue::Type::OpenTypeTagged: {
|
||||
auto& underlying_open_type_tagged = underlying_value.as_open_type_tagged();
|
||||
auto& animated_open_type_tagged = animated_value.as_open_type_tagged();
|
||||
if (underlying_open_type_tagged.tag() != animated_open_type_tagged.tag())
|
||||
return {};
|
||||
auto composited_value = composite_value(underlying_open_type_tagged.value(), animated_open_type_tagged.value(), composite_operation);
|
||||
if (!composited_value)
|
||||
return {};
|
||||
return OpenTypeTaggedStyleValue::create(OpenTypeTaggedStyleValue::Mode::FontVariationSettings, underlying_open_type_tagged.tag(), composited_value.release_nonnull());
|
||||
}
|
||||
case StyleValue::Type::Percentage: {
|
||||
auto result = composite_raw_values(underlying_value.as_percentage().percentage().value(), animated_value.as_percentage().percentage().value());
|
||||
return PercentageStyleValue::create(Percentage { result });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue