Commit 7da2b204 authored by davve's avatar davve Committed by Commit bot

Consistency in LayoutReplaced::computeReplacedLogicalWidth()

All other return values pass through
computeReplacedLogicalWidthRespectingMinMaxWidth, let this one do so
too.

Review URL: https://codereview.chromium.org/1637473002

Cr-Commit-Position: refs/heads/master@{#371761}
parent acce4131
......@@ -576,7 +576,7 @@ LayoutUnit LayoutReplaced::computeReplacedLogicalWidth(ShouldComputePreferred sh
// 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;
return computeReplacedLogicalWidthRespectingMinMaxWidth(0, ComputePreferred);
// 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 = containingBlock()->availableLogicalWidth();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment