| Summary: | [CSSRegions] Children of inline-block content-node are not displayed in regions | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Mihnea Ovidenie <mihnea> | ||||||||
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | WebkitBugTracker | ||||||||
| Priority: | P2 | ||||||||||
| Version: | 528+ (Nightly build) | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Bug Depends on: | 130229, 130249, 130392 | ||||||||||
| Bug Blocks: | 57312 | ||||||||||
| Attachments: |
|
||||||||||
Created attachment 225449 [details]
WIP1
Created attachment 226092 [details]
WIP2
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
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. Landed the patches containing the split work. |
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.