WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
86528
implement new negative flexing algorithm
https://bugs.webkit.org/show_bug.cgi?id=86528
Summary
implement new negative flexing algorithm
Tony Chang
Reported
2012-05-15 14:25:55 PDT
Correct formula for the desired result: space-shortage = sum(flex-basis) - available-space shrink-factor = space-shortage / sum(flex-basis * negative-flex)) main-size = flex-basis * (1 - shrink-factor * negative-flex)) See
http://lists.w3.org/Archives/Public/www-style/2012May/0291.html
for a test case and some rationale.
Attachments
Patch
(13.04 KB, patch)
2012-05-25 14:48 PDT
,
Tony Chang
no flags
Details
Formatted Diff
Diff
Patch
(14.94 KB, patch)
2012-05-25 15:53 PDT
,
Tony Chang
no flags
Details
Formatted Diff
Diff
Patch for landing
(14.98 KB, patch)
2012-05-25 16:05 PDT
,
Tony Chang
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Tony Chang
Comment 1
2012-05-25 14:48:15 PDT
Created
attachment 144151
[details]
Patch
Tony Chang
Comment 2
2012-05-25 14:48:44 PDT
The spec reflects this change as well.
Tony Chang
Comment 3
2012-05-25 14:51:51 PDT
Comment on
attachment 144151
[details]
Patch Actually, I can overflow and get into an infinite loop. Let me fix that first.
Tony Chang
Comment 4
2012-05-25 15:53:58 PDT
Created
attachment 144161
[details]
Patch
Ojan Vafai
Comment 5
2012-05-25 16:03:14 PDT
Comment on
attachment 144161
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=144161&action=review
> Source/WebCore/rendering/RenderFlexibleBox.cpp:876 > + if (availableFreeSpace > 0 && totalPositiveFlexibility > 0 && flexSign == PositiveFlexibility && isfinite(totalPositiveFlexibility)) > childSize += lroundf(availableFreeSpace * child->style()->positiveFlex() / totalPositiveFlexibility); > - else if (availableFreeSpace < 0 && totalNegativeFlexibility > 0 && flexSign == NegativeFlexibility) > - childSize += lroundf(availableFreeSpace * child->style()->negativeFlex() / totalNegativeFlexibility); > + else if (availableFreeSpace < 0 && totalWeightedNegativeFlexibility > 0 && flexSign == NegativeFlexibility && isfinite(totalWeightedNegativeFlexibility))
Might want to mention this isfinite check in the ChangeLog description.
Tony Chang
Comment 6
2012-05-25 16:05:29 PDT
Created
attachment 144164
[details]
Patch for landing
WebKit Review Bot
Comment 7
2012-05-25 19:07:34 PDT
Comment on
attachment 144164
[details]
Patch for landing Clearing flags on attachment: 144164 Committed
r118600
: <
http://trac.webkit.org/changeset/118600
>
WebKit Review Bot
Comment 8
2012-05-25 19:07:44 PDT
All reviewed patches have been landed. Closing bug.
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