servo: Merge #4114 - Fix layout on google search results (from glennw:table-layout-fix); r=pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 431644bfc8208b613bf69a89826376ffb143cb58
This commit is contained in:
Glenn Watson 2014-11-26 18:39:38 -07:00
Родитель 16bf33605a
Коммит 13d56c2822
1 изменённых файлов: 2 добавлений и 5 удалений

Просмотреть файл

@ -265,12 +265,9 @@ impl Flow for TableFlow {
// if there are any, or among all the columns if all are specified.
if total_column_inline_size < content_inline_size &&
num_unspecified_inline_sizes == 0 {
let extra_column_inline_size = content_inline_size;
(content_inline_size - total_column_inline_size) /
(self.column_inline_sizes.len() as i32);
let ratio = content_inline_size.to_subpx() / total_column_inline_size.to_subpx();
for column_inline_size in self.column_inline_sizes.iter_mut() {
column_inline_size.minimum_length = column_inline_size.minimum_length +
extra_column_inline_size;
column_inline_size.minimum_length = column_inline_size.minimum_length.scale_by(ratio);
column_inline_size.percentage = 0.0;
}
} else if num_unspecified_inline_sizes != 0 {