Index: third_party/WebKit/Source/core/layout/LayoutTableCell.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp |
index 87e7a70e8e2c30e940f9b394443a990bee8c3da3..2c5e484fd2ccf292f69f8f8c7a0996b99408f50a 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp |
@@ -206,7 +206,22 @@ void LayoutTableCell::ComputePreferredLogicalWidths() { |
// grids before the child cells try to use them. |
Table()->RecalcSectionsIfNeeded(); |
+ // We don't want the preferred width from children to be affected by any |
mstensho (USE GERRIT)
2017/05/12 11:44:07
Agreed. No preferred width calculation code should
rhogan
2017/05/12 19:12:23
Here you go:
diff --git a/third_party/WebKit/Sour
mstensho (USE GERRIT)
2017/05/15 06:50:09
Here's the problem. Calculating preferred/intrinsi
|
+ // notional height on the cell, such as can happen when a percent sized image |
+ // scales up its width to match the available height. Setting a zero override |
+ // height prevents this from happening. |
+ LayoutUnit content_height = HasOverrideLogicalContentHeight() |
+ ? OverrideLogicalContentHeight() |
+ : LayoutUnit(-1); |
+ SetOverrideLogicalContentHeight(LayoutUnit()); |
mstensho (USE GERRIT)
2017/05/16 07:57:54
You wrote:
|
+ |
rhogan
2017/05/01 16:12:38
OK I know this is ugly, but I think what makes cel
mstensho (USE GERRIT)
2017/05/12 11:44:07
Yeah, if we really need a special height override
|
LayoutBlockFlow::ComputePreferredLogicalWidths(); |
+ |
+ if (content_height > -1) |
+ SetOverrideLogicalContentHeight(content_height); |
+ else |
+ ClearOverrideLogicalContentHeight(); |
mstensho (USE GERRIT)
2017/05/16 07:57:54
And if it's possible to clear it above, you won't
|
+ |
if (GetNode() && Style()->AutoWrap()) { |
// See if nowrap was set. |
Length w = StyleOrColLogicalWidth(); |