RESOLVED FIXED Bug 129478
[CSSRegions] Children of inline-block content-node are not displayed in regions
https://bugs.webkit.org/show_bug.cgi?id=129478
Summary [CSSRegions] Children of inline-block content-node are not displayed in regions
Mihnea Ovidenie
Reported 2014-02-28 02:19:28 PST
In the following situation, #div2 is not displayed at all and it should be. <html> <head> <style> #region1 { -webkit-flow-from: flow; position: absolute; top: 100px; left: 100px; width: 100px; height: 100px; border: 5px solid black; } #region2 { -webkit-flow-from: flow; position: absolute; top: 100px; left: 300px; width: 100px; height: 100px; border: 5px solid black; } #content1 { -webkit-flow-into: flow; display: inline-block; } #div1, #div2 { width: 100px; height: 100px; } #div1 { background-color: salmon; } #div2 { background-color: orange; } </style> </head> <body> <div id="region1"></div> <div id="region2"></div> <div id="content1"> <div id="div1"></div> <div id="div2"></div> </div> </body> </html> We have to fix region ranges computation for inline-blocks and their children too.
Attachments
WIP1 (29.24 KB, patch)
2014-02-28 02:20 PST, Mihnea Ovidenie
no flags
WIP2 (34.82 KB, patch)
2014-03-07 00:42 PST, Mihnea Ovidenie
no flags
Patch 3 (35.79 KB, patch)
2014-03-11 08:07 PDT, Mihnea Ovidenie
no flags
Mihnea Ovidenie
Comment 1 2014-02-28 02:20:10 PST
Mihnea Ovidenie
Comment 2 2014-03-07 00:42:40 PST
Mihnea Ovidenie
Comment 3 2014-03-11 08:07:02 PDT
Created attachment 226427 [details] Patch 3 WIP3: * for a box in block flow, attempts to compute the range only if the parent has a computed region range * modified getRegionRangeForBox to return false if the region range was not cached - either in region range map or stored in a corresponding RootInlineBox. If unable to retrieve the range from the cached information, try to see if the box has a parent that is unsplittable and try to get the first region from that parent range * modified RenderObject::locateFlowThreadContainingBlock to check the flowThreadState of the object and the flow on the stack, in those cases in which we have a multi-column element inside a named flow and locateFlowThreadContainingBlock would return the multicolumn-flowthread for elements outside the multicolumn-flowthread
Andrei Bucur
Comment 4 2014-03-11 09:08:56 PDT
Comment on attachment 226427 [details] Patch 3 View in context: https://bugs.webkit.org/attachment.cgi?id=226427&action=review > Source/WebCore/rendering/RenderBoxModelObject.h:-183 > - bool canHaveBoxInfoInRegion() const { return !isFloating() && !isReplaced() && !isInline() && !hasColumns() && !isTableCell() && isRenderBlock() && !isRenderSVGBlock(); } I don't think we want to remove the isInline check. We just want to allow inline blocks. Maybe isInlineBlockOrInlineTable is good enough? > Source/WebCore/rendering/RenderFlowThread.cpp:594 > + for (auto& region : m_regionList) Why have you changed this code? There shouldn't be any region box info outside the range. If there is, we can catch it with the assert later on. > Source/WebCore/rendering/RenderFlowThread.cpp:790 > + } while (!cb->isRenderFlowThread()); This is correct but I think we can stop earlier, at the first line with a containing region. However, I like this more for the sake of simplicity.
Mihnea Ovidenie
Comment 5 2014-03-19 23:06:26 PDT
Landed the patches containing the split work.
Note You need to log in before you can comment on or make changes to this bug.