mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:57:45 +00:00
LibWeb: Add virtuals to check if Paintable is PBox or PWithLines
Instead of inferring the type of paintables by looking at the type of their origin in the layout tree, let's ask them directly.
This commit is contained in:
parent
6b3af92262
commit
136ac1a6a5
4 changed files with 16 additions and 7 deletions
|
@ -197,6 +197,8 @@ protected:
|
|||
Vector<ShadowData> resolve_box_shadow_data() const;
|
||||
|
||||
private:
|
||||
[[nodiscard]] virtual bool is_paintable_box() const final { return true; }
|
||||
|
||||
Optional<OverflowData> m_overflow_data;
|
||||
|
||||
CSSPixelPoint m_offset;
|
||||
|
@ -249,6 +251,8 @@ protected:
|
|||
PaintableWithLines(Layout::BlockContainer const&);
|
||||
|
||||
private:
|
||||
[[nodiscard]] virtual bool is_paintable_with_lines() const final { return true; }
|
||||
|
||||
Vector<Layout::LineBox> m_line_boxes;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue