Bug 166061 - RenderFlexibleBox::applyStretchAlignmentToChild uses wrong available width for constrainLogicalWidthInRegionByMinMax
Summary: RenderFlexibleBox::applyStretchAlignmentToChild uses wrong available width fo...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-12-20 07:07 PST by Christian Biesinger
Modified: 2017-02-28 10:48 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Biesinger 2016-12-20 07:07:05 PST
From Chrome bug https://bugs.chromium.org/p/chromium/issues/detail?id=675333

The code here:
https://trac.webkit.org/browser/trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp#L1499

            childWidth = child.constrainLogicalWidthInRegionByMinMax(childWidth, childWidth, *this);

Should not pass childWidth() as the second argument -- that will lead to an incorrect percentage calculation for multiline column flexboxes or children with margins in a column flexbox. See the mentioned Chrome bug for a testcase. Fix should be to replace the second childWidth with contentLogicalWidth().
Comment 1 Radar WebKit Bug Importer 2016-12-21 17:29:11 PST
<rdar://problem/29780895>
Comment 2 Kyle Bishop 2017-02-06 22:42:43 PST
This is a confirmed bug in Chrome with a known and easy fix. Bumping this to request an easy patch because this bug affects a number of CSS/JS layout frameworks, and causes more harm the longer the bug lingers.

Thanks!
Comment 3 Dave Hyatt 2017-02-28 10:48:09 PST
This was fixed (and atest case added) by my Blink merge to flex box.