Skip to content

Conversation

pauloamed
Copy link
Contributor

No description provided.

@pauloamed pauloamed force-pushed the palm/font-style branch 2 times, most recently from 5a8409c to 8366024 Compare July 18, 2025 06:59
export struct Computer {
Media _media;
Media const _media;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i think this is needed because after build(), the class has internal structures dependent on the media value. so having this attribute media not const allows us to set an invalid state on Computer

@pauloamed pauloamed requested a review from sleepy-monax July 18, 2025 07:04
@pauloamed
Copy link
Contributor Author

Guten Morgen @sleepy-monax I don't know how to set copilot to review this beautiful PR so we waste less neurons here.

@sleepy-monax sleepy-monax requested a review from Copilot July 18, 2025 07:14
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 CSS Page Size functionality for the Vaev engine, enabling proper handling of page dimensions in print layouts. The implementation adds support for the CSS size property as defined in the CSS Page Module Level 3 specification.

Key changes:

  • Added page size parsing and resolution logic with support for predefined paper sizes and custom dimensions
  • Refactored the style system to remove separate ComputedValues and consolidate font handling within SpecifiedValues
  • Implemented page bounds calculation considering margins and orientation

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/vaev-engine/values/page.cpp Added page size parsing with support for paper stock types and custom dimensions
src/vaev-engine/values/length.cpp Added absolute length resolution function for converting CSS units to application units
src/vaev-engine/style/specified.cpp Added page size property to style values and integrated font face handling
src/vaev-engine/style/props.cpp Implemented PageSizeProp parser for CSS size property
src/vaev-engine/style/computer.cpp Added page base size computation and refactored font handling
src/vaev-engine/layout/values.cpp Refactored length resolution to use centralized absolute length conversion
src/vaev-engine/layout/builder.cpp Updated box construction to remove separate font face parameter
src/vaev-engine/layout/base.cpp Simplified Box structure by removing separate font face member
src/vaev-engine/driver/print.cpp Implemented page bounds calculation and media size updates
src/vaev-engine/dom/element.cpp Removed computed values structure and methods
Comments suppressed due to low confidence (1)

@pauloamed
Copy link
Contributor Author

Related PR: skift-org/karm#6

@pauloamed pauloamed force-pushed the palm/font-style branch 2 times, most recently from 3b7f4ae to e6ea763 Compare July 22, 2025 14:02
""s,
(f64)pageRect.size().width * media.resolution.toDppx(),
(f64)pageRect.size().height * media.resolution.toDppx()
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we try to name these pages?

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