mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-25 19:56:30 +00:00
Revert "LibWeb: Store visibility for Paintables"
This reverts commit 7dc8062283
.
This did not propagate correctly to paintables whose style was inherited
from an ancestor, causing rendering artifacts on https://linear.app/
This commit is contained in:
parent
657f1c37a8
commit
f4ee341a14
Notes:
github-actions[bot]
2025-08-20 07:16:27 +00:00
Author: https://github.com/awesomekling
Commit: f4ee341a14
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5917
Reviewed-by: https://github.com/gmta ✅
2 changed files with 7 additions and 3 deletions
|
@ -24,7 +24,6 @@ Paintable::Paintable(Layout::Node const& layout_node)
|
||||||
m_positioned = computed_values.position() != CSS::Positioning::Static;
|
m_positioned = computed_values.position() != CSS::Positioning::Static;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_visible = computed_values.visibility() == CSS::Visibility::Visible && computed_values.opacity() != 0;
|
|
||||||
m_fixed_position = computed_values.position() == CSS::Positioning::Fixed;
|
m_fixed_position = computed_values.position() == CSS::Positioning::Fixed;
|
||||||
m_sticky_position = computed_values.position() == CSS::Positioning::Sticky;
|
m_sticky_position = computed_values.position() == CSS::Positioning::Sticky;
|
||||||
m_absolutely_positioned = computed_values.position() == CSS::Positioning::Absolute;
|
m_absolutely_positioned = computed_values.position() == CSS::Positioning::Absolute;
|
||||||
|
@ -52,6 +51,12 @@ void Paintable::visit_edges(Cell::Visitor& visitor)
|
||||||
visitor.visit(m_containing_block.value());
|
visitor.visit(m_containing_block.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Paintable::is_visible() const
|
||||||
|
{
|
||||||
|
auto const& computed_values = this->computed_values();
|
||||||
|
return computed_values.visibility() == CSS::Visibility::Visible && computed_values.opacity() != 0;
|
||||||
|
}
|
||||||
|
|
||||||
DOM::Document const& Paintable::document() const
|
DOM::Document const& Paintable::document() const
|
||||||
{
|
{
|
||||||
return layout_node().document();
|
return layout_node().document();
|
||||||
|
|
|
@ -58,7 +58,7 @@ public:
|
||||||
|
|
||||||
void detach_from_layout_node();
|
void detach_from_layout_node();
|
||||||
|
|
||||||
[[nodiscard]] bool is_visible() const { return m_visible; }
|
[[nodiscard]] bool is_visible() const;
|
||||||
[[nodiscard]] bool is_positioned() const { return m_positioned; }
|
[[nodiscard]] bool is_positioned() const { return m_positioned; }
|
||||||
[[nodiscard]] bool is_fixed_position() const { return m_fixed_position; }
|
[[nodiscard]] bool is_fixed_position() const { return m_fixed_position; }
|
||||||
[[nodiscard]] bool is_sticky_position() const { return m_sticky_position; }
|
[[nodiscard]] bool is_sticky_position() const { return m_sticky_position; }
|
||||||
|
@ -163,7 +163,6 @@ private:
|
||||||
|
|
||||||
SelectionState m_selection_state { SelectionState::None };
|
SelectionState m_selection_state { SelectionState::None };
|
||||||
|
|
||||||
bool m_visible : 1 { false };
|
|
||||||
bool m_positioned : 1 { false };
|
bool m_positioned : 1 { false };
|
||||||
bool m_fixed_position : 1 { false };
|
bool m_fixed_position : 1 { false };
|
||||||
bool m_sticky_position : 1 { false };
|
bool m_sticky_position : 1 { false };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue