Bug 103919 - Flex item auto margins in the cross direction should safe center
Summary: Flex item auto margins in the cross direction should safe center
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://plexode.com/eval3/#ht=%3Cdiv%2...
Keywords:
Depends on:
Blocks: 62048
  Show dependency treegraph
 
Reported: 2012-12-03 13:08 PST by Tony Chang
Modified: 2012-12-05 02:26 PST (History)
4 users (show)

See Also:


Attachments
Patch (4.38 KB, patch)
2012-12-04 08:24 PST, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Chang 2012-12-03 13:08:29 PST
See example in the URL.  setting the margin to auto shouldn't overflow out the top of the flexbox.
Comment 1 Tony Chang 2012-12-03 13:08:47 PST
This would be a pretty easy bug to fix.
Comment 2 Carlos Garcia Campos 2012-12-04 08:24:00 PST
Created attachment 177488 [details]
Patch
Comment 3 Ojan Vafai 2012-12-04 09:52:21 PST
Comment on attachment 177488 [details]
Patch

Can you also add asserts in updateAutoMarginsInCrossAxis and updateAutoMarginsInMainAxis that the LayoutUnit passed in is >= 0?
Comment 4 Tony Chang 2012-12-04 13:40:58 PST
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 5 Carlos Garcia Campos 2012-12-05 02:26:43 PST
Comment on attachment 177488 [details]
Patch

Committed r136660: <http://trac.webkit.org/changeset/136660>