| Index: Source/core/rendering/RenderReplaced.cpp
|
| diff --git a/Source/core/rendering/RenderReplaced.cpp b/Source/core/rendering/RenderReplaced.cpp
|
| index f93555ab2feb6afc6d9488571bce209a8a598061..cce808e4050ed74d2ace5cf20a51090340407c46 100644
|
| --- a/Source/core/rendering/RenderReplaced.cpp
|
| +++ b/Source/core/rendering/RenderReplaced.cpp
|
| @@ -390,6 +390,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;
|
|
|