mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:57:44 +00:00
LibWeb: Allow inline nodes to establish a stacking context
With this change, a stacking context can be established by any paintable, including inline paintables. The stacking context traversal is updated to remove the assumption that the stacking context root is paintable box.
This commit is contained in:
parent
6c645f3a9f
commit
3cf5ad002a
12 changed files with 253 additions and 151 deletions
|
@ -25,8 +25,6 @@ public:
|
|||
|
||||
virtual void paint(PaintContext&, PaintPhase) const override;
|
||||
|
||||
[[nodiscard]] bool is_visible() const;
|
||||
|
||||
virtual Optional<CSSPixelRect> get_masking_area() const { return {}; }
|
||||
virtual Optional<Gfx::Bitmap::MaskKind> get_mask_type() const { return {}; }
|
||||
virtual RefPtr<Gfx::Bitmap> calculate_mask(PaintContext&, CSSPixelRect const&) const { return {}; }
|
||||
|
@ -122,17 +120,9 @@ public:
|
|||
|
||||
void set_overflow_data(OverflowData data) { m_overflow_data = move(data); }
|
||||
|
||||
StackingContext* stacking_context() { return m_stacking_context; }
|
||||
StackingContext const* stacking_context() const { return m_stacking_context; }
|
||||
void set_stacking_context(NonnullOwnPtr<StackingContext>);
|
||||
StackingContext* enclosing_stacking_context();
|
||||
|
||||
DOM::Node const* dom_node() const { return layout_box().dom_node(); }
|
||||
DOM::Node* dom_node() { return layout_box().dom_node(); }
|
||||
|
||||
DOM::Document const& document() const { return layout_box().document(); }
|
||||
DOM::Document& document() { return layout_box().document(); }
|
||||
|
||||
virtual void apply_scroll_offset(PaintContext&, PaintPhase) const override;
|
||||
virtual void reset_scroll_offset(PaintContext&, PaintPhase) const override;
|
||||
|
||||
|
@ -143,8 +133,6 @@ public:
|
|||
|
||||
virtual bool handle_mousewheel(Badge<EventHandler>, CSSPixelPoint, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y) override;
|
||||
|
||||
void invalidate_stacking_context();
|
||||
|
||||
enum class ConflictingElementKind {
|
||||
Cell,
|
||||
Row,
|
||||
|
@ -194,8 +182,6 @@ public:
|
|||
void set_box_shadow_data(Vector<ShadowData> box_shadow_data) { m_box_shadow_data = move(box_shadow_data); }
|
||||
Vector<ShadowData> const& box_shadow_data() const { return m_box_shadow_data; }
|
||||
|
||||
PaintableBox const* nearest_scrollable_ancestor_within_stacking_context() const;
|
||||
|
||||
protected:
|
||||
explicit PaintableBox(Layout::Box const&);
|
||||
|
||||
|
@ -217,8 +203,6 @@ private:
|
|||
CSSPixelPoint m_offset;
|
||||
CSSPixelSize m_content_size;
|
||||
|
||||
OwnPtr<StackingContext> m_stacking_context;
|
||||
|
||||
Optional<CSSPixelRect> mutable m_absolute_rect;
|
||||
Optional<CSSPixelRect> mutable m_absolute_paint_rect;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue