Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| index 405cfa8fa480d7b8e0c57767319f7d3be211aec1..43cb1f4b3a236d1df36a95565827fcba281b7463 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| @@ -2588,10 +2588,14 @@ LayoutUnit LayoutBox::computePercentageLogicalHeight(const Length& height) const |
| availableHeight = overrideContainingBlockContentLogicalHeight(); |
| } else if (cb->isTableCell()) { |
| if (!skippedAutoHeightContainingBlock) { |
| - // Table cells violate what the CSS spec says to do with heights. Basically we |
| - // don't care if the cell specified a height or not. We just always make ourselves |
| - // be a percentage of the cell's current content height. |
| - if (!cb->hasOverrideLogicalContentHeight()) { |
| + // The second clause in this conditional (after the ||) is to support this line from the |
| + // definition of height in CSS 2.2: |
| + // "If the height of the containing block is not specified explicitly (i.e., it depends on |
| + // content height), and this element is not absolutely positioned, the used height is |
| + // calculated as if 'auto' was specified." |
| + // But FF doesn't apply this logic (1) in quirks mode or (2) when "this element" is a table. |
|
mstensho (USE GERRIT)
2016/01/21 20:21:33
https://dev.windows.com/en-us/microsoft-edge/tools
dgrogan
2016/01/22 00:08:09
Yeah, Edge shows the red square :(
mstensho (USE GERRIT)
2016/01/22 10:15:36
I still think we take the chance and land this cha
dgrogan
2016/01/22 17:41:48
His answer for now is "don't know, will ask around
|
| + // Though I can't find documentation to support either of those. |
|
mstensho (USE GERRIT)
2016/01/21 20:21:33
And I don't think you ever will. Because, tables!!
dgrogan
2016/01/22 00:08:09
Done.
|
| + if (!cb->hasOverrideLogicalContentHeight() || (!document().inQuirksMode() && !isTable() && cbstyle.logicalHeight().isAuto())) { |
| // Normally we would let the cell size intrinsically, but scrolling overflow has to be |
| // treated differently, since WinIE lets scrolled overflow regions shrink as needed. |
| // While we can't get all cases right, we can at least detect when the cell has a specified |