LibWeb: Parse and store the opacity property

This commit is contained in:
Egor Ananyin 2021-07-23 13:18:09 +03:00 committed by Ali Mohammad Pur
commit 0e6ba6e1d3
Notes: sideshowbarker 2024-07-18 08:23:50 +09:00
5 changed files with 23 additions and 0 deletions

View file

@ -327,6 +327,9 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& specified_style)
computed_values.set_background_color(specified_style.color_or_fallback(CSS::PropertyID::BackgroundColor, document(), Color::Transparent));
computed_values.set_z_index(specified_style.z_index());
computed_values.set_opacity(specified_style.opacity());
if (computed_values.opacity() == 0)
m_visible = false;
if (auto width = specified_style.property(CSS::PropertyID::Width); width.has_value())
m_has_definite_width = true;