Bug 88366 - Changing flexbox justify/alignment doesn't update their positioning
Summary: Changing flexbox justify/alignment doesn't update their positioning
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tony Chang
Depends on:
Blocks: 62048
  Show dependency treegraph
Reported: 2012-06-05 14:57 PDT by Eric
Modified: 2012-06-05 23:45 PDT (History)
4 users (show)

See Also:

Test case (1.18 KB, text/html)
2012-06-05 14:59 PDT, Eric
no flags Details
Patch (5.45 KB, patch)
2012-06-05 17:35 PDT, Tony Chang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric 2012-06-05 14:57:15 PDT
The attached test case demonstrates this. The buttons update the justify/alignment properties
of the flex container, but the items are not repositioned correctly. Toggling off the original
style set on the flex contain (via the inspector) works. It appears a repaint is happening.

I'm on 536.5 (@118056)
Comment 1 Eric 2012-06-05 14:59:46 PDT
Created attachment 145875 [details]
Test case
Comment 2 Tony Chang 2012-06-05 15:10:28 PDT
I don't have time to investigate this right now, but I suspect that the bug is that in RenderStyle::diff, we don't compare the new values on rareNonInheritedData.

Previously, we would compare rareNonInheritedData->m_flexibleBox against each other, but moving the values to rareNonInheritedData doesn't automatically do this.  Once we realize that the style has changed, we'll probably re-layout properly.

The fix is probably around line RenderStyle.cpp:376.
Comment 3 Tony Chang 2012-06-05 17:35:03 PDT
Created attachment 145903 [details]
Comment 4 Tony Chang 2012-06-05 17:35:27 PDT
I wasn't making progress on my other bug, so I decided to fix this :)
Comment 5 WebKit Review Bot 2012-06-05 23:45:40 PDT
Comment on attachment 145903 [details]

Clearing flags on attachment: 145903

Committed r119564: <http://trac.webkit.org/changeset/119564>
Comment 6 WebKit Review Bot 2012-06-05 23:45:50 PDT
All reviewed patches have been landed.  Closing bug.