Bug 130392

Summary: [CSSRegions] Compute region ranges for children of inline blocks
Product: WebKit Reporter: Mihnea Ovidenie <mihnea>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, kondapallykalyan, WebkitBugTracker
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 129478    
Attachments:
Description Flags
Patch none

Description Mihnea Ovidenie 2014-03-18 05:47:28 PDT
Extend region range computation also for children of inline blocks.
Comment 1 Mihnea Ovidenie 2014-03-18 06:19:27 PDT
Created attachment 227044 [details]
Patch
Comment 2 Andrei Bucur 2014-03-18 06:41:01 PDT
Comment on attachment 227044 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=227044&action=review

> Source/WebCore/rendering/RenderFlowThread.cpp:801
> +            endRegion = startRegion;

An unsplittable box should always have startRegion == endRegion. Shouldn't this line be an assertion instead?

> Source/WebCore/rendering/RenderObject.cpp:529
> +    if (flowThread && (flowThreadState() == flowThread->flowThreadState()))

What's this change for?
Comment 3 Mihnea Ovidenie 2014-03-19 01:18:56 PDT
Comment on attachment 227044 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=227044&action=review

>> Source/WebCore/rendering/RenderFlowThread.cpp:801
>> +            endRegion = startRegion;
> 
> An unsplittable box should always have startRegion == endRegion. Shouldn't this line be an assertion instead?

Yes, you are right :)

>> Source/WebCore/rendering/RenderObject.cpp:529
>> +    if (flowThread && (flowThreadState() == flowThread->flowThreadState()))
> 
> What's this change for?

Assume you have a region-based multicolumn flow thread inside a named flow and you have the multi-column flow thread set as the current flow thread. Now suppose you want to compute borderBoxRectInRegion for the multicolumnflowthread and the region being the rendermulticolumnset. When you ask for containingBlock renderBoxRegionInfo, you go out of rendermulticolumnthread boundary and for these boxes, flowThreadContainingBlock() will return the wrong result.

There are some possible solutions to this problem:
* the check above, which ensures that when you are in the middle of layout and you cross the flow thread boundary, you still get the right result
* add a check in RenderBox::renderBoxRegionInfo so that we return 0 if the flowThreadContainingBlock flowThreadState is different than the box flowThreadState
Comment 4 Andrei Bucur 2014-03-19 04:47:10 PDT
Comment on attachment 227044 [details]
Patch

r=me
Comment 5 WebKit Commit Bot 2014-03-19 05:39:19 PDT
Comment on attachment 227044 [details]
Patch

Clearing flags on attachment: 227044

Committed r165890: <http://trac.webkit.org/changeset/165890>
Comment 6 WebKit Commit Bot 2014-03-19 05:42:26 PDT
All reviewed patches have been landed.  Closing bug.