mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
LibWeb: Make computed opacity always available
No need to store opacity as Optional<float> as there's always a value (and the default initial value is 1.)
This commit is contained in:
parent
07f15aa550
commit
ff45eb7fb1
6 changed files with 14 additions and 20 deletions
|
@ -77,10 +77,7 @@ bool Node::establishes_stacking_context() const
|
|||
auto position = computed_values().position();
|
||||
if (position == CSS::Position::Absolute || position == CSS::Position::Relative || position == CSS::Position::Fixed || position == CSS::Position::Sticky)
|
||||
return true;
|
||||
auto opacity = computed_values().opacity();
|
||||
if (opacity.has_value() && opacity.value() != 1.0f)
|
||||
return true;
|
||||
return false;
|
||||
return computed_values().opacity() < 1.0f;
|
||||
}
|
||||
|
||||
HitTestResult Node::hit_test(const Gfx::IntPoint& position, HitTestType type) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue