Summary: | in a column flexbox, input overflows the box when stretched | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tony Chang <tony> | ||||||||
Component: | Layout and Rendering | Assignee: | Tony Chang <tony> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | eric, ojan, webkit.review.bot | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
URL: | http://plexode.com/eval3/#ht=%3Cdiv%20style%3D%22display%3A%20-webkit-flex%3B%20-webkit-flex-direction%3A%20column%3B%20background-color%3A%20grey%3B%20width%3A%20200px%22%3E%0A%20%3Cinput%3E%0A%3C%2Fdiv%3E%0A | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 62048 | ||||||||||
Attachments: |
|
Description
Tony Chang
2012-10-14 13:17:01 PDT
Created attachment 168796 [details]
Patch
Comment on attachment 168796 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=168796&action=review > Source/WebCore/ChangeLog:15 > + (WebCore): Please omit lines like this even when the script generates them. > Source/WebCore/rendering/RenderBox.cpp:1775 > +static bool stretchingVerticalFlexboxChild(const RenderObject* child) This function name sounds like a function that returns the “stretching vertical flexbox child”. Probably best to add the word “is” or “should” to the name to disambiguate. > Source/WebCore/rendering/RenderBox.cpp:1783 > + if (parent->isFlexibleBox() && parent->style()->flexWrap() == FlexWrapNone && parent->style()->isColumnFlexDirection() > + && (child->style()->alignSelf() == AlignStretch || (child->style()->alignSelf() == AlignAuto && parent->style()->alignItems() == AlignStretch))) > + return true; I think this could use a comment to explain why this is the correct set of checks. And maybe even some helper functions. Created attachment 168972 [details]
Patch
Comment on attachment 168972 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=168972&action=review > Source/WebCore/rendering/RenderBox.cpp:1775 > +static bool flexboxChildHasStretchAlignment(const RenderObject* child) Naming nit: how about flexItemHasStretchAlignment? > Source/WebCore/rendering/RenderBox.cpp:1781 > +static bool isStretchingVerticalFlexboxChild(const RenderObject* child) Naming nit: isStretchingColumnFlexItem > Source/WebCore/rendering/RenderBox.cpp:1822 > if (!parent()->style()->isColumnFlexDirection() || parent()->style()->flexWrap() != FlexWrapNone) If you added isFlexboxRowOrMultiline(parent), then you could use it here and in isStretchingVerticalFlexboxChild. I think it would make the code a bit more readable. Created attachment 168984 [details]
Patch for landing
Comment on attachment 168984 [details] Patch for landing Clearing flags on attachment: 168984 Committed r131481: <http://trac.webkit.org/changeset/131481> All reviewed patches have been landed. Closing bug. |