WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
117436
Correctly calculate auto margins for column flows
https://bugs.webkit.org/show_bug.cgi?id=117436
Summary
Correctly calculate auto margins for column flows
Ryosuke Niwa
Reported
2013-06-10 16:07:48 PDT
Consider merging
https://chromium.googlesource.com/chromium/blink/+/4727602ff32037dede84f2acd9534d6256f3e001
In RenderBox::computeInlineDirectionMargins, we have to pretend that auto margins are zero so that the line cross size gets calculated correctly (compare
http://dev.w3.org/csswg/css-flexbox/#auto-margins
) That fix exposed a bug in RenderFlexibleBox::updateAutoMarginsInCrossAxis, which needs to take LTR/RTL-ness into account -- it needs to adjust the position iff margin-before is auto, which can be margin-right. This CL also adds a few comments in an attempt to clarify the code a little.
Attachments
Add attachment
proposed patch, testcase, etc.
Ahmad Saleem
Comment 1
2022-08-26 14:39:19 PDT
I am able to reproduce this issue kind of based on linked Chromium patch: Link -
https://jsfiddle.net/abgLcdpq/show
*** Safari Technology Preview 152 *** Shows "only four" - centeredWithAlignSelf *** Chrome Canary 107 *** Shows "five" - centeredWithAlignSelf *** Firefox Nightly 106 *** Shows "five" - centeredWithAlignSelf _____________________________ Just wanted to share updated results. Thanks!
Ahmad Saleem
Comment 2
2022-08-29 13:52:19 PDT
This is already added in RenderBox.cpp:
https://github.com/WebKit/WebKit/blob/4385a00da760f9db033925547caa238d3a9f0885/Source/WebCore/rendering/RenderBox.cpp#L3065
RenderFlexibleBox.cpp - Added this already
https://github.com/WebKit/WebKit/blob/4ccdb2ac7f7c989dd9d92ec1c42dccc44ef21b6a/Source/WebCore/rendering/RenderFlexibleBox.cpp#L1288
https://github.com/WebKit/WebKit/blob/4ccdb2ac7f7c989dd9d92ec1c42dccc44ef21b6a/Source/WebCore/rendering/RenderFlexibleBox.cpp#L1302
https://github.com/WebKit/WebKit/blob/4ccdb2ac7f7c989dd9d92ec1c42dccc44ef21b6a/Source/WebCore/rendering/RenderFlexibleBox.cpp#L1315
I think this was added but now we still have different behavior as mentioned in my previous comment. :-?
Radar WebKit Bug Importer
Comment 3
2022-08-30 12:12:08 PDT
<
rdar://problem/99344089
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug