1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:37:43 +00:00

LibWeb: Improve computation of a layout node's containing block

In particular, we now compute the containing block of boxes with
position:absolute and position:fixed (more) correctly.
This commit is contained in:
Andreas Kling 2020-06-05 16:54:28 +02:00
parent 762617a028
commit 7fcf61be35
3 changed files with 43 additions and 5 deletions

View file

@ -81,7 +81,8 @@ public:
callback(*node);
}
virtual const char* class_name() const { return "LayoutNode"; }
virtual const char* class_name() const = 0;
virtual bool is_root() const { return false; }
virtual bool is_text() const { return false; }
virtual bool is_block() const { return false; }
virtual bool is_replaced() const { return false; }
@ -108,8 +109,12 @@ public:
virtual void layout(LayoutMode);
virtual void render(RenderingContext&);
bool is_absolutely_positioned() const;
const LayoutBlock* containing_block() const;
bool can_contain_boxes_with_position_absolute() const;
virtual LayoutNode& inline_wrapper() { return *this; }
const StyleProperties& style() const;