зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
16bf33605a
Коммит
13d56c2822
|
@ -265,12 +265,9 @@ impl Flow for TableFlow {
|
||||||
// if there are any, or among all the columns if all are specified.
|
// if there are any, or among all the columns if all are specified.
|
||||||
if total_column_inline_size < content_inline_size &&
|
if total_column_inline_size < content_inline_size &&
|
||||||
num_unspecified_inline_sizes == 0 {
|
num_unspecified_inline_sizes == 0 {
|
||||||
let extra_column_inline_size = content_inline_size;
|
let ratio = content_inline_size.to_subpx() / total_column_inline_size.to_subpx();
|
||||||
(content_inline_size - total_column_inline_size) /
|
|
||||||
(self.column_inline_sizes.len() as i32);
|
|
||||||
for column_inline_size in self.column_inline_sizes.iter_mut() {
|
for column_inline_size in self.column_inline_sizes.iter_mut() {
|
||||||
column_inline_size.minimum_length = column_inline_size.minimum_length +
|
column_inline_size.minimum_length = column_inline_size.minimum_length.scale_by(ratio);
|
||||||
extra_column_inline_size;
|
|
||||||
column_inline_size.percentage = 0.0;
|
column_inline_size.percentage = 0.0;
|
||||||
}
|
}
|
||||||
} else if num_unspecified_inline_sizes != 0 {
|
} else if num_unspecified_inline_sizes != 0 {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче