Index: Source/core/rendering/RenderBoxModelObject.cpp |
diff --git a/Source/core/rendering/RenderBoxModelObject.cpp b/Source/core/rendering/RenderBoxModelObject.cpp |
index 53d7164c9254ad60cea76dd2d87510bba9da9e01..2f54e9542489a0b91185bc47b50138c76890c631 100644 |
--- a/Source/core/rendering/RenderBoxModelObject.cpp |
+++ b/Source/core/rendering/RenderBoxModelObject.cpp |
@@ -187,6 +187,11 @@ bool RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight() const |
if (cb->isTableCell()) |
return false; |
+ // Match RenderBox::availableLogicalHeightUsing by special casing |
+ // the render view. The available height is taken from the frame. |
+ if (cb->isRenderView()) |
+ return false; |
+ |
if (!cb->style()->logicalHeight().isAuto() || (!cb->style()->logicalTop().isAuto() && !cb->style()->logicalBottom().isAuto())) |
return false; |
@@ -805,18 +810,10 @@ IntSize RenderBoxModelObject::calculateImageIntrinsicDimensions(StyleImage* imag |
FloatSize intrinsicRatio; |
image->computeIntrinsicDimensions(this, intrinsicWidth, intrinsicHeight, intrinsicRatio); |
- // Intrinsic dimensions expressed as percentages must be resolved relative to the dimensions of the rectangle |
- // that establishes the coordinate system for the 'background-position' property. |
- |
- // FIXME: Remove unnecessary rounding when layout is off ints: webkit.org/b/63656 |
- if (intrinsicWidth.isPercent() && intrinsicHeight.isPercent() && intrinsicRatio.isEmpty()) { |
- // Resolve width/height percentages against positioningAreaSize, only if no intrinsic ratio is provided. |
- int resolvedWidth = static_cast<int>(round(positioningAreaSize.width() * intrinsicWidth.percent() / 100)); |
- int resolvedHeight = static_cast<int>(round(positioningAreaSize.height() * intrinsicHeight.percent() / 100)); |
- return IntSize(resolvedWidth, resolvedHeight); |
- } |
+ ASSERT(!intrinsicWidth.isPercent()); |
+ ASSERT(!intrinsicHeight.isPercent()); |
- IntSize resolvedSize(intrinsicWidth.isFixed() ? intrinsicWidth.value() : 0, intrinsicHeight.isFixed() ? intrinsicHeight.value() : 0); |
+ IntSize resolvedSize(intrinsicWidth.value(), intrinsicHeight.value()); |
IntSize minimumSize(resolvedSize.width() > 0 ? 1 : 0, resolvedSize.height() > 0 ? 1 : 0); |
if (shouldScaleOrNot == ScaleByEffectiveZoom) |
resolvedSize.scale(style()->effectiveZoom()); |