Skip to content

Conversation

sleepy-monax
Copy link
Member

This is a first step into getting floats working in vaev.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 FloatsContainer class 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

Comment on lines +21 to +22
FloatsContainer(Vec2Au origin, Au inlineSize)
: _origin(origin), _inlineSize(inlineSize) {}
Copy link
Preview

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot generated this review using guidance from repository custom instructions.

FloatsContainer(Vec2Au origin, Au inlineSize)
: _origin(origin), _inlineSize(inlineSize) {}

FloatsContainer() : _origin({0_au, 0_au}), _inlineSize(0_au) {}
Copy link
Preview

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot generated this review using guidance from repository custom instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant