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

Reapply line-height change with fixes for normal line-height and inline images. #532

Merged
merged 3 commits into from Jun 21, 2013
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Fix computing line height for generic boxes and images.

  • Loading branch information
jrfeenst committed Jun 21, 2013
commit 09a4ba8d7560bdffee43b14c538261bb97b20cd6
@@ -786,6 +786,10 @@ impl InlineFlowData {
let height = Au::from_px(size.get_or_default(Size2D(0, 0)).height);
image_box.base.position.size.height = height;

if height > linebox_height {
linebox_height = height;
}

image_box.base.position.translate(&Point2D(Au(0), -height))
}
TextRenderBoxClass(text_box) => {
@@ -822,6 +826,9 @@ impl InlineFlowData {
// and other replaced content.
// FIXME(pcwalton): This seems clownshoes; can we remove?
generic_box.position.size.height = Au::from_px(30);
if generic_box.position.size.height > linebox_height {
linebox_height = generic_box.position.size.height;
}
generic_box.position
}
// FIXME(pcwalton): This isn't very type safe!
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.