Summary: | Flex item auto margins in the cross direction should safe center | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tony Chang <tony> | ||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | cgarcia, 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%20width%3A%20100px%3B%20height%3A%20100px%3B%20background-color%3A%20grey%3B%22%3E%0A%20%20%3Cdiv%20style%3D%22background-color%3A%20green%3B%20height%3A%20200px%3B%20width%3A%2020px%3B%20margin%3A%20auto%22%3E%3C%2Fdiv%3E%0A%3C%2Fdiv%3E | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 62048 | ||||||
Attachments: |
|
Description
Tony Chang
2012-12-03 13:08:29 PST
This would be a pretty easy bug to fix. Created attachment 177488 [details]
Patch
Comment on attachment 177488 [details]
Patch
Can you also add asserts in updateAutoMarginsInCrossAxis and updateAutoMarginsInMainAxis that the LayoutUnit passed in is >= 0?
Comment on attachment 177488 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=177488&action=review > LayoutTests/css3/flexbox/flex-flow-auto-margins-no-available-space.html:4 > +<style> > +body { Please use resources/flexbox.css and the styles defined there when possible. This makes the tests runnable in Firefox and makes it easy to add other vendor prefixes to the tests. Comment on attachment 177488 [details] Patch Committed r136660: <http://trac.webkit.org/changeset/136660> |