Summary: | New flexboxes don't split into columns | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ojan Vafai <ojan> |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW --- | ||
Severity: | Normal | CC: | hyatt, tony |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | |||
Bug Blocks: | 62048 |
Description
Ojan Vafai
2012-02-13 18:43:15 PST
As well as: RenderBlock* RenderBlock::createAnonymousBlock(bool isFlexibleBox) const { RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(style()); RenderBlock* newBox = 0; if (isFlexibleBox) { newStyle->setDisplay(BOX); newBox = new (renderArena()) RenderDeprecatedFlexibleBox(document() /* anonymous box */); } else { newStyle->setDisplay(BLOCK); newBox = new (renderArena()) RenderBlock(document() /* anonymous box */); } newBox->setStyle(newStyle.release()); return newBox; } And to round out the trio, RenderObject.h: bool isAnonymousBlock() const { // This function is kept in sync with anonymous block creation conditions in // RenderBlock::createAnonymousBlock(). This includes creating an anonymous // RenderBlock having a BLOCK or BOX display. Other classes such as RenderTextFragment // are not RenderBlocks and will return false. See https://bugs.webkit.org/show_bug.cgi?id=56709. return isAnonymous() && (style()->display() == BLOCK || style()->display() == BOX) && style()->styleType() == NOPSEUDO && isRenderBlock() && !isListMarker() #if ENABLE(FULLSCREEN_API) && !isRenderFullScreen() && !isRenderFullScreenPlaceholder() #endif ; } We need createAnonymousBlock to create a RenderFlexibleBox when splitting flexboxes. This will get new flexboxes to match the old ones. Old flexboxes are all sorts of buggy in multi-column though. |