mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Add ComputedProperties::set_property_without_modifying_flags
There are a few places in style computation where we want to update the value of a property without modifying the inherited or important flags. Previously we would look up these flags and pass them to the normal `set_property` method but this is unnecessary and was easy to forget to do.
This commit is contained in:
parent
84762021b8
commit
823dd11b67
Notes:
github-actions[bot]
2025-10-27 09:53:13 +00:00
Author: https://github.com/Calme1709
Commit: 823dd11b67
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6590
Reviewed-by: https://github.com/AtkinsSJ ✅
3 changed files with 20 additions and 19 deletions
|
|
@ -118,11 +118,18 @@ void ComputedProperties::set_property(PropertyID id, NonnullRefPtr<StyleValue co
|
|||
{
|
||||
VERIFY(id >= first_longhand_property_id && id <= last_longhand_property_id);
|
||||
|
||||
m_property_values[to_underlying(id) - to_underlying(first_longhand_property_id)] = move(value);
|
||||
set_property_without_modifying_flags(id, move(value));
|
||||
set_property_important(id, important);
|
||||
set_property_inherited(id, inherited);
|
||||
}
|
||||
|
||||
void ComputedProperties::set_property_without_modifying_flags(PropertyID id, NonnullRefPtr<StyleValue const> value)
|
||||
{
|
||||
VERIFY(id >= first_longhand_property_id && id <= last_longhand_property_id);
|
||||
|
||||
m_property_values[to_underlying(id) - to_underlying(first_longhand_property_id)] = move(value);
|
||||
}
|
||||
|
||||
void ComputedProperties::revert_property(PropertyID id, ComputedProperties const& style_for_revert)
|
||||
{
|
||||
VERIFY(id >= first_longhand_property_id && id <= last_longhand_property_id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue