mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Resolve more calculated values in ComputedProperties
We simplify these at style computation time so there is no need to
maintain them as {Number|Length}OrCalculated
Reduces the time spent in `Length::ResolutionContext::for_layout_node`
from 3.3% to 0.4% when loading
https://en.wikipedia.org/wiki/2023_in_American_television
This commit is contained in:
parent
201803f601
commit
7a5b948b5b
Notes:
github-actions[bot]
2025-11-10 11:13:07 +00:00
Author: https://github.com/Calme1709
Commit: 7a5b948b5b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6773
8 changed files with 33 additions and 54 deletions
|
|
@ -528,8 +528,6 @@ void NodeWithStyle::apply_style(CSS::ComputedProperties const& computed_style)
|
|||
|
||||
if (auto maybe_font_language_override = computed_style.font_language_override(); maybe_font_language_override.has_value())
|
||||
computed_values.set_font_language_override(maybe_font_language_override.release_value());
|
||||
if (auto maybe_font_feature_settings = computed_style.font_feature_settings(); maybe_font_feature_settings.has_value())
|
||||
computed_values.set_font_feature_settings(maybe_font_feature_settings.release_value());
|
||||
if (auto maybe_font_variant_alternates = computed_style.font_variant_alternates(); maybe_font_variant_alternates.has_value())
|
||||
computed_values.set_font_variant_alternates(maybe_font_variant_alternates.release_value());
|
||||
computed_values.set_font_variant_caps(computed_style.font_variant_caps());
|
||||
|
|
@ -540,6 +538,7 @@ void NodeWithStyle::apply_style(CSS::ComputedProperties const& computed_style)
|
|||
computed_values.set_font_variant_ligatures(maybe_font_variant_ligatures.release_value());
|
||||
if (auto maybe_font_variant_numeric = computed_style.font_variant_numeric(); maybe_font_variant_numeric.has_value())
|
||||
computed_values.set_font_variant_numeric(maybe_font_variant_numeric.release_value());
|
||||
computed_values.set_font_feature_settings(computed_style.font_feature_settings());
|
||||
computed_values.set_font_variant_position(computed_style.font_variant_position());
|
||||
if (auto maybe_font_variation_settings = computed_style.font_variation_settings(); maybe_font_variation_settings.has_value())
|
||||
computed_values.set_font_variation_settings(maybe_font_variation_settings.release_value());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue