Index: Source/core/rendering/RenderBoxModelObject.cpp |
diff --git a/Source/core/rendering/RenderBoxModelObject.cpp b/Source/core/rendering/RenderBoxModelObject.cpp |
index 687b5f4faf90176e6690b5d841c4a986f8325b74..4bdf38435e2709ee3bb011ad8860f1e98319f63d 100644 |
--- a/Source/core/rendering/RenderBoxModelObject.cpp |
+++ b/Source/core/rendering/RenderBoxModelObject.cpp |
@@ -805,18 +805,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. |
+ ASSERT(!intrinsicWidth.isPercent()); |
+ ASSERT(!intrinsicHeight.isPercent()); |
- // 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); |
- } |
- |
- 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()); |