[dev-servo] Intrinsic sizing of orthogonal flows and parallel layout

2014-10-27 Thread Simon Sapin
So far, Servo’s layout implementation is divided into three parallel 
tree traversals: intrinsic inline-size calculation (bottom up), used 
inline-size assignment (top down) and block-size assignment (bottom up). 
Each traversal only depends on results from the previous one.


(Inline-size and block-size and width and height respectively in 
horizontal text such as English.)


Now that we’re adding CSS Writing Modes, there is a problem with 
orthogonal flows (vertical text where the parent is horizontal, or the 
other way around.) Normally the intrinsic inline-size of a block is 
based on the intrinsic inline-size of its children. But if one of the 
children is an orthogonal flow, it’s based on that child’s intrinsic 
block-size instead.


Now, the details of intrinsic block-size are not that well-defined in 
the spec [1] right now, but it probably involves doing actual layout all 
the way through, with a couple of different available inline sizes.


[1] http://dev.w3.org/csswg/css-sizing/#block-intrinsic

This means using results (for a subtree) of our third traversal in the 
first traversal. Can we do that without compromising parallel layout?


--
Simon Sapin
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Intrinsic sizing of orthogonal flows and parallel layout

2014-10-27 Thread Patrick Walton

On 10/27/14 9:11 PM, Simon Sapin wrote:

This means using results (for a subtree) of our third traversal in the
first traversal. Can we do that without compromising parallel layout?


Not really (at least, not easily), but if it's just for a rare case 
involving mixed-writing-mode documents, I'm happy with detecting that 
case and falling back to a second sequential traversal. (This is no 
worse than floats, and probably several orders of magnitude rarer.)


Patrick

___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo