[Webkit-unassigned] [Bug 66143] [CSSRegions] RenderFlowThread layout should use the attached region sizes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 22 12:29:46 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=66143





--- Comment #4 from Chiculita Alexandru <achicu at adobe.com>  2011-08-22 12:29:46 PST ---
(In reply to comment #3)
> (From update of attachment 104660 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=104660&action=review

> Pull view() into a local since it's being accessed three times here in quick succession.

Ok.

> Pull this into a helper function. Even a little static function would be nice.

Ok.

> I'm not sure if there's any compelling logic behind picking the right side to shrink or if you just made an arbitrary call. 

I was thinking that regions stay on the left, and I would need to adjust just the right edge.

> It's cool that this gets lines working, but we know long-term that this solution isn't going to work for block splitting. I guess it's better than nothing though.

For blocks, I think two passes will be necessary. One with the region width size + region styling applied, and if the block fits inside a single region we're done, if not do a second pass with the maximum region width. I'm not sure how would that work with incremental layout.

> 
> > Source/WebCore/rendering/RenderFlowThread.cpp:466
> > +    // FIXME: The regions are always in order, optimize this search.
> 
> Interval tree might work here right?
Can that be in a separate bug? I'm sure a simple binary search will do here, because the regions are always in order and never overlapping. Just that we now have a linked list and it would be slow to search the middle region.

> This isn't a "logicalTop" really. It's just a position that is examined. I'd rename "logicalTop" to "position" since that matches the other "ForLine" methods in RenderBlock.

Ok.

> Can you go from valid to invalid? If so, then you would need an invalidate for that also. I'm thinking you probably can't, but I figured I'd double-check. I'm assuming going from valid to invalid can only happen across a reconstruction of the RenderObject.

No, there should be no way to get from valid to invalid. The state is required for regions that are invalid when first added. At a later time other regions may be removed meaning that some of the invalid regions may become valid. That's why we need to keep track of invalid regions. Once valid a region cannot go back. A visible issue of this approach might be that one could remove a valid region and reverse the dependencies. When the same region is added back, this time it becomes invalid.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list