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

Fix flex item with intrinsic aspect ratio #15149

Open
shinglyu opened this issue Jan 23, 2017 · 3 comments
Open

Fix flex item with intrinsic aspect ratio #15149

shinglyu opened this issue Jan 23, 2017 · 3 comments
Labels
A-layout/flex S-blocked-on-external Something, somewhere else, needs to happen before this PR can be merged.

Comments

@shinglyu
Copy link
Contributor

Quote @stshine

flex item with intrinsic aspect ratio
Item like image that have its intrinsic ratio needs special handling to keep its ratio after flex lengths resolving. Currently servo handle them in https://github.com/servo/servo/blob/master/components/layout/fragment.rs#L488 , which get the size info directly from style, thus won't fit into flexbox. That method needs to be changed, maybe isolating logic for intrinsic aspect ratio is good idea.

Maybe related? https://github.com/servo/servo/pull/14490/files

@shinglyu
Copy link
Contributor Author

@stshine
Copy link
Contributor

stshine commented Jan 24, 2017

Yeah, now you can know whether a fragment has intrinsic aspect ratio by the has_intrinsic_ratio() method. And you may need to isolate some code from calculate_replaced_sizes() and reuse the logic.

@shinglyu
Copy link
Contributor Author

shinglyu commented Feb 6, 2017

The css-test test cases are blocked by #15402, I'll take a look at that first.

@nox nox added the S-blocked-on-external Something, somewhere else, needs to happen before this PR can be merged. label Oct 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-layout/flex S-blocked-on-external Something, somewhere else, needs to happen before this PR can be merged.
Projects
None yet
Development

No branches or pull requests

4 participants