| Index: Source/core/rendering/RenderReplaced.cpp
|
| diff --git a/Source/core/rendering/RenderReplaced.cpp b/Source/core/rendering/RenderReplaced.cpp
|
| index 885b9b0493fb58393734aaa25f09e3ca56ccfce1..69bfa7180ea2da8dd1e9b601538c6a46976c4ee9 100644
|
| --- a/Source/core/rendering/RenderReplaced.cpp
|
| +++ b/Source/core/rendering/RenderReplaced.cpp
|
| @@ -401,6 +401,8 @@ LayoutUnit RenderReplaced::computeReplacedLogicalWidth(ShouldComputePreferred sh
|
| // 'width' is undefined in CSS 2.1. However, it is suggested that, if the containing block's width does not itself depend on the replaced element's width, then
|
| // the used value of 'width' is calculated from the constraint equation used for block-level, non-replaced elements in normal flow.
|
| if (computedHeightIsAuto && !hasIntrinsicWidth && !hasIntrinsicHeight) {
|
| + if (shouldComputePreferred == ComputePreferred)
|
| + return 0;
|
| // The aforementioned 'constraint equation' used for block-level, non-replaced elements in normal flow:
|
| // 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' = width of containing block
|
| LayoutUnit logicalWidth;
|
|
|