mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 08:36:12 +00:00
LibWeb: Allow stacking context to only be created by PaintableBox
For a while we used the wider Paintable type for stacking context, because it was allowed to be created by InlinePaintable and PaintableBox. Now, when InlinePaintable type is gone, we can use more specific PaintableBox type for a stacking context.
This commit is contained in:
parent
ed80e929e5
commit
9f541c363d
Notes:
github-actions[bot]
2024-11-18 19:08:27 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 9f541c363d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2421
7 changed files with 103 additions and 120 deletions
|
@ -146,13 +146,9 @@ public:
|
|||
return TraversalDecision::Continue;
|
||||
}
|
||||
|
||||
StackingContext* stacking_context() { return m_stacking_context; }
|
||||
StackingContext const* stacking_context() const { return m_stacking_context; }
|
||||
void set_stacking_context(NonnullOwnPtr<StackingContext>);
|
||||
bool has_stacking_context() const;
|
||||
StackingContext* enclosing_stacking_context();
|
||||
|
||||
void invalidate_stacking_context();
|
||||
|
||||
virtual void before_paint(PaintContext&, PaintPhase) const { }
|
||||
virtual void after_paint(PaintContext&, PaintPhase) const { }
|
||||
|
||||
|
@ -251,8 +247,6 @@ private:
|
|||
GC::Ref<Layout::Node const> m_layout_node;
|
||||
Optional<GC::Ptr<PaintableBox>> mutable m_containing_block;
|
||||
|
||||
OwnPtr<StackingContext> m_stacking_context;
|
||||
|
||||
SelectionState m_selection_state { SelectionState::None };
|
||||
|
||||
bool m_positioned : 1 { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue