Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change conversion to appunit from float of percentage calcuation #102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Asun0204
Copy link

change conversion to appunit from float of percentage calcuation, prevent child box size is calculated too large.

@Asun0204 Asun0204 changed the title [fixbug] change conversion to appunit from float of percentage calcuation change conversion to appunit from float of percentage calcuation Dec 26, 2024
@Loirooriol
Copy link
Contributor

Since we want to test this before publishing a new release of app units, let's inline the code here for now.

@Loirooriol
Copy link
Contributor

BTW, when creating a PR it's better not to use your main branch.

Loirooriol added a commit to Asun0204/servo that referenced this pull request Jan 8, 2025
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Loirooriol added a commit to Asun0204/servo that referenced this pull request Jan 8, 2025
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Copy link
Contributor

@Loirooriol Loirooriol left a comment

Choose a reason for hiding this comment

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

It may make more sense to modify this instead:

impl From<CSSPixelLength> for Au {
#[inline]
fn from(len: CSSPixelLength) -> Self {
Au::from_f32_px(len.0)
}
}

I thought that would be more likely to affect Firefox, but I have tried commenting that (and its callers) out, and Firefox compiles fine, so it's not used.

prevent the situation that child box size is calculated too large.

Signed-off-by: Asun0204 <Asun0204@163.com>
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.

2 participants