Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutTableSection.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp |
| index afb1424af20b17dd535baaf7b8b72eb90a7b5c23..6bd887853b138426e7af016b2ccd36550ccca2da 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp |
| @@ -320,7 +320,10 @@ void LayoutTableSection::distributeExtraRowSpanHeightToPercentRows(LayoutTableCe |
| if (percent > 0 && extraRowSpanningHeight > 0) { |
| // TODO(alancutter): Make this work correctly for calc lengths. |
| if (m_grid[row].logicalHeight.hasPercent()) { |
| - int toAdd = (tableHeight * m_grid[row].logicalHeight.percent() / 100) - rowsHeight[row - rowIndex]; |
| + float maxPercent = 100.0; |
|
mstensho (USE GERRIT)
2015/10/16 18:19:13
I see no need for |maxPercent|. Just put 100.0 in
a.suchit2
2015/10/19 10:01:04
100.0 can not be used directly inside std::min bec
mstensho (USE GERRIT)
2015/10/19 18:17:47
So float(100.0) should work, then.
a.suchit2
2015/10/20 05:15:07
ok I will do it but I am not sure that it is accep
|
| + int toAdd = (tableHeight * |
| + std::min(m_grid[row].logicalHeight.percent(), maxPercent) / 100) |
|
mstensho (USE GERRIT)
2015/10/16 18:19:13
Say, shouldn't you really divide by |totalPercent|
a.suchit2
2015/10/19 10:01:04
If we are using the |totalPercent| in place of 100
|
| + - rowsHeight[row - rowIndex]; |
| // FIXME: Note that this is wrong if we have a percentage above 100% and may make us grow |
|
mstensho (USE GERRIT)
2015/10/16 18:19:13
I guess this would no longer be the case, and that
a.suchit2
2015/10/19 10:01:04
Yes, we can remove it.
|
| // above the available space. |