equal
deleted
inserted
replaced
1454 // is not specified explicitly, and this element is not absolutely positioned. |
1454 // is not specified explicitly, and this element is not absolutely positioned. |
1455 // In standard mode, we try to follow this rule. |
1455 // In standard mode, we try to follow this rule. |
1456 if (!style()->htmlHacks() && cb->style()->height().isAuto() && !isPositioned() && !cb->isRenderView() && !cb->isTableCell()) { |
1456 if (!style()->htmlHacks() && cb->style()->height().isAuto() && !isPositioned() && !cb->isRenderView() && !cb->isTableCell()) { |
1457 IntSize size = intrinsicSize(); |
1457 IntSize size = intrinsicSize(); |
1458 // Try to keep aspect ratio. |
1458 // Try to keep aspect ratio. |
1459 int h = size.width() ? calcReplacedWidth() * size.height() / size.width() : size.height(); |
1459 int h = size.height(); |
|
1460 if (size.width() && (style()->width().isFixed() || style()->width().isPercent())) |
|
1461 h = calcReplacedWidth() * size.height() / size.width(); |
1460 if (h > 0) |
1462 if (h > 0) |
1461 return calcContentBoxHeight(h); |
1463 return calcContentBoxHeight(h); |
1462 } |
1464 } |
1463 |
1465 |
1464 int availableHeight = isPositioned() ? containingBlockHeightForPositioned(cb) : cb->availableHeight(); |
1466 int availableHeight = isPositioned() ? containingBlockHeightForPositioned(cb) : cb->availableHeight(); |
1465 |
1467 |
1466 // It is necessary to use the border-box to match WinIE's broken |
1468 // It is necessary to use the border-box to match WinIE's broken |