Index: Source/core/rendering/RenderBox.cpp |
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp |
index ef86f2943fdc59b3cad488d411f7f2720369d011..7f49a876f9273f1109db01f3d90f58634cdd9ca4 100644 |
--- a/Source/core/rendering/RenderBox.cpp |
+++ b/Source/core/rendering/RenderBox.cpp |
@@ -3295,7 +3295,7 @@ void RenderBox::computePositionedLogicalWidthUsing(Length logicalWidth, const Re |
if (autoWidthShouldFitContent()) |
shrinkToFitWidth(availableSpace, logicalLeftValue, bordersPlusPadding, computedValues); |
else |
- computedValues.m_extent = availableSpace - (logicalLeftValue + valueForLength(logicalRight, containerLogicalWidth)); |
+ computedValues.m_extent = std::max<LayoutUnit>(0, availableSpace - (logicalLeftValue + valueForLength(logicalRight, containerLogicalWidth))); |
} else if (!logicalLeftIsAuto && !logicalWidthIsAuto && logicalRightIsAuto) { |
// RULE 6: (no need solve for right) |
logicalLeftValue = valueForLength(logicalLeft, containerLogicalWidth); |