mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user