Summary: | Implement new flex property and deprecate flex function | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | niclas | ||||||
Component: | CSS | Assignee: | Tony Chang <tony> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | niclas, ojan, tony, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Bug Depends on: | 82927 | ||||||||
Bug Blocks: | 62048 | ||||||||
Attachments: |
|
Description
niclas
2012-03-24 10:09:46 PDT
Created attachment 135412 [details]
Patch
The code change was surprisingly small. I left the old css parsing in this change. I'll remove it separately. Comment on attachment 135412 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=135412&action=review > Source/WebCore/rendering/RenderFlexibleBox.cpp:348 > +Length RenderFlexibleBox::preferredFlexLengthForChild(RenderBox* child) const Not a huge fan of this name. I feel like it could easily be confused with the length after we've done the flex algorithm. How about mainAxisPreferredLengthForChild? > Source/WebCore/rendering/RenderFlexibleBox.cpp:650 > float RenderFlexibleBox::positiveFlexForChild(RenderBox* child) const > { > - return isHorizontalFlow() ? child->style()->flexboxWidthPositiveFlex() : child->style()->flexboxHeightPositiveFlex(); > + return child->style()->positiveFlex(); > } > > float RenderFlexibleBox::negativeFlexForChild(RenderBox* child) const > { > - return isHorizontalFlow() ? child->style()->flexboxWidthNegativeFlex() : child->style()->flexboxHeightNegativeFlex(); > + return child->style()->negativeFlex(); > } Don't necessarily need to do it in this patch, but these helper functions don't seem terribly useful to me. Created attachment 135419 [details]
Patch for landing
(In reply to comment #3) > (From update of attachment 135412 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=135412&action=review > > > Source/WebCore/rendering/RenderFlexibleBox.cpp:348 > > +Length RenderFlexibleBox::preferredFlexLengthForChild(RenderBox* child) const > > Not a huge fan of this name. I feel like it could easily be confused with the length after we've done the flex algorithm. How about mainAxisPreferredLengthForChild? Renamed to preferredLengthForChild. > > Source/WebCore/rendering/RenderFlexibleBox.cpp:650 > > float RenderFlexibleBox::positiveFlexForChild(RenderBox* child) const > > { > > - return isHorizontalFlow() ? child->style()->flexboxWidthPositiveFlex() : child->style()->flexboxHeightPositiveFlex(); > > + return child->style()->positiveFlex(); > > } > > > > float RenderFlexibleBox::negativeFlexForChild(RenderBox* child) const > > { > > - return isHorizontalFlow() ? child->style()->flexboxWidthNegativeFlex() : child->style()->flexboxHeightNegativeFlex(); > > + return child->style()->negativeFlex(); > > } > > Don't necessarily need to do it in this patch, but these helper functions don't seem terribly useful to me. Inlined. Comment on attachment 135419 [details] Patch for landing Clearing flags on attachment: 135419 Committed r113097: <http://trac.webkit.org/changeset/113097> All reviewed patches have been landed. Closing bug. |