mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-28 05:07:35 +00:00
LibWeb: Correctly calculate static position rect when absolutely
positioned element is a descendant of inline-block Sets inline block offsets in InlineFormattingContext.cpp, but this is not enough. When static position rect is calculated during layout, not all ancestors of abspos box may have their offsets calculated yet (more info here: https://github.com/LadybirdBrowser/ladybird/pull/2583#issuecomment-2507140272). So now static position rect is calculated relative to static containing block during layout and calculation relative to actual containing block is done later in FormattingContext::layout_absolutely_positioned_element. Fixes wpt/css/CSS2/abspos/static-inside-inline-block.html
This commit is contained in:
parent
1821896ecf
commit
a6935299eb
Notes:
github-actions[bot]
2025-03-17 14:56:06 +00:00
Author: https://github.com/stasoid
Commit: a6935299eb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3845
Reviewed-by: https://github.com/kalenikaliaksandr ✅
11 changed files with 45 additions and 16 deletions
|
@ -90,6 +90,7 @@ struct LayoutState {
|
|||
void set_content_x(CSSPixels x) { offset.set_x(x); }
|
||||
void set_content_y(CSSPixels y) { offset.set_y(y); }
|
||||
|
||||
// offset from top-left corner of content area of box's containing block to top-left corner of box's content area
|
||||
CSSPixelPoint offset;
|
||||
|
||||
SizeConstraint width_constraint { SizeConstraint::None };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue