On 2/16/14 7:15 PM, Pradeep Kumar S wrote:
Hi everyone,
Just wanted to weigh in about the algorithm mentioned by Boris and Patrick
above:
I think it won't work for calculating height for absolutely positioned elements because
we aren't calculating the static position y-coordinate anywhere. This needs to be done by
adding up the heights of all the "frames" between the hypothetical box and the
actual Containing Block.
The dependency is like
(assign-height for in-flow frames) ->
(calculate static position y-coordinate for hypothetical boxes) ->
(assign-height for absolutely positioned elements) ->
(send back overflow from absolutely positioned elements)
This seems to suggest that we need some sort of a traversal after the normal
assign-heights traversal.
Yes, that's true. Good point.
> + (2) Traverse back to the containing block from each hypothetical
frame to calculate the static position y-coordinate
An alternative would be to bubble up y coordinates of hypothetical
frames during assign-heights. (We could just keep a count of absolute
children during flow construction and preallocate those slots at that
time.) That would potentially be better on the CPU cache because it
avoids a separate sequential traversal but might be slower during style
recalc due to having larger flows.
> What do you think?
Sounds good, thanks for bringing it up!
Patrick
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo