mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +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
|
@ -35,6 +35,11 @@ public:
|
|||
|
||||
virtual void paint(PaintContext&, PaintPhase) const override;
|
||||
|
||||
StackingContext* stacking_context() { return m_stacking_context; }
|
||||
StackingContext const* stacking_context() const { return m_stacking_context; }
|
||||
void set_stacking_context(NonnullOwnPtr<StackingContext>);
|
||||
void invalidate_stacking_context();
|
||||
|
||||
virtual Optional<CSSPixelRect> get_masking_area() const;
|
||||
virtual Optional<Gfx::Bitmap::MaskKind> get_mask_type() const { return {}; }
|
||||
virtual RefPtr<Gfx::ImmutableBitmap> calculate_mask(PaintContext&, CSSPixelRect const&) const { return {}; }
|
||||
|
@ -276,6 +281,8 @@ private:
|
|||
virtual DispatchEventOfSameName handle_mouseup(Badge<EventHandler>, CSSPixelPoint, unsigned button, unsigned modifiers) override;
|
||||
virtual DispatchEventOfSameName handle_mousemove(Badge<EventHandler>, CSSPixelPoint, unsigned buttons, unsigned modifiers) override;
|
||||
|
||||
OwnPtr<StackingContext> m_stacking_context;
|
||||
|
||||
Optional<OverflowData> m_overflow_data;
|
||||
|
||||
CSSPixelPoint m_offset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue