Bug 130392 - [CSSRegions] Compute region ranges for children of inline blocks
Summary: [CSSRegions] Compute region ranges for children of inline blocks
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 129478
  Show dependency treegraph
 
Reported: 2014-03-18 05:47 PDT by Mihnea Ovidenie
Modified: 2014-03-19 05:42 PDT (History)
5 users (show)

See Also:


Attachments
Patch (43.32 KB, patch)
2014-03-18 06:19 PDT, Mihnea Ovidenie
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.