mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Simplify ComputedProperties::will_change()
We know that `will-change` parses as either `Keyword::Auto` or `StyleValueList`
This commit is contained in:
parent
b52beb5105
commit
47bed173b4
Notes:
github-actions[bot]
2025-12-01 10:18:17 +00:00
Author: https://github.com/Calme1709
Commit: 47bed173b4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6972
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 6 additions and 12 deletions
|
|
@ -2531,20 +2531,14 @@ WillChange ComputedProperties::will_change() const
|
|||
return property_id.release_value();
|
||||
};
|
||||
|
||||
if (value.is_value_list()) {
|
||||
auto const& value_list = value.as_value_list();
|
||||
Vector<WillChange::WillChangeEntry> will_change_entries;
|
||||
for (auto const& style_value : value_list.values()) {
|
||||
if (auto entry = to_will_change_entry(*style_value); entry.has_value())
|
||||
will_change_entries.append(*entry);
|
||||
}
|
||||
return WillChange(move(will_change_entries));
|
||||
auto const& value_list = value.as_value_list();
|
||||
Vector<WillChange::WillChangeEntry> will_change_entries;
|
||||
for (auto const& style_value : value_list.values()) {
|
||||
if (auto entry = to_will_change_entry(*style_value); entry.has_value())
|
||||
will_change_entries.append(*entry);
|
||||
}
|
||||
|
||||
auto will_change_entry = to_will_change_entry(value);
|
||||
if (will_change_entry.has_value())
|
||||
return WillChange({ *will_change_entry });
|
||||
return WillChange::make_auto();
|
||||
return WillChange(move(will_change_entries));
|
||||
}
|
||||
|
||||
CSSPixels ComputedProperties::font_size() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue