mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
LibWeb: Resolve relative offsets *once* after layout
Instead of applying relative offsets (like position:relative insets) during painting and hit testing, we now do a pass at the end of layout and assign the final resolved offsets to paintables. This makes painting and hit testing easier since they don't have to think about relative offsets, and it also fixes a bug where offsets were not applied to text fragments inside inline-flow elements that were themselves position:relative.
This commit is contained in:
parent
481fdfee68
commit
25a3d0d643
6 changed files with 117 additions and 24 deletions
|
@ -172,6 +172,9 @@ struct LayoutState {
|
|||
|
||||
LayoutState const* m_parent { nullptr };
|
||||
LayoutState const& m_root;
|
||||
|
||||
private:
|
||||
void resolve_relative_positions(Vector<Painting::PaintableWithLines&> const&);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue