mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:17:45 +00:00
LibWeb: Make Layout::Node::containing_block() return a Layout::Box
Containing blocks can be formed by boxes that aren't block containers, so let's make this return a Box and work towards type correctness here.
This commit is contained in:
parent
d5480a44e5
commit
51555dea7c
6 changed files with 42 additions and 30 deletions
|
@ -121,7 +121,7 @@ public:
|
|||
|
||||
void set_needs_display() const { const_cast<Layout::Node&>(*m_layout_node).set_needs_display(); }
|
||||
|
||||
Layout::BlockContainer const* containing_block() const
|
||||
Layout::Box const* containing_block() const
|
||||
{
|
||||
if (!m_containing_block.has_value())
|
||||
m_containing_block = m_layout_node->containing_block();
|
||||
|
@ -141,7 +141,7 @@ protected:
|
|||
|
||||
private:
|
||||
JS::NonnullGCPtr<Layout::Node> m_layout_node;
|
||||
Optional<JS::GCPtr<Layout::BlockContainer>> mutable m_containing_block;
|
||||
Optional<JS::GCPtr<Layout::Box>> mutable m_containing_block;
|
||||
};
|
||||
|
||||
inline DOM::Node* HitTestResult::dom_node()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue