vaev-layout: Initial implementation of float.#94
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements initial support for CSS floats in the vaev layout engine. The implementation adds float positioning logic and integrates it into the existing layout system.
- Adds a
FloatsContainerclass to manage float placement and available space calculations - Integrates float handling into block layout and paint ordering
- Updates condition checks to use logical operators as per coding guidelines
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vaev-engine/values/insets.cpp | Updates logical operator from ` |
| src/vaev-engine/layout/paint.cpp | Adds float consideration to stacking context logic |
| src/vaev-engine/layout/mod.cpp | Exports the new floats module |
| src/vaev-engine/layout/floats.cpp | Implements the complete FloatsContainer class for float management |
| src/vaev-engine/layout/builder.cpp | Updates display logic to handle floated elements as block-level |
| src/vaev-engine/layout/block.cpp | Integrates float placement into block formatting context |
| FloatsContainer(Vec2Au origin, Au inlineSize) | ||
| : _origin(origin), _inlineSize(inlineSize) {} |
There was a problem hiding this comment.
Constructors should be O(1) and lightweight. The current constructors are already simple, but consider making the parameterized constructor explicit to prevent unintended implicit conversions.
| FloatsContainer(Vec2Au origin, Au inlineSize) | ||
| : _origin(origin), _inlineSize(inlineSize) {} | ||
|
|
||
| FloatsContainer() : _origin({0_au, 0_au}), _inlineSize(0_au) {} |
There was a problem hiding this comment.
Constructors should be O(1) and lightweight. The current constructors are already simple, but consider making the parameterized constructor explicit to prevent unintended implicit conversions.
This is a first step into getting floats working in vaev.